All Projects → hongshuochen → DefakeHop

hongshuochen / DefakeHop

Licence: other
Official code for DefakeHop: A Light-Weight High-Performance Deepfake Detector

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to DefakeHop

awesome-Deepfakes
All about Deepfakes & Detection
Stars: ✭ 107 (+109.8%)
Mutual labels:  deepfake-detection
Awesome-Deepfakes-Detection
A list of tools, papers and code related to Deepfake Detection.
Stars: ✭ 30 (-41.18%)
Mutual labels:  deepfake-detection
FakeFynder-Hackathon-for-Good-2019
This repository contains our POC for a website which can easily check videos for manipulated areas. It was part of the Hackathon for Good in the Hague, 2019.
Stars: ✭ 23 (-54.9%)
Mutual labels:  deepfake-detection
Combining-EfficientNet-and-Vision-Transformers-for-Video-Deepfake-Detection
Code for Video Deepfake Detection model from "Combining EfficientNet and Vision Transformers for Video Deepfake Detection" available on Arxiv and was submitted to ICIAP 2021.
Stars: ✭ 39 (-23.53%)
Mutual labels:  deepfake-detection
FakeFinder
FakeFinder builds a modular framework for evaluating various deepfake detection models, offering a web application as well as API access for integration into existing workflows.
Stars: ✭ 29 (-43.14%)
Mutual labels:  deepfake-detection
FaceLivenessDetection-SDK
3D Passive Face Liveness Detection (Anti-Spoofing) & Deepfake detection. A single image is needed to compute liveness score. 99,67% accuracy on our dataset and perfect scores on multiple public datasets (NUAA, CASIA FASD, MSU...).
Stars: ✭ 85 (+66.67%)
Mutual labels:  deepfake-detection
Deep-Fakes
No description or website provided.
Stars: ✭ 88 (+72.55%)
Mutual labels:  deepfake-detection

DefakeHop: A Light-Weight High-Performance Deepfake Detector

This is the official Python implementation of our work: "DefakeHop: A Light-Weight High-Performance Deepfake Detector" accepted at ICME 2021.

State-of-the-art Deepfake detection methods are built upon deep neural networks. In this work, we proposed a non deep learning method to detect Deepfake videos which use the successive subspace learning (SSL) principle to extract features from various parts of face images. The features are also further distilled by our feature distillation module to derive a concise representation of the fake and real faces.

Framework

Required packages

conda install -c anaconda pandas 
conda install -c conda-forge opencv
conda install -c anaconda scikit-image
conda install -c conda-forge matplotlib
conda install -c conda-forge scikit-learn

Since we use GPU to accelerate the processes, please install xgboost by pip

pip install xgboost 

Data

Please put your videos in following folders accordingly

  • train
    • real
    • fake
  • test
    • real
    • fake

Preprocessing

  • Extracting the facial landmarks using OpenFace. Please check here more more details.
python landmark_extractor.py
  • Face alignment and Crop the facial regions
python patch_extractor.py
  • Get the training and testing data
python data.py

How to run

We use UADFV dataset as an example to show how to use our code to train and test the model.

python model.py

When we train the model, we use three items to train.

  • Images: 4D numpy array (N,H,W,C).

  • Labels: 1D numpy array where 1 is Fake and 0 is Real.

  • Names: 1D numpy array storing frame names.

    The frame name should follow the format of {video_name}_{frame_number}.

    Example: real/0047_0786.bmp, we can know it is the 786 th frame from real/0047.mp4

Cite us

If you use this repository, please consider to cite.

@misc{chen2021defakehop,
      title={DefakeHop: A Light-Weight High-Performance Deepfake Detector}, 
      author={Hong-Shuo Chen and Mozhdeh Rouhsedaghat and Hamza Ghani and Shuowen Hu and Suya You and C. -C. Jay Kuo},
      year={2021},
      eprint={2103.06929},
      archivePrefix={arXiv},
      primaryClass={cs.CV}
}

Acknowledgment

This work was supported by the Army Research Laboratory (ARL) under agreement W911NF2020157.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].