Giter VIP home page Giter VIP logo

sladd's Introduction

Self-supervised Learning of Adversarial Example: Towards Good Generalizations for Deepfake Detection

This repository contains PyTorch implementation of the CVPR oral presentation paper:

Self-supervised Learning of Adversarial Example: Towards Good Generalizations for Deepfake Detection.

Liang Chen, Yong Zhang, Yibing Song, Lingqiao Liu, Jue Wang

The proposed method uses adversarial self-supervised training to improve the generability of current deepfake detectors. The pipeline is illustrated in the following figure:

IMG

Preparation

pacakges

Please refer to the requirements.txt for details.

pretrained weights

Download Xception pretrained weights and dlib landmark predictor and put them in the weights folder.

Datasets

training datasets

We use the FaceForensicsDataset (FF++) for training. Please go to their project page for downloading. For every video in FF++ dataset, we extract 270 frames for training, and 100 each for evaluation and testing rigously following their data splitting strategy. The data structure is like:

    SLADD project
    |---README.md
    |---...
    |---data
        |---FF
            |---image
                |---FF-DF
                    |---071_054 
                        |---0001.png  
                        |---...
                    |---...
                |---FF-F2F
                |---FF-FS
                |---FF-NT
                |---real
            |---mask
                |---FF-DF
                    |---071_054 
                        |---0001_mask.png  
                        |---...
                    |---...
                |---FF-F2F
                |---FF-FS
                |---FF-NT
            |---config
                |---train.json
                |---test.json
                |---eval.json

test datasets

We use the DFDC, CelebDF, and DF1.0 for testing. These datasets are organized similar to FF++. Please go to their sites for downloading.

Running

   python train.py  --resolution 256 --dataname none --dset FF-DF --meta FF-DF -n 1 -g 8 -nr 0  -mp 5555

Citation

If you find this code useful for your research, please cite:

@inproceedings{chen2022self,
    author = {Liang Chen and Yong Zhang and Yibing Song and Lingqiao Liu and Jue Wang},
    title = {Self-supervised Learning of Adversarial Examples: Towards Good Generalizations for DeepFake Detections}, 
    booktitle = {CVPR},  
    year = {2022}
}

Contact

Please open an issue or contact Liang Chen ([email protected]) if you have any questions or any feedback.

sladd's People

Contributors

liangchen527 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.