This Deepfake Detection project provides a complete pipeline for identifying manipulated videos using deep learning. It includes tools for extracting faces from video frames, training a model to distinguish real from fake faces, and evaluating its accuracy. A FastAPI-powered web app allows users to upload videos and receive deepfake detection results through an intuitive interface. The system also manages user data automatically and follows a modular structure, making it easy to extend, customize, or debug.
- 🎥 Face Extraction: Automatically extracts faces from video frames for training/testing.
- 🤖 Deep Learning Model: Trains a model to differentiate between real and fake faces.
- 🧪 Testing & Evaluation: Evaluate model performance on a test dataset.
- 🌐 FastAPI Web App: Upload a video and detect deepfakes through a user-friendly web interface.
- 🗂️ User Data Management: Automatically manages user directories and video uploads.
- 🧩 Modular Design: Easy to extend and debug.
git clone https://github.com/cgdhanush/deepfake
cd deepfakeconda create --name deepfake python=3.11 -y
conda activate deepfakepip install -r requirements.txtpython -m deepfake create-userdir
⚠️ Ensure the dataset is placed in theuser_data/datafolder before proceeding.
Extract frames and faces from videos for training or testing by default 80% for traing and 20% for tesing:
python -m deepfake extract python -m deepfake trainpython -m deepfake testpython -m deepfake startThis command starts the FastAPI server. Visit http://localhost:8000 to:
- Sign up or log in
- Upload videos
- View detection results