0% found this document useful (0 votes)
9 views

Deep Fake Detection

This paper presents a web-based deepfake detection system utilizing Flask, TensorFlow, and OpenCV, designed to classify videos as 'REAL' or 'FAKE' using a pre-trained convolutional neural network. The system preprocesses video frames for real-time classification, although initial tests indicated all videos were classified as 'FAKE', highlighting challenges in model generalization. Future work aims to enhance model accuracy and broaden accessibility through multi-frame analysis and public server deployment.

Uploaded by

tiwaripraveen318
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Deep Fake Detection

This paper presents a web-based deepfake detection system utilizing Flask, TensorFlow, and OpenCV, designed to classify videos as 'REAL' or 'FAKE' using a pre-trained convolutional neural network. The system preprocesses video frames for real-time classification, although initial tests indicated all videos were classified as 'FAKE', highlighting challenges in model generalization. Future work aims to enhance model accuracy and broaden accessibility through multi-frame analysis and public server deployment.

Uploaded by

tiwaripraveen318
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

International Journal of Scientific Research in Engineering and Management (IJSREM)

Volume: 09 Issue: 05 | May - 2025 SJIF Rating: 8.586 ISSN: 2582-3930

Deep Fake Detection: Using a web Based Convolutional Neural Network System
Saurabh Jain 1, Praveen Kumar Tiwari2, Kalash Sharma3 Kolla Charvi 4 ,Lalit Kumar Yadav 5
Praddyumn Raj Singh 6
1
Guide Of Department of Computer Science Engineering, Babu Banarsi Das Institute of Technology and
Management, Lucknow
2
Bachelor of Technology in Computer Science Engineering, Babu Banarsi Das Institute of Technology and
Management, Lucknow
3
Bachelor of Technology in Computer Science Engineering, Babu Banarsi Das Institute of Technology and
Management, Lucknow
4
Bachelor of Technology in Computer Science Engineering, Babu Banarsi Das Institute of Technology and
Management, Lucknow
5
Bachelor of Technology in Computer Science Engineering, Babu Banarsi Das Institute of Technology and
Management, Lucknow
6
Bachelor of Technology in Computer Science Engineering, Babu Banarsi Das Institute of Technology and
Management, Lucknow

---------------------------------------------------------------------***---------------------------------------------------------------------
Abstract – The rapid proliferation of deepfake 1.INTRODUCTION :
technology poses significant challenges to digital media
authenticity, necessitating robust detection mechanisms. This Deepfakes, synthetic media generated by
This paper presents a web-based deepfake detection artificial intelligence, have emerged as a dual-edged
system developed using Flask, sword—offering creative potential while threatening
TensorFlow, and OpenCV, designed to classify misinformation and trust in visual content. With
uploaded videos as "REAL" or "FAKE" based on a pre- advancements in generative adversarial networks
trained convolutional neural network (CNN) model. The (GANs), detecting manipulated videos has become a
system preprocesses video frames to a standardized critical research area. Traditional detection methods rely
on manual analysis or desktop-based tools, limiting
(None, 128, 128, 3) input shape, leveraging a single-
accessibility. This project introduces a web-based
frame analysis approach for real-time classification. Key solution that integrates a pre-trained CNN model into a
challenges, including model compatibility, input shape user-friendly interface, enabling non-experts to upload
mismatches, and prediction biases, were addressed and analyze videos via a browser.
during development. Preliminary results indicate
successful deployment on a local server, though 2. Methodology :
limitations in model generalization were observed, with
The development of the deepfake detection system
all test videos classified as "FAKE." This work
followed a structured approach, combining frontend
highlights the feasibility of web-integrated deepfake
design, backend processing, and machine learning
detection and identifies areas for future enhancement
integration.
Deepfake detection has evolved alongside generative
3.1 System Architecture :
technologies. Early methods relied on visual artifacts,
while modern approaches leverage deep learning. Li et
Frontend: An HTML interface (index.html) with
al. proposed CNN-based detection using frame-level
JavaScript for asynchronous file uploads via the Fetch
features, achieving high accuracy on datasets like Face
API, styled with CSS (style.css).
Forensics++. Rossler et al. introduced the Face
Backend: Flask (app.py) serves the webpage, handles
Forensics++ dataset, pairing real and manipulated
video uploads, and processes predictions, saving files to
videos, with Caption models expecting (128, 128, 3)
static/uploads/.
inputs—similar to our system’s model.
Model: A pre-trained CNN (deepfake_model.h5)
expecting (None, 128, 128, 3) input, loaded with
TensorFlow/Keras.
Key Words: Synthetic Media , Video Manipulation
3.2 Video Preprocessing:
Detection Deep Fake , AI- generated Content , Deep
Neural Network Frame Extraction: OpenCV’s cv2.VideoCapture extracts
a single frame from the uploaded video.

© 2025, IJSREM | www.ijsrem.com DOI: 10.55041/IJSREM47219 | Page 1


International Journal of Scientific Research in Engineering and Management (IJSREM)
Volume: 09 Issue: 05 | May - 2025 SJIF Rating: 8.586 ISSN: 2582-3930

Resizing: Frames are resized to (128, 128) using


cv2.resize() and normalized to [0, 1] by dividing by
255.0. Future work includes:
Input Formatting: A batch dimension is added with np. Enhancing model accuracy with multi-frame analysis
expand dims(), yielding (1, 128, 128, 3) for model input. (e.g., (None, 10, 128, 128, 3) via LSTM).
Expanding supported formats with FFmpeg-backed
3.3 Classification: OpenCV.
Deploying on a public server for broader accessibility.
The model outputs a scalar value (assumed sigmoid- This system lays a foundation for accessible deepfake
activated), interpreted as a confidence score. detection, bridging the gap between AI research and
A threshold of 0.5 determines the label: "FAKE" if confidence practical application..
> 0.5 else "REAL".
5. REFERENCES
3.4 Deployment
1. A. Rossler et al., "FaceForensics++: Learning to
The system runs locally (http://localhost:5000)
Detect Manipulated Facial Images," IEEE
using Flask’s development server, with debug mode
Transactions on Pattern Analysis and Machine
enabled for real-time error tracking.
Intelligence, vol. 42, no. 12, pp. 2967-2981,
2020.
3.5 Development Challenges
Shape Mismatch: Initial attempts to process 10 frames 2. Y. Li et al., "Celeb-DF: A Large-scale
((1, 10, 128, 128, 3)) failed due to model Challenging Dataset for Deepfake Forensics," in
incompatibility, resolved by switching to single-frame Proceedings of IEEE Conference on Computer
analysis. Vision and Pattern Recognition (CVPR), 2020,
File Format: Restricted to .mp4, .avi, and .mov via pp. 3207-3216
ALLOWED_EXTENSIONS, with codec support
dependent on OpenCV’s backend. 3. Goodfellow et al., "Generative Adversarial
Networks," in Proceedings of Advances in
3. Results : Neural Information Processing Systems
(NeurIPS), 2014, pp. 26722680.
The system was tested on a local machine (Windows,
Python 3.12) with sample .mp4 videos from various 4. T. Dolhansky et al., "DeepFake Detection
sources (phone recordings, stock clips). Key Challenge Dataset," arXiv preprint
observations: arXiv:2006.07397, 2020.
Deployment:: Successfully hosted at
http://localhost:5000, with a responsive interface for
video uploads.
Processing: Frames were consistently resized to (128, 5. P. Korshunov and S. Marcel, "DeepFakes: A
128, 3), with model input shape verified as (1, 128, 128, New Threat to Face Recognition? Assessment
3). and Detection," arXiv preprint
Prediction: All tested videos were classified as "FAKE," arXiv:1812.08685, 2018.
with confidence scores ranging from 0.6 to 0.95 (e.g.,
Prediction: [[0.852]])
6. . X. Yang et al., "Exposing Deep Fakes Using
Inconsistent Head Poses," in Proceedings of
4. Conclusion IEEE International Conference on Acoustics,
Speech and Signal Processing (ICASSP), 2019
This project demonstrates a functional web-based
deepfake detection system, integrating Flask, 7. . M. Verdoliva, "Media Forensics and
TensorFlow, and OpenCV to process video frames into a DeepFakes: An Overview," IEEE Journal of
(None, 128, 128, 3) format for CNN-based Selected Topics in Signal Processing, vol. 14,
classification. The system successfully uploads and no. 5, pp. 910-932, 2020
analyzes .mp4, .avi, and .mov files, delivering
predictions via a user-friendly interface. However, the 8. . D. Guera and E. J. Delp, "Deepfake Video
uniform "FAKE" output indicates limitations in the pre- Detection Using Recurrent Neural Networks," in
trained model’s generalization, likely requiring Proceedings of IEEE International Conference
retraining on a balanced dataset or adjustment of the on Advanced Video and Signal Based
classification threshold. Surveillance (AVSS), 2018.

© 2025, IJSREM | www.ijsrem.com DOI: 10.55041/IJSREM47219 | Page 2


International Journal of Scientific Research in Engineering and Management (IJSREM)
Volume: 09 Issue: 05 | May - 2025 SJIF Rating: 8.586 ISSN: 2582-3930

. ClassificationAuthors: Bosheng Yan et


al.Published: December 2022
9. Kundu, R., Balachandran, A., Roy-Chowdhury,
A. K. (2025). TruthLens: Explainable DeepFake
Detection. arxiv.org/abs/2503.15867

10. Chakraborty, R., Chakraborty, R., Rahimian, A.


K., MacDougall, T. (2025). Training-Free
DeepFake Detection. arxiv.org/abs/2503.15342

11. Hossain Shanto, M. D., et al. (2025). DFCon:


Supervised Contrastive Learning for Deepfake
Detection. arxiv.org/abs/2501.16704

12. Mehta, A., McArthur, B., Kolloju, N., Tu, Z.


(2025). HFMF: Hierarchical Fusion for
Deepfake Detection. arxiv.org/abs/2501.05631

13. Wyawahare, M., Tyagi, M., Rajasekaran, K. S.


(2025). Comparative Analysis of Deepfake
Detection Models. hrcak.srce.hr/en/326071

14. Deepfake-Eval-2024: A Multi-Modal In-the-


Wild Benchmark of Deepfakes Circulated in
2024 Link: arXiv:2503.02857

15. SIDA: Social Media Image Deepfake Detection,


Localization and Explanation with Large
Multimodal Model Authors: Zhenglin Huang et
al. Published: December 2024 Link:
arXiv:2412.04292

16. A Improving Fairness in Deepfake


DetectionAuthors: Yan Ju et al.Published:
November 2023

17. Comprehensive Evaluation of Deepfake


Detection Methods: Approaches, Challenges
and Future ProspectsAuthor: Xixi Hu Published:
February 2025Link: ITM Web of Conferences

18. SLIM: Style-Linguistics Mismatch Model for


Generalized Audio Deepfake DetectionAuthors:
Yi Zhu et al.Published: NeurIPS 2024Link:
NeurIPS 2024

19. CrossDF:Link: arXiv:2310.00359 Authors:


Shanmin Yang et al.Published: September 2023

20. Deepfake Detection via Joint Unsupervised


Reconstruction and Supervised

© 2025, IJSREM | www.ijsrem.com DOI: 10.55041/IJSREM47219 | Page 3

You might also like