GithubHelp home page GithubHelp logo

shahil98 / deep_fake_video_detection Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 5.21 MB

This repository has the code for a system that detects deep fake videos.

License: MIT License

Python 100.00%

deep_fake_video_detection's Introduction

DeepFake Detection

Installation

  1. Clone this repository.
https://github.com/Shahil98/Deep_Fake_Video_Detection.git
  1. In the repository, execute pip install -r requirements.txt to install all the necessary libraries.

  2. Download the pretrained weights.

    1. YOLO Face model pretrained weights and save it in /model_data/

Usage

Use python main.py --help to see usage for main.py.


usage: main.py [-h] [--genFaceCrops] [--frames [FRAMES]]
               [--videoDirectory [VIDEODIRECTORY]] [--trainEfficientNet]
               [--trainResNext] [--epochs [EPOCHS]] [--batchSize [BATCHSIZE]]
               [--imageDirectory [IMAGEDIRECTORY]]
               [--learningRate [LEARNINGRATE]]
               [--trainableLayers [TRAINABLELAYERS]] [--test]
               [--testVideoDirectory [TESTVIDEODIRECTORY]]

optional arguments:
  -h, --help            show this help message and exit
  --genFaceCrops        Will generate facecrops for videos inside
                        videoDirectory.
  --frames [FRAMES]     Will set the number of frames to be considered for
                        each video. Defaults to 30.
  --videoDirectory [VIDEODIRECTORY]
                        Will set the directory for videos whose facecrops are
                        to be generated. Defaults to 'test_videos'
  --trainEfficientNet   Will train EfficientNet.
  --trainResNext        Will train ResNeXt.
  --epochs [EPOCHS]     Will set the number of epochs for training. Defaults
                        to 200.
  --batchSize [BATCHSIZE]
                        Will set the batch size for training. Defaults to 64.
  --imageDirectory [IMAGEDIRECTORY]
                        Will set the directory for training set images.
                        Defaults to 'train_images'
  --learningRate [LEARNINGRATE]
                        Will set the learning rate for training. Defaults to
                        0.0001
  --trainableLayers [TRAINABLELAYERS]
                        Will set the number of trainable layers. Defaults to
                        5.
  --test                Test mode.
  --testVideoDirectory [TESTVIDEODIRECTORY]
                        Will set the directory for test videos. Defaults to
                        'test'

Methodology

Implementation for DeepFake Detection Using Ensembling Techniques

Alt Text

Determining whether a given video is Real or Fake by cropping the face of a person and classifying the cropped image by an ensemble of 2 models (ResNext and EfficientNetB6)

deep_fake_video_detection's People

Contributors

shahil98 avatar

Watchers

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