Git Product home page Git Product logo

unknownaware's Introduction

Unknown Aware Feature Learning for Face Forgery Detection (FG2021)

This repository is the official implementation of the FG 2021 paper Unknown Aware Feature Learning for Face Forgery Detection.

Overview

In this study, we leverage domain generalization to enhance face forgery detection with awareness to unknown forgery algorithms. In particular, we improve generalization of models by encouraging it to learn from non-salient areas with subtle artifacts.

Unknown Aware Feature Learning for Face Forgery Detection

Preparations

  • To install requirements:
pip install -r requirements.txt
  • Download datasets at FaceForensics++, Celeb-DF, etc.

  • Run face detection. With cropped face images, generate json files in the following format:

[
    {
        "path": "path/to/image_0.png",
        "label": 0
    },

    {
        "path": "path/to/image_1.png",
        "label": 1
    },

    ...
]

  • Link the json files in the config files to load the data. You can also just modify the dataset files to load the images in any other ways you want.

Training

Make sure to specify paths to labels, pretrained models, as well as hyperparameters in configs/config.py.

To train the baseline model:

python train.py

To train the model with our proposed method:

python train_gfsl.py

Evaluation

Specify models to test in the aforementioned config files.

Evaluate the model by running:

python evaluate.py

Reference

Consider citing our paper if you find it helpful:

@inproceedings{shi2021unknown,
  title={Unknown aware feature learning for face forgery detection},
  author={Shi, Liang and Zhang, Jie and Liang, Chenyue and Shan, Shiguang},
  booktitle={2021 16th IEEE International Conference on Automatic Face and Gesture Recognition (FG 2021)},
  year={2021},
  organization={IEEE}
}

Feel free to contact us with any comments or feedback.

unknownaware's People

Contributors

shiliang26 avatar

Stargazers

 avatar

Watchers

 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.