Code Monkey home page Code Monkey logo

cvit's Introduction

CViT

Deepfake Video Detection Using Convolutional Vision Transformer

Implementation code for our paper. link to paper | link to MS Thesis

Requirements:

  • Pytorch >=1.4

DL library used for face extraction

  • helpers_read_video_1.py
  • helpers_face_extract_1.py
  • blazeface.py
  • blazeface.pth

Preprocessing

extractfaces.py
   Face extraction from video.
   The code works for DFDC dataset. You can test it using the sample data provided.

Weights

deepfake_cvit_gpu_ep_50.pth - Full model weight.
deepfake_cvit_gpu_inference_ep_50.pth - For detection.

Predict CViT

python cvit_prediction.py
    Predicts whether a video is Deepfake or not.
    Prediction value <0.5 - REAL
    Prediction value >=5 - FAKE

Train CViT

To train the model on your own you can use the following parameters:
  e: epoch
  s: session - (g) - GPU or (t) - TPU
  w: weight decay default= 0.0000001
  l: learning rate default=0.001
  d: path file
  b: batch size, defualt=32

python cvit_train.py -e 10 -s 'g' -l 0.0001 -w 0.0000001 -d sample_train_data/

Authors

Deressa Wodajo
Solomon Atnafu (PhD)

References

Deressa Wodajo and Solomon Atnafu, "Deepfake Video Detection Using Convolutional Vision Transformer," arXiv preprints arXiv:2102.11126, 2021.

cvit's People

Contributors

erprogs avatar amirreza1751 avatar

Watchers

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