Awesome
DeepFakeFace
Code accompanying the paper "Robustness and Generalizability of Deepfake Detection: A Study with Diffusion Models". [Website] [paper] [HuggingFace Dataset].
Introduction
Welcome to the DeepFakeFace (DFF) repository! Here we present a meticulously curated collection of artificial celebrity faces, crafted using cutting-edge diffusion models. Our aim is to tackle the rising challenge posed by deepfakes in today's digital landscape.
Our dataset can be downloaded from HuggingFace. Here are some example images in our dataset:
<div align="center"> <img width="100%" height="auto" src="docs/images/deepfake_examples.jpg"> </div>DeepFake Dataset Compare
We compare our dataset with previous datasets here:
<div align="center"> <img width="100%" height="auto" src="docs/images/compare.jpg"> </div>Installation
Diffusers, Pytorch, InsightFace
Generate mask images required for deepfakes generated by Stabel Diffusion Inpainting
process.py generates corresponding mask images according to the label file of wiki. The mask images can also be generated by other SOTA face detection methods such as RetinaFace.
python process.py
Generate deepfake by Stable Diffusion V1.5
python generate_text2img.py
Generate deepfake by Stable Diffusion Inpainting
python generate_inpainting.py
Generate deepfake by InsightFace
InsightFace is a powerful toolbox for swapping faces.
python generate_insight.py
Evaluation
We emplot SOTA detection method RECCE to detect deepfakes. As for distortion, we apply the same setting with DeeperForensics to evaluate the robustness of detection methods.
python add_distortion.py
Experimental Results
Performance of RECCE across different generators, measured in terms of Acc (%), AUC (%), and EER (%):
<div align="center"> <img width="78%" height="auto" src="docs/images/table1.jpg"> </div>Robustness evaluation in terms of ACC(%), AUC (%) and EER(%):
<div align="center"> <img width="100%" height="auto" src="docs/images/table2.jpg"> </div>Cite
Please cite our paper if you use our codes or our dataset in your own work:
@misc{song2023robustness,
title={Robustness and Generalizability of Deepfake Detection: A Study with Diffusion Models},
author={Haixu Song and Shiyu Huang and Yinpeng Dong and Wei-Wei Tu},
year={2023},
eprint={2309.02218},
archivePrefix={arXiv},
primaryClass={cs.CV}
}