This project focuses on detecting deepfakes in images using the MesoNet network architecture, which is specifically designed for identifying facial manipulations. The model leverages key deep learning frameworks including TensorFlow, Keras, PyTorch, and OpenCV for efficient processing and analysis.
- Python 3.5
- Numpy 1.14.2
- Keras 2.1.5
- TensorFlow, Keras: For model development and training.
- PyTorch: Supporting model optimization and performance tuning.
- OpenCV: Used for image processing and manipulation tasks.
- Forged Images: 5,111
- Real Images: 7,250
- Forged Images: 2,889
- Real Images: 4,259
- Both the training and validation sets maintain a balanced distribution between forged and real images. This balance ensures that the model is effectively trained to recognize deepfake patterns and generalize across different data scenarios.
You can find the pretrained weight in the weights
folder. The _DF
extension correspond to a model trained to classify deepfake-generated images and the _F2F
to Face2Face-generated images.
- Clone the Repository
git clone https://github.com/Deepfake-Detection-using-Mesonet.git
cd Deepfake-Detection-using-Mesonet
- Download and Prepare the Dataset
/data
/train
/real
/forged
/validation
/real
/forged
- Train the Model
python train.py --epochs 50 --batch_size 32
- Validate the Model
python validate.py --model mesonet_model.h5 --data_dir ./data/validation
- Run Inference on New Data
python predict.py --image_path ./path_to_image.jpg --model mesonet_model.h5
The primary goal of this project is to develop a robust detection framework that identifies deepfake images with high accuracy. By training the model on a diverse dataset, the system is validated for real-world deployment, providing a critical tool for cybersecurity and digital forensics.
- MesoNet Architecture: A compact Convolutional Neural Network (CNN) architecture designed for detecting facial forgeries with precision.
- Cybersecurity Application: The system enhances the integrity of digital media by identifying manipulated content, safeguarding against threats like misinformation, identity theft, and fraud.
Maimuna Khatoon - Github
Charvi Jaiswal - Github
Sheryl Sokhi - Github
Tulika Tripathi - Github
Afchar, D., Nozick, V., Yamagishi, J., & Echizen, I. (2018, September). MesoNet: a Compact Facial Video Forgery Detection Network. In IEEE Workshop on Information Forensics and Security, WIFS 2018.