# CViT
**Repository Path**: a844304090/CViT
## Basic Information
- **Project Name**: CViT
- **Description**: No description available
- **Primary Language**: Unknown
- **License**: GPL-3.0
- **Default Branch**: main
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2021-06-30
- **Last Updated**: 2021-06-30
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# CViT
### Deepfake Video Detection Using Convolutional Vision Transformer
Implementation code for our paper.
[link to paper](https://arxiv.org/abs/2102.11126) | [link to MS Thesis](http://etd.aau.edu.et/handle/123456789/24209)
### 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](https://arxiv.org/abs/2102.11126)," arXiv preprints arXiv:2102.11126, 2021.