A Flask-based deepfake detection web app that analyzes videos frame-by-frame using a trained EfficientNet-B0 model. It provides real-time progress via SSE and generates a forensic report with charts and flagged evidence.
- Python 3.9+
- pip
# 1. Clone the repository
git clone <repo-url>
cd internship
# 2. (Recommended) Create and activate a virtual environment
python -m venv venv
# Windows:
venv\Scripts\activate
# macOS/Linux:
source venv/bin/activate
# 3. Install dependencies
pip install -r requirements.txtpython app.pyThe server starts at http://localhost:5000. Open it in a browser, upload a video, and the analysis runs automatically.
The pre-trained model
deepfake_detector.h5and DNN face detector files (models/) are already included. No additional setup is required.
├── app.py # Flask server (routes, face detection, analysis logic)
├── deepfake_detector.h5 # Trained EfficientNet-B0 model
├── requirements.txt # Python dependencies
├── models/
│ ├── deploy.prototxt # DNN face detector config
│ └── res10_300x300_ssd_iter_140000.caffemodel # DNN face detector weights
├── templates/
│ └── index.html # Frontend UI
├── static/
│ └── style.css # Styles
├── uploads/ # Uploaded videos (created at runtime)
├── data/ # Training/testing datasets
└── Report/ # Project report
- The app accepts MP4, AVI, and MOV files up to 500 MB.
- Uploaded videos are analyzed in a background thread; the UI updates in real time.
- The model is loaded at startup — this takes a few seconds.