Home

Awesome

Implicit Identity Leakage: The Stumbling Block to Improving Deepfake Detection Generalization

This repo includes the authors' Pytorch implementation of the paper:

Implicit Identity Leakage: The Stumbling Block to Improving Deepfake Detection Generalization

Computer Vision and Pattern Recognition (CVPR) 2023

[arxiv]

Introduction

In this work, we take a deep look into the generalization ability of binary classifiers for the task of deepfake detection. Specifically,

Updates

Dependencies

Data Preparation

Take FF++ as an example:
  1. Download the dataset from FF++ and put them under the ./data.
.
└── data
    └── FaceForensics++
        ├── original_sequences
        │   └── youtube
        │       └── raw
        │           └── videos
        │               └── *.mp4
        ├── manipulated_sequences
        │   ├── Deepfakes
        │       └── raw
        │           └── videos
        │               └── *.mp4
        │   ├── Face2Face
        │		...
        │   ├── FaceSwap
        │		...
        │   ├── NeuralTextures
        │		...
        │   ├── FaceShifter
        │		...
  1. Download the landmark detector from here and put it in the folder ./lib.

  2. Run the code to extract frames from FF++ videos and save them under the ./train_images or ./test_images based on the division in the original dataset.

     python3 lib/extract_frames_ldm_ff++.py
    

Pretrained weights

You can download pretrained weights here.

Evaluations

To evaluate the model performance, please run:

python3 test.py   --cfg ./configs/caddm_test.cfg

Results

Our model achieved the following performance on:

Training DataBackboneFF++Celeb-DFDFDC
FF++ResNet-3499.70%91.15%71.49%
FF++EfficientNet-b399.78%93.08%73.34%
FF++EfficientNet-b499.79%93.88%73.85%

Note: the metric is video-level AUC.

Training

To train our model from scratch, please run :

python3  train.py --cfg ./configs/caddm_train.cfg

Citation

Coming soon

Acknowledgements

Contact

If you have any questions, please feel free to contact us via jirenhe@megvii.com.