Welcome to the DeepFake Image Detection repository! This project is designed to detect deepfake images using state-of-the-art deep learning models like VGG16, VGG19, InceptionV3, and ResNet50, combined with an ensemble technique to maximize accuracy. Whether you're a researcher, developer, or just curious about deepfake detection, this repository has everything you need to get started! π
2.Features
4.Usage
5.Dataset
6.Models
8.Results
10.License
12.Contact
Deepfakes are synthetic media generated using deep learning techniques, often used to manipulate images or videos. This project aims to detect deepfake images by leveraging pre-trained deep learning models and ensemble techniques. The goal is to provide a robust and accurate solution for identifying manipulated images. π―
Pre-trained Models: Fine-tuned VGG16, VGG19, InceptionV3, and ResNet50 models for deepfake detection.
Ensemble Learning: Combines predictions from multiple models to improve accuracy.
Data Augmentation: Extensive data preprocessing and augmentation techniques.
Hyperparameter Tuning: Optimized hyperparameters for better performance.
Visualization: Detailed visualization of training and validation metrics.
Open Source: Fully open-source and ready for community contributions.
To get started with this project, follow these steps:
1. Clone the repository:
git clone https://github.com/Sunilyadav03/DeepFake-Image-Detection.git
cd DeepFake-Image-Detection
2. Install dependencies:
pip install -r requirements.txt
3. Download the dataset: DataSet Link
1.Data Preprocessing:
Run the data preprocessing script to augment and preprocess your dataset.
2.Model Training:
Train the models using the provided scripts.
3.Ensemble Prediction:
Combine predictions from all models using the ensemble technique.
4.Visualization:
Visualize the training and validation metrics.
The dataset used in this project consists of 140,000 real and fake images. You can use your own dataset or download a publicly available one. Here are some popular datasets for deepfake detection:
DeepFake Detection Challenge Dataset
But, primarily I used 140k Real and Fake Faces dataset for this project.
This project uses the following pre-trained models:
VGG16: A deep convolutional network with 16 layers.
VGG19: A deeper version of VGG16 with 19 layers.
InceptionV3: A model designed for efficient image recognition.
ResNet50: A residual network with 50 layers, known for its performance in image classification tasks.
Custom Model: A deep convolutional network with 9 layers(Made and tested by myself).
Each model is fine-tuned on the deepfake dataset to improve detection accuracy.
To further enhance accuracy, we use a weighted average ensemble technique. This method combines the predictions from all four models, giving more weight to the models that perform better. The ensemble technique has shown to significantly improve the overall detection accuracy.
Here are the results obtained from the ensemble model:
Model | Accuracy |
---|---|
VGG16 | 95.27% |
VGG19 | 95.21% |
Custom Model | 95.02% |
ResNet50 | 94.0% |
InceptionV3 | 77.20% |
Ensemble | - |
We welcome contributions from the community! If you'd like to contribute, please follow these steps:
1.Fork the repository.
2.Create a new branch (git checkout -b feature-branch).
3.Commit your changes (git commit -m 'Add some feature').
4.Push to the branch (git push origin feature-branch).
5.Open a pull request.
This project is licensed under the MIT License.
Papers and Articles:
DeepFake Detection: A Comprehensive Study
FaceForensics++: Learning to Detect Manipulated Facial Images
Celeb-DF: A Large-scale Challenging Dataset for DeepFake Forensics
Tools and Libraries:
If you have any questions or suggestions, feel free to reach out:
Email: [email protected]
LinkedIn: Let's connect!
Medium: Blogs