You are on page 1of 11

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/369235655

MORPHED IMAGE DETECTION USING ELA AND CNN TECHNIQUES

Article · March 2023


DOI: 10.47750/pnr.2022.13.S07.511

CITATIONS READS

0 108

4 authors, including:

Jayasri Kotti
GMR Institute of Technology. Rajam. Vizianagaram(Dist)
22 PUBLICATIONS   29 CITATIONS   

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

DIGITIZATION OF LIBRARY View project

All content following this page was uploaded by Jayasri Kotti on 15 March 2023.

The user has requested enhancement of the downloaded file.


MORPHED IMAGE DETECTION USING ELA AND
CNN TECHNIQUES
Dr. Jayasri Kotti*1, Dr. E. Gouthami2, Dr. K. Swapna3, Suneetha Vesalapu4

1
Professor, Department of Computer Science & Engineering, Vignan’s Institute of Engineering for Women, KJ Peta,
Visakhapatnam (Andhra Pradesh), India.
2
Assistant Professor, Department of Basic Science & Humanities, Vignan’s Institute of Engineering for Women, KJ Peta,
Visakhapatnam (Andhra Pradesh), India.
3
Assistant professor, Department of Computer science and Engineering, College of Engineering, Dr.B.R.Ambedkar
University, Srikakulam.
4
Assistant Professor, Department of Computer Science & Engineering, Vignan’s Institute of Engineering for Women, KJ
Peta, Visakhapatnam (Andhra Pradesh), India.

DOI: 10.47750/pnr.2022.13.S07.511

During recent times, a lot of techniques proliferated that can morph an image resulting in indispensable transition, affecting
the image color, theme, or resolution at times with the addition of multiple filters. This paper introduces a novel approach to
identifying and detect the considered image is real or fake. Proposed approach is designed to depict the genuine of the image
using Convolutional Neural Network (CNN) algorithm and ELA techniques. Forensic image detection technique ELA (Error
Level Analysis) was used to find out the compression ratio between the fake and original images. From the area deep neural
network, we consolidate a database with images that require validation. Detailed diagnostic results created with various
methods and techniques available in deep learning proves proposed network is generic and vigorous. Previously morphed
picture recognition approaches focus on statistical relationships of hand-crafted appearance features between original and
forged images, while this works on providing maximum reliable accuracy to determine the forged of an image. The
determination of the image forged is depicted over an interactive web interface that displays the ELA along with the considered
image which also includes the possibility to share the result via mail to the requested users.

Keywords: ELA, CNN, Morphed image, forged image, Forensic image.

1. Introduction
Every day, millions of images are created by a variety of technologies and transmitted by newspapers, television
stations, and websites. To create critical decisions for specific events many governmental, legal and scientific
entities employ digital photos as evidence. Unfortunately, low development cost, high resolution digital cameras
as well as complicated software has resulted in. So, it is easy to take on image modifications and the detection of
fake photos using photo editing software. Through human vision, this is far more challenging. As a result, the
trustworthiness of digital images/photographs is questioned. real-life events, as a result, picture forensic
approaches for detecting faked images are required. To put an end to this, all photographs uploaded on social
media should be accurately classified as either real or fraudulent. Social media is a fantastic tool for socializing,
sharing, and spreading information, but if used without caution, it has the potential to mislead people and even
wreak mayhem due to unintended false propaganda. While the majority of the photoshopped images are blatantly
manipulated due to pixelization and amateurish work, some of them look to be genuine. Manipulated images,
especially in politics, can make or break a politician's credibility. Current forensic procedures necessitate the use
of an expert to assess the image's reliability. Proposed system uses deep learning to identify whether an image is

Journal of Pharmaceutical Negative Results ¦ Volume 13 ¦ Special Issue 7 ¦ 2022 4069


genuine or not, making it available to the general public. This work will be divided into three sections, the first of
which will focus on the dataset training, the second on the implementation specifics, and the third on the
experimental results. Proposed model is based on counterfeit feature extraction and ELA techniques and is
implemented in deep learning. Error Level Analysis is applied to enhance the efficiency of identifying fake image
copy from real images. This model employs CNN on an image dataset for training and testing to recognize the
altered image. The counterfeit property can be extracted and photographs can be detected using a convolution
neural network (CNN). In the proposed method, we created a user interface that allows users to upload images. It
determines whether the image is real or phony, as well as the image's correctness. The outcome will be emailed
to the user.

To aggregate the information obtained by evidence estimators, existing forgery detection algorithms use several
description approaches. Each depiction technique, however, has its own set of restrictions and drawbacks.
Convolution neural network importance in picture classification and computer vision applications exploded in
recent times. Because it contains information about the picture such as color and structural elements, conventional
neural networks use the original image in RGB channels as the input. New and valuable applications have been
made possible by recent breakthroughs in digital image processing and enhancement techniques. As a result, we
investigated various forms of image production and detection strategies, with a particular focus on pixel-based
picture morphing detection systems. A large number of picture data must be processed to identify image fraud,
and an architectural model may process many pixels in the image. In addition to the project, the training data must
be effective and adaptable to support its use in daily life. As a result, the Convolutional Neural Network (CNN)
architecture, which employs Error Level Analysis (ELA), is used. The image is analysed on two levels in this
research. It checks the picture metadata at the first level. Because image metadata may be changed with simple
tools, it is not very dependable. However, the majority of the photographs we come across will have non-altered
metadata, which will aid in identifying the changes. If an image is modified with Adobe Photoshop, for example,
the metadata will include the Adobe Photoshop version utilized. The image is transformed to an error level
analysed format and scaled to a 100px x 100px image at the second level. Then these 10,000 RGB-valued pixels
(30,000 inputs) are fed into the Multilayer perceptron network's input layer. We decide whether the image is
morphed or not based on the value of these neuron outputs, as well as metadata analyser output, and how likely
the image is to be transformed.

2. Literature Survey
The significance of social media in the spread of fake news or morphed images cannot be underestimated. The
utilization of digital images and forged images has become common in the social media and newspapers. Fake
pictures are frequently aimed with the target and purpose of benefiting one party. Therefore, the research towards
automatic detection also increases rapidly [1][6]. But sometimes morphed image or fake news on social media
and websites has economic and political consequences [2][12]. The present techniques for automatic fake images
recognition are generally based on linguistic and machine learning techniques and also image analysis and
crowdsourcing were applied. There is a pressing need for latest techniques and methods by which morphed image
alterations can be identified [7]. Images are incorporated with posts, social media, or even sent via text, they
immediately become more convincing [3][4]. To detect the fake or morphed images it takes a significant amount
of image data and a vigorous representation that can process every pixel but still provides efficiency and flexibility
to support daily life use [5].

More techniques and algorithms presented in artificial intelligence and machine learning can be applied for the
discovery of fake news [6][18]. In real time communication to each other and PC exchange will be accessible to
objects [15]. This paper presents a new image forgery detection method based on deep learning technique, which
utilizes a convolutional neural network to automatically learn hierarchical representations from the input RGB
color images. The adopted CNN is specifically designed for image splicing and copy-move detection applications
[9][13]. The proposed method recovers the original pixel histogram and the contrast enhancement simultaneously
from a single image with an iterative algorithm [8]. Trained dataset is to detect tampering artifacts in a face
categorization stream and train a patch-based triplet network to leverage features capturing local noise residuals

Journal of Pharmaceutical Negative Results ¦ Volume 13 ¦ Special Issue 7 ¦ 2022 4070


and camera characteristics as a second stream [10]. At present, splicing detection, copy-move detection, and image
retouching detection are attracting noteworthy awareness from researchers [11]. In recent years, reversible data
hiding in encrypted images (RDHEI) has drawn more and more attention and has been widely used in cloud
applications [14][17].

3. Proposed Algorithm
Here outline the inherent aspects of forgery formation and how to tell if an image is genuine. After the morphing
process, the pictures may lose their inter-channel correlation or illuminant consistency. Any minor modification
in the image can be immediately spotted. To find out the variation between the original and the morphed image it
takes less time. In proposed method, three feature extractors and feature fusion module used to find forgery
relevant characteristics. And we use the original image as one of the input branches. Simultaneously with the
original image, these two pieces of substantiation are worn as two extra input branches. By using CNN and ELA
techniques various color transfer methods test the system with faked images. To cumulative the information
obtained by confirmation estimators, existing falsification detection algorithms use several narrative approaches.
Unfortunately, the existing techniques has its own set of limitations and drawbacks. So here in proposed method
uses DIs and IM as two pieces of evidence for image recoloring detection. Based on the observation that images
may lose inter channel correlation or illuminant consistency after recoloring. CNN and ELA analysis is to refine
forgery relevant features and output the probability of authenticity after extracting them. The erudite
characteristics can describe the intrinsic qualities of morphed formation and help to determine the authenticity.

Error Level Analysis (ELA): One of the ways for detecting picture activities is error level analysis, which involves
recording images at a given quality level and computing the comparison between compression levels. In most
cases, this approach is applied to frames in a lossy format (lossy compression). JPEG is the image type that was
used to extract this data. Compression for each 8*8-pixel picture in JPEG images is done separately. If the image
is not processed, the error status must be the same for all 8*8 pixels in the image. Although JPEG is a lossy format,
each re-recording introduces a different degree of inaccuracy. Any alteration to the image will cause the image to
change and the area to become unstable (in the absence of other faults). For example, if you save a modified image
again, it will keep 75% of its original quality, and you can then replicate certain information, such as copying the
book on the shelf and adding the toy dinosaur to the shelf. Because these locations are no longer at the lowest
error threshold, 95% of ELA can detect the change. Other portions of the image are slightly more volatile since
Photoshop mixes information from numerous layers and modifies many pixels. Saving the image from 90% to
90% is the same as saving 81 percent of the backup. Similarly, saving the image at 75% and then re-recording it
at 90% (75 percent to 90%) will provide nearly comparable results (90 percent to 90%), which is a 67.5 percent
backup. There is almost no difference after roughly 64 re-recordings. When the image is edited, however, the
modified 8*8 unit does not have the same error level as the unaltered image. Error level analysis (ELA) calculates
the difference between two images after re-recording them with a given error rate as shown in Fig 1(a), 1(b) and
Fig 2 (a),2(b). The lossy compression of JPEG images is exploited by Error Level Analysis (ELA). Only boundary
sections of authentic images have specific noise patterns, whereas fraudulent images have more white noise and
blobby regions.

Fig. 1(a) Real images & corresponding ELA images

Journal of Pharmaceutical Negative Results ¦ Volume 13 ¦ Special Issue 7 ¦ 2022 4071


Fig. 1(b) Fake images & corresponding ELA images

Fig. 2 (a) Fake images & corresponding ELA images

Fig. 2 (b). Fake images & corresponding ELA images

Convolutional Neural Network: The Convnet or CNN is a neural network subtype that is mostly employed in
image recognition applications. It contains convolutional layer, decreases the image dimensionality without
sacrificing information. The work takes place in the convolution layer. To do so, we define a filter that sets the
size of the partial images we're looking at, as well as a step length that determines how many pixels we continue
between calculations, i.e. how near the partial photos, are to each other. We have considerably decreased the
image's dimensionality by taking this step. The pooling layer is the following step. From a purely computational
standpoint, the same thing happens here as it does in the convolution layer, with the exception that, depending on
the application, we only extract the average or maximum value from the result. This keeps minor details in a few
pixels that are important for the task solution. Finally, there is a fully-connected layer, similar to what we see in
traditional neural networks. We may now use the densely meshed layers because the image's size has been
considerably reduced. To recognize the links and carry out the categorization, the individual sub-images are linked
again. The fundamental construction of CNN includes pooling layer, convolutional layer and a fully linked layer.
The extraction of entities is one of the most common applications of convolutional layers. Connect each layer to
the top layer's local receiving field by connecting each neuron's input. The pooling layer can minimize data size
while maintaining network structural features.

Journal of Pharmaceutical Negative Results ¦ Volume 13 ¦ Special Issue 7 ¦ 2022 4072


Data Set: Kaggle has a large number of datasets to choose from. We use the CASIA dataset, which can be found
on TensorFlow. We have two datasets, one of which contains real photographs and the other of which contains
altered images as shown in fig 3. A total of 8,000 photos are included in the dataset. This is a fantastic training
dataset because each class has exactly 2000 photos. In classification models, we must always make sure that each
class is represented 13 times in the dataset, if at all possible. We use a total of 20% of the photos in the training
dataset for the test dataset. Each of these photos has a resolution of 3232 pixels. Each integer indicates a color
code, and each pixel has a value between 0 and 255. As a result, we divide each pixel value by 255 to bring the
pixel values within the range of 0 to 1.

Fig. 3 General Architecture

4 Experiment and Result


Employee Management System has a graphical user interface that enables actions such as adding new employee
information and determining whether or not he is an employee, using predictive analysis of the complete dataset.
This system also utilizes feature selection to assist users in identifying the critical factors that contribute to an
employee. We describe a novel deep learning strategy for altered picture recognition using the Python
programming language in this paper. This program determines whether an employee photograph is morphed or
not and displays the outcome. In ELA processing, there are two basic methods: deep learning approaches in the
form of Convolutional Neural Networks and data Error Level Analysis. ELA is a forensic method to identify
portions of an image with a different level of compression. The data from the error level analysis is then fed into
the convolutional neural network architecture layer. The information changes to a format known as byte code as
shown Fig 4 and Fig 5. Compilation takes place within Python, but not into machine code. It's converted into byte
code, which the CPU can't understand.

Fig. 4 Data validation

Journal of Pharmaceutical Negative Results ¦ Volume 13 ¦ Special Issue 7 ¦ 2022 4073


Fig. 5 Neural Network Overview

The technique of identifying the number of epochs that is good for use through training is early stopping. With
this process, training will be stopped when the accuracy of validation starts to decrease or the value of validation
loss starts to increase. Since the ELA conversion result image function is used to make the learning model more
effective and the RGB values are normalized, the number of learning periods required is small and convergence
cannot be achieved. Each pixel can also accelerate the convergence of the CNN model. Below fig 6 and fig 7
represents the accuracy obtained by the model doing the classification can be said to be quite high. This is an
indication that the feature is in the form of an ELA image successfully used to classify whether the image is an
original image or has been modified.

Fig. 6 Accuracy and loss curves for epoch

Journal of Pharmaceutical Negative Results ¦ Volume 13 ¦ Special Issue 7 ¦ 2022 4074


Fig. 7 Loss and accuracy curves for training and validation

Web interface:
This paper major goal is to apply the ELA approach to recognize the morphed image and send the results to the
requested user. To make this model more interactive, a web page is constructed shown in below fig 8,fig 9,fig 10
and fig11, that allows the user to select a specific image and assess whether or not it is false, as well as a report
via e-mail. When the interactive web page is run from the command prompt, it connects to a local host. HTML
and CSS are used to build the website. It has an interactive interface that makes image tampering detection simple.
This model can be implemented as an extension to other social networking programs to prevent users from
uploading modified photographs. Stop spreading incorrect information on social media. Notifications can be sent
to secure companies that deal with fraudulent image detection, such as educational institutions and multinational
corporations, to validate papers and identify morphed photographs on verified government portals.

Journal of Pharmaceutical Negative Results ¦ Volume 13 ¦ Special Issue 7 ¦ 2022 4075


Fig. 8 Interface for uploading an image.

Fig. 9 Interface after uploading an image

Fig. 10 Resulted output for the real image.

Journal of Pharmaceutical Negative Results ¦ Volume 13 ¦ Special Issue 7 ¦ 2022 4076


Fig. 11 Resulted output for the fake image.

5. Conclusions
We describe a novel deep learning strategy for altered picture recognition using the Python programming language
in this paper. This program determines whether a photograph is morphed or not and displays the outcome. In ELA
processing, there are two basic methods: deep learning approaches in the form of Convolutional Neural Networks
and data Error Level Analysis. ELA is a forensic method to identify portions of an image with a different level of
compression. The data from the error level analysis is then fed into the convolutional neural network architecture
layer. CNN has numerous fully attached convolutional layers. When picture data is fed into a convolutional neural
network, each pixel may be processed. Finally, show if the image is fake or real. To make it interactive, we
designed a web page that accepts images and email-id as input and processes the output upon request. The output
generated is the input image with its ELA image, along with this the accuracy is also predicted and displayed as
an output. The interface allows us to visually identify the fakeness of an image. The output is also reported to the
requested user via an email that is generated alongside the output. We anticipate that our modest but effective
research will serve as a compacted groundwork for future transformed image identification research. Our future
efforts will be focused on developing a more effective network architecture and identifying high-level cues for
improved detection.

Funding:
No funds, grants, or other support was received.

Financial interests:
The authors have no relevant financial or non-financial interests to disclose.

References
[1] Ozgobek, Ozlem, and Jon Atle Gulla. “Towards an understanding of fake news,” CEUR Workshop Proceedings. 2017.

[2] Kshetri, Nir and Voas, J. (2017). “The Economics of “Fake News” IEEE IT Professional 19(6), 8-12.

[3]https://www.simplyeffectivewebdesign.com/why-images-are-important-in-your-marketing/

[4] Bullas, Jeff. “6 Powerful Reasons Why You Should Include Images in Your Marketing.” 2012.

[5] Narayan Kumar, Sunil Kumar Chowdhary, Abhishek Srivastava, “Intelligent Morphed Image Identification using Error Level Analysis
and Deep learning”, Ilkogretim Online - Elementary Education Online, 2021; Vol 20 (Issue 5): pp. 7181-7189 http://ilkogretim-online.org
DOI: 10.17051/ilkonline.2021.05.809

Journal of Pharmaceutical Negative Results ¦ Volume 13 ¦ Special Issue 7 ¦ 2022 4077


[6] Faraz Ahmad, Lokeshkumar R, “ A Comparison of Machine Learning Algorithms in Fake News Detection”, International Journal on
Emerging Technologies, 10(4): 01-07(2019)

[7] Matthew C. Stamm, K. J. R. Liu, “ Forensic detection of image manipulation using statistical intrinsic fingerprints”, IEEE Transactions
on Information Forensics and Security, 2010

[8] Wen, Longyin, Honggang Qi, and Siwei Lyu. “Contrast enhancement estimation for digital image forensics.” ACM Transactions on
Multimedia Computing, Communications, and Applications (TOMM): 1-21, 14.2, 2018.

[9] Y. Rao and J. Ni, "A deep learning approach to detection of splicing and copy-move forgeries in images," 2016 IEEE International
Workshop on Information Forensics and Security (WIFS), 2016, pp. 1-6, DOI: 10.1109/WIFS.2016.7823911.

[10] P. Zhou, X. Han, V. I. Morariu and L. S. Davis, "Two-Stream Neural Networks for Tampered Face Detection," 2017 IEEE Conference
on Computer Vision and Pattern Recognition Workshops (CVPRW), 2017, pp. 1831-1839, DOI: 10.1109/CVPRW.2017.229.

[11] Yuanfang Guo, Xiaochun Cao, Wei Zhang, and Rui Wang,” Fake Colorized Image Detection”, IEEE TRANSACTIONS ON
INFORMATION FORENSICS AND SECURITY, VOL. 13, NO. 8, AUGUST 2018

[12] ZOLLER KHAN, MD FAHAD AHMAD, “ FAKE IMAGE DETECTION USING CONVOLUTIONAL NEURAL NETWORK”,
http://dspace.daffodilvarsity.edu.bd:8080/bitstream/handle/123456789/3905/P14336%20%2814_%29.pdf?sequence=1&isAllowed=y,
Report Daffodil International University, SEPTEMBER 2019.

[13] Waseem Rawat, Zenghui Wang, “ Deep Convolutional Neural Networks for Image Classification: A Comprehensive Review”, Neural
Computation (2017) 29 (9): 2352–2449, https://doi.org/10.1162/neco_a_00990

[14] Xu Wang, Xu Wang, Li-Yao Li, Ching-Chun Chang, Chih-Cheng Chen, "High-Capacity Reversible Data Hiding in Encrypted Images
Based on Prediction Error Compression and Block Selection", Security and Communication Networks, vol. 2021, Article ID 9606116, 12
pages, 2021. https://doi.org/10.1155/2021/9606116

[15] Jayasri Kotti, D. Nageswara Rao, T. V. Ramana, Huma Khan, Abdul Shareef Pallivalappil, Harish Kumar, Henry Kwame Atiglah,
"Machine Learning-Based Secured Intelligent DMA Controller for Video Restoration", Wireless Communications and Mobile Computing,
vol. 2022, Article ID 9155349, 12 pages, 2022. https://doi.org/10.1155/2022/9155349

[16] Jayasri, K.and Seetharamaiah, P. (2015). A GQM Based Approach towards the Development of Metrics for Software Safety. Journal of
Computer Science, 11(6), 813-820. https://doi.org/10.3844/jcssp.2015.813.820

[17] Kotti Jayasri, Panchumarthy Seetharamaiah,(2016). “The Quantitative Safety Assessment and Evaluation for Safety-Critical Computer
Systems”, ACM SIGSOFT Software Engineering Notes 41 (1), 1-8, ACM New York, NY, USA., https://doi.org/10.1145/2853073.2853091

[18] Kotti, J. Industrial Automation with Safety Aspects using Machine Learning Techniques. Saf. Extreme Environ. 2, 183–188 (2020).
https://doi.org/10.1007/s42797-020-00020-y

Journal of Pharmaceutical Negative Results ¦ Volume 13 ¦ Special Issue 7 ¦ 2022 4078

View publication stats

You might also like