Rethinking the Up-Sampling Operations in CNN-based Generative Network for Generalizable Deepfake Detection
Beijing Jiaotong University, YanShan University, A*Star
Reference github repository for the paper Rethinking the Up-Sampling Operations in CNN-based Generative Network for Generalizable Deepfake Detection.
@misc{tan2023rethinking,
title={Rethinking the Up-Sampling Operations in CNN-based Generative Network for Generalizable Deepfake Detection},
author={Chuangchuang Tan and Huan Liu and Yao Zhao and Shikui Wei and Guanghua Gu and Ping Liu and Yunchao Wei},
year={2023},
eprint={2312.10461},
archivePrefix={arXiv},
primaryClass={cs.CV}
}
2024/02
: NPR is accepted by CVPR 2024! Congratulations and thanks to my all co-authors!
Classification environment: We recommend installing the required packages by running the command:
pip install -r requirements.txt
Download dataset from CNNDetection CVPR2020, UniversalFakeDetect CVPR2023 (googledrive), DIRE 2023CVPR (googledrive), GANGen-Detection (googledrive), Diffusion1kStep googledrive.
pip install gdown==4.7.1
chmod 777 ./download_dataset.sh
./download_dataset.sh
CUDA_VISIBLE_DEVICES=0 python train.py --name 4class-resnet-car-cat-chair-horse --dataroot {CNNDetection-Path} --classes car,cat,chair,horse --batch_size 32 --delr_freq 10 --lr 0.0002 --niter 50
Modify the dataroot in test.py.
CUDA_VISIBLE_DEVICES=0 python test.py --model_path ./NPR.pth -batch_size {BS}
This repository borrows partially from the CNNDetection.