Fake Currency Detection With Machine Learning Algorithm and Image Processing
Fake Currency Detection With Machine Learning Algorithm and Image Processing
Fake Currency Detection With Machine Learning Algorithm and Image Processing
Abstract—This paper deals with the matter of enhanced accuracy. K-nearest neighbors (KNN) is an
identifying the currency that if the gi ven sample of algorithm that stores all the available data and
currency is fake. Different tradi tional strategies and classifies a new data point based on the similarity. This
methods are avail able for fake currency i dentification means when new data appears then it can be easily
based on the colors, wi dth, and serial numbers classified into a good suite category by using the KNN
mentioned. In the advanced age of Computer science
algorithm [6]. Usually, the Euclidean distance is used
and high computati onal methods, various machine
learning algorithms are proposed by i mage processing as the distance metric. Then, it assigns the point to the
that gi ves 99.9% accuracy for the fake identity of the class among its k nearest neighbors (where k is an
currency. Detecti on and recogniti on methods over the integer).
algorithms include entities like color, shape, paper
wi dth, image filtering on the note. This paper proposes a
method for fake currency recognition using K-Nearest
Neighbours followed by i mage processing. KNN has a
high accuracy for small data sets making it desirable to
be used for the computer vision task. In this, the
banknote authentication dataset has been created with
the high computati onal and mathematical strategies ,
which gi ve the correct data and information regardi ng
the entities and features related to the currency. Data
processing and data Extracti on is performed by
implementing machine learning algorithms and i mage
processing to acquire the final result and accuracy.
Authorized licensed use limited to: San Francisco State Univ. Downloaded on July 01,2021 at 08:40:12 UTC from IEEE Xplore. Restrictions apply.
Proceedings of the Fifth International Conference on Intelligent Computing and Control Systems (ICICCS 2021)
IEEE Xplore Part Number: CFP21K74-ART; ISBN: 978-0-7381-1327-2
In this straight strategy, some errors and drawbacks network, and followed by image processing. It has
were observed that was not making the system and shown the efficiency to be maximum in today's days.
fake identification method more efficient.
motion blur problem,
Noise imposed by image capture instrument III. METHODOLOGY
Less efficient feature extraction technique The data set was made by collecting high-quality
Due to such problems faced in the major cases the images of both genuine and counterfeit currency using
concept for the implementation of image processing an industrial camera. The images have a dimension of
works, which purify the entities like shape, color, 400x400 pixels[2]. Due to the type of lens used and
serial numbers in the form of images and brings more the distance to the investigated object, grayscale
distinction and efficiency in the implementation and pictures of 660dpi were captured. On these pictures,
work was introduced [3]. As the data set is small this Wavelet Transform was used to extract features from
KNN algorithm suits best for the system and high- the gathered images. The attributes gathered after the
performance measures scores are expected for the Wavelet Transformation were as follows-
same. Fake currency detection system not only reduces Variance
the circulation of counterfeit currency but also Skewness
provides encouragement to the dealers to accept/make Kurtosis
payment through cash, refrains people from circulating Entropy
fake notes and also ensures proper flow of currency in Class of the currency
economy. First, four of the five derived attributes are continuous
and describe the features of the note where-as the fifth
II. LITERATURE SURVEY
attribute- ‘Class’, classifies the currency into fake by
Different types of study and research work have been giving it a value of 0 and genuine by giving it a value
carried out in earlier days a different time. Different of 1. The data set has a total of 1372 samples, out of
enhancements and progress were observed [1]. In the which 610 are genuine and 762 are counterfeit note
past studies the data collected for the fake note samples[9].
detection was with professional cameras but in those A brief description of the data set is presented below-
data, accuracy seen was to be fair and good due to
simple machine learning algorithms. K nearest
neighbor algorithms were used traditionally for the
detection of fake notes. Systems were getting slower
when the data size became large. After that system
came across to classify the precision and recognition
rate with some enhancement in Machine learning
algorithms and deep learning concepts [12]. Due to
high and large data sets, data sets were getting
distorted, and the precision was not effective a lot Fig.3 Dataset Description
though it was 98%. All of these detections were
carried out earlier only with open cv and python but On analysing the data, following observations was
time and again with modern deep learning techniques found-
data were collected with the count of 100 images per The data is highly varied. This can be seen as
denomination and then measured [11]. Accuracy of the maximum and mean values of all the
training and testing sets were measured. This brings features vary greatly.
the chain type efficiency that elongates to a larger Therefore, the data needs to be normalized to
value in comparison to other techniques. Concept of prevent from the results being dominated by a
the transfer learning was used in the system. The noise single attribute.
was also captured, and this was another problem due to The ‘Class’ feature has a binary value, 1
which much more advancement was required. After denoting a genuine sample and 0 denoting a
that, a Convolutional neural network came into the counterfeit sample.
measurement for the error elimination. Loss trends Furthermore, after plotting each attriubte following
were generally analyzed concerning training loss (TL) can be observed-
and validation loss (VL). Accuracy trends were Entropy is negatively skewed which implies
generally analyzed by training accuracy (TA). In 2021 that the data has high entropy values[13].
the fake note is being detected with the algorithms of It is observed that Kurtosis is positively
efficient Machine learning, Deep convolutional neural skewed.
Authorized licensed use limited to: San Francisco State Univ. Downloaded on July 01,2021 at 08:40:12 UTC from IEEE Xplore. Restrictions apply.
Proceedings of the Fifth International Conference on Intelligent Computing and Control Systems (ICICCS 2021)
IEEE Xplore Part Number: CFP21K74-ART; ISBN: 978-0-7381-1327-2
Fig.6 Normalization
Authorized licensed use limited to: San Francisco State Univ. Downloaded on July 01,2021 at 08:40:12 UTC from IEEE Xplore. Restrictions apply.
Proceedings of the Fifth International Conference on Intelligent Computing and Control Systems (ICICCS 2021)
IEEE Xplore Part Number: CFP21K74-ART; ISBN: 978-0-7381-1327-2
issue. Moverver, as it is non-parametric and do not Independent and Dependent Variables- As discusses
need to worry about the data distribution and it can the above the data set contains 5 columns with 4 being the
decision boundary can take any form[16]. features extracted after Waveform transform and the
2) Support Vector Classifier- It is a supervised 5th one being the class that distinguishes between fake
machine learning algorithm which is mostly used for and genuine notes. For this project, we took the first 4
classficiation and regression problems. In this attributes-‘variance’, ‘skewness’, ‘kurtosis’ and
algorithm Each point is plot in a n-dimensional plane ‘entropy’ as the independent or input variables and the
with the value of the point being the data point of the ‘class’ as the target or dependent variable. Data is split
sample. Then the classification is performed by finding after the normalization and preprocessing works. We
a hyper-plane that is the best fit for dividing the used the Kfold functionality present in the
classification. Some advantages of this algorithm are- sklearn.model_selection to split the data. The purpose
performs well for non linear decision boundaries, uses of using this library is it helps to gain a more accurate
a subset of training points so is memory efficient, and understanding of the algorithm. As the data is split into
is versatile. Some of the drawbacks include- if the k blocks of data set and the algorithm is run with each
number of features are greater than the number of
block once as the test set. This helps in gaining a
sample the algorithm is likely to underperform and it is
quite taxing to train[5]. complete understanding of the model as each sample is
This algorithm can work on our data set as it is used for both training and testing. Another reason we
classified into 2 classes and the number of features is used this method was that our data set was limited and
quite less that the number of samples. Moreover, as therefore, didn’t take too much extra time in training
discussed above, even 2 features provide us with some through this method.
clear distinction between counterfeit and genuine Once the data was split into training and testing sets,
notes. Therefore, after projecting to a higher we moved on to building the model.
dimensional plane we should get better results.
3) Gradient Boosting Classifier- It is an ensemble D) Building the Model
of weak learner which when work together help in For this project, the required classifiers were imported
providing a very accurate predicting model. A weak from the sklearn library. We made a function that took
learner are algorithms which provide models with parameters as the training and testing data sets along
accuracy being slightly better than randomly choosing with the algorithm and returned a trained model with
an answer. Therefore, they are structured using a its performance measure scores. We repeated this for
decision tree type model in which layers of yes and no every fold and accumulated results for every pass in a
type questions are asked to get a predictive model. list. Lastly, the cross-validation predict module is used
Some of its advantages are that it is easy to interpret to build a confusion matrix for all the algorithms.
and implement, can effectively capture non-linear Finally, plotted the results to gain a visual
function dependencies, it is extremely flexible and understanding of how the algorithms performed[4].
cutomizable and finally builds a robust model using E) Performance measures
the output of many weak learners. However, they Performance measures are used to check the
consume a lot of memory and can be very time correctness of the model. For this project, accuracy,
consuming with the ensemble is large. precision, and f-score are performance measures.
This algorithm can be used on our data set as layered
graphs were plotted for each performance measure and
questions can be asked and the data and be classified
compared the results. k-fold cross-validation technique
according. Moreover, as the number of features are
is used for this project. As discussed above the KFold
less the training and testing time is not going to huge.
and cross-validation predict module from the sklearn
model selection library. This technique divides the
C) Implementation
data set into the number of ‘k’ blocks specified by the
For this project the steps we are going to follow are as
user and runs the algorithm once for every block as a
follows-
test set 10 for the value of k. After building the model
Preprocess and normalize the data set. it is analyzed using the performance measures
Split the data using K-fold cross validation discussed above.
technique.
Training the model using the algorithms IV. RESULT ANALYSIS
discussed above. After training the model using the data set and the
Calculate the performance measures. algorithms described above, we tested them to see how
Initially, the data set was loaded and preprocessed. As they performed. Calculating the performance measures
discussed in the above sections data normalization was described above, we were able to gain an understanding
required that was done using the MinMaxScaler of how every algorithm performed. Below are the
present in the sklearn. preprocessing library. accuracy, precision, and f-scores for each algorithm.
Authorized licensed use limited to: San Francisco State Univ. Downloaded on July 01,2021 at 08:40:12 UTC from IEEE Xplore. Restrictions apply.
Proceedings of the Fifth International Conference on Intelligent Computing and Control Systems (ICICCS 2021)
IEEE Xplore Part Number: CFP21K74-ART; ISBN: 978-0-7381-1327-2
Authorized licensed use limited to: San Francisco State Univ. Downloaded on July 01,2021 at 08:40:12 UTC from IEEE Xplore. Restrictions apply.
Proceedings of the Fifth International Conference on Intelligent Computing and Control Systems (ICICCS 2021)
IEEE Xplore Part Number: CFP21K74-ART; ISBN: 978-0-7381-1327-2
techniques for classification model,” 2018 4th Int. “An automatic recognition of fake Indian paper
Conf. Comput. Commun. Autom. ICCCA 2018, pp. currency note using MATLAB,” Certif. Int. J. Eng.
1–6, 2018, doi: 10.1109/CCAA.2018.8777704. Sci. Innov. Technol., vol. 9001, no. 4, pp. 2319–
[7] S. Arya and M. Sasiku mar, “Fake Currency 5967, 2008, [Online]. Available:
Detection,” 2019 Int. Conf. Recent Adv. Energy- http://www.ijesit.com/ Vo lu me 3/Issue
Efficient Comput. Commun. ICRAECC 2019, pp. 4/IJESIT201404_ 77.pdf.
2019–2022, 2019, doi: [13] M. A. Gaikwad, V. V Bhosle, and V. D. Pat il,
10.1109/ICRA ECC43874.2019.8994968. “Automatic Indian New Fake Currency Detection
[8] A. Ku mar and A. Ku mar, “Dog Breed Classifier for Technique,” Int. J. Eng. Res. Technol., vol. 6, no.
Facial Recognition using Convolutional Neural 11, pp. 84–87, 2017.
Networks,” pp. 508–513, 2020. [14] S. Adhikari, S. Thapa, and B. K. Shah,
[9] M. Haider Ali, “Thesis Report on Fake Currency “Oversampling based Classifiers for Categorizat ion
Detection using Image Processing Method,” Akiful of Radar Returns fro m the Ionosphere,” Proc. Int.
Mohaimin Rifat Islam Shahriar Chowdhury, no. Conf. Electron. Sustain. Commun. Syst. ICESC
13301148, pp. 1–38, 1330. 2020, no. Icesc, pp. 975–978, 2020, doi:
[10] M. N. Shende and P. P. Patil, “A Review on Fake 10.1109/ICESC48915.2020.9155833.
Currency Detection using Image Processing,” Int. J. [15] A. Ghimire, S. Thapa, A. K. Jha, S. Adhikari, and
Futur. Revolut. Comput. Sci. Commun. Eng., vol. 4, A. Ku mar, “Accelerating business growth with big
no. 1, pp. 391–393, 2018. data and artificial intelligence,” Proc. 4th Int. Conf.
[11] T. Agasti, G. Burand, P. Wade, and P. Chitra, “Fake IoT Soc. Mobile, Anal. Cloud, ISMAC 2020 , pp.
currency detection using image processing,” IOP 441–448, 2020, do i: 10.1109/I-
Conf. Ser. Mater. Sci. Eng., vol. 263, no. 5, pp. 88– SMAC49090.2020.9243318.
93, 2017, doi: 10.1088/1757-899X/ 263/5/ 052047.
[12] P. . P. Binod Prasad Yadav, C. S. Pat il, R. R. Karhe,
Authorized licensed use limited to: San Francisco State Univ. Downloaded on July 01,2021 at 08:40:12 UTC from IEEE Xplore. Restrictions apply.