An intelligent video analysis system that detects AI-generated deepfake videos using a fine-tuned EfficientNetB0 deep learning model, MTCNN face detection, and majority voting. DeepShield combines Computer Vision, Deep Learning, and an interactive Streamlit interface to provide accurate, explainable, and efficient deepfake detection from uploaded videos.
https://deepshield-cq6f.onrender.com/
The rapid advancement of generative Artificial Intelligence has made it increasingly easy to create highly realistic deepfake videos, posing significant challenges in areas such as digital media, cybersecurity, journalism, and identity verification. Detecting manipulated content has therefore become an important research problem within Computer Vision and Deep Learning.
DeepShield presents an end-to-end AI-powered solution for deepfake video detection. The system processes uploaded videos by extracting frames, detecting human faces using MTCNN, preprocessing each detected face, and classifying them using a fine-tuned EfficientNetB0 convolutional neural network.
Rather than relying on a single frame prediction, DeepShield performs majority voting across all analyzed frames to generate a more robust video-level prediction. The application further provides confidence scores, prediction analytics, processing statistics, and sample analyzed faces through a modern Streamlit web interface.
The project demonstrates the practical integration of Deep Learning, Computer Vision, Video Processing, and AI Deployment into a complete real-world deepfake detection pipeline.
Disclaimer: This project is intended for educational, research, and demonstration purposes. Predictions should not be considered definitive evidence regarding the authenticity of any video.
- MP4 Video Upload
- Automatic Frame Extraction
- Efficient Video Analysis
- Optimized Frame Sampling
- MTCNN Face Detection
- Automatic Face Cropping
- Face Alignment
- Image Preprocessing
- Fine-Tuned EfficientNetB0
- Binary Classification (Real / Fake)
- Confidence Score Estimation
- Majority Voting Across Frames
- Final Prediction
- Confidence Visualization
- Prediction Distribution
- Processing Statistics
- Sample Analyzed Faces
- Streamlit-Based Interface
- Responsive User Experience
- Dockerized Deployment
- Hosted on Render
| Capability | Status |
|---|---|
| Deep Learning-Based Detection | β |
| Deepfake Video Analysis | β |
| MTCNN Face Detection | β |
| EfficientNetB0 Classification | β |
| Majority Voting Pipeline | β |
| Interactive Dashboard | β |
| Streamlit Deployment | β |
| Docker Support | β |
| Open Source | β |
The rapid advancement of generative Artificial Intelligence has made the creation of highly realistic deepfake videos more accessible than ever before. While these technologies have many legitimate applications, they also introduce significant challenges related to misinformation, identity theft, digital impersonation, media manipulation, and cybersecurity.
DeepShield was developed to address this challenge by combining Computer Vision, Deep Learning, and Video Processing into a unified detection pipeline capable of distinguishing authentic videos from AI-generated deepfakes.
Unlike traditional image classifiers that rely on a single frame, DeepShield analyzes multiple frames from an uploaded video, performs face detection using MTCNN, classifies each detected face with a fine-tuned EfficientNetB0 model, and applies majority voting to produce a more reliable video-level prediction.
The project demonstrates how modern AI techniques can be integrated into an end-to-end application for practical deepfake detection while maintaining a clean and interactive user experience.
| Category | Technologies |
|---|---|
| Programming Language | Python |
| Deep Learning | TensorFlow, Keras |
| CNN Backbone | EfficientNetB0 (Fine-Tuned) |
| Computer Vision | OpenCV |
| Face Detection | MTCNN |
| Data Processing | NumPy, Pandas |
| Data Visualization | Matplotlib |
| Web Framework | Streamlit |
| Deployment | Docker, Render |
| Version Control | Git & GitHub |
EfficientNetB0 was selected as the backbone architecture because it provides an excellent balance between prediction accuracy, computational efficiency, and inference speed.
- High classification performance
- Lightweight architecture
- Efficient parameter utilization
- Faster inference compared to larger CNN models
- Suitable for deployment in interactive web applications
Its compound scaling strategy enables DeepShield to achieve strong performance while maintaining reasonable computational requirements for real-time inference.
DeepShield follows a multi-stage pipeline for analyzing uploaded videos:
- Upload an MP4 video.
- Extract representative video frames.
- Detect human faces using MTCNN.
- Crop and preprocess each detected face.
- Classify each face using the fine-tuned EfficientNetB0 model.
- Aggregate frame-level predictions using majority voting.
- Generate the final prediction and display analytics through the interactive dashboard.
The DeepShield architecture consists of several interconnected modules working together to provide accurate deepfake detection.
| Stage | Description |
|---|---|
| π€ Video Upload | Accepts MP4 video input from the user. |
| π Frame Extraction | Converts the uploaded video into representative frames. |
| π€ Face Detection | Detects and crops faces using MTCNN. |
| πΌ Image Preprocessing | Resizes and normalizes detected faces for inference. |
| π§ Deep Learning Model | EfficientNetB0 predicts each face as Real or Fake. |
| π³ Majority Voting | Combines frame-level predictions into a final decision. |
| π Analytics Dashboard | Displays prediction, confidence, statistics, and analyzed faces. |
DeepShield
β
βββ app.py
βββ Dockerfile
βββ requirements.txt
βββ README.md
β
βββ assets
β βββ banner
β βββ logo
β βββ workflow
β βββ architecture
β βββ screenshots
β βββ footer
β
βββ config
β βββ config.py
β
βββ dataset
β βββ raw
β βββ processed
β βββ metadata
β
βββ models
β βββ finetune
β βββ best_cnn_finetuned.keras
β
βββ notebooks
β
βββ outputs
β
βββ src
βββ preprocessing
βββ models
βββ training
βββ evaluation
βββ explainability
βββ inference
βββ utils
| Directory | Purpose |
|---|---|
| assets/ | Repository banner, logo, workflow diagrams, screenshots, and UI assets |
| config/ | Centralized configuration and project settings |
| dataset/ | Raw videos, processed frames, and metadata |
| models/ | Fine-tuned EfficientNetB0 model |
| notebooks/ | Experimentation and model development notebooks |
| outputs/ | Generated outputs and evaluation artifacts |
| src/preprocessing/ | Frame extraction, preprocessing, and face detection |
| src/models/ | Model definitions and utilities |
| src/training/ | Training pipeline and fine-tuning scripts |
| src/evaluation/ | Performance evaluation and metrics |
| src/explainability/ | Explainability utilities and visual analysis |
| src/inference/ | Video inference and majority voting pipeline |
| src/utils/ | Common helper functions |
| app.py | Streamlit web application entry point |
The DeepShield classification model was fine-tuned using EfficientNetB0 to distinguish between Real and Deepfake videos. Rather than relying on a single frame prediction, the system aggregates predictions across multiple frames using majority voting, resulting in a more robust video-level classification.
| Metric | Value |
|---|---|
| Accuracy | 80.60% |
| Precision | 87.74% |
| Recall | 71.15% |
| ROC-AUC | 89.88% |
- Fine-Tuned EfficientNetB0 Backbone
- Binary Classification (Real / Fake)
- Video-Level Majority Voting
- Optimized for Efficient Inference
- Interactive Streamlit Deployment
Note: Performance metrics were obtained using the final fine-tuned EfficientNetB0 model evaluated on a held-out test dataset. Majority voting improves prediction robustness by combining frame-level classifications into a single video-level decision.
The screenshots below illustrate the key stages of the DeepShield inference pipeline.
| π Home Page | π€ Video Upload |
|---|---|
![]() |
![]() |
| βοΈ Video Processing | π§ Final Prediction |
|---|---|
![]() |
![]() |
| π€ Sample Analyzed Faces |
|---|
![]() |
git clone https://github.com/TanmayT134/DeepShield.git
cd DeepShieldpython -m venv venv
venv\Scripts\activatepython3 -m venv venv
source venv/bin/activatepip install -r requirements.txtstreamlit run app.pyOnce the server starts, open your browser and navigate to:
http://localhost:8501
Using DeepShield is straightforward.
Launch the Streamlit application.
Upload a supported MP4 video.
Click Analyze Video.
DeepShield automatically performs:
- Video Frame Extraction
- Face Detection using MTCNN
- Face Preprocessing
- EfficientNetB0 Classification
- Majority Voting
- Dashboard Generation
Review the generated analysis, including:
- π― Final Prediction
- π Confidence Score
- π Prediction Distribution
- π€ Sample Analyzed Faces
- β± Processing Statistics
| Property | Value |
|---|---|
| Model | EfficientNetB0 |
| Task | Deepfake Video Detection |
| Classification Type | Binary |
| Classes | Real, Fake |
| Input Resolution | 224 Γ 224 Γ 3 |
| Framework | TensorFlow / Keras |
| Face Detection | MTCNN |
| Decision Strategy | Majority Voting |
| Output | Softmax Probability |
DeepShield demonstrates practical applications across several domains.
- Deepfake Video Detection
- AI-Powered Media Verification
- Digital Content Authentication
- Cybersecurity Research
- Computer Vision
- Deep Learning
- Educational AI Demonstrations
- Video Forensics Research
DeepShield is designed to be modular and extensible. Several enhancements are planned to further improve detection accuracy, explainability, and deployment capabilities.
- Grad-CAM++ visualization
- Attention heatmaps for detected faces
- Explainable prediction reports
- Frame-level visual explanations
- Multi-face tracking
- Frame-wise prediction timeline
- Real-time webcam analysis
- Batch video processing
- Support for multiple deepfake datasets
- Ensemble learning
- Vision Transformer (ViT) architectures
- Higher detection accuracy through improved training strategies
- Downloadable PDF reports
- Confidence trend visualization
- Detailed frame-wise statistics
- Exportable prediction summaries
- REST API support
- Mobile-friendly interface
- Cloud storage integration
- User authentication
- GPU-accelerated inference
| Version | Status | Planned Features |
|---|---|---|
| v1.0 | β Released | Video Upload, MTCNN, EfficientNetB0, Analytics Dashboard |
| v1.1 | π§ In Progress | Performance Optimization & Code Refactoring |
| v2.0 | π Planned | Explainable AI (Grad-CAM++) |
| v2.5 | π Planned | Multi-face Tracking |
| v3.0 | π Planned | Real-time Detection & REST API |
Contributions are welcome.
If you'd like to improve DeepShield, feel free to:
- Fork the repository
- Create a feature branch
- Commit your changes
- Push the branch
- Open a Pull Request
Bug reports, feature requests, and suggestions are always appreciated.
DeepShield was developed using the following open-source technologies, frameworks, and tools.
Special thanks to the open-source community for providing the technologies, libraries, and resources that made this project possible.
Tanmay Tawade
If you found this project useful, consider giving it a β on GitHub.
If you found this project helpful, consider:
- β Starring this repository
- π΄ Forking the project
- π‘ Sharing your feedback or suggestions
Your support encourages continued development and future improvements.








