Giter Club home page Giter Club logo

kannadahandwritingrecognition's Introduction

The paper describing this approach has been presented at 2018 3rd IEEE INTERNATIONAL CONFERENCE ON RECENT TRENDS ON ELECTRONICS, INFORMATION & COMMUNICATION TECHNOLOGY.

Link to Publication - https://ieeexplore.ieee.org/document/9012531

INSTALLATION

You need to have Python 3.x installed

pip install -r requirements.txt

The python libraries used are

scikit image
numpy
OpenCV
Django
Tensorflow
Joblib
Scipy
Matplotlib
Keras
Pillow

We also made use of a LRN2D layer which was removed from the keras source. It needs to be manually included.

  • Paste the contents of keras_addition.txt in /usr/local/lib/python3.5/dist-packages/keras/layers/normalization.py.
  • Add from .normalization import LRN2D right under the import from .normalization import BatchNormalization in /usr/local/lib/python3.5/dist-packages/keras/layers/__init__.py . The file path may vary depending on your python version.

KANNADA HANDWRITING RECOGNIZER

The project aims at Optical Character Recognition of handwritten documents in Kannada, a South Indian Language.

Kannada is being chosen as not much research was done prior with a whole document but only individual characters. The complexity further increases due to a very large number of classes due to letters, numbers, kagunitas and ottaksharas.

This project has also performed a comparative analysis of two supervised (k-Nearest neighbors and Support Vector Machines) and two unsupervised models (Inception V3 and Convoluted Neural Networks).

A web app provides the user interface. A handwritten document is given as input and the corresponding text as digital text is presented as an output in the web apps display

DATASET

The dataset used is the Chars74K[http://www.ee.surrey.ac.uk/CVSSP/demos/chars74k/] dataset. It consists of a collection of images that belong to 657+ classes. Each class consists of 25 handwritten characters. Since a Deep Learning approach has also been used in this paper, the dataset needed to be expanded. This was done by using various augmentation techniques.

PROPOSED APPROACH FOR KANNADA OCR

SEGMENTATION

The entire document is first segmented into lines, then words and at last into characters. Contour detection, Dilation and Bounded boxes method has been used for same.

Ottakshara segmentation -

From the character obtained during character segmentation, we separate Ottakshara by considering its position along y axis with respect to the total height of the image.

Experimentations proved that all the contours that lie in the lower of the images could be considered as Ottakshara. The ottakshara identified is then mapped to the base character based on its position along x axis.

PREPROCESSING

The preprocessing steps that we carried out on our input images were - Grayscale, Noise Removal, Contrast Normalisation and Binarization.

AUGMENTATION

Since certain models require large number of training data, it is practically not possible to write them. Due to this, we augmented the existing dataset to create more dataset for training phase. This has to be done with care so that overfitting does not happen.

The augmentation steps we considered were

  • Aspect ratio

  • Rotation

  • Smoothening

  • Padding

  • Noise

  • Resizing

Remove is also one of the augmentation steps we use. This is used to remove stray elements from the segmented character images. This is done by retaining the largest connected component. An example of how this step works is shown below

MNIST

MNIST like dataset was created from the augmented Chars74K dataset in order to train SVM and k-NN models.

MODELS AND VALUES OF PARAMETERS USED

Support Vector Machine

  • Histogram of Oriented Gradients were used as feature

  • Gamma - 0.001

  • C - 12.5

  • Kernel - Radial Basis function

k - Nearest Neighbours

  • Optimum k value - 5

Convolutional Neural Network

  • Alternating stacks of Convolutional layers followed by Max Pooling layers

  • Local Response Normalization layer is added to implement lateral inhibition.

  • Adam is chosen as the optimizer with a learning rate of 1e-2โ€‹

  • The learning rate was chosen using the method Cyclical Learning Rates for Training Neural Networks

  • Epoch - 100

  • Batch size - 100

Able to detect subtle variations in characters such as addition of kagunithas

Inception V3

  • Train percentage - 90%

  • Test percentage - 10%

  • Training Steps - 4000

HOW TO EXECUTE

Check web_app/hwrkannada\how_to_run.txt

RESULT

Models Accuracy
SVM 96.35%
k-NN 68.53%
CNN 99.84%
Inception v3 75.36%

AUTHORS

  • Subhrajyoti Sen
  • Shreya V Prabhu
  • Steve Jerold
  • Pradeep JS

kannadahandwritingrecognition's People

Contributors

deeppra avatar deepsource-autofix[bot] avatar deepsourcebot avatar imgbotapp avatar shreyaprabhu avatar stevejerold1 avatar subhrajyotisen avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.