This project is a comprehensive, modular system for detecting deepfakes in both audio and video using state-of-the-art AI models. Its architecture separates concerns across dedicated components, enabling scalable deployment and easy integration into real-world applications, with a focus on forensic use for law enforcement.
ai(Python): Deep learning models and inference scripts.backend(Express.js): API layer and communication management.frontend(Next.js): User interface for interacting with the tool.
Each component is self-contained and requires its own setup.
- Navigate to the frontend directory:
cd frontend - Install dependencies:
npm install
- Start the development server:
npm run dev
- Navigate to the backend directory:
cd backend - Install dependencies:
npm install
- Start the backend server (port 5000):
node server.js
Note: This service also runs on port 5000. Run it independently or use a port management tool if needed.
- Navigate to the AI directory:
cd ai/rushi - Install required Python libraries:
pip install -r requirements.txt
- Run the AI service:
python app.py
Located in ai/model:
best_deepfake_detector.pth: Detects deepfakes in audio files.best_optimized_fine_tuned_model.h5: Detects deepfakes in video files.
AI-generated media (deepfakes) are increasingly realistic, posing risks like misinformation, identity theft, and erosion of public trust. This project provides an AI-powered forensic tool for law enforcement to detect, analyze, and securely document deepfake videos for reliable evidence gathering and court presentation.
-
Multi-Modal Detection
- Facial Manipulations: Detects subtle anomalies and inconsistencies in facial features and movements across common video formats.
- Voice Cloning: Analyzes audio tracks for voice manipulations and synthetic speech.
-
Detailed Forensic Analysis
- Binary Classification: Classifies videos as "Real" or "Deepfake".
- Confidence Scores: Provides a numerical confidence score for each classification.
- Visual Heat Maps: Highlights manipulated areas in video frames.
-
Tamper-Proof Reporting
- Automated PDF Generation: Creates comprehensive, tamper-proof PDF reports.
- Report Contents: Includes metadata, cryptographic hashes, detection results, and key snapshots with heat map overlays.
-
Secure Chain of Custody
- Secure Storage: Ensures secure storage of media and reports.
- Blockchain-based Audit Trails: Uses a private blockchain ledger for immutable audit trails, guaranteeing forensic integrity.
This tool provides law enforcement with a reliable, efficient, and legally defensible forensic solution for deepfake detection. It enables quick identification of manipulated media and validated reporting for court use, helping combat the threat of deepfakes and digital misinformation.