A complete end-to-end AI/ML project to detect face-swapped deepfake videos using XceptionNet. Built with a scalable and production-ready architecture including a modern frontend, robust backend, containerized deployment, and observability stack.
Deepfakes pose a significant threat to digital authenticity. This project tackles the challenge by building a high-accuracy classifier to detect face-swapped deepfake videos using a convolutional neural network.
- Model: XceptionNet (CNN)
- Dataset: FaceForensics++
- Frontend: Vite + React
- Backend: FastAPI
- Infrastructure: Docker, Docker Compose, NGINX
- Monitoring: Prometheus + Grafana
.
├── project/ # FastAPI server
├── vision-truth-finder/ # React (Vite) client
├── test/ # Test image: REAL and video:Fake
├── project/model/ # XceptionNet model
├── project/docker-compose.yml # Docker orchestration
├── project/Dockerfile # Backend Dockerfile
├── project/nginx/ # NGINX reverse proxy config
├── project/prometheus/ # Prometheus config
├── project/.env # Environment variables
├── README.md
├── .gitignore
├── LICENSE
└── run.sh
- Trained a deepfake detection classifier using XceptionNet
- Preprocessed ~42,000 frames from the FaceForensics++ dataset
- Achieved 91.76% accuracy on test set
- Trained on 2×NVIDIA T4 GPUs with training time under 3 hours
- Exposes a
/predictendpoint for model inference - Handles video frame input and passes through preprocessing pipeline
- Uses
python-dotenvto load environment variables securely - Structured logging for debugging and traceability
- Built a lightweight UI for uploading video frames or images
- Shows real-time prediction results and model confidence
- Connected directly to FastAPI via REST
- Backend and frontend containerized with Docker
- All services orchestrated using Docker Compose
.envsupport for flexible configuration
- Serves as the single entrypoint to all services
- Handles CORS, header injection, and internal routing
- Access controlled to internal Docker network
git clone https://github.com/argodevops/deepfake-detection./run.sh start- Frontend: http://localhost:8080
- Backend: http://localhost:8000/docs
./run.sh stop- Used FaceForensics++ (face-swap subset)
- Preprocessed video files into image frames
- Split into train/test (balanced real/fake)
| Metric | Value |
|---|---|
| Accuracy | 91.76% |
| Training Time | ~2 hours |
| Hardware | 2×T4 GPUs |
The model can be downloaded from Kaggle
This project is for educational and research purposes only.