Deepfake Detection System Using Deep Neural Networks
Deepfake Detection System Using Deep Neural Networks
Abstract— The rapid progress in technology and automation B. How do Deep Fakes Work?
has enabled sophisticated manipulation of multimedia content,
Over time, we've witnessed a significant surge in the
blurring the line between real and fabricated media. Deepfake
volume of data accessible to the public through various online
technology, driven by deep learning and Generative Adversarial
Networks (GANs), creates hyper-realistic fake content, with
platforms, including social media. This wealth of information
applications spanning video games, films, and advertising. has become a valuable resource. Simultaneously, rapid
However, this technology also carries substantial societal risks, advancements in machine learning and deep learning,
fostering misinformation and explicit content. To mitigate these particularly through technologies like Generative Adversarial
concerns, this paper presents a Deepfake detection system that Networks, have made it astonishingly simple to create
utilizes deep neural networks to discern genuine from forged convincingly realistic fake content [2].
images. Frames are extracted from videos and face detection
Various deepfake techniques exist for altering the
and face cropped are performed. LSTM and ResNext CNN are
utilized to generate a feature vector. The proposed system uses
appearances of individuals, and three of the most frequently
the Anvil platform to design the front end and Visual Studio and encountered methods include identity swapping, expression
Jupyter Notebook for the back end. A publicly available dataset swapping, and the creation of entirely new faces. Machine
was used to train and test the model. The proposed model learning plays a pivotal role in the creation of deepfakes, with
achieved an impressive 86% accuracy on video dataset. these techniques rooted in deep learning methods and neural
networks [3]. Fig. 1 illustrates the process of deep learning,
Keywords— Deepfake, Fake contents, Deep Neural Networks, which serves as the foundation for generating deepfake
Generative Adversarial Networks (GANs), Anvil Platform. content. The initial step in the deepfake creation process
entails training a neural network, which falls under the
I. INTRODUCTION broader umbrella of machine learning. This training process
A. Problem Overview imparts the model with a comprehensive understanding of a
person's appearance in images or videos under various
A deepfake refers to a deceptive form of media, whether conditions, such as different angles and lighting scenarios.
it's a video or an image, cleverly crafted using advanced deep Machine learning further divides the model used in deepfake
learning and machine learning techniques. Typically, creation into two distinct phases: training and testing. During
deepfakes involve superimposing a person's appearance, model training, a dataset is employed to generate fake videos,
voice, and behaviour into fictional scenarios that never while in parallel, detection mechanisms are developed to
actually took place, resulting in misleading content [1]. The identify these fabricated videos [4].
consequences of this technology can be deeply distressing,
particularly when it's used to create revenge porn, which can C. Deep Neural Networks
inflict intense emotional turmoil on the victims, leading to A deep neural network, comprising numerous layers of
feelings of anger, guilt, paranoia, depression, and tragically, nodes, is designed to execute complex operations based on the
even thoughts of suicide. provided input. On the other hand, a convolutional neural
Moreover, deepfake technology allows for the effortless network (CNN) specializes in image recognition and plays a
swapping of faces in videos or images, a capability frequently crucial role in tasks such as deep fake detection, which
exploited for nefarious purposes. Malicious actors use this involves analyzing images and video frames individually.
technology to fabricate videos featuring individuals we trust, CNNs are fundamental components of contemporary artificial
aiming to deceive others into falling for scams, divulging intelligence systems [5]. The cornerstone of their functionality
sensitive information, or even parting with their hard-earned lies in convolution operations, where an image, represented as
money. a two-dimensional array of numbers, is convolved with a
Authorized licensed use limited to: NATIONAL INSTITUTE OF TECHNOLOGY SILCHAR. Downloaded on October 19,2024 at 06:31:06 UTC from IEEE Xplore. Restrictions apply.
Balde et al [13] proposed a method for improving facial
recognition of FaceNet. By employing facial recognition
technology to examine video frames, the model's III. PROPOSED SYSTEM
methodology enables it to discriminate between authentic and The proposed system aims to develope a method for the
altered content. The submission uses Facenet, a facial detection of deepfake videos. The methodology for
recognition system, as a starting point. Facenet maps facial identifying deep fakes is outlined as follows:
features to points in a multidimensional space, where the
proximity of points indicates how similar a face is to another. Step 1: Obtain a deepfake dataset from Kaggle, which will
A plotted histogram that conveys the final verdict on video be refined by incorporating real-world samples. This
authenticity and sheds light on the model's level of refinement process enhances the quality of the dataset,
confidence in its prediction is used. The evaluation of this particularly in terms of feature selection.
model primarily considers complexity and accuracy. Step 2: Develop a system using Meso-4 algorithm, which is
However, it's worth noting that the absence of a graphical based on deep learning and neural networks. This algorithm
user interface renders it a straightforward text-based program, will be employed for training and testing the refined dataset.
and the final output is presented graphically, potentially
posing a clarity challenge. Step 3: To present the analysis effectively, a graphical user
interface (GUI) has been created. This GUI will display the
Tariq Shahroz et al [14] employed a technique known as results in the form of a bar chart, offering users a clear visual
Long Short-Term Memory (LSTM), a type of neural network, representation of the growth of deepfakes and their variations
in their paper. In addition to neural networks, they also based on confidence scores. The Anvil platform, a Python-
developed web applications using the Django framework. based drag-and-drop web app builder, was utilized to design
The primary objective of this paper was to identify videos the GUI.
falling into the category of "deep fakes." To achieve this,
deep learning techniques such as LSTM and ResNext CNN
were utilized to generate a feature vector. The system
architecture of this model entails the uploading of videos,
followed by data preprocessing, which includes data splitting.
The deep fake detection model incorporates ResNext feature
extraction and LSTM video classification. Following the
deepfake detection phase, the model's performance is
assessed using a confusion matrix, providing a final label
indicating whether the video is authentic (original) or
synthetic (categorized as fake). To bring this system to life, a
website was created using the Django application, which is a
high-level Python web framework known for facilitating
swift development and clean code practices. Kavita Lal [15]
performed a study on deep fake identification techniques
using deep learning. Table 1 presents a summary of the
contributions done by various reseachers.
Authorized licensed use limited to: NATIONAL INSTITUTE OF TECHNOLOGY SILCHAR. Downloaded on October 19,2024 at 06:31:06 UTC from IEEE Xplore. Restrictions apply.
The proposed system used publically available dataset V. RESULT AND DISCUSSION
from kaggle [16] which has 50 smaller videos. These videos The primary challenge faced in this research work is the
are pre-processed and frames are extracted. Resizing is done insufficient availability of datasets for authenticating both
for standard resolution and data augmentation was done for genuine and deepfake images. To enhance the model's
increasing the dataset size. predictive accuracy, it is imperative to expand the dataset.
C. Model Architecture: This issue holds significant importance as it hinders the
model's ability to detect deepfake images prevalent in the real
The proposed system used MesoNet pre-trained deep world, primarily because the majority of available deepfake
neural network for feature extractor and classification. Meso- datasets originate from adult content websites or a specific
4 consists of four layers of pooling and convolutions that are subset thereof. Addressing this challenge necessitates the
successively followed by a dense network with a single hidden creation of a more extensive and diverse dataset featuring
layer. One more layer was added to classify the images as a images of various types and individuals from different ethnic
fake or real. backgrounds. Several strategies can be explored to tackle this
D. Training and Fine-Tune the Model issue. One approach involves establishing a platform for users
to contribute their images. Alternatively, collaboration with
Dataset was split into training, test, and validation sets. prominent image platforms like Meta, which hosts a wide
The model was fine-tuned on this dataset to achieve better range of user-generated images, could yield valuable datasets
performance. for research purposes. Another avenue is to amalgamate
publicly accessible datasets of both deepfake and genuine
images into a unified resource.
Another noteworthy concern pertains to the limitations of
deep fake analysis as a comprehensive solution for mitigating
the proliferation of synthetic content on the internet. Our
findings suggest that the ultimate solution lies in
implementing content verification mechanisms across various
internet platforms. In practice, this may involve major IT
corporations collectively integrating identification protocols
into their platforms when publishing content. The illustrations
of implementation of developed model and the results are
depicted in Fig. 5, Fig. 6 and Fig. 7.
Authorized licensed use limited to: NATIONAL INSTITUTE OF TECHNOLOGY SILCHAR. Downloaded on October 19,2024 at 06:31:06 UTC from IEEE Xplore. Restrictions apply.
[4] S. S. Chauhan, N. Jain, S. C. Pandey and A. Chabaque, "Deepfake
Detection in Videos and Picture: Analysis of Deep Learning Models
and Dataset," 2022 IEEE International Conference on Data Science and
Information System (ICDSIS), Hassan, India, 2022, pp. 1-5, doi:
10.1109/ICDSIS55133.2022.9915885.
[5] Raza A, Munir K, Almutairi M. A Novel Deep Learning Approach for
Deepfake Image Detection. Applied Sciences. 2022; 12(19):9820.
https://doi.org/10.3390/app12199820
[6] Güera, David, and Edward J. Delp. "Deepfake video detection using
recurrent neural networks." 2018 15th IEEE international conference
on advanced video and signal based surveillance (AVSS). IEEE, 2018.
[7] K. Bansal, S. Agarwal and N. Vyas, "Deepfake Detection Using CNN
and DCGANS to Drop-Out Fake Multimedia Content: A Hybrid
Approach," 2023 International Conference on IoT, Communication
and Automation Technology (ICICAT), Gorakhpur, India, 2023, pp. 1-
6, doi: 10.1109/ICICAT57735.2023.10263628.
Fig. 7. Real Image Detected by the App
[8] https://github.com/yuezunli/celeb-deepfakeforensics
[9] https://github.com/deepfakeinthewild/deepfake-in-the-wild
The deepfake detection system underwent training and
[10] https://www.idiap.ch/en/scientific-research/data/deepfaketimit
testing using a video dataset where frames are extracted. This
model demonstrates a high level of accuracy, achieving 86% [11] Li, Y., Yang, X., Sun, P., Qi, H., & Lyu, S. (2020). Celeb-df: A large-
scale challenging dataset for deepfake forensics. In Proceedings of the
precision, particularly when applied to synthetic datasets. IEEE/CVF conference on computer vision and pattern recognition (pp.
3207-3216).
[12] D. Afchar, V. Nozick, J. Yamagishi, and I. Echizen, “MesoNet: A
VI. CONCLUSION compact facial video forgery detection network,” 10th IEEE Int. Work.
Inf. Forensics Secur. WIFS 2018, 2018, doi:
Deep learning has emerged as a prominent force in the 10.1109/WIFS.2018.8630761
realm of artificial intelligence, and image-related challenges [13] Balde, Ansh Abhay, Abhay Jain, and Dipti Patra. "Improving facial
have played a pivotal role in this progress. Thanks to recent recognition of FaceNet in a small dataset using DeepFakes." 2020 4th
advancements in convolutional neural networks, there is a International Conference on Computer, Communication and Signal
Processing (ICCCSP). IEEE, 2020.
prevailing belief that AI will soon surpass human capabilities
[14] Tariq, Shahroz, Sangyup Lee, and Simon S. Woo. "A convolutional
in most conventional vision-based tasks. This development lstm based residual network for deepfake video detection." arXiv
carries profound implications for society, information preprint arXiv:2009.07480 (2020).
dissemination, and the media, especially in light of AI's [15] Kavita Lal, Madan Lal Saini; A study on deep fake identification
newfound ability to generate convincingly deceptive images techniques using deep learning. AIP Conf. Proc. 15 June 2023; 2782
and videos. Notably, our proposed model, employing Meso4 (1): 020155. https://doi.org/10.1063/5.0154828
architecture and trained on a publically available dataset of [16] https://www.kaggle.com/code/piyush357/deepfake-
videos, has demonstrated an 86% accuracy in detecting deep detection/notebook
fakes. The forthcoming endeavours will predominantly focus [17] https://www.kaggle.com/competitions/deepfake-detection-
on enhancing the precision of deep-fake video detection. challenge/data
[18] D. H. Choi, H. J. Lee, S. Lee, J. U. Kim and Y. M. Ro, "Fake Video
Detection With Certainty-Based Attention Network," 2020 IEEE
International Conference on Image Processing (ICIP), Abu Dhabi,
REFERENCES United Arab Emirates, 2020, pp. 823-827, doi:
10.1109/ICIP40778.2020.9190655
[1] Deepfakes: Trick or Treat. - ScienceDirect. ScienceDirect.Com/
Science, Health and Medical Journals, Full Text Articles and Books., [19] Tolosana, R., Vera-Rodriguez, R., Fierrez, J., Morales, A. and Ortega-
https://www.sciencedirect.com/science/article/abs/pii/S000768131930 Garcia, J. Deepfakes and beyond: A Survey of face manipulation and
1600. fake detection. Information Fusion, (2020), [online] 64, pp.131–148.
Available at: https://arxiv.org/pdf/2001.00179.pdf.
[2] Korshunov, P., & Marcel,. Deepfakes: A new threat to face recognition,
assessment and detection. From arXiv.org, online available at [20] Nguyen, H. M., & Derakhshani, R. Eyebrow recognition for
https://arxiv.org/abs/1812.08685. identifying deepfake videos. In 2020 international conference of the
biometrics special interest group (BIOSIG) (pp. 1-5). IEEE.
[3] H. A. Khalil and S. A. Maged, "Deepfakes Creation and Detection
Using Deep Learning," 2021 International Mobile, Intelligent, and
Ubiquitous Computing Conference (MIUCC), Cairo, Egypt, 2021, pp.
1-4, doi: 10.1109/MIUCC52538.2021.9447642
Authorized licensed use limited to: NATIONAL INSTITUTE OF TECHNOLOGY SILCHAR. Downloaded on October 19,2024 at 06:31:06 UTC from IEEE Xplore. Restrictions apply.