Skip to content

SlimShadys/DeepFakeDetectionOF

Repository files navigation

DeepFakeDetectionOF

This repo contains the PyTorch implementation of the paper 'Deepfake Video Detection through Optical Flow based CNN'.

In this work, we train and evaluate the ResNet-50/VGG-16/ViT/DeiT models on the FaceForensics++ Dataset, which can be found here.


Main algorithm


Forwarding
RGB image

Routing
Optical Flow | PWC | 2017

Routing
Optical Flow | RAFT | 2020

Routing
Optical Flow | GMA | 2021


Installation (locally)

In order to run the notebook locally, make sure to meet the following library requirements:

  • tqdm
  • gdown
  • cv2
  • timm
  • transformers
  • torch

You can install them through:

pip install -U tqdm gdown opencv-python timm transformers

Refer to the PyTorch website for local installation of PyTorch.

For Optical Flow algorithms, we used the Sniklaus and Hmorimitsu repos for Optical Flow Estimation.


Usage

Simply, run any notebook inside the training models directory. You can choose between:

  • training models/resnet.ipynb (Runs the algorithm through the ResNet-50/152 model)
  • training models/vgg16.ipynb (Runs the algorithm through the VGG16 model)
  • training models/Transformers.ipynb (Runs the algorithm through the ViT or DeiT model)

Results

As for the results, we have a table in the training models directory, summing up all the results we had.

Team Members

Avatar

Gianmarco Scarano


Avatar

Giancarlo Tedesco

About

This repo contains the PyTorch implementation of the paper 'Deepfake Video Detection through Optical Flow based CNN', which can be found here: https://openaccess.thecvf.com/content_ICCVW_2019/papers/HBU/Amerini_Deepfake_Video_Detection_through_Optical_Flow_Based_CNN_ICCVW_2019_paper.pdf

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published