Git Product home page Git Product logo

deepfake-detection's Introduction

Deepfake Detection Using OpenFace2 and LSTM

This project aims to develop a minimum viable product for detecting deepfake videos using the LSTM architecture and OpenFace2. The project is a work in progress.

Project Overview

The project is built to detect deepfake videos using LSTM in combination with OpenFace2 for facial feature extraction. Celeb-DF is the primary data source used in training the model. Features extraction from the videos are used to train the model in the form of csv files. The project currently achieves a validation accuracy of 77% and we are hoping to improve the model and incorporate more techniques into it.

Dependencies

  • Python 3
  • PyTorch
  • OpenFace 2.0.0
  • OpenCv4

OpenFace 2

OpenFace 2 is used in the project for facial feature extraction. It is the main feature source of the project. OpenFace 2 can be installed by cloning their repository and following the installation guide in their wiki. The Ubuntu installation was followed for this project. The "FeatureExtraction" executable file is used to extract features in a Python script before being preprocessed and used for training.

Use the installation steps for the respective operating system in which you are going to train the model and ensure that the openface directory is in the root of the project.

Preparing new Videos

The script folder contains the scripts required to preprocess, prepare and label new video data. The code does not currently load the latest checkpoint but you can easily add this before starting the training loop.

First step is to extract features from your videos using the feature_extraction.py file.

  • --openface_exe : the path to the openface feature extraction binary file. This would normally be in ./build/bin of the open face directory.
  • --input_dir : the directory where your video files reside.
  • --output_dir : the directory to which you wish to save the extracted features.

Simply run the script with the above parameters and the extracted features will be saved to the output directory.

Once you have extracted the features, you can run the prepocessor.py script. This script has several functions which were used in early stages of the project.

deepfake-detection's People

Contributors

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