An integrated and scalable library for Deepfake detection research.
PyDeepFakeDet is an integrated and scalable Deepfake detection tool developed by Fudan Vision and Learning Lab. The goal is to provide state-of-the-art Deepfake detection Models as well as interfaces for the training and evaluation of new Models on commonly used Deepfake datasets.
This repository includes implementations of both CNN-based and Transformer-based methods:
-
CNN Models
-
Transformer Models
The baseline Models on three versions of FF-DF dataset are provided.
Method | RAW | C23 | C40 | Model |
---|---|---|---|---|
ResNet50 | 97.61 | 94.87 | 84.95 | RAW / C23 / C40 |
Xception | 97.84 | 95.24 | 86.27 | RAW / C23 / C40 |
EfficientNet-b4 | 97.89 | 95.61 | 87.12 | RAW / C23 / C40 |
Meso4 | 85.14 | 77.14 | 60.13 | RAW / C23 / C40 |
MesoInception4 | 95.45 | 84.13 | 71.31 | RAW / C23 / C40 |
GramNet | 97.65 | 95.16 | 86.21 | RAW / C23 / C40 |
F3Net | 99.95 | 97.52 | 90.43 | RAW / C23 / C40 |
MAT | 97.90 | 95.59 | 87.06 | RAW / C23 / C40 |
ViT | 96.72 | 93.45 | 82.97 | RAW / C23 / C40 |
M2TR | 99.50 | 97.93 | 92.89 | RAW / C23 / C40 |
The baseline Models on Celeb-DF is also available.
Method | Celeb-DF | Model |
---|---|---|
ResNet50 | 98.51 | CelebDF |
Xception | 99.05 | CelebDF |
EfficientNet-b4 | 99.44 | CelebDF |
Meso4 | 73.04 | CelebDF |
MesoInception4 | 75.87 | CelebDF |
GramNet | 98.67 | CelebDF |
F3Net | 96.47 | CelebDF |
MAT | 99.02 | CelebDF |
ViT | 96.73 | CelebDF |
M2TR | 99.76 | CelebDF |
-
We use Python == 3.9.0, torch==1.11.0, torchvision==1.12.0.
-
Install the required packages by:
pip install -r requirements.txt
Please follow the instructions in DATASET.md to prepare the data.
Specify the path of your local dataset in ./configs/resnet50.yaml
, and then run:
python run.py --cfg resnet50.yaml
Please refer to VISUALIZE.md for detailed instructions.
PyDeepFakeDet is written and maintained by Wenhao Ouyang, Chao Zhang, Zhenxin Li, and Junke Wang.
PyDeepFakeDet is released under the MIT license.
@inproceedings{wang2021m2tr,
title={M2TR: Multi-modal Multi-scale Transformers for Deepfake Detection},
author={Wang, Junke and Wu, Zuxuan and Ouyang, Wenhao and Han, Xintong and Chen, Jingjing and Lim, Ser-Nam and Jiang, Yu-Gang},
booktitle={ICMR},
year={2022}
}