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

Handwritten Digit Recognition Using ML&DL

This document discusses handwritten digit recognition using machine learning and deep learning algorithms. It presents research on classifying handwritten digits using algorithms like SVM, KNN, random forest classifier, and multilayer convolutional neural networks (CNNs) using frameworks like Keras, Theano and TensorFlow. The research uses the MNIST dataset of 60,000 training and 10,000 test images of handwritten digits from 0-9. Key steps included preprocessing the images, developing a neural network architecture with convolutional and pooling layers, and evaluating the models on the test data. Handwritten digit recognition has applications in processing documents, license plate recognition, and CAPTCHAs.

Uploaded by

UTSAV BHARDWAJ
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views

Handwritten Digit Recognition Using ML&DL

This document discusses handwritten digit recognition using machine learning and deep learning algorithms. It presents research on classifying handwritten digits using algorithms like SVM, KNN, random forest classifier, and multilayer convolutional neural networks (CNNs) using frameworks like Keras, Theano and TensorFlow. The research uses the MNIST dataset of 60,000 training and 10,000 test images of handwritten digits from 0-9. Key steps included preprocessing the images, developing a neural network architecture with convolutional and pooling layers, and evaluating the models on the test data. Handwritten digit recognition has applications in processing documents, license plate recognition, and CAPTCHAs.

Uploaded by

UTSAV BHARDWAJ
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Handwritten Digit Recognition Using ML&DL

Saurabh Anand1 Sonu Kumar Giri2, Utsav Bhardwaj3,Divyansh


Assistant Professor, Department of CEA Chaturvedi4, Shubham Jain5
IET, GLA University Mathura, India BTech (CSE) IVth year, Department of CEA
[email protected] IET, GLA University
Mathura, India

Abstract-- Digitized recognition of Digit has in recent times been tools such as scikit-read,
of great interest among scientists because of development of
scipy image, etc. With an algorithm such as multilayer CNN
various algorithms for learning and deep learning. For this
uses Google's Tensor and Tensor Flow etc. By studying
project, we made the most of it widely used Machine Learning deeply Deep Learning , the tools used in this regard make the
algorithms such as SVM, KNN and RFC and Deep Learning app more powerful and accurate.
Handwritten-Digital Recognition is useful in many areas such
algorithm such as multilayer CNN using Keras and Theano and as:
Tensor Flow. The indicator is to take a large number of
handwritten numbers, such as training yourself examples, and • Entering business documents data, e.g. check, passport, bank
then develop a program that you can learn from these training statement and receipt.
• Automatic scan number-plate recognition.
examples. In new words, the neural network uses examples to
• Eliminate anti-bot programs for CAPTCHA, or designed
automatically skip handwriting rules. Handwriting recognition specifically to prevent OCR.
of letters had been around that time in the 19th century. The
obligation to recognize handwritten digits, using a classifier, has
unlimited value and use such as online text recognition on
II. METHODOLOGY
computers, tablets, sight zip codes for postal checks, bank checks
see, for most numerical entries in the building manually
completed (for example - tax preparation) and so on.  Hardware Requirements : Xenon Processor/ AWS
Handwritten digital is not always the same size, dimensions, or EC2 Server
coordinates and sequences of maps. Our guide, to use the pattern  Software Requirements:
• Python 3.5+
partitioning process handwritten digit recognition is provided in • Scikit-Learn (latest version)
MNIST data that sets the handwritten digit images from 0-9. • Numpy (+mkl for windows)
Details set used for our application was built 60,000 training • Matplotlib
• Keras Theano and Tensor Flow
images and 10,000 test images. Each image is 28 x 28 grayscale
(0-255) labelled with each name.

The motivation for this project comes from looking at an


example, if you send a letter with a pin / zip code like "281406"
and the system receives and sees it as "287406" then it will not be
DATA AND RESULTS:
sent to the correct address.
MNIST DATASET- The MNIST dataset, a larger sub- set of
I. INTRODUCTION standard NIST databases, is a database of 70,000 handwritten
numbers, divided into 60,000 training examples and 10,000
testing samples. Definitions in the MNIST dataset exist in an
Handwritten digit recognition has the ability of electronic
orderly format that includes 28by28 values that sign the image
computer devices to receive handwritten I/P.'s as digits from
and their tags. This is the same when processing images again.
many different types of bases, for example- emails, book
Data is presented in 4 files:
pages and photos, etc. This has been a topic of great interest
1. train-photos-idx3-ubyte: set-up training for photos
among investigators. Some of the research areas include
2. training-labels-idx1-ubyte: training labels
translation of postal addresses from envelopes, bank exam
3. t10k-images-idx3-ubyte: test set photos
processing etc. Many classification techniques that use
4. t10k-labels-idx1-ubyte: test set labels
Machine Learning Tools have been developed and are used
for such things as K-Nearest Neighbors, SVM Classifier,
Random Forest Classifier etc. but these methods though
MNIST details provide a specific format. Therefore, to be able
having good accuracy for recognition are not enough for real-
to read the data it is important that you know in what format
world applications. In short, the accuracy required for real-
the data is available. Both training and test images and labels
world applications is very important but these methods do not
occupy the first two columns containing "Magic Number" and
provide the precision required. Here comes the use of deep
no. of file items. The magic number has its first bits of 2 * 8 =
learning for handwritten digit recognition. Many advanced
at least 16bits or 2 bytes equal to 00. It reads like MSB first
and its composition is given below: categories:

1. Stage1 - MNIST Input Data: The first stage is MNIST


input data. MNIST details are given as 784-d pixels. So,
first of all, we convert it to grayscale images using 28x28
pixels matrix.
2 1 1 Byte 2. Stage2 – Construction Network Architect: In the

By By second section, we describe the models that will be used to

tes te build a neural network. Here, we use the Sequential class from
Di Keras to build the network. In this network, we have three sets
00 Da mensio of layers "CONV => ReLU => POOL".
ta n a) Initial Convolution Layer: In the first layer, we take 20
Ty trick filters that run like a smooth 5x5 size window over all
28x28 matrix images and try to find pixels for maximum
pe
resolution

b) ReLU Function: We know that convolution is a method


METHODS/WAYS: that uses Back Propagation. Therefore, using the ReLU
function as a function of output as soon as the detection
layer reduces the probability of the gradient disappears
K-NEAREST NEIGHBORS and avoids sparsity. This way we lose important data and
remove unwanted data like many pixels.
K-Near Neighbor is a process in which the best estimate of all
values is the highest number of neighbors for the least
Euclidian or Hamming value.
KNN learns based on example/instances. This requirement for
training data, is a set of well-labeled data points for c) Pooling Layer: Lakes layer receives data from ReLU
algorithms. This algorithm acts as an I/ P point for new data operation and samples down -steps in 3D tensor. In short
and makes a distinction of this by calculating the Euclidian or it shakes off all the pixels found in previous editions and
Hamming distance between the new data point and the label then rewrites a new image of a smaller size. These images
point. Euclidian distance is measured using the following are then added to the second set of layers i.e. "ConV =>
method: ReLU => POOL" and this process continues until we get
to the smallest set of pixels that helps us classify a digit.
.
3. Stage 3 –Fully Connected Layer: A fully connected layer
is used to connect each layer before the next layer. This
layer contains about 500 neurons. Finally, we use
SoftMaxClassifier that returns a list of possibilities for
SUPERVISED VECTOR MACHINE each 10-class label. A class label with the highest
probability is selected as the last separation from the
In machine learning, a support vector machine is an important network and is shown for output.
model. A supervised learning model used to classify and
streamline within this. In this model, we are given a set of These findings are used to generate the model confusion
examples where each of them is marked as one of the two matrix. In this case we can add a very large number of
categories. The Support Machine model represents a point in layers but adding other layers can affect the accuracy. As,
the space available in the packaging so that the two different it uses many layers, so it's called a deep learning system.
classes of components are as far apart as possible. Image
pixels or test inputs are then scaled and the prediction is based
on class or category, the input to which the test is valid.

CONVOLUTIONAL NEURAL NETWORK ( CNN)


CNN is a type of feed-forward ANN in which the connecting
pattern of its b / w neurons is inspired by a group of visual
animal cortex.
CNN consists of sensory neurons with readability and
prediction. Each neuron receives a specific input and produces
a dot output and optionally follows it with non-linear manner.
CNN STANDARD FOR HANDWRITTEN
RECOGNITION
CNN's Handwritten Digit Recognition works in 3 major
III. CONCLUSION AND FUTURE WORKS

The implementation of a handwritten Dig-Recognition


using Deep Learning has been included in this paper. In
addition, some of the most widely used algorithms are
Machine Learning i.e. RFC, KNN and SVM are trained
and receive test results in the same data to draw
comparisons and why we need deep learning methods in
sensitive applications such as Handwritten Digit
Recognition. In this case, we found that by applying deep
learning techniques, greater accuracy has achieved.
The table below shows an accurate comparison of the
various strategies used by us for the recognition of
handwritten digits.
.

RFC KNN SVM CNN


Trained 99.71% 97.88% 99.91% 99.98%
Classifier
Accuracy

Trained 99.71% 97.88% 99.91% 99.98%


Classifier
Accuracy
Accuracy 96.89% 96.67% 97.91% 98.72%
on Test
Images

Table : Percent Accuracy of Each Classification Technique

REFERENCES
[1] R.BabithaLincy, Dr.R.Gayathri, SVCE, Sriperumbudur.,
“HANDWRITTEN RECOGNITION FOR TAMIL LANGUAGE:
OVERVIEW, CHALLENGES ANDFUTURE”, International
Conference on Recent Trends in Computing, Communication and
Networking Technologies (ICRTCCNT’19) Oct 18-19, 2019, Kings
Engineering College, Chennai, TamilNadu, India.
[2] J.Pradeep, E.Srinivasan and S.Himavathi, “DIAGONAL BASED
FEATURE EXTRACTION FOR HANDWRITTEN ALPHABETS
RECOGNITION SYSTEM USING NEURAL NETWORK”,
International Journal of Computer Science & Information
Technology (IJCSIT), Vol 3, No 1, Feb 2011
[3] MOSHIUR RAHMAN, IQBAL MAHMUD, MD. PALASH
UDDIN, MASUD IBN AFJAL, MD.AHSAN HABIB, FAISAL
KABIR, “HANDWRITTEN BENGALI CHARACTER
RECOGNITIONTHROUGH GEOMETRY BASED FEATURE
EXTRACTION”, Journal of Theoretical and Applied Information
Technology, 15th December 2019, Vol.97, No. 23

You might also like