Coder Social home page Coder Social logo

naram92 / deepfakedetection Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 1.96 MB

This project was completed as part of the Deep Learning course (GLO-4030) at Laval University. Its goal is to detect deepfake videos using deep learning techniques on the FaceForensics dataset. We were able to achieve deepfake detection by using the EfficientNet model.

Python 16.81% Jupyter Notebook 83.19%
blazeface deep-learning deepfake-detection efficientnet faceforensics pytorch

deepfakedetection's Introduction

DeepFakeDetection

Dataset

FaceForensics++ is a large-scale facial manipulation dataset generated using deepfake technologies. Each deepfake method is applied to 1000 high-quality videos uploaded to YouTube, manually selected to present subjects almost face-on without occlusion.

Preprocessing

We followed the same data preprocessing strategy for the dataset:

  • Extract the images from each video;
  • Use reliable face tracking technology (Blazeface) to detect faces in each frame and crop the image around the face.

When detecting videos with manipulated faces, it is possible to train the detectors on the entire frames of the videos or to crop the area around the face and apply the detector exclusively to this cropped region. We chose the latter approach.

We applied a series of simple but effective data augmentation techniques, including downscaling, horizontal flipping, random brightness and contrast adjustments, hue and saturation changes, noise injection, ... It is worth noting that data augmentation was only applied to training images.

Model and train

In our experiments, we used the EfficientNetB4 model as a baseline due to its favorable balance of number of parameters, runtime, and classification performance. We evaluated four configurations:

  • Configuration 1: Using the EfficicentNetB4 pre-trained model and freezing all convolutional parameters.
  • Configuration 2: Using the EfficicentNetB4 pre-trained model and retraining the last 8 MBConvBlocks with the last two layers (the convolutional layer and the classifier).
  • Configuration 3: Using the EfficicentNetB4 pre-trained model and retraining the last 16 MBConvBlocks with the last two layers (the convolutional layer and the classifier).
  • Configuration 4: Using the EfficicentNetB4 pre-trained model and integrating a Spatial Transformer Network after MBConvBloc 20.

deepfakedetection's People

Contributors

naram92 avatar

Stargazers

 avatar  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.