0% found this document useful (0 votes)
19 views6 pages

A Deep Learning Approach For Optical Character

The document discusses a deep learning approach for optical character recognition of handwritten Devanagari script. It proposes using a convolutional neural network for OCR, in contrast to existing methods that use support vector machines or artificial neural networks. Convolutional neural networks are well-suited for this task due to their ability to handle image data with minimal preprocessing. The document also provides background on Devanagari script and applications of handwritten character recognition.

Uploaded by

bhaskarbrv
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views6 pages

A Deep Learning Approach For Optical Character

The document discusses a deep learning approach for optical character recognition of handwritten Devanagari script. It proposes using a convolutional neural network for OCR, in contrast to existing methods that use support vector machines or artificial neural networks. Convolutional neural networks are well-suited for this task due to their ability to handle image data with minimal preprocessing. The document also provides background on Devanagari script and applications of handwritten character recognition.

Uploaded by

bhaskarbrv
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

2019 2nd International Conference on Intelligent Computing, Instrumentation and Control Technologies (ICICICT)

A Deep Learning Approach for Optical Character


Recognition of Handwritten Devanagari Script
1st
Brijeshwar Dessai 2nd
Amit Patil
Department of Computer Engineering Department of Computer Engineering
Goa College of Engineering Goa College of Engineering
Farmagudi, Ponda-Goa,India Farmagudi, Ponda-Goa,India
[email protected] [email protected]

Abstract— Handwritten Character Recognition is one of the very tough to achieve 100% accuracy as the accuracy is based
most challenging and demanding area of interest for researchers entirely on user handwriting styles. Many researches have
in domains of pattern recognition and image processing. Many
been carried out in this direction but achieving 100% accuracy
researchers have worked with recognition of characters of
different languages but there is comparatively less work carried is not possible.
for Devanagari Script. In past few years, however the work
carried out in this direction is increasing to a great extent. Optical Character Recognition (OCR) is a method which
Handwritten Devanagari Character Recognition is more takes an image as input scans it and transforms it to an
challenging in comparison to the recognition of the Roman editable form. There are various systems in the market which
characters. The complexity is mostly due to the presence of a scan printed data and some scan even handwritten data. But
header line known as shirorekha that connects the Devanagari
characters to form a word. The presence of this header line when it comes to the accuracy of the output most existing
makes the segmentation process of characters more difficult. software’s fail to provide enough accuracy as needed.
There is uniqueness to the handwriting styles of every individual
which adds to the complexity. In this paper, we propose The OCR systems which are present mostly make use of
development of Convolutional Neural Network (CNN) based machine learning techniques such as support vector machines
Optical Character Recognition system (OCR) for Handwritten (SVMs) and artificial neural networks (ANNs) for the
Devanagari Script which is observed to recognize the characters
accurately. recognition of characters. These classifier models used in the
OCR systems require that input images are down sampled to
Keywords— Convolutional Neural Networks, Deep Learning, reduce the complexity. This down sampling results in the loss
Devanagari Script, Handwritten character, Optical Character of some important information. SVM classifier for instance
Recognition. provide different recognition accuracy for characters with
different font styles.
I. INTRODUCTION
Therefore, in order to build an efficient OCR system which
can make use of data in the form of images we propose use of
Character recognition deals with recognizing the characters
convolutional neural networks in contrast with use of SVMs
accurately from a document. Character recognition is done
and ANNs. Convnets have proved to be very useful in high
either from printed documents or handwritten documents.
quality image and video recognition methods.
Character recognition is distinguished into two classes: on-line
character recognition and off-line character recognition. In
Convolutional Neural Network (CNN) are class of Deep
off-line recognition characters are optically captured by a
Neural Network which need smaller parameters and are easier
scanner and the writing is available as an image. In on-line
to train. By changing the number of hidden layers and
recognition the user writes directly on a pen-based input
trainable parameters in each layer of CNN their ability to
devices and curves and styles of writing are identified as
model input dataset can be varied. CNN have lesser trainable
written to recognize the character.
parameters in comparison to a fully connected feed-forward
network. CNNs have notion of local receptive field, weight
Handwritten character recognition is a technique to
replication and subsampling which allows us in having some
convert handwritten document into a text file which can be
amount of shift and distortion changes in data. A number of
edited. Handwritten character recognition is a very complex
convolutional and subsampling layers are present in CNNs for
task in contrast to printed character recognition as the
image processing.
characters are written in various styles and sizes. Every
individual has a unique way of writing. As a result it becomes

978-1-7281-0283-2/19/$31.00 ©2019 IEEE 1160

Authorized licensed use limited to: University College London. Downloaded on May 23,2020 at 18:14:50 UTC from IEEE Xplore. Restrictions apply.
2019 2nd International Conference on Intelligent Computing, Instrumentation and Control Technologies (ICICICT)

These layers are finally terminated by fully connected layer script which means that pronunciation of words are done as
where recodnition of data take place. Deep convolutional how they are written.
neural networks have a compact and cheaper mechanism as
opposed to standard feed forward network of same depth. But
a lot of processing and computation is required to train a
CNN, along with a large labelled dataset.

II. APPLICATION OF HANDWRITTEN CHARACTER


RECOGNITION SYSTEM

In recent years there is immense development in the


direction of digitization. In government organizations and
villages, there is a need of OCR systems which can recognize Fig 1: Vowels in Devanagari Script
and convert the written document into recognizable format as
a large number of people in India still use Devanagari Script
to write important documents.

Some of the important applications of handwritten character


recognition include:
A. Signature Verification
HCR systems are used to identify individuals based on
signature verification. Signature verification is done by
identifying specific handwritten text.
B. Cheque reading
Character recognition is used in banks to read the amount
filled by the user and also to verify the signature. Fig 2: Consonants in Devanagari Script

C. Form processing
HCR systems are used to read out the forms used to collect
public information. People reply in the space provided in the
forms. HCR systems are used to read what is written in blank
space.
D. Postcode recognition
HCR systems are used to read Handwritten postal address
and digits of postcode on letters.
Fig 3: Numerals in Devanagari Script

III. DEVANAGARI SCRIPT One of the unique feature of Devanagari script is the
presence of header line known as the “shirorekha”. This
A. Properties of Devanagari Script header line is present on top of every word and is used to
connect characters to form a word. The last letter of the word
is determined by the end of shirorekha. The presence of this
Devanagari script is used by languages like Hindi, Sanskrit,
shirorekha makes segmentation of characters more difficult
Sindhi Marathi, Nepali and Konkani. It is principal script of
for the recognition process. The writing fashion of the script is
India. Devanagari is a compound word with its subparts deva
from left to right direction and characters do not have
meaning “deity” and nagari meaning “city”
uppercase/lowercase.
Devanagari script has 36 consonants-“vyanjan” and 12
A Devanagari script is divided into three regions:
vowels-“swar” which are the basic characters. Besides these
basic characters there are also special symbols in the script
• Upper
known as “Matras”. These are known as the modifiers of the
• Middle
script and are placed above, below, left or right of a character.
• Lower
Also there are compound characters in the script which are
formed by combination of basic characters. It is a phonetic

xxxxxxxxxxxxxxxx ©2019 IEEE.


978-1-7281-0283-2/19/$31.00 ©2019 IEEE 1161

Authorized licensed use limited to: University College London. Downloaded on May 23,2020 at 18:14:50 UTC from IEEE Xplore. Restrictions apply.
2019 2nd International Conference on Intelligent Computing, Instrumentation and Control Technologies (ICICICT)

The upper region is the portion above the headerline, the [1] presents an efficient OCR system with the use of
middle region covers the portion between headerline and convolutional neural networks. They recognize Sanskrit texts
baseline, the lower region is the segment below the baseline. written on olden documents which were poorly maintained
and downgraded. They showed that convolutional neural
networks are better than SVM and ANN for image
classification.

Gaurav Jaiswal et al [7] proposes Devanagari character


recognition model using neural networks. Handwritings of
different writers are used for training and testing the classifier
model. This model begins by preprocessing and then feature
extraction is carried out. Based on features that are extracted it
classifies the characters.

Dinesh Kumar et al [8] presents Sanskrit OCR which makes


Fig 4: Various zone portioning in Devanagari Script use of a feed forward neural network model to classify the
characters. The problem with this Sanskrit OCR is that it
B. Challenges in Devanagari Script cannot handle variation in image quality, font size and style
which is mainly because of its simple ANN architecture.
There are many different characters in this script which have
similar structure differentiated only with presence of dots,
Pahuni Saharan et al [3] have presented a system developed
lines etc. The recognition process becomes more complicated
for recognition of handwritten Devanagari characters using
due the writing fashion of people.
Neural Network Toolbox of Matlab. The main focus of this
paper is on Hindi Characters. A small set of characters are first
trained and then recognized. These characters are analyzed
repeatedly to check for improvement in results with
subsequent recognition and training.

V. METHODOLOGY

In this section we discuss the proposed methodology of the


Fig 5: Different characters having similar structure Character recognition system. The proposed system comprises
of two stages:

IV. RELATED WORKS • Training


• Recognition
Earlier OCR systems made use of feature-based and
template-based approach for classification of letters[16,17]. A. Training
Recent OCR systems mostly make use of machine learning This step deals with training the neural network for character
algorithms to classify letters instead of traditional use of recognition. Convolutional neural networks will be used in
feature and template-based techniques[8,18]. The machine this case.
learning algorithms are able to produce better results as
compared to the traditional methods. The problem with Creation of Dataset
machine algorithms such as SVMs and ANNs is that they Dataset of 15 Devanagari characters was created manually by
require input images to be downsampled but this leads to loss making different individuals to write the character. This
of important information. resulted in wide amount of variation each character was
written. The character was captured as an image. Each image
Some OCR systems make use of deep learning algorithms. is unique in dataset. Each image is 32x32 pixels. Each image
[6] use Bidirectional Long Short-Term Memory Networks was preprocessed. The preprocessing steps applied on each
(BLSTMs) for classifying texts from an image. These systems image are explained below.
recognize the text at word level by recording word’s past and
future context.

978-1-7281-0283-2/19/$31.00 ©2019 IEEE 1162

Authorized licensed use limited to: University College London. Downloaded on May 23,2020 at 18:14:50 UTC from IEEE Xplore. Restrictions apply.
2019 2nd International Conference on Intelligent Computing, Instrumentation and Control Technologies (ICICICT)

Segmentation
Segmentation is differentiating object from the background.
For the grayscale image f(x,y), the segmented image s(x, y) is
obtained by binarization process as given below.

s(x; y) = {1 if f(x; y) >= T


{0 if f(x; y) < T (1)

Inversion
When we write documents we usually write on a white paper
with a black/blue pen. But for character recognition we use
black pixels as background and white as foreground. Hence,
there is a need to invert the images.
i(x, y) = 1 - f(x, y) (2)

Fig 9: Inverted image

Universe of Discourse
It is the smallest area where the character is present, basically
the smallest rectangle surrounding the character. It removes
the extra unwanted pixels around the image.

Fig 6: Proposed Methodology


Fig 10: Universe of Discourse

Normalization
Normalizing refers to conversion of variable sized input
images to a predefined fixed size used for processing. In our
work we normalize the input images to a fixed size if 32x32
Fig 7: Handwritten Character pixels.
Preprocessing
Preprocessing is the initial stage in the handwritten character
recognition system. Preprocessing steps applied on the image Fig 11: Normalized image
are:-

Skeletonization
RGB to gray scale inversion A thin version of a character is known as skeleton of that
If the character is written in different color other than black character. Skeletonization is a process of converting the binary
we need to convert this image into a gray scale image. image into subsection of original image. While skeletonizing
This is done by taking weighted threshold of Red, Green and it is made sure that connectivity of the original image is
Blur component of a RGB image. preserved.

Noise Removal
Noise is removed from images with the help of filtering. In
our work we use non-linear median filtering.

Fig 12: Skeletonized image

Fig 8: Filtered image

978-1-7281-0283-2/19/$31.00 ©2019 IEEE 1163

Authorized licensed use limited to: University College London. Downloaded on May 23,2020 at 18:14:50 UTC from IEEE Xplore. Restrictions apply.
2019 2nd International Conference on Intelligent Computing, Instrumentation and Control Technologies (ICICICT)

B. Recognition generally after every 2 or 3 convolutional operations in order


In this step word is written on a canvas and is saved in the to decrease the computational dimensionality of the network.
image format. The word is then segmented to devide into Every max pooling operation makes use of a filter of size 2x2
characters. These characters are then used to test the having stride of 2 pixels . The final layer in the networks is the
recognition system. fully connected layer. Eventually the network ends with a
softmax layer.
Letter segmentation
After the word is written we need to segment it into
individual characters. Segmentation of characters by
identifying local minima of column-wise pixel intensity
directly is not possible due to the presence of a header line. To
account for this problem header line is eliminated. Row-wise
black colored pixel intensity is calculated for this task and
region with maximum row-wise pixel intensity is eliminated.
The image without the header line is then used to segment
letters. Fig 14: General Convolutional Neural Network

Implementation Details
The project is implemented in Python. We used LeNet a
special type of CNN for the system. Convolutional neural
networks are implemented on keras. Tensorflow is used as
backend. Training is done on NVIDIA Geforce 940MX GPU.

VII. RESULTS
Convolutional neural networks are trained with labeled
dataset. We collected data samples of 15 characters from
different individuals. 1500 samples of each character were
used for training and 250 samples of each character were used
for testing. After the network was trained unknown characters
from word were given as input to the recognition system. The
accuracy obtained is shown below.

TABLE 1: Accuracy Measure


Characters included %Accuracy
89.34%
Excluding 91.11%
Fig 13 : Image preprocessing steps

Preprocessing VIII. CONCLUSION


Preprocessing is done in the same way discussed in training
section. The paper proposes an approach for optical character
recognition of handwritten Devanagari characters using
Classification Convolutional Neural Networks. Convolutional Neural
After the characters are preprocessed they will be further Networks which are considered to be efficient when it comes
given to the classification phase and the recognition process to image classification in comparison to SVMs and ANNs.
will proceed. Working with Devanagari characters is more complex because
of their compound structures as compared to the roman
VI. CONVOLUTIONAL NEURAL NETWORKS characters. Also, the presence of a header line for every word
The input of the convolutional neural networks is a fixed and uniqueness in writing style of every individual increases
32x32 RGB image. This image passes through number of the complexity.
convolution and max-pooling operations. Every operation has To make the OCR system more efficient compound
a kernel of stride 1. The convolutional output is followed by handwritten characters which are formed by combinations of
ReLU function. A max pooling operation is carried out two different characters can be included for recognition.

978-1-7281-0283-2/19/$31.00 ©2019 IEEE 1164

Authorized licensed use limited to: University College London. Downloaded on May 23,2020 at 18:14:50 UTC from IEEE Xplore. Restrictions apply.
2019 2nd International Conference on Intelligent Computing, Instrumentation and Control Technologies (ICICICT)

ACKNOWLEDGMENT and Artificial Neural Network” 2018 IEEE 3rd International Conference
on Computing, Communication and Security (ICCCS), Kathmandu
(Nepal).
I would like to take this as an opportunity to thank my [10] Abhishek Sutar, Naveen Menon, Priyanka Potdar, Priyanka Patil, Komal
Project Guide, Prof. Amit Patil, for giving me the opportunity Karande, Dr. Vijay Ghorpade “ Development of Intelligent Optical
Handwritten Character Recognition System for Devanagari Script” April
to work in the area of Character recognition and guided me. I
2016 International Research Journal of Engineering and Technology
would also like to thank my parents, sisters and friends who (IRJET) e-ISSN: 2395 -0056 Volume: 03 Issue: 04 | April-2016.
have constantly supported me throughout the duration of this [11] Krizhevsky, Alex, Ilya Sutskever, and Geoffrey E. Hinton. "Imagenet
project. classification with deep convolutional neural networks." In Advances in
neural information processing systems, pp. 1097-1105. 2012.
[12] Deepu Kumar, Divya Gupta “Review On Optical Character Recognition
for Off-line Devanagari Handwritten Characters & Challenges”
REFERENCES International Journal of Scientific Research in Computer Science,
Engineering and Information Technology © 2018 IJSRCSEIT | Volume
3 | Issue 3 | ISSN: 2456-3307.
[1] Meduri Avadesh and Navneet Goyal, “Optical Character Recognition [13] Ashutosh Aggarwal, Rajneesh Rani and Renu Dhir, “Handwritten
for Sanskrit using Convolution Neural Networks”, IEEE 2018 13th Devanagari Character Recognition Using Gradient Features”, Pattern
IAPR International Workshop on Document Analysis Systems. Recognition Volume 2, Issue 5, May 2012 ISSN: 2277 128X
[2] Bappaditya Chakraborty, Bikash Shaw, Jayanta Aich, Ujjwal International Journal of Advanced Research in Computer Science and
Bhattacharya and Swapan Kumar Parui “Does Deeper Network Lead to Software Engineering.
Better Accuracy: A Case Study on Handwritten Devanagari Characters” [14] Naveen Malik, Aashdeep Singh “Review of Character Recognition of
2018 13th IAPR International Workshop on Document Analysis Offline Handwritten Devanagari Script”. International Journal of
Systems. 2018 IEEE DOI 10.1109/DAS.2018.7. Computer Science and Mobile Computing, Vol.5 Issue.5, May- 2016, pg.
[3] Pahuni Saharan and Rupali Malhotra “Handwritten Devanagari 178-183
Character Recognition System Using Neural Network” Journal of [15] Yadav, Divakar, Sonia Sánchez-Cuadrado, and Jorge Morato. "Optical
Network Communications and Emerging Technologies (JNCET) character recognition for Hindi language using a neural-network
Volume 6, Issue 6, June (2016). approach." JIPS 9, no. 1 (2013): 117140.
[4] Kumar, Satish. "A study for handwritten Devanagari word recognition." [16] Pal, U., and B. B. Chaudhuri. "Indian script character recognition: a
Communication and Signal Processing (ICCSP), 2016 International survey." pattern Recognition 37, no. 9 (2004):1887-1899.
Conference on. IEEE, 2016. [17] Bansal, Veena, and R. M. K. Sinha. "Integrating knowledge sources in
[5] Jangid M, Srivastava S. Accuracy Enhancement of Devanagari Devanagari text recognition system." IEEE Transactions on Systems,
Character Recognition by Gray level Normalization. ACM.In Man, and Cybernetics-Part A: Systems and Humans 30, no. 4 (2000):
Proceedings of the 7th International Conference on Computing 500-505.
Communication and Networking Technologies 2016 Jul 6 (p. 25). [18] Rahiman, M. Abdul, and M. S. Rajasree. "A detailed study and analysis
[6] Sankaran, Naveen, and C. V. Jawahar. "Recognition of printed of ocr research in south indian scripts." In Advances in Recent
Devanagari text using BLSTM Neural Network." In Pattern Recognition Technologies in Communication and Computing, 2009. ARTCom’09.
(ICPR), 2012 21st International Conference on, pp. 322-325. IEEE, International Conference on, pp. 31-38. IEEE, 2009.
2012. [19] C. V. Jawahar, M. N. S. S. K. Pavan Kumar, S. S. Ravi Kiran. A
[7] Gaurav Jaiswal, “Handwritten Devanagari Character Recognition Model Bilingual OCR for Hindi-Telugu Documents and its Applications.
Using Neural Network” 2014 IJEDR | Volume 2, Issue 1 901-906. ICDAR 2003, 0-7695-1960-1/03 $17.00 © 2003 IEEE.
[8] Dinesh kumar, R., and J. Suganthi., "Sanskrit character recognition [20] Jayadevan, R., Satish R. Kolhe, Pradeep M. Patil, and Umapada Pal.
system using neural network."Indian Journal of Science and Technology, "Offline recognition of Devanagari script: A survey." IEEE Transactions
Vol 8(1), 65–69, January 2015. on Systems, Man, and Cybernetics, 41, no. 6 (2011)
[9] Sudan Prajapati , Shashidhar Ram Joshi , Aman Maharjan , Bikash
Balami “Evaluating Performance of Nepali Script OCR using Tesseract

978-1-7281-0283-2/19/$31.00 ©2019 IEEE 1165

Authorized licensed use limited to: University College London. Downloaded on May 23,2020 at 18:14:50 UTC from IEEE Xplore. Restrictions apply.

You might also like