Fake Currency Detection
Fake Currency Detection
Kakileti Murari
Registration No.: 2020105244
Kakileti Murari
Registration No.: 2020105244
Under Supervision of
Dr. Nagaraju Baydeti
BONAFIDE CERTIFICATE
Certified that this Project titled “INDIAN FAKE CURRENCY DETECTION USING
IMAGE PROCESSING AND MACHINE LEARNING” is the bonafide work of SAI
CHARAN DEEP BANDU (2020105252) & KAKILETI MURARI (2020105243) who
carried out the work under my supervision. Certified further, that to the best of my
knowledge the work reported herein does not form part of any other project or dissertation
on the basis of which a degree or award was conferred on an earlier occasion on this or
any other student.
ABSTRACT
Due to the advancement in color printing and scanning technology, the rate of
counterfeit notes production and distribution is massively increasing. Therefore new
problem arises which is faced by almost all the countries. It affects the economy of the
country, since it affects the security of the real economy. Counterfeit currencies are used
to fuel illegal motives, usually involving terrorist activities. According to the various
research, developing countries like India have been impacted by this very negatively.
Even after the steps taken in 2016 to remove the counterfeits, by executing the
demonetization of 500 and 1000-rupees bank notes in India the counterfeits of the new
notes have begun circulating. The primary objective is to detect and reduce circulation of
these counterfeits notes. The secondary objective is to use all the security features of each
denomination provided by Reserve Bank of India for detecting fake notes. This project
gives the complete methodology of fake note detector machine, by leverage cutting-edge
technologies, such as computer vision and machine learning, the aim of this project is
thereby creating a system that can swiftly and accurately distinguish genuine banknotes
from counterfeit ones.
The results of the Convolutional Neural Network model showcase its proficiency in
extracting and interpreting distinctive features within the input data. Each feature model
plays a crucial role in contributing to the model's overall performance, reflecting the
network's ability to discern intricate patterns and representations within image.Our
advanced fake currency detection system stands out by utilizing individual security
features within the input image for precise prediction, distinguishing itself from other
systems that rely on the entire currency note image for analysis.
iv
ACKNOWLEDGEMENT
We wish to place on record our deep sense of gratitude to our honorific Guide
Dr. Nagaraju Baydeti, Assistant Professor, National Institute of Technology for his
supervision, valuable guidance and moral support leading to the successful completion of
the work. Without his continuous encouragement and involvement, this project would not
have been a reality.
We would like to extent my sincere thanks to Dr. Arambam Neelima for their
valuable suggestions. We wish to thank Dr. Lithungo Murry, Department of Computer
Science and Engineering, NIT Nagaland for continuous support. We would also like to
thank all our friends who have developed us to gain a sense of dutifulness, perfection and
sincerity in the effort.
We wish to dedicate this work to our parents, friends and teachers, for they
are the pillars of support giving us confidence in whatever we do. We would like to thank
Shyam Sunder Jannu Soloman, PhD Scholar who has motivated us to work harder and
do our best. Last but not least, we would like to owe our sincere and incessant gratitude to
the almighty God for the immense blessing on us.
&
Kakileti Murari
v
TABLE OF CONTENTS
ABSTRACT
LIST OF FIGURES
LIST OF ABBREVIATIONS
1. INTRODUCTION
1.1 GENERAL
1.2 STATE OF ART
1.3 OBJECTIVES
1.4 ORGANIZATION OF THE REPORT
3. IMAGE PROCESSING
3.1 INTRODUCTION
3.2 NOISE REDUCTION AND OBJECT SEGMENTATION
3.2.1 CLOSING OPERATION
3.2.2 GRABCUT ALGORITHM
3.3 EDGE DETECTION
3.4 CONTOUR DETECTION
3.5 PERSPECTIVE TRANSFORMATION
3.6 FEATURES EXTRACTION USING ROI COORDINATES
vi
4. PROPOSED MODEL
4.1 INTRODUCTION
4.2 CONVOLUTIONAL NEURAL NETWORK
4.2.1 MAX POOLING
6. CONCLUSION
6.1 INTRODUCTION
6.2 HIGHLIGHTS OF THE WORK
6.3 FUTURE WORK
vii
LIST OF FIGURES
LIST OF ABBREVIATIONS
TP - True Positive
TN - True Negative
FP - False Positive
FN - False Negative
1
CHAPTER 1
INTRODUCTION
1.1. GENERAL
The burning question all over the world is a counterfeit currency. In the last fiscal
on the account of frauds the banks have lost Rs.16,789 crores. According to the Reserve
Bank of India. The amount that has been lost on account of frauds in the year 2016-17
was Rs. 16,789 crores which was as per the fraud monitoring report submitted by various
banks and different financial institutions. The distribution of Fake currency even
contributes to the growth of terrorism and it acts as life to terrorism.
The fake currency Detector machine is the solution for this rising problem which can
be used by a common man. Since this kind of detecting machines are available only in
banks and are not affordable by common man. The usage of counterfeit detection
tools/software are available to stop counterfeiting. They are also efficient in terms of cost,
reliability and accuracy. Taking into consideration of overall scenarios, the common man
needs a solution to find out whether the currency is fake or not so that the value of
currency is not lost.
The following bar graph visually depicts the number of detected counterfeit notes
over the last five years
2
A method for identifying real notes from fake was presented by Sharan and Kaur [1].
Using this method, three unique features are extracted from an image: the latent image,
the RBI logo, and the denomination numeral with the Rupee sign. The mean intensity of
the RGB channels in the image is measured. This approach has a notably high degree of
accuracy.
Neeraja et al. [3] proposed a novel approach for currency note duplicate detection that
makes use of the Dual Tree Complex Wavelet Transform (DTCWT). The system
categorizes bogus elements of the note by combining scores from many fake detection
modules. Using the K-NN technique, the method makes use of two images: the original
image of the paper money and a test image for verification.
Paper currency features were extracted by D. Kumar et al. [4] using ORB and a Brute-
Force matcher technique to accurately detect banknote denominations on both the obverse
and reverse sides. Tested on a range of Indian currency denominations, the combination
of ORB and BF matchers in OpenCV produced a detection accuracy of up to 95.0%.
Fake notes were categorized by A. Kulkarni et al. [5] using an image processing
system. The best approach for feature extraction and matching was found by comparing
several image processing methods in Matlab software (SIFT, ORB, FAST, BRISK,
SURF, BRISK, and KAZE).
In their study, Naveen Kumar et al. [7] concentrated on the physical characteristics
of Indian cash, displaying safety elements through image processing techniques. To
differentiate between real and fake notes, the system incorporates safety measures such
the security thread, RBI emblem, and distinctive evidence imprint.
Local Binary Patterns (LBP), Principal Component Analysis (PCA), and the
Euclidean distance algorithm are combined in a method proposed by Kalpna Gautam [8].
This entails using MATLAB to extract features from MAT files and compare them with
input paper money.
The use of image processing techniques for the authentication of Indian paper
currency was discussed by Rubina Mirza et al. [10]. Using edge-based segmentation and
the Sobel operator, the methodology extracts three features: the identity mark, security
thread, and watermark.
4
The entire procedure is effective and suitable for Indian denominations of 100, 500,
and 1000, providing a straightforward and manageable resolution to problems related to
counterfeiting.
1.3. OBJECTIVES
⚫ To effectively use all security features which are provided by the government of
India, thus enabling the system to reliably distinguish between counterfeit and
genuine currency notes.
CHAPTER 2
2.2. DATASET
The dataset used for this project work is benchmark dataset sourced from a conference
paper [9], data is available at Kaggle.com. It comprises of a comprehensive collection of
4000 high-resolution images, with distribution of 3000 genuine and 1000 counterfeit
banknotes of all denominations. The quality and diverse nature of these images make it
ideal for testing and evaluating algorithms in the realm of image processing, particularly
in the context of trained models to distinguish between authentic and manipulated one.
The link of the dataset is mentioned below-
⚫ https://www.kaggle.com/datasets/vishalmane109/indian-currency-note-
images-dataset-2020
After performing image processing techniques, the extracted security features of the
banknotes will be stored in dedicated databases, with each distinct feature being stored in
its own separate database as shown in figure 3.
7
CHAPTER 3
IMAGE PROCESSING
3.1. INTRODUCTION
Image processing using computer vision (CV) stands at the forefront of pioneering
technologies, offering a transformative approach to understanding, analyzing, and
interpreting images. In recent years, the convergence of advanced algorithms,
computational power, and sophisticated hardware has propelled image processing
through CV into a realm of unprecedented possibilities. This multidisciplinary field
merges computer science, mathematics, and domain-specific knowledge to develop
algorithms and techniques that enable computers to comprehend and extract meaningful
information from images. From medical diagnostics to autonomous vehicles, surveillance
systems to augmented reality, the applications of image processing through CV are vast
and diverse. This introduction marks the entry into a realm where pixels transform into
insights, and patterns in visual data unveil solutions to complex problems. As we delve
into the world of image processing using CV, we embark on a journey where innovation
meets visualization, and the power of computers extends to the nuanced understanding of
the visual world around us.
An image is defined as a two-dimensional function, F(x, y), where x and y are spatial
coordinates, and the amplitude of F at any pair of coordinates (x,y) is called
the intensity of that image at that point.
Types of an image
BINARY IMAGE– The binary image as its name suggests, contain only two pixel
elements i.e, 0 & 1, where 0 refers to black and 1 refers to white.
8 bit COLOR FORMAT– It has 256 different shades of colors in it and commonly
known as Grayscale Image. In this format, 0 stands for Black, and 255 stands for white,
and 127 stands for gray.
10
16 bit COLOR FORMAT– It has 65,536 different colors in it.It is also known as High
Color Format. A 16 bit format is actually divided into three further formats which are
Red, Green and Blue.We will be dealing RGB images in this project.
Images are represented in rows and columns as shown in the following syntax
The work flow of feature extraction is shown in figure 5, which encompasses a series
of image processing steps aimed at transforming an input image into a structured
representation that captures essential information for further analysis and pattern
recognition.
Closing morphology technique is useful for closing small gaps within objects in the
image. This operation can help in connecting broken lines caused by noise.
Dilation is used to expand or dilate shapes in an image, which can help in closing
small gaps and smoothing the image. In dilation, the central pixel of the structuring
element is set by performing logical XOR (for binary images) of the values of the pixels
.
Erosion is used to reduce noise by shrinking or eroding the shapes within an image.
the central pixel in the element is set by performing dual of dilation for the values of the
pixels .
A●B=(A ⊕ B) ⊖B (1)
The kernel used in closing operation is 7*7 matrix in which all elements are filled with
ones.
12
1 1 1 1 1 1 1
1 1 1 1 1 1 1
1 1 1 1 1 1 1
1 1 1 1 1 1 1
1 1 1 1 1 1 1
1 1 1 1 1 1 1
1 1 1 1 1 1 1
It is used to extract the main object in the image from the background by
roughly specifying the area around the object.
Fig 8.(a). Input Image from dataset Fig 8.(b). Image after Noise
Reduction
Fig 8.(c). Image after Object Fig 8.(d). Image after Edge
Segmentation Detection
14
Double Thresholding: Used to classify the remaining edge pixels into strong
and weak edge candidates
Edge Tracking by hysteresis: Used to transform weak edge pixels to strong edge
pixels.
Contour is curve that joins all the points lying on the boundary of the object
Syntax: cv2.findContours(img,RETR_mode,APRX_met)
Syntax: cv2.drawContours(img,contours,index)
Syntax: cv2.approxPolyDP(curve,epsilon,closed)
Fig 9.(a). Image after Draw Contours Fig 9.(b). Image after Contours
Approximation
15
Image will be resized into desired pixel length using resize function
Syntax:cv2.resize(img,(height,width))
CHAPTER 4
PROPOSED MODEL
4.1. INTRODUCTION
For the Economic growth of a nation the currency is playing a pivotal role. So, to
overcome counterfeit currency in our country. In this chapter we have proposed a model
to take the currency note as an input and to perform image processing and machine
learning tasks on the currency note to determine whether the currency note is real or fake.
After storing all the extracted security features from each input image in their respective
feature datasets, as illustrated in figure 3, an individual CNN model is trained for each
feature. Subsequently, fusion of a boolean-valued vector comprising the values from all
feature models, is evaluated to calculate the result of the overall model.
18
The objective of this CNN model is to classify images into two categories i.e, real or
fake, leveraging convolutional layers for feature extraction and dense layers for
classification. The network architecture includes convolutional layers with increasing
filter sizes, max-pooling layers for spatial down-sampling, and dense layers for final
classification.
The CNN model consists of three sets of convolutional layers followed by max-pooling
each layer.
model=tf.keras.models.Sequential([tf.keras.layers.Conv2D(16,(3,3),activation='relu',input_shape=(107, 435,3)),
tf.keras.layers.MaxPool2D(2,2),
tf.keras.layers.Conv2D(32,(3,3),activation='relu'),
tf.keras.layers.MaxPool2D(2,2),
tf.keras.layers.Conv2D(64,(3,3),activation='relu'),
tf.keras.layers.MaxPool2D(2,2),
tf.keras.layers.Flatten(),
tf.keras.layers.Dense(512,activation='relu'),
tf.keras.layers.Dense(1,activation='sigmoid')
])
The convolutional layers utilize 3x3 filters, progressively increasing from 16 to 32 and
64 filters. Max-pooling layers with a 2x2 pool size follow each convolutional layer to
down-sample spatial dimensions. A Flatten layer transforms the 3D tensor output into a
1D tensor, which is then fed into two Dense layers. The first Dense layer has 512 units
with a ReLU activation function, and the final layer with 1 unit uses a sigmoid activation
for binary classification.
The required Conv2D parameters are activation function, height and width of input
image, number of filters that the convolutional layer will learn.
Layers early in the network architecture learn fewer convolutional filters while layers
deeper in the network will learn more filters.Conv2D layers in between will learn more
filters than the early Conv2D layers but fewer filters than the layers closer to the output.
19
The process of pooling that chooses the maximum element from the area of the
feature map that the filter covers is called max pooling. As a result, the output after max-
pooling layer would be a feature map containing the most prominent features of the
previous feature map.
The output of a CNN model typically consists of predictions or classifications for the
given input. In the context of binary classification tasks, where the goal is to categorize
input data into one of two classes, the CNN model will produce an output that can be
interpreted as either true or false, corresponding to the predicted class for the given input.
This binary nature of the output reflects the model's decision on the presence accurate
features, ultimately resulting in a categorical assignment of the input data.
Following the output of the Convolutional Neural Network (CNN) model, a post-
processing step involves type casting the predicted values. In this context, the model's
output, which signifies true or false based on the binary classification task, will be
explicitly converted to numerical values. Specifically, the conversion will be to type cast
true to 1 and false to 0. This transformation facilitates a convenient representation of the
model's predictions in a numeric format, allowing for straightforward interpretation and
compatibility with various analytical or computational procedures that may require
numerical input.
21
........
1 0 1 1 0 1
Fig 17. Combining values from each model to generate final result
The dot product will be computed by multiplying corresponding values from each
model as shown in figure 16 . This process involves taking the individual predicted scores
generated by each model and performing dot product to predict a final value. The dot
product operation ensures that the influence of each model's prediction is considered in
the overall outcome.
22
CHAPTER 5
5.1. INTRODUCTION
In this section, we delve into the interpretation and discussion of the results obtained,
on implementing Convolutional Neural Network (CNN) model. The results encapsulate
the model's ability to learn intricate patterns and make predictions on images with a focus
on accuracy. The architecture of a CNN, with its convolutional layers, flattened layers,
and dense layers, is designed to capture minute details from images. CNN uses small
squares of input data and slides them over the entire image to learn local patterns. CNN
allows the network to learn hierarchical representations, capturing simple features in the
early layers and complex structures in deeper layers.
Accuracy is used to measure the performance of the model. It is the ratio of Total correct
instances to the total instances.
Accuracy can be calculated by
FEATURE 1
FEATURE 2
FEATURE 3
FEATURE 4
FEATURE 5
FEATURE 6
5.3. CONCLUSION
The output of a CNN model typically consists of predictions or classifications for the
given input. In the context of binary classification tasks, where the goal is to categorize
input data into one of two classes, the CNN model will produce an output that can be
interpreted as either true or false, corresponding to the predicted class for the given input.
This binary nature of the output reflects the model's decision on the presence accurate
features, ultimately resulting in a categorical assignment of the input data.
26
CHAPTER 6
CONCLUSION
6.1. INTRODUCTION
The journey begins with the raw input image, where the first steps involve noise
reduction and object segmentation. Robust preprocessing techniques are employed to
enhance image quality, ensuring clarity in subsequent stages. The processed image
undergoes edge detection, a critical step in identifying boundaries and prominent features.
Contour detection further refines this process, by outlining distinct shapes within the
image. Perspective transformation corrects distortions in the image, ensuring accurate
spatial relationships. This is particularly beneficial for images with skewed perspectives
or angles. Regions of interest are extracted with precision, focusing on the areas
containing essential information. This step involves isolating key elements from the
image, laying the foundation for subsequent feature extraction. The extracted ROIs serve
as the basis for feature dataset creation. Essential characteristics and patterns within the
regions are meticulously documented, forming a rich dataset essential for training the
Convolutional Neural Network (CNN). Leveraging the curated feature dataset, a CNN
model is trained to recognize and understand intricate patterns. The model undergoes
27
iterative training, learning to discern the nuances within the features and enhancing its
predictive capabilities.
The trained CNN model is put to the test using a new image. This step assesses the
model's generalization and its ability to accurately classify and interpret features within
unseen data. The final result is derived from the trained model's predictions on the test
image.
⚫ To train on various machine learning models for one denomination and after
analyzing the results, will subsequently train the model for other denominations.
REFERENCES
1. V. Sharan and A. Kaur, “Detection of Counterfeit Indian Currency Note using Image
Processing”, International Journal of Engineering and Advanced Technology, Vol. 9,
no. 1, pp. 2440-2447, 2019.
2. V. Saxena and Snehlata, “An Efficient Technique for Detection of Fake Currency”,
International Journal of Recent Technology and Engineering, Vol. 8, no. 3, pp. 1298-
1305, 2019.
3. Y. Neeraja, B. Divija and M. Nithish Kumar, “Fake currency Detection using K-NN
Technique”, International Journal of Research in Engineering, IT and Social Science,
Vol. 9, no. 1, pp. 201-205, 2019.
7. T. Naveen Kumar, T. Subhash, S. Saajid Rehman, N. Hari Babu, P. Sai and D. Regan,
“Fake Currency Recognition System for Indian Notes Using Image Processing
Techniques”, Journal of Emerging Technologies and Innovative Research, Vol. 6, no.
4, pp. 30-35, 2019.
9. Aman Bhatia, Vansh Kedia, Anshul Shroff, Mayand Kumar, Bickey Kumar Shah,
Aryan, “Fake Currency Detection with Machine Learning Algorithm and Image
29