- GitHub repo link: https://github.com/HongguLiu/Deepfake-Detection
- Paper link: https://arxiv.org/abs/1610.02357
- Any pretrained weights link: https://drive.google.com/drive/folders/1GNtk3hLq6sUGZCGx8fFttvyNYH8nrQS8
- License notes (if known): Apache-2.0 license
- Does the repo match the paper description? (Yes/No/Partially) Partially
- Pretrained model available? (Yes/No) Yes
- Dataset expected by repo: face images extracted from video dataset
List exactly what you installed (with versions if possible):
- OS: Ubuntu 22.04.5 LTS
- Python: 3.10.12
- PyTorch: 2.7.1+cu118
- CUDA (if used): 11.8
- OpenCV: 4.11.0
- Other deps: opencv-python dlib==19.18.0 numpy==1.22.0 pillow>=6.2.2
python3.10 -m venv xception_env
source xception_env/bin/activate
git clone https://github.com/HongguLiu/Deepfake-Detection
cd Deepfake-Detection
python -m pip install -r requirements.txt- What to download: You can download the pretrained models from https://drive.google.com/drive/folders/1GNtk3hLq6sUGZCGx8fFttvyNYH8nrQS8.
- Where to place it: You can put it in Deepfake-Detection/.
# To train
python train_CNN.py -n xception -tl ./data_list/train.txt -vl ./data_list/val.txt -bz 64 -e 20 -mn xception_ffpp_c23.pkl --continue_train True -mp ./ffpp_c23.pth
# To test
python test_CNN.py -bz 64 -tl data_list/test.txt -mp output/xception/best.pkl
# To predict a video
python detect_from_video.py --video_path ./videos/003_000.mp4 --model_path ./pretrained_model/df_c0_best.pkl -o ./output --cuda
# To predict an image
python test_CNN.py -bz 32 --test_list ./data_list/Deepfakes_c0_299.txt --model_path ./pretrained_model/df_c0_best.pkl- What output you saw (logs, metrics, saved files):
(xception_env) gdgteam1@lisa:~/AI-Video-Detection/backend/models/XceptionNet/Deepfake-Detection$ python train_CNN.py -n xception -tl ./data_list/train.txt -vl ./data_list/val.txt -bz 64 -e 20 -mn xception_ffpp_c23.pkl --continue_train True -mp ./ffpp_c23.pth Using dropout 0.5 Epoch 1/20
epoch train loss: 0.0000 Acc: 0.9996 epoch val loss: 0.0061 Acc: 0.9492 Best val Acc: 0.9507
(xception_env) gdgteam1@lisa:~/AI-Video-Detection/backend/models/XceptionNet/Deepfake-Detection$ python test_CNN.py -bz 64 -tl data_list/test.txt -mp output/xception/best.pkl Using dropout 0.5 Test Acc: 0.9505
- Add screenshots in assets/ if helpful.
- Issue: requirements.txt failed to install
- Cause: Several package versions are outdated and not compatible with python 3.10
- Fix (steps/commands): Removed outdated packages, installed newer versions of these packages
- If someone else sets this up from scratch, what do they need to know? If you have any question, dm on Discord.