GithubHelp home page GithubHelp logo

phuchai123 / deepfake-detection Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hongguliu/deepfake-detection

0.0 0.0 0.0 129.93 MB

The Pytorch implemention of Deepfake Detection based on Faceforensics++

Home Page: https://github.com/ondyari/FaceForensics

License: Apache License 2.0

Python 100.00%

deepfake-detection's Introduction

Deepfake-Detection


The Pytorch implemention of Deepfake Detection based on Faceforensics++

The Backbone net is XceptionNet, and we also reproduced the MesoNet with pytorch version, and you can use the mesonet network in this project.

Install & Requirements

The code has been tested on pytorch=1.3.1 and python 3.6, please refer to requirements.txt for more details.

To install the python packages

python -m pip install -r requirements.txt

Although you can install all dependencies at a time. But it is easy to install dlib via conda install -c conda-forge dlib

Dataset

If you want to use the opensource dataset Faceforensics++, you can use the script './download-FaceForensics_v3.py' to download the dataset accroding the instructions of download section.

You can train the model with full images, but we suggest you take only face region as input.

Pretrained Model

The model provided just be used to test the effectiveness of our code. We suggest you train you own models based on your dataset.

And we will upload models which have better performance as soon as possible.

we provide some pretrained model based on FaceForensics++

  • FF++_c23.pth
  • FF++_c40.pth

Usage

To test with videos

python detect_from_video.py --video_path ./videos/003_000.mp4 --model_path ./pretrained_model/df_c0_best.pkl -o ./output --cuda

To test with images

python test_CNN.py -bz 32 --test_list ./data_list/Deepfakes_c0_299.txt --model_path ./pretrained_model/df_c0_best.pkl

To train a model

python train_CNN.py (Please set the arguments after read the code)

About

If our project is helpful to you, we hope you can star and fork it. If there are any questions and suggestions, please feel free to contact us.

Thanks for your support.

License

The provided implementation is strictly for academic purposes only. Should you be interested in using our technology for any commercial use, please feel free to contact us.

deepfake-detection's People

Contributors

dependabot[bot] avatar hermesbonilla avatar hongguliu 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.