{"id":17719865,"url":"https://github.com/yizhe-ang/fake-detection-lab","last_synced_at":"2026-02-23T08:34:16.527Z","repository":{"id":116895945,"uuid":"332461166","full_name":"yizhe-ang/fake-detection-lab","owner":"yizhe-ang","description":"Media Forensics / Fake Detection experiments in PyTorch. Implements Fighting Fake News: Image Splice Detection via Learned Self-Consistency","archived":false,"fork":false,"pushed_at":"2021-09-19T11:10:05.000Z","size":21779,"stargazers_count":16,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-03-06T10:07:54.739Z","etag":null,"topics":["adversarial-attacks","adversarial-machine-learning","deep-learning","deeplearning","fake-news-detection","machine-learning","pytorch"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yizhe-ang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-24T13:48:53.000Z","updated_at":"2023-01-08T15:28:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"4f758bab-0144-4a48-a3e9-4dc2d9fc7ca3","html_url":"https://github.com/yizhe-ang/fake-detection-lab","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/yizhe-ang/fake-detection-lab","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yizhe-ang%2Ffake-detection-lab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yizhe-ang%2Ffake-detection-lab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yizhe-ang%2Ffake-detection-lab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yizhe-ang%2Ffake-detection-lab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yizhe-ang","download_url":"https://codeload.github.com/yizhe-ang/fake-detection-lab/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yizhe-ang%2Ffake-detection-lab/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29740026,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-23T07:44:07.782Z","status":"ssl_error","status_checked_at":"2026-02-23T07:44:07.432Z","response_time":90,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adversarial-attacks","adversarial-machine-learning","deep-learning","deeplearning","fake-news-detection","machine-learning","pytorch"],"created_at":"2024-10-25T15:10:46.459Z","updated_at":"2026-02-23T08:34:16.496Z","avatar_url":"https://github.com/yizhe-ang.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fake-detection-lab\nMedia Forensics / Fake Image Detection experiments in PyTorch.\n\nProject report can be found [here](report.pdf).\n\n# Installation\nWe use `conda` for managing Python and CUDA versions, and `pip-tools` for managing Python package dependencies.\n1. Specify the appropriate `cudatoolkit` and `cudnn` versions to install on your machine in the `environment.yml` file.\n2. To create the `conda` environment, run: `conda env create`\n3. Activate the environment: `conda activate fake-detection-lab`\n4. Install all necessary packages: `pip-sync requirements/prod.txt`\n\n# Model Artifacts\nAll model artifacts can be accessed and downloaded [here](https://drive.google.com/drive/folders/1Qm1WUUithm0dE1qnJXGfoCbMG37jq3mW?usp=sharing).\n- `exif_sc.npy`: EXIF-SC model weights\n\n# Project Structure\n```\n├── artifacts\n│   └── exif_sc.npy      \u003c-- Store model weights here\n├── assets\n├── configs              \u003c-- Configuration files for scripts\n├── data\n│   ├── downloaded       \u003c-- To store downloaded data\n│   └── raw              \u003c-- Dataset metadata\n├── notebooks\n├── requirements\n├── src\n│   ├── attacks          \u003c-- Implementation of adversarial attacks\n│   ├── datasets         \u003c-- Data loading classes\n│   ├── evaluation       \u003c-- Evaluation classes and utilities\n│   ├── models           \u003c-- Implementation of detection models\n│   ├── trainers         \u003c-- Classes for model training\n│   ├── structures.py\n│   └── utils.py\n├── evaluate.py          \u003c-- Main entry point for evaluation\n├── non_adv_evaluate.py  \u003c-- Main entry point for evaluation\n├── train.py             \u003c-- Main entry point for training\n└── ...\n```\n\n# Usage\n\n## Training\n```\npython train.py \\\n    --config configs/train/exif_sc.yaml \\\n    --checkpoints_dir checkpoints \\\n    --gpu 0\n```\nRuns training on a dataset, based on the settings specified in the configuration file. Weights are saved as a torch `.ckpt` file in the specified directory.\n\nMore [info](src/trainers/README.md).\n\n## Evaluation\nMore info [here](src/models/exif_sc/README.md) and [here](src/attacks/README.md)\n### Without Adversarial Attack\n```\npython non_adv_evaluate.py \\\n    --config configs/evaluate/non_adv.yaml \\\n    --weights_path path/to/weights.{npy, ckpt}\n```\nRuns the evaluation on a dataset, based on the settings specified in the configuration file.\n\n### With Adversarial Attack\n```\npython evaluate.py \\\n    --config configs/evaluate/adv.yaml \\\n    --weights_path path/to/weights.{npy, ckpt}\n```\nRuns the evaluation on a clean dataset, and also on the dataset after it has been adversarially perturbed, based on the settings specified in the configuration file.\n\n# Datasets\nAll metadata for the datasets used can be found [here](data/raw).\n\n# Resources\n### Model Conversion\n- Microsoft's [MMdnn](https://github.com/microsoft/MMdnn)\n- [ONNX](https://github.com/onnx/onnx)\n\n### Survey Papers\n- Media Forensics and DeepFakes: an overview ([Luisa Verdoliva, 2020](https://arxiv.org/abs/2001.06564))\n- A Survey of Machine Learning Techniques in Adversarial Image Forensics ([Nowroozia et al., 2020](https://arxiv.org/abs/2010.09680))\n\n### Fake Detectors\n- Fighting Fake News: Image Splice Detection via Learned Self-Consistency ([Huh et al., ECCV 2018](https://minyoungg.github.io/selfconsistency/))\n\n### Adversarial Machine Learning\n- Adversarial Attack on Deep Learning-Based Splice Localization ([Rozsa et al., 2020](https://arxiv.org/abs/2004.08443))\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyizhe-ang%2Ffake-detection-lab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyizhe-ang%2Ffake-detection-lab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyizhe-ang%2Ffake-detection-lab/lists"}