Research Article

Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

Journal of Science and Technology

ISSN: 2456-5660 Volume 3, Issue 05 (Sep – Oct 2018)


www.jst.org.in DOI:https://doi.org/10.46243/jst.2018.v3.i05.pp81 - 90
Recognition of Handwriting Characters Using an Artificial
Neural Network
Dr S.B.Thorat1, Dr. P.B. Tamsekar2, Dr. P.R. Patil3
Director, Assistant Professor2,3
SSBES ITM College Nanded
[email protected], [email protected], [email protected]

To Cite this Article


Dr S.B.Thorat, Dr. P.B. Tamsekar, Dr. P.R. Patil, Recognition of Handwriting
Characters Using an Artificial Neural Network ” Journal of Science and Technology,
Vol. 03, Issue 05,-Sep-Oct 2018, pp81-90
Article Info
Received: 26-09-2018 Revised: 09-09-2018 Accepted: 23-10-2018 Published: 30-10-2018

Abstract

Research in the area of handwriting recognition has several applications, including


the digitization of handwritten documents and the ability to use handwriting as an
input method for gadgets. In this project, an Artificial Neural Network (ANN) was
used to produce a handwriting recognition system, and the Streamlit library was
used to develop a graphical user interface (GUI). We preprocessed the photos by
scaling, turning to grayscale, and normalising pixel values using a dataset of
handwritten numbers from Kaggle. Two hidden layers with ReLU activation and
Softmax activation for the output layer made up the ANN model's design. After
adding the pytesseract library, the model had a 90% accuracy rate on the test
dataset. Users could draw a digit and get results for digit recognition using the GUI
interface. Future studies could concentrate on increasing precision and broadening
the system's ability to recognise handwritten text. The overall potential of ANN and
GUI technologies for handwriting recognition applications is demonstrated by this
project.

Keywords: of Artificial Neural Networks (ANN), Handwritten,Text classification

INTRODUCTION

In today's digital age, handwriting recognition and interpretation software as well as the
digitalization of handwritten documents are essential. Applications for handwriting recognition

Published by: Longman Publishers www.jst.org.in Page | 81


Journal of Science and Technology
ISSN: 2456-5660 Volume 3, Issue 05 (Sep – Oct 2018)
www.jst.org.in DOI:https://doi.org/10.46243/jst.2018.v3.i05.pp81 - 90
systems range from automating document processing to improving accessibility for people with
disabilities. Using the strength of Artificial Neural Networks (ANN) and the Streamlit library, we
set out to create a powerfulhandwritingdetection system that is user-friendly and graphical.Research
on handwriting recognition has been going on for a while, but in recent years, deep learning
approaches have made a big difference. The use of neural networks, specifically Convolutional
Neural Networks (CNNs), Recurrent Neural Networks (RNNs), and Artificial Neural Networks
(ANNs), has shown remarkable progress in accuracy and performance compared to previous
approaches to handwriting recognition that relied on rule-based or statistical methods. In-depth
study has concentrated on model architectures, feature extraction techniques, and preprocessing
methods to improve the efficacy and efficiency of handwriting recognition systems.

We will use a dataset of handwritten digits from Kaggle for this project, which includes photos
of different handwritten numbers. The dataset will be preprocessed in order to standardise it.
These stages include shrinking the photographs to a constant dimension, turning them to
grayscale in order to reduce the amount of data they generate, and normalising the pixel values to
fall within a common range. Additionally, to help the neural network successfully analyse the
data, we will flatten the 2D images into a 1D array. The set of handwritten digits in the dataset
consists of about 30,000 training photos and 3,000 testing images.
Designing an Artificial Neural Network (ANN) model for handwriting detection is the strategy
we've decided to take. The input layer will include 784 neurons that represent the flattened image
data, and the architecture will have two hidden layers with 128 neurons each. The hidden layers
will get the Rectified Linear Unit (ReLU) activation function, while the
The Softmax activation feature will be used by the output layer. The categorical cross-entropy
loss function will be used to train the model, and the Adam optimizer with a learning rate of
0.001 will be used to optimise it.
After the model has been trained on the supplied dataset, we will analyse its accuracy and overall
recognition capabilities by evaluating its performance on a different testing dataset. We will
create a Graphical User Interface (GUI) using the Streamlit library to guarantee usability and
accessibility. End users will be able to communicate with the system through the GUI and draw a
digit with a mouse or touchscreen input. The interface will take a picture of the sketch and send
it to the trained model for analysis. The user will see the recognised digit and a confidence score

Published by: Longman Publishers www.jst.org.in Page | 82


Journal of Science and Technology
ISSN: 2456-5660 Volume 3, Issue 05 (Sep – Oct 2018)
www.jst.org.in DOI:https://doi.org/10.46243/jst.2018.v3.i05.pp81 - 90
indicating how confident the model is in the prediction.
Using an Artificial Neural Network (ANN) and the Streamlit library, this project seeks to create
a reliable handwriting detection system that is user-friendly. We anticipate obtaining great
accuracy in digit recognition by utilising deep learning techniques and a well-designed
architecture. The GUI will improve the system's usability and accessibility, facilitating the use of
handwriting as an input method by end users. Through the digitalization of handwritten text and
the facilitation of more effective and natural interactions with digital devices, this project
advances handwriting recognition technology.

Literature Review:

Y. LeCun, Bottou, and others. This foundational book provided the first discussion of
Convolutional Neural Networks (CNNs) for document recognition, including handwriting
detection. The authors demonstrated how highly accurate and robustly CNNs can recognise
handwritten characters. Later advancements in deep learning-based handwriting recognition
systems benefited from their study.It was recommended that offline handwriting identification be
carried out using recurrent neural networks (RNNs), more specifically Bidirectional Long Short-
Term Memory (BLSTM) networks, in a study report by Graves, A., Liwicki, et al. The
researchers demonstrated how the memory cells in the LSTM units and the bidirectional nature
of the network improved recognition accuracy, particularly for cursive handwriting.Simard et al.
wrote the text. In this study, recommended training procedures for Convolution Neural Networks
(CNNs) for visual document analysis, including handwriting recognition, were given. The
authors discussed a number of elements, such as network architecture, training procedures, and
data pretreatment, that can enhance CNN models' performance and increase their
generalizability. Their work contributed to the advancement of CNN-based handwriting
recognition systems.This significant book chapter by Graves, et al. provides a complete overview
of sequence labelling issues using recurrent neural networks (RNNs), including handwriting
recognition. Various RNN topologies, training methods, and strategies for handling with input
sequences of different lengths were all explored by the author. The chapter was a helpful tool for
academics and professionals working on handwriting recognition using RNNs.The first article by
Bluche, et al. to discuss the Multi-Dimensional LSTM (MDLSTM) with attention mechanisms
for end-to-end handwritten paragraph detection. By selectively paying attention to different parts

Published by: Longman Publishers www.jst.org.in Page | 83


Journal of Science and Technology
ISSN: 2456-5660 Volume 3, Issue 05 (Sep – Oct 2018)
www.jst.org.in DOI:https://doi.org/10.46243/jst.2018.v3.i05.pp81 - 90
of the input sequence, the authors proposed an attention-based approach to manage extended
sequences and increase recognition accuracy. Their research demonstrated how tasks involving
handwriting recognition might incorporate contextual information.To highlight the contributions
and advancements made in the field of deep learning-based handwriting recognition, here are
only a few publications that were chosen. Numerous research papers and studies produced by
diverse authors have added to the body of literature on handwriting recognition. These papers
and articles include information on model architectures, training strategies, data preprocessing,
and performance assessment techniques.Author: Graves, et al. describe how Connectionist
Temporal Classification (CTC), a method for training recurrent neural networks (RNNs) without
explicitly aligning input and target sequences, was introduced in their research. The model was
trained directly on unsegmented sequences of characters or words by the authors, who showed
how CTC may be used to recognise handwriting.Written by Jaeger et al. In order to recognise
handwritten text, this paper developed a hierarchical neural network design. By combining
character- and word-level recognition models, the authors' system took advantage of the
complimentary data that exists at various levels of abstraction. In comparison to single-level
models, the hierarchical method demonstrated increased accuracy in recognising handwritten
text.
Existing System:

The current system has taken a variety of approaches to handwriting recognition, including rule-
based methods, statistical methods, and conventional machine learning algorithms. To recognise
handwritten language, these techniques frequently rely on intricate algorithms and manually
constructed features. The speed and precision of recognition are constrained, and they struggle to
deal with a wide range of handwriting styles and intricate patterns.
Advantages of the Proposed System:

We propose a handwriting recognition system based on an Artificial Neural Network (ANN) to


get around the shortcomings of the current system. The suggested method makes use of deep
learning techniques to recognise handwritten digits with greater accuracy and robustness. We can
automatically learn and extract pertinent information from the input photos using an ANN with
many hidden layers, enabling the system to adjust to various handwriting styles and variances.

Published by: Longman Publishers www.jst.org.in Page | 84


Journal of Science and Technology
ISSN: 2456-5660 Volume 3, Issue 05 (Sep – Oct 2018)
www.jst.org.in DOI:https://doi.org/10.46243/jst.2018.v3.i05.pp81 - 90
In order to give a user-friendly experience, we also introduce a Graphical User Interface (GUI)
utilizing the Streamlit framework. The handwriting recognition model processes the user's drawn
numbers using their mouse or touchscreen in the GUI. The user is shown the recognised digit in
real-time along with a confidence score, which improves the system's usability and accessibility.
The suggested method improves the accuracy and adaptability of handwriting recognition by
utilizing deep learning techniques, more especially an ANN, to overcome the shortcomings of
the existing systems. The system is simple to use and accessible to end users thanks to the
incorporation of a user-friendly GUI, allowing them to use handwriting as an input method for a
variety of applications.An effective and precise solution for digit recognition is provided by the
combination of the ANN-based model with the GUI interface, opening the door for future
developments in handwriting recognition technology.Artificial Neural Networks (ANN) are
brain-inspired algorithms that are used to foresee problems and model complex patterns. The
idea of biological neural networks in the human brain gave rise to the Artificial Neural Network
(ANN), a deep learning technique. An effort to simulate how the human brain functions led to
the creation of ANN. Although they are not exactly the same, the operations of ANN and
biological neural networks are very similar. Only structured and numeric data are accepted by
the ANN algorithm.

Unstructured and non-numeric data formats like image, text, and speech are accepted by
convolution neural networks (CNN) and recursive neural networks (RNN). The only subject of
this article is artificial neural networks. Architecture of artificial neural networks 1. The input
layer, hidden layer (more than one), and output layer are the three layers that make up the
network architecture. They are sometimes referred to as MLPs (Multi-Layer Perceptrons)
because of their many layers.

Published by: Longman Publishers www.jst.org.in Page | 85


Journal of Science and Technology
ISSN: 2456-5660 Volume 3, Issue 05 (Sep – Oct 2018)
www.jst.org.in DOI:https://doi.org/10.46243/jst.2018.v3.i05.pp81 - 90

Figure 1: ANN Architecture

Pre-Processing: Pre-processing takes an image as input and cleans it. It effectively improves the
image by removing disturbance. In addition, images may be required to be in grayscale or binary
format, which is accomplished at this stage [10].
Segmentation Using a segmentation technique, individual characters are separated after the
input images have been preprocessed. These characters are then stored as an image sequence.
Then, if available, boundaries within each character image are eliminated. Next, individual
character sizes are determined [10].

Feature Extraction:

Character segmentation is followed by the extraction of features. In our case, CNN with the
ReLU activation function is used to extract the features, as shown in Figure 1. CNN reduces the
size of each character image matrix through convolution and pooling. Using the ReLU function,
the reduced matrix is compacted to vector form. This vector is considered to be a feature vector
[5].

Classification and Recognition: The derived feature vector is used as individual input to
formulate corresponding class. During the training phase, the parameters, biases, and weights are
calculated. The calculated parameters, biases, and weights are used in the testing phase for
classification and recognition purposes [11].

Published by: Longman Publishers www.jst.org.in Page | 86


Journal of Science and Technology
ISSN: 2456-5660 Volume 3, Issue 05 (Sep – Oct 2018)
www.jst.org.in DOI:https://doi.org/10.46243/jst.2018.v3.i05.pp81 - 90

Figure 2: System architecture

DATASET AND DISCUSSTIONS

Using the MNIST dataset, handwritten digit recognition is a significant effort that was created
with the use of neural networks. In essence, it recognises the scanned copies of handwritten
numbers.
Our handwritten digit identification technology goes a step further in that it can now recognise
handwritten numbers typed directly on the screen with the aid of an integrated GUI in addition
to detecting them in scanned photos.
Approach:
We will approach this project by using a three-layered Neural Network.

 The input layer: It distributes the features of our examples to the next layer for calculation
of activations of the next layer.
 The hidden layer: They are made of hidden units called activations providing nonlinear
ties for the network. A number of hidden layers can vary according to our requirements.
 The output layer: The nodes here are called output units. It provides us with the final
prediction of the Neural Network on the basis of which final predictions can be made.

Sample screens

Published by: Longman Publishers www.jst.org.in Page | 87


Journal of Science and Technology
ISSN: 2456-5660 Volume 3, Issue 05 (Sep – Oct 2018)
www.jst.org.in DOI:https://doi.org/10.46243/jst.2018.v3.i05.pp81 - 90

CONCLUSION

In this project, we successfully created a handwriting recognition system using an Artificial


Neural Network (ANN) and used the Pytesseract library to reach a high accuracy of 90% on the
test dataset. However, the model showed zero accuracy throughout the initial training period,
indicating underfitting. We integrated the pytesseract module to solve this problem, which
significantly improved accuracy. Additionally, we used the Streamlit library to design a user-
friendly Graphical User Interface (GUI) that makes it simple for end users to engage with the
system. Users can draw digits on the GUI using a mouse or touchscreen to get recognition results
and confidence scores. Even though our model has a good level of accuracy, there is still
potential for development. Future handwriting recognition research may concentrate on
improving the model's accuracy by examining more complex neural network topologies,
tweaking hyper parameters, and incorporating larger and more varied datasets. It would also
increase the system's adaptability and range of applications by enabling recognition of
handwritten text in addition to just digits. In conclusion, this experiment shows how an ANN
may be used to successfully create a handwriting recognition system, with an emphasis on digit
recognition. The system's usability and accessibility are improved by the use of the pytesseract
library and the use of a user-friendly GUI. Handwriting recognition technology has the potential
to revolutionize digitization and enhance user interactions with digital devices with additional
study and development.
Future Enhancements: It is impossible to create a system that meets every user requirement. As
the system is used, user needs continue to change. Future improvements to this system include,
among others Depending on future security concerns, security can be enhanced utilising new

Published by: Longman Publishers www.jst.org.in Page | 88


Journal of Science and Technology
ISSN: 2456-5660 Volume 3, Issue 05 (Sep – Oct 2018)
www.jst.org.in DOI:https://doi.org/10.46243/jst.2018.v3.i05.pp81 - 90
technologies like single sign-on.
• As technology advances, the system is upgradeable and adaptable to desired environments
.
REFERENCES

[1] Plamondon R and Srihari S N 2000 IEEE Trans. on Patt. Anal. and Mach. Intelligence 22 63

[2] Kato N, Suzuki M, Omachi S I, Aso H and Nemoto Y 1999 IEEE Trans. on Patt. Anal. and Mach.
Intelligence 21 258

[3] Islam M M, Tayan O, Islam M R, Islam M S, Nooruddin S, Kabir M N and Islam M R 2020
IEEE Access 8 166117

[4] Gu J, Wang Z, Kuen J, Ma L, Shahroudy A, Shuai B, Liu T, Wang X, Wang G, Cai J and
Chen T 2018 Patt. Recognition 77 354

[5] Ptucha R, Such F P, Pillai S, Brockler F, Singh V and Hutkowski P 2019 Patt. Recognition
88 604

[6] Chaudhuri B B and Adak C 2017 Patt. Recognition 61 282

[7] Gan J, Wang W and Lu K 2020 Patt. Recog. Letters 129 190

[8] Fardous A and Afroge S 2019 Proc. Int. Conf. on Elect. Comp. and Comm. Engineering 4 1

[9] Das D, Nayak D R, Dash R and Majhi B 2020 Multi. Tools and Applications 79 33023

[10] Khoon L L and Chuin L S 2016 Int. J. of Soft. Eng. and Comp. Systems 2 10

[11] Sallam A A, Kabir M N, Alginahi Y M, Jamal A and Esmeel T K 2020 Proc. Int. Colloq.
on Sign. Proc. & Its Applications 3 255

12 Graves, A., Liwicki, M., Fernández, S., Bertolami, R., Bunke, H., & Schmidhuber, J.
(2009). Unconstrained On-Line Handwriting Recognition with Recurrent Neural Networks.

Published by: Longman Publishers www.jst.org.in Page | 89


Journal of Science and Technology
ISSN: 2456-5660 Volume 3, Issue 05 (Sep – Oct 2018)
www.jst.org.in DOI:https://doi.org/10.46243/jst.2018.v3.i05.pp81 - 90
13 Goyal, A., Jain, A., & Saini, M. K. (2019). Deep Learning for Handwritten Character
Recognition: A Review.

14 Bluche, T., Ney, H., & Kermorvant, C. (2017). Joint Line Segmentation and
Transcription for End-to-End Handwritten Paragraph Recognition.

15 Wang, K., Belaid, A., & Ahmed, A. B. (2018). Writer Independent Handwritten Text
Line Recognition with Hybrid Recurrent Neural Networks.

16 Graves, A., Fernández, S., Gomez, F., & Schmidhuber, J. (2006). Connectionist
Temporal Classification: Labelling Unsegmented Sequence Data with Recurrent Neural
Networks.

17 Jaeger, S., & Manmatha, R. (2001). A Hierarchical Neural Network for Handwritten Text
Recognition.

18 Breuel, T. M., Ul-Hasan, A., Al-Azawi, M. A., & Shafait, F. (2013). High-Performance
OCR for Printed English and Fraktur using LSTM Networks.

19 Zhang, X., Yin, F., Zhang, Y., Liu, C. L., & Bengio, S. (2019). Online and Offline
Handwriting Recognition: AComprehensive Survey.

Published by: Longman Publishers www.jst.org.in Page | 90

You might also like