├── .gitattributes ├── .gitignore ├── README.md ├── data ├── dataset_util.py ├── paired_dataset.py ├── processing │ ├── celebahq_crop.py │ ├── export_tfrecord_to_img.py │ ├── faceforensics_process_frames.py │ ├── glow_tf.py │ ├── pgan_tf.py │ └── sgan_tf.py ├── transforms.py └── unpaired_dataset.py ├── environment_basic.yml ├── environment_data.yml ├── img └── classifier.jpeg ├── models ├── __init__.py ├── base_model.py ├── basic_discriminator_model.py ├── networks │ ├── customnet.py │ ├── netutils.py │ ├── networks.py │ └── xception.py └── patch_discriminator_model.py ├── notebooks ├── histograms.ipynb ├── ipynb_drop_output.py ├── models ├── overlay_heatmap.ipynb ├── setup_notebooks.sh ├── tables.ipynb └── utils ├── options ├── base_options.py ├── test_options.py └── train_options.py ├── patches.py ├── resources ├── download_resources_basic.sh └── download_resources_data.sh ├── scripts ├── 00_data_processing_export_tfrecord_to_img.sh ├── 00_data_processing_faceforensics_aligned_frames.sh ├── 00_data_processing_sample_celebahq_models.sh ├── 00_data_processing_sample_ffhq_models.sh ├── 01_train_gan_xception_patches_invonly.sh ├── 01_train_gan_xception_patches_samplesonly.sh ├── 01_train_gan_xception_patches_winversion.sh ├── 01_train_gan_xception_patches_winversion_randcrop.sh ├── 01_train_gan_xception_patches_winversion_randresizecrop.sh ├── 02_train_faceforensics_DF_xception_patches_aligned.sh ├── 02_train_faceforensics_F2F_xception_patches_aligned.sh ├── 02_train_faceforensics_FS_xception_patches_aligned.sh ├── 02_train_faceforensics_NT_xception_patches_aligned.sh ├── 03_baseline_resnet_full.sh ├── 03_baseline_xception_full.sh ├── 03_train_resnet_block1.sh ├── 04_eval_checkpoint.sh ├── 04_eval_patches_faceforensics_DF.sh ├── 04_eval_patches_faceforensics_F2F.sh ├── 04_eval_patches_gen_models.sh ├── 04_eval_visualize_faceforensics_DF.sh ├── 04_eval_visualize_faceforensics_F2F.sh └── 04_eval_visualize_gen_models.sh ├── segmenter.py ├── test.py ├── test_runs.py ├── train.py └── utils ├── imutil.py ├── lightbox.html ├── logging.py ├── options.py ├── pbar.py ├── pidfile.py ├── renormalize.py ├── rfutil.py ├── show.py ├── tensorboard_utils.py ├── util.py └── visualizer.py /.gitattributes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/.gitattributes -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/.gitignore -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/README.md -------------------------------------------------------------------------------- /data/dataset_util.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/data/dataset_util.py -------------------------------------------------------------------------------- /data/paired_dataset.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/data/paired_dataset.py -------------------------------------------------------------------------------- /data/processing/celebahq_crop.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/data/processing/celebahq_crop.py -------------------------------------------------------------------------------- /data/processing/export_tfrecord_to_img.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/data/processing/export_tfrecord_to_img.py -------------------------------------------------------------------------------- /data/processing/faceforensics_process_frames.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/data/processing/faceforensics_process_frames.py -------------------------------------------------------------------------------- /data/processing/glow_tf.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/data/processing/glow_tf.py -------------------------------------------------------------------------------- /data/processing/pgan_tf.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/data/processing/pgan_tf.py -------------------------------------------------------------------------------- /data/processing/sgan_tf.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/data/processing/sgan_tf.py -------------------------------------------------------------------------------- /data/transforms.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/data/transforms.py -------------------------------------------------------------------------------- /data/unpaired_dataset.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/data/unpaired_dataset.py -------------------------------------------------------------------------------- /environment_basic.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/environment_basic.yml -------------------------------------------------------------------------------- /environment_data.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/environment_data.yml -------------------------------------------------------------------------------- /img/classifier.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/img/classifier.jpeg -------------------------------------------------------------------------------- /models/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/models/__init__.py -------------------------------------------------------------------------------- /models/base_model.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/models/base_model.py -------------------------------------------------------------------------------- /models/basic_discriminator_model.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/models/basic_discriminator_model.py -------------------------------------------------------------------------------- /models/networks/customnet.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/models/networks/customnet.py -------------------------------------------------------------------------------- /models/networks/netutils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/models/networks/netutils.py -------------------------------------------------------------------------------- /models/networks/networks.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/models/networks/networks.py -------------------------------------------------------------------------------- /models/networks/xception.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/models/networks/xception.py -------------------------------------------------------------------------------- /models/patch_discriminator_model.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/models/patch_discriminator_model.py -------------------------------------------------------------------------------- /notebooks/histograms.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/notebooks/histograms.ipynb -------------------------------------------------------------------------------- /notebooks/ipynb_drop_output.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/notebooks/ipynb_drop_output.py -------------------------------------------------------------------------------- /notebooks/models: -------------------------------------------------------------------------------- 1 | ../models/ -------------------------------------------------------------------------------- /notebooks/overlay_heatmap.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/notebooks/overlay_heatmap.ipynb -------------------------------------------------------------------------------- /notebooks/setup_notebooks.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/notebooks/setup_notebooks.sh -------------------------------------------------------------------------------- /notebooks/tables.ipynb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/notebooks/tables.ipynb -------------------------------------------------------------------------------- /notebooks/utils: -------------------------------------------------------------------------------- 1 | ../utils/ -------------------------------------------------------------------------------- /options/base_options.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/options/base_options.py -------------------------------------------------------------------------------- /options/test_options.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/options/test_options.py -------------------------------------------------------------------------------- /options/train_options.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/options/train_options.py -------------------------------------------------------------------------------- /patches.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/patches.py -------------------------------------------------------------------------------- /resources/download_resources_basic.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/resources/download_resources_basic.sh -------------------------------------------------------------------------------- /resources/download_resources_data.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/resources/download_resources_data.sh -------------------------------------------------------------------------------- /scripts/00_data_processing_export_tfrecord_to_img.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/scripts/00_data_processing_export_tfrecord_to_img.sh -------------------------------------------------------------------------------- /scripts/00_data_processing_faceforensics_aligned_frames.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/scripts/00_data_processing_faceforensics_aligned_frames.sh -------------------------------------------------------------------------------- /scripts/00_data_processing_sample_celebahq_models.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/scripts/00_data_processing_sample_celebahq_models.sh -------------------------------------------------------------------------------- /scripts/00_data_processing_sample_ffhq_models.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/scripts/00_data_processing_sample_ffhq_models.sh -------------------------------------------------------------------------------- /scripts/01_train_gan_xception_patches_invonly.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/scripts/01_train_gan_xception_patches_invonly.sh -------------------------------------------------------------------------------- /scripts/01_train_gan_xception_patches_samplesonly.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/scripts/01_train_gan_xception_patches_samplesonly.sh -------------------------------------------------------------------------------- /scripts/01_train_gan_xception_patches_winversion.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/scripts/01_train_gan_xception_patches_winversion.sh -------------------------------------------------------------------------------- /scripts/01_train_gan_xception_patches_winversion_randcrop.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/scripts/01_train_gan_xception_patches_winversion_randcrop.sh -------------------------------------------------------------------------------- /scripts/01_train_gan_xception_patches_winversion_randresizecrop.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/scripts/01_train_gan_xception_patches_winversion_randresizecrop.sh -------------------------------------------------------------------------------- /scripts/02_train_faceforensics_DF_xception_patches_aligned.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/scripts/02_train_faceforensics_DF_xception_patches_aligned.sh -------------------------------------------------------------------------------- /scripts/02_train_faceforensics_F2F_xception_patches_aligned.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/scripts/02_train_faceforensics_F2F_xception_patches_aligned.sh -------------------------------------------------------------------------------- /scripts/02_train_faceforensics_FS_xception_patches_aligned.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/scripts/02_train_faceforensics_FS_xception_patches_aligned.sh -------------------------------------------------------------------------------- /scripts/02_train_faceforensics_NT_xception_patches_aligned.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/scripts/02_train_faceforensics_NT_xception_patches_aligned.sh -------------------------------------------------------------------------------- /scripts/03_baseline_resnet_full.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/scripts/03_baseline_resnet_full.sh -------------------------------------------------------------------------------- /scripts/03_baseline_xception_full.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/scripts/03_baseline_xception_full.sh -------------------------------------------------------------------------------- /scripts/03_train_resnet_block1.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/scripts/03_train_resnet_block1.sh -------------------------------------------------------------------------------- /scripts/04_eval_checkpoint.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/scripts/04_eval_checkpoint.sh -------------------------------------------------------------------------------- /scripts/04_eval_patches_faceforensics_DF.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/scripts/04_eval_patches_faceforensics_DF.sh -------------------------------------------------------------------------------- /scripts/04_eval_patches_faceforensics_F2F.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/scripts/04_eval_patches_faceforensics_F2F.sh -------------------------------------------------------------------------------- /scripts/04_eval_patches_gen_models.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/scripts/04_eval_patches_gen_models.sh -------------------------------------------------------------------------------- /scripts/04_eval_visualize_faceforensics_DF.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/scripts/04_eval_visualize_faceforensics_DF.sh -------------------------------------------------------------------------------- /scripts/04_eval_visualize_faceforensics_F2F.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/scripts/04_eval_visualize_faceforensics_F2F.sh -------------------------------------------------------------------------------- /scripts/04_eval_visualize_gen_models.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/scripts/04_eval_visualize_gen_models.sh -------------------------------------------------------------------------------- /segmenter.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/segmenter.py -------------------------------------------------------------------------------- /test.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/test.py -------------------------------------------------------------------------------- /test_runs.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/test_runs.py -------------------------------------------------------------------------------- /train.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/train.py -------------------------------------------------------------------------------- /utils/imutil.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/utils/imutil.py -------------------------------------------------------------------------------- /utils/lightbox.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/utils/lightbox.html -------------------------------------------------------------------------------- /utils/logging.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/utils/logging.py -------------------------------------------------------------------------------- /utils/options.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/utils/options.py -------------------------------------------------------------------------------- /utils/pbar.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/utils/pbar.py -------------------------------------------------------------------------------- /utils/pidfile.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/utils/pidfile.py -------------------------------------------------------------------------------- /utils/renormalize.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/utils/renormalize.py -------------------------------------------------------------------------------- /utils/rfutil.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/utils/rfutil.py -------------------------------------------------------------------------------- /utils/show.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/utils/show.py -------------------------------------------------------------------------------- /utils/tensorboard_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/utils/tensorboard_utils.py -------------------------------------------------------------------------------- /utils/util.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/utils/util.py -------------------------------------------------------------------------------- /utils/visualizer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chail/patch-forensics/HEAD/utils/visualizer.py --------------------------------------------------------------------------------