• Aucun résultat trouvé

Unconstrained Bengali Handwriting Recognition with Recurrent Models Utpal Garain

N/A
N/A
Protected

Academic year: 2022

Partager "Unconstrained Bengali Handwriting Recognition with Recurrent Models Utpal Garain"

Copied!
5
0
0

Texte intégral

(1)

1

Unconstrained Bengali Handwriting Recognition with Recurrent Models

Utpal Garain

1

Luc Mioulet

2

B. B. Chaudhuri

1

Clement Chatelain

3

Thierry Paquet

2

1. CVPR Unit, Indian Statistical Institute, 203, B. T. Road, Kolkata 700108, INDIA

2. Laboratoire LITIS - EA 4108, Universite de Rouen, 76800, FRANCE 3. Laboratoire LITIS - EA 4108, INSA Rouen, 76800, FRANCE

Abstract

This paper presents a pioneering attempt for developing a recurrent neural net based connectionist system for unconstrained Bengali offline handwriting recognition.

The major challenge in configuring a such classification system for a complex script like Bengali is to effectively define the character classes. A novel way of defining character classes is introduced in order to make the recognition problem suitable for using a recurrent model. Indeed, it has to deal with more than nine hundred character classes for which the occurrence probability is very skewed in the language. An off-the- shelf BLSTM-CTC recognizer is used. A new open- source dataset is developed for unconstrained Bengali offline handwriting recognition. The dataset contains 2338 handwritten text lines consisting of about 21,000 words. Experiment shows that with the new definition of character classes the BLSTM-CTC framework provides an impressive performance for unconstrained Bengali offline handwriting recognition. The character level recognition accuracy is 75.40% without doing any post- processing on the BLSTM-CTC output. Among the 24.60% character level errors, the substitution, deletion and insertion errors are 18.91%, 4.69% and 0.98%, respectively.

Keywords: Handwriting recognition, Bengali, Semi- ortho-syllables, Recurrent Neural Nets, BLSTM-CTC, Dataset, Evaluation.

1. Introduction

The research on character recognition in Indic script has been seriously challenged by the unlimited script complexity shown by the major Indic scripts [1]. The progress is therefore not as much as what we have seen for Latin based scripts. Some advances are observed for printed character recognition [2] but efficient handling Indic script handwriting recognition requires much more research to achieve a notable success [3].

As expected, the effort for Indic script offline handwriting recognition started with recognition of

numerals [4] and then extended to isolated character recognition [5]. In the recent past, vocabulary based word recognition has also been attempted [6]. The state of the art for the recognition of isolated characters is somehow clear as public domain datasets are available [7] but in case of word recognition it is still difficult to understand the progress as no common dataset is available for evaluation and the researchers have reported their research results using private datasets.

There is a very good collection of handwritten samples as reported in [8] but as this dataset does not include annotation for handwritten words, it is not suitable for evaluation of handwriting recognition system.

What brings out from the foregoing discussion is the following. HMM is still the major classification tool based on which the researchers have tried to develop handwriting recognition system for Indic scripts.

Research on unconstrained handwriting recognition is yet to attempt for major Indic scripts. Finally, unavailability of common dataset for evaluation fails to make the progress of the related research, especially word or unconstrained handwriting recognition.

This paper attempts to do unconstrained handwriting recognition for one of the major complex Indic scripts, namely Bengali. The BLSTM-CTC based recurrent neural network model is used for classification [9]. This framework, in the recent times, has emerged as a viable methodology that has outperformed previous results using other classification techniques like TDNN, HMM, SVM, etc. [10]. However, in spite of its success, BLSTM-CTC has not been well explored for Indic script handwriting recognition. This paper works towards this exploration.

The involvement of any sequence labelling method like BLSTM-CTC for a complex Indic script (like Bengali, Devanagari, etc.) requires redefinition of character classes as the adjacent characters often overlap (the problem is even more serious for unconstrained handwriting). This work, therefore, redefines the character classes to order to fit the recognition problem suitable for sequence labelling by BLSTM-CTC.

(2)

2 Finally, a dataset suitable for conducting the research

and evaluating the proposed BLSTM-CTC based unconstrained handwriting recognition for Bengali is reported here.

2. Redefinition of Character Classes

Holistic word based recognition is difficult to follow in realizing unconstrained Bengali handwriting recognition. This is because a holistic word recognizer would require training of tens of thousands of words, especially for a highly inflectional language like Bengali (note that Bengali News corpus1 shows more than 400,000 distinct words appear in the language).

Therefore, instead of holistic word recognition based approach [6, 11], a character recognition based approach is to be followed for the present purpose. But for an Alpha-syllabary (or Abugida) script like Bengali, Devanagari, etc., use of character based approach is not straightforward since the concept of character is quite complex. The following subsection briefly discuss about this complexity.

2.1. Bengali Character Set and Writing System The Bengali script contains three types of characters: the Basic characters (50 in number), Compound characters (about 250 in number) and vowel allographs (10 in number). The placement of allographs do not follow simple left to right sequence as per the utterance. They can orthographically sit at one of the right [

]

, left [

], above [

or

]

and below [

]

positions of the basic/compound character. Note that the dotted circles are not part of the character shapes, it indicates that these allographs should be attached with some basic or compound character, e.g.

or

). Even

a couple of allographs have two components (e.g.

,

), of which one component can sit to the left and the other to the right of the basic/compound character (e.g.

). In handling this script complexity the following technique has been mostly followed in the previous works in order to define the character classes needed for Bengali printed/ handwritten word recognition.

2.2. Conventional Character Classes for OCR As number of classes is always an issue in designing any character recognizer, researchers followed several segmentation techniques to reduce the number classes.

1http://www.isical.ac.in/~fire/data/Bengali_abp_lexicon.txt

In the traditional approach a text line/word is partitioned into three horizontal zones, one above the other. The middle zone is the busiest one, having main body of basic and compound characters as well as portions of some vowel allographs. The upper zone, which is demarcated by a horizontal stroke calledheadline, may contain portions of basic character and portions of vowel allograph. The lower zone may contain vowel allographs, vowel stop sign (Hasant, ) etc. The parts in the three zones are, in general, separately isolated and identified by separate classifiers and the results are combined to form the OCR output.

For example, in a word like

, detection of two horizontal lines helps in finding the upper zone and lower zone shapes leaving the middle zone shapes as

, which are vertically segmented to give shapes as ,

, , and . Some post-processing techniques are followed to regenerate the original shapes. For instance, the shape (

) is segmented and recognized as two shapes, i.e. the upper part and the vertical line separately which are later joined together to get the character shape (i.e.

) back. This way of segmenting words into characters more or less reduces the number of classes to about 350 but introduces segmentation and output combination error.

Figure 1: A handwritten word in Bengali.

Although the above way of defining character classes served the need for printed character recognition, this is not suitable for unconstrained handwriting recognition because handwriting hardly follows horizontal zoning.

Figure 1 shows an example where the word " "

has been handwritten and there is hardly any chance to find three horizontal zones. Moreover, the existing segmentation technique (i.e. a horizontal segmentation followed by a vertical one and then post-processing) views the classification task as a recognition of isolated characters not as a sequence of characters. This has motivated us to review the definition of character classes so that the classification task can be viewed as a sequence labelling problem. The following section presents our new way of defining the character classes.

(3)

3 2.3. Semi-Ortho Syllable (SOS) Representation

Because of ambiguities in defining the concept of

"character" in Indic scripts, ancient Indian linguists/grammarians brought the concept of a bigger unit called Akshara, which may be called as ortho- syllable since such units hold some property of phonetic syllable. An ortho-syllable in a written word can be a basic vowel/consonant shape, or a compound character or a basic/compound along with the vowel allograph associated with it. Interestingly, a left to right sequence of Akshara can be isolated by vertical line of demarcation agreeing well to the phonetic sequence of their utterance. Therefore, in ortho-syllable representation,

( =

)

),

( =

)

,

( =

)

,

( =

)

, etc. are treated as single character classes instead of combination of two character classes as shown in brackets.

Thus, if we change the paradigm of character-based text recognition to Ortho-syllable based text recognition, the Alpha-syllabary Indian scripts should be better tackled specially by the sequence labelling algorithms.

However, one difficulty in this approach is that the number of ortho-syllable classes is large, about 1000 for any major Indian scripts. Also, for handwriting, chances of vertical overlap between neighbouring ortho-syllables are fairly high. Moreover, vertical separability can be possible on units smaller than the ortho-syllable. Thus, the concept of class is slightly different from the ortho- syllable units of the word. We may call them as semi- ortho-syllable (SOS) classes. For example, in SOS representation,

can be treated as two classes, i.e.,

but

( =

)

is treated as a single class.

3. BLSTM-CTC based Bengali Handwriting Recognizer

The BLSTM-CTC is a novel neural network architecture that enables to produce character (i.e. class) posterior probabilities on a sequence. It is composed of two recurrent neural networks with Long Short Term Memory (LSTM) neurons [12]. One recurrent neural network processes the signal chronologically while the other one processes the signal anti-chronologically. At every time step they hand over the information they have accumulated over time to the Connectionist Temporal Classification (CTC) Layer[13] . This layer is a Softmax neural network layer that outputs character probabilities. It has the ability to avoid outputting ambiguous decisions, thanks to an additional 'blank' output.

In this experiment, the BLSTM-CTC is trained on handwritten lines. For each line image, corresponding groundtruth is available in Unicode. The line level Unicode representation is converted into a sequence of SOS class representation. Next, the line image along with its class representation is submitted to the BLSTM- CTC for learning. Figure 2(a) shows a sample line image. The SOS represented decoded sequence is shown in Fig. 2(b) where each character class (which actually gets class label like c1, c2, etc. before fed to BLSTM- CTC) is separated by space and the space between words are shown by a special character .

(a)

(b)

Figure 2: Training of the BLSTM-CTC: (a) an input sequence, (b) the corresponding decoded sequence following SOS representation (the character  is used to represent space).

In order to normalize the appearance of characters we added pre-processing steps. For noise reduction, at first, the images are binarized using a fixed threshold binarization. They are then deslanted to reduce the character variations, using the method presented in [14].

The BLSTM-CTC requires a fixed input and hence, the images are normalized in height to a fixed size.

After the preprocessing step, we extract features that are processed by the BLSTM-CTC. We use a sliding window method to extract Histogram of Oriented Gradients (HOG) from the images [15, 16]. HOG subdivides a window into 2 x 4 sub-windows and from each sub-window the histogram of oriented gradients is computed. Each histogram is composed of 8 directions.

Hence each window is represented by an 8 x 8 = 64 dimensional feature vector. This sequence of feature vectors for a handwritten line image is presented to the BLSTM-CTC.

In this experiment, the BLSTM-CTC for Bengali handwriting recognition is composed of two BLSTM hidden layers with around 200 neurons on each layer.

The CTC layer is composed of 917 output nodes.

!

(4)

4

4. Experimental Details

As no public domain dataset is available for evaluating unconstrained Bengali offline handwriting recognition, we have developed a dataset suitable for this purpose.

The dataset and evaluation of the BLSTM-CTC system are presented next.

4.1. Unconstrained Bengali Offline Handwriting Dataset

The dataset is consisting of a set of 2,338 unconstrained handwritten Bengali text lines. Each text line contains, on average, nine words leading to a collection of about 21K words. More than 100 different writers have written these lines and since no special instruction was given to the writers so that the samples truly represent unconstrained scenario. Almost half of these lines are taken from the CMATER dataset (Part-I) which is freely available for research [8]. These dataset contains handwritten pages for which line segmentation results are given. We extracted the lines and added the corresponding groundtruth (in Unicode) manually.

Other samples are taken from the Bengali writer identification dataset (samples of 40 writers are there, each writer wrote two pages consisting of 35 lines) [17].

Five persons were hired to add Unicode groundtruth for each text line. Inter-annotator agreement is checked to make the groundtruthed data free from any typing errors.

4.2. Evaluation of the Classification System The dataset of 2,338 samples are divided into three parts training, validation and testing in 3:1:1 ratio. Five-fold cross validation is followed. The BLSTM-CTC output on the test set is evaluated for measuring character (as defined by SOS representation) recognition accuracy. It is noted that this accuracy is 75.40%. Among 24.60%

errors, the substitution, deletion and insertion errors are 18.91%, 4.69% and 0.98%, respectively. Figure 3 shows recognition output for two sample test images (the input image, the corresponding Unciode groundtruth and the BLSTM-CTC output are shown in the upper, middle and lower blocks, respectively). The ortho-syllable level errors are marked as red in the groundtruth which is in Unicode that does not support SOS-level marking.

Analysis of errors reveals that for a large number of character classes sufficient number of training samples are not there in the dataset. Out of 917 classes, only 100 classes have 10 or more training samples. Therefore, the classes with insufficient number of training samples are often misrecognized (e.g.

,

,

in Fig. 3a). Shape similarities also result in character confusions (e.g.

 in Fig. 3a). Note that no post-processing is done

on the output of the BLSTM-CTC. When the evaluation is done on the sequence level (i.e. the entire text line), it is noted that almost of test sequences are marred by one or more character level recognition errors.

Figure 3: Unconstrained handwriting recognition output from the BLSTM-CTC: two test images are shown in (a) and (b). Corresponding groundtruth and recognition output are shown in the middle and lower blocks.

5. Conclusions

This paper presents a system for unconstrained Bengali offline handwriting recognition using BLSTM-CTC. A semi-ortho syllable (SOS) representation is followed to make the recognition problem suitable for sequence labeling. As the BLSTM-CTC learns better on longer sequences (i.e., larger context) training is done on line level (instead of on words). A new dataset for unconstrained handwriting recognition is developed. A character level recognition accuracy of about 75% is achieved which is quite encouraging as no post- processing is applied on the BLSTM-CTC output. This shows a practical recognition system can be configured based on this research with some additional future efforts as outlined next.

Extension of the dataset: For improving the BLSTM- CTC performance we need more samples so that it can be trained using sufficient number of samples for each character class. For this purpose, soon the present dataset will be made available in the public domain and other researchers will be invited to contribute more samples so that a larger dataset suitable for unconstrained handwriting recognition in Bengali (in other major Indic scripts) can be developed through a collaborative effort. This would facilitate the researchers willing to work on this fascinating problem that involves

(b)

ঠ থ ঠ

(a)

(5)

5 large number of character classes and enormous script

complexity. We plan to distribute this dataset freely at the forthcoming ICDAR event.

Refinement of the character classes: The present SOS representation of the character classes considers all possible character combinations which are followed logically. For example, as we know the vowel allographs logically can be attached to all consonants and compound characters, all possible combinations are added into the list of character classes. However, it is true that many of these classes (e.g. , , etc.) actually do not appear in the language. Therefore, an evidence (from a language corpus) based pruning is to be done thereby reducing the number of character classes.

Other class representations: In this work, SOS representation is followed but other representations can be explored to check how the BLSTM-CTC reacts when classes are defined otherwise. This effort, in a limited scale, has been explored in a recent work for online character recognition [18].

Post-processing: This work did not attempt any post- processing of the BLSTM-CTC output. However, looking at the present output it is evident that the accuracy of the result can be further improved if suitable post-processing techniques can be applied. For this purpose, we plan to make the existing recognition output (along with the image and groundtruthed data) available in the public domain so that some researchers can concentrate on designing some post-processing techniques in isolation in order to improve the recognition results thereby advancing the state-of-art of the related research.

6. References

[1] V. Govindaraju and S. Setlur (Eds.), "Guide to OCR for Indic Scripts", Document Recognition and Retrieval Series: Advances in Computer Vision and Pattern Recognition, Springer, 2010.

[2] D. Arya, T. Patnaik, S. Chaudhury, C. V. Jawahar, B. B. Chaudhuri, A. G. Ramakrishna, C. Bhagvati, and G. S. Lehal, "Experiences of integration and performance testing of multilingual OCR for printed Indian scripts", In J-MOCR Workshop, ICDAR, 2011.

[3] U. Pal, R. Jayadevan, and N. Sharma, "Handwriting Recognition in Indian Regional Scripts: A Survey of Offline Techniques", in ACM Trans. Asian Lang. Inf.

Process. 11(1), 2012.

[4] U. Bhattacharya and B. B. Chaudhuri, "Handwritten Numeral Databases of Indian Scripts and Multistage Recognition of Mixed Numerals", IEEE Trans. on PAMI, 31(3): 444-457, 2009.

[5] U. Bhattacharya, M. Shridhar, S. K. Parui, P. K.

Sen, and B. B. Chaudhuri, "Offline recognition of handwritten Bangla characters: an efficient two-stage approach", Pattern Anal. Appl., 15(4), 445-458, 2012.

[6] P. P. Roy, P. Dey, S. Roy, U. Pal, and F. Kimura, "A Novel Approach of Bangla Handwritten Text Recognition Using HMM", ICFHR, 661-666, 2014.

[7] H. El Abed, V. Märgner, and M. Blumenstein,

"International Conference on Frontiers in Handwriting Recognition (ICFHR 2010) - Competitions Overview", ICFHR: 703-708, 2010.

[8] R. Sarkar, N. Das, S. Basu, M. Kundu, M. Nasipuri, and D. K. Basu, "CMATERdb1: a database of unconstrained handwritten Bangla and Bangla-English mixed script document image", IJDAR 15(1):71-83, 2012.

[9] A. Graves, M. Liwicki, S. Fernandez, R. Bertolami, H. Bunke, and J. Schmidhuber, "A Novel Connectionist System for Unconstrained Handwriting Recognition", IEEE Trans. on PAMI, 31(5): 855-868, 2009.

[10] A. Graves, "Teaching Computers to Read and Write: Recent Advances in Cursive Handwriting Recognition and Synthesis with Recurrent Neural Networks", CORIA-CIFED, 2014.

[11] N. Sankaran and C. V. Jawahar, "Recognition of printed Devanagari text using BLSTM Neural Network," ICPR: 322-325, 2012.

[12] S. Hochreiter and J. Schmidhuber, "Long Short Term Memory", Neural Computation, 1735--1780, 1997.

[13] A. Graves and F. Gomez, "Connectionist temporal classification: Labelling unsegmented sequence data with recurrent neural networks", ICML, 2006.

[14] A. Vinciarelli and J. Luettin, "A new normalization technique for cursive handwritten words", Pattern recognition letters 22(9): 1043-1050, 2001.

[15] N. Dalal and B. Triggs, "Histograms of Oriented Gradients for Human Detection", CVPR, 886--893, 2005.

[16] A-M. Kamel and Thierry Paquet, "OpenHaRT 2013 evaluation: description of the LITIS handwriting recognition system", Proc. of the NIST OpenHaRT Workshop, 2013.

[17] U. Garain and T. Paquet, "Off-Line Multi-Script Writer Identification Using AR Coefficients", ICDAR, 991-995, 2009.

[18] V. Frinken, N. Bhattacharya, S. Uchida, and U. Pal,

"Improved BLSTM Neural Networks for Recognition of On-Line Bangla Complex Words", S+SSPR, 404-413, 2014.

Références

Documents relatifs

These studies have in particular established that multipole expansions of K(r) are too costly except at low frequencies (because the expansion truncation threshold increases with

In the next few sections we will discuss in detail the word recognition achievements as well as the dierent attempts for handwritten digit recognition focusing on issue like

Online Character Segmentation Method for Unconstrained Handwriting Strings Using Off-stroke Features.. Naohiro Furukawa † Junko Tokuno ‡ Hisashi

The present handwritten numeral database for Bangla includes off-line samples of both isolated numerals and numeral strings.. Descriptions of both of these components of the

In order to merge these primitive components into characters and to find optimum character segmentation of a word, dynamic programming (DP) is applied using the total likelihood

Online Hand- written Character Recognition of Devanagari and Telugu Characters using Support Vector Machines.. Tenth International Workshop on Frontiers in Handwriting

‘ka-ga-nga’ systems—belong to the Indic family of writing systems is an unde- niable paleographic fact, and the nearly seamless applicability to Indonesian documents of the iso

Indeed, because of the recurrent nature of their architecture, in order to prop- erly learn RNNs the Back-Propagation Through Time algorithm (BPTT) should be used [23]. The