All Projects → polimi-ispl → Icpr2020dfdc

polimi-ispl / Icpr2020dfdc

Licence: gpl-3.0
Video Face Manipulation Detection Through Ensemble of CNNs

Projects that are alternatives of or similar to Icpr2020dfdc

Deeplabv3p gluon
DeepLab v3+ in MXNet Gluon
Stars: ✭ 63 (-1.56%)
Mutual labels:  jupyter-notebook
Tutorials 2017
Geophysical Tutorials column for 2017
Stars: ✭ 63 (-1.56%)
Mutual labels:  jupyter-notebook
Deeplearning Nlp Models
A small, interpretable codebase containing the re-implementation of a few "deep" NLP models in PyTorch. Colab notebooks to run with GPUs. Models: word2vec, CNNs, transformer, gpt.
Stars: ✭ 64 (+0%)
Mutual labels:  jupyter-notebook
Niwidgets
Neuroimaging widgets for jupyter notebooks
Stars: ✭ 63 (-1.56%)
Mutual labels:  jupyter-notebook
Constrained decoding
Lexically constrained decoding for sequence generation using Grid Beam Search
Stars: ✭ 63 (-1.56%)
Mutual labels:  jupyter-notebook
Codingworkshops
Programming challenges for python, webdev, data science Python Project Night
Stars: ✭ 63 (-1.56%)
Mutual labels:  jupyter-notebook
Vitech
tuyển chọn các tài liệu về công nghệ bằng tiếng Việt
Stars: ✭ 63 (-1.56%)
Mutual labels:  jupyter-notebook
Learners Space
This repository contains all the content for these courses to be covered in Learner's Space -
Stars: ✭ 64 (+0%)
Mutual labels:  jupyter-notebook
How to make a tensorflow image classifier live
Stars: ✭ 63 (-1.56%)
Mutual labels:  jupyter-notebook
Pizzafire
Run your own DeepStyle factory on the cloud.
Stars: ✭ 63 (-1.56%)
Mutual labels:  jupyter-notebook
Openmomo
Sounding Rocket "MOMO"
Stars: ✭ 63 (-1.56%)
Mutual labels:  jupyter-notebook
Ipybind
IPython / Jupyter integration for pybind11
Stars: ✭ 63 (-1.56%)
Mutual labels:  jupyter-notebook
Deep3dpose
Stars: ✭ 63 (-1.56%)
Mutual labels:  jupyter-notebook
Relaynet pytorch
Pytorch Implementation of retinal OCT Layer Segmentation (with trained models)
Stars: ✭ 63 (-1.56%)
Mutual labels:  jupyter-notebook
Recsyspuc 2020
Material del curso de Sistemas Recomendadores IIC3633 PUC Chile
Stars: ✭ 64 (+0%)
Mutual labels:  jupyter-notebook
Ismartdnn
Light-weighted neural network inference for object detection on small-scale FPGA board
Stars: ✭ 62 (-3.12%)
Mutual labels:  jupyter-notebook
Hmms
Continuous-time Hidden Markov Model
Stars: ✭ 62 (-3.12%)
Mutual labels:  jupyter-notebook
Decisiveml
Machine learning end-to-end research and trade execution
Stars: ✭ 63 (-1.56%)
Mutual labels:  jupyter-notebook
Sudo rm rf
Code for SuDoRm-Rf networks for efficient audio source separation. SuDoRm-Rf stands for SUccessive DOwnsampling and Resampling of Multi-Resolution Features which enables a more efficient way of separating sources from mixtures.
Stars: ✭ 64 (+0%)
Mutual labels:  jupyter-notebook
Pysparkgeoanalysis
🌐 Interactive Workshop on GeoAnalysis using PySpark
Stars: ✭ 63 (-1.56%)
Mutual labels:  jupyter-notebook

Video Face Manipulation Detection Through Ensemble of CNNs

This is the official repository of Video Face Manipulation Detection Through Ensemble of CNNs, accepted to ICPR2020 and currently available on arXiv.

We participated as the ISPL team in the Kaggle Deepfake Detection Challenge. With this implementation, we reached the 41st position over 2116 teams (top 2%) on the private leaderboard.

This repository is currently under maintenance, if you are experiencing any problems, please open an issue.

Getting started

Prerequisites

  • Install conda
  • Create the icpr2020 environment with environment.yml
$ conda env create -f environment.yml
$ conda activate icpr2020

Quick run

If you just want to test the pre-trained models against your own videos or images:

The whole pipeline

You need to preprocess the datasets in order to index all the samples and extract faces. Just run the script make_dataset.sh

$ ./scripts/make_dataset.sh

Please note that we use only 32 frames per video. You can easily tweak this parameter in extract_faces.py

Celeb-DF (v2)

Altough we did not use this dataset in the paper, we provide a script index_celebdf.py to index the videos similarly to DFDC and FF++. Once you have the index, you can proceed with the pipeline starting from extract_faces.py.

Train

In train_all.sh you can find a comprehensive list of all the commands to train the models presented in the paper. Please refer to the comments in the script for hints on their usage.

Training a single model

If you want to train some models without lunching the script:

  • for the non-siamese architectures (e.g. EfficientNetB4, EfficientNetB4Att), you can simply specify the model in train_binclass.py with the --net parameter;
  • for the siamese architectures (e.g. EfficientNetB4ST, EfficientNetB4AttST), you have to:
    1. train the architecture as a feature extractor first, using the train_triplet.py script and being careful of specifying its name with the --net parameter without the ST suffix. For instance, for training the EfficientNetB4ST you will have to first run python train_triplet.py --net EfficientNetB4 --otherparams;
    2. finetune the model using train_binclass.py, being careful this time to specify the architecture's name with the ST suffix and to insert as --init argument the path to the weights of the feature extractor trained at the previous step. You will end up running something like python train_binclass.py --net EfficientNetB4ST --init path/to/EfficientNetB4/weights/trained/with/train_triplet/weights.pth --otherparams

Test

In test_all.sh you can find a comprehensive list of all the commands for testing the models presented in the paper.

Pretrained weights

We also provide pretrained weights for all the architectures presented in the paper. Please refer to this Dropbox link. Each directory is named $NETWORK_$DATASET where $NETWORK is the architecture name and $DATASET is the training dataset. In each directory, you can find bestval.pth which are the best network weights according to the validation set.

Additionally, you can find notebooks for results computations in the notebook folder.

Datasets

References

Credits

Image and Sound Processing Lab - Politecnico di Milano

  • Nicolò Bonettini
  • Edoardo Daniele Cannas
  • Sara Mandelli
  • Luca Bondi
  • Paolo Bestagini
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].