A comprehensive solution for detecting and defending against deepfakes using a multi-layered approach combining watermarking, traditional image analysis, and machine learning techniques.
This system provides a robust framework for:
- Watermarking authentic images to verify their integrity
- Detecting potential deepfakes using multiple analysis methods
- Managing and tracking verified vs. manipulated media
- Providing a user-friendly dashboard for monitoring and analysis
- Watermarking System: Embeds secure digital signatures into images
- Deepfake Detection Engine: Utilizes multiple analysis techniques to identify manipulated images
- White-listing Mechanism: Maintains a registry of known authentic images
- User Dashboard: Web interface for uploading, testing, and monitoring images
- Robust API: RESTful endpoints for integration with other systems
- Clone the repository:
git clone https://github.com/JahagirdarPrajwal/ML-DeepFake-Detection-Defense--BAM-.git
cd ML-DeepFake-Detection-Defense--BAM-
- Create and activate a virtual environment:
python -m venv myenv
source myenv/bin/activate # On Windows: myenv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
- Set up environment variables:
cp .env.example .env
# Edit .env with your configuration
python dashboard.py
The dashboard will be available at: http://localhost:5000
/api/upload
- Upload and watermark an image/api/test
- Test an image for watermarks and deepfake detection/api/assets
- Get all media assets/api/alerts
- Get detection alerts/api/logs
- Get system logs
The watermarking.py
file implements:
- Simple Invertible Neural Network (INN) for encoding/decoding
- Error Correction Code (ECC) for robust watermark extraction
- Methods for embedding and extracting watermarks
The deepfake_detector.py
file implements:
- Traditional image analysis methods (noise, compression artifacts, face consistency)
- Ensemble approach for more reliable detection
- White-listing system for known authentic images
The dashboard.py
file provides:
- Flask web server
- API endpoints for image processing
- Integration with Firebase (optional)
- File serving and management
MIT
- Prajwal Jahagirdar