Home

Awesome

RECCE CVPR 2022

:page_facing_up: End-to-End Reconstruction-Classification Learning for Face Forgery Detection

:boy: Junyi Cao, Chao Ma, Taiping Yao, Shen Chen, Shouhong Ding, Xiaokang Yang

Please consider citing our paper if you find it interesting or helpful to your research.

@InProceedings{Cao_2022_CVPR,
    author    = {Cao, Junyi and Ma, Chao and Yao, Taiping and Chen, Shen and Ding, Shouhong and Yang, Xiaokang},
    title     = {End-to-End Reconstruction-Classification Learning for Face Forgery Detection},
    booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
    month     = {June},
    year      = {2022},
    pages     = {4113-4122}
}

Introduction

This repository is an implementation for End-to-End Reconstruction-Classification Learning for Face Forgery Detection presented in CVPR 2022. In the paper, we propose a novel REConstruction-Classification lEarning framework called RECCE to detect face forgeries. The code is based on Pytorch. Please follow the instructions below to get started.

Motivation

Briefly, we train a reconstruction network over genuine images only and use the output of the latent feature by the encoder to perform binary classification. Due to the discrepancy in the data distribution between genuine and forged faces, the reconstruction differences of forged faces are obvious and also indicate the probably forged regions.

Basic Requirements

Please ensure that you have already installed the following packages.

Dataset Preparation

Config Files

Training

CUDA_VISIBLE_DEVICES=0 python -m torch.distributed.launch --nproc_per_node=1 --master_port 12345 train.py --config path/to/config.yaml

Testing

python test.py --config path/to/config.yaml

Inference

python inference.py --bin path/to/model.bin --image_folder path/to/image_folder --device $DEVICE --image_size $IMAGE_SIZE

Acknowledgement