Skip to content

AI-ron-Man/Community-Forensics

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Community Forensics:
Using Thousands of Generators to Train Fake Image Detectors

Repository for Community Forensics: Using Thousands of Generators to Train Fake Image Detectors.
(Project page)

Currently, we release a simple evaluation pipeline that outputs a probability of an input image being generated.

Usage example

  1. Download the checkpoints. Link (Dropbox)
  2. Install the required libraries -- torch, torchvision, pillow, timm
    • pip install -r requirements.txt
  3. Run the evaluation pipeline.
    • If evaluating a single file:
      • python main.py --input_path="test_image.jpeg" --output_path="./results_dir" --device="cuda" --checkpoint_path="pretrained_weights/model_v11_ViT_384_base_ckpt.pt"
    • If evaluating a folder:
      • python main.py --input_path="./path_to_test_images" --output_path="./results_dir" --device="cuda" --checkpoint_path="pretrained_weights/model_v11_ViT_384_base_ckpt.pt"
  4. Check the .json files containing the results under the output path designated by --output_path argument.

Citation

@misc{park2024communityforensics,
    title={Community Forensics: Using Thousands of Generators to Train Fake Image Detectors}, 
    author={Jeongsoo Park and Andrew Owens},
    year={2024},
    eprint={2411.04125},
    archivePrefix={arXiv},
    primaryClass={cs.CV},
    url={https://arxiv.org/abs/2411.04125}, 
}

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%