GithubHelp home page GithubHelp logo

tusharambelkar / devanagricharacterrecognition Goto Github PK

View Code? Open in Web Editor NEW
3.0 0.0 0.0 4.35 MB

Python 100.00%
convolutional-neural-networks devanagari character-recognition devanagari-character-dataset devanagri-character-recognition

devanagricharacterrecognition's Introduction

DevanagriCharacterRecognition

Problem Statement:

  • To create a classifier model to recognise handwritten devanagari characters and use the model to test a given image.

Description of dataset:

Available at:

https://archive.ics.uci.edu/ml/datasets/Devanagari+Handwritten+Character+Dataset

  • Data-type: Gray-scale image

  • Classes: 46 (36 characters,10 digits)

  • Dataset size: 92000(2000 examples of each class)

  • Training data: 72000

  • Test/Validation data: 20000

  • Description:

    • Size: 32x32 pixels
    • Actual size: 28x28 pixels
    • Padding : 2 pixels in each direction
    • Background: black(0)
    • Character-color: white(255)
  • Preprocessing Activity on Dataset:

    During each iteration of our training algorithm, we have applied following preprocessing attributes to avoid overfitting:

    • rotation_range = 50 ,
    • width_shift_range = 0.1
    • height_shift_range = 0.1
    • shear_range = 0.2
    • zoom_range = 0.2
  • Machine Learning algorithm used:

    The problem of image classification can be well handled by Convolutional Neural Networks.

  • Convolutional Neural Networks:

    In machine learning, a convolutional neural network (CNN, or ConvNet) is a class of deep, feed-forward artificial neural networks that has successfully been applied to analyzing visual imagery.

    Convolutional networks were inspired by biological processes in that the connectivity pattern between neurons resembles the organization of the animal visual cortex. Individual cortical neurons respond to stimuli only in a restricted region of the visual field known as the receptive field. The receptive fields of different neurons partially overlap such that they cover the entire visual field.

    CNNs use relatively little pre-processing compared to other image classification algorithms. This means that the network learns the filters that in traditional algorithms were hand-engineered. This independence from prior knowledge and human effort in feature design is a major advantage.

Design:

A CNN consists of an input and an output layer, as well as multiple hidden layers. The hidden layers of a CNN typically consist of convolutional layers, pooling layers, fully connected layers and normalization layers.

Convolutional

Convolutional layers apply a convolution operation to the input, passing the result to the next layer. The convolution emulates the response of an individual neuron to visual stimuli.Each convolutional neuron processes data only for its receptive field. Although fully connected feedforward neural networks can be used to learn features as well as classify data, it is not practical to apply this architecture to images. A very high number of neurons would be necessary, even in a shallow (opposite of deep) architecture, due to the very large input sizes associated with images, where each pixel is a relevant variable. For instance, a fully connected layer for a (small) image of size 100 x 100 has 10000 weights for each neuron in the second layer. The convolution operation brings a solution to this problem as it reduces the number of free parameters, allowing the network to be deeper with fewer parameters.For instance, regardless of image size, tiling regions of size 5 x 5, each with the same shared weights, requires only 25 learnable parameters. In this way, it resolves the vanishing or exploding gradients problem in training traditional multi-layer neural networks with many layers by using backpropagation.

Pooling:

Convolutional networks may include local or global pooling layers, which combine the outputs of neuron clusters at one layer into a single neuron in the next layer.For example, max pooling uses the maximum value from each of a cluster of neurons at the prior layer.Another example is average pooling, which uses the average value from each of a cluster of neurons at the prior layer

Fully connected:

Fully connected layers connect every neuron in one layer to every neuron in another layer. It is in principle the same as the traditional multi-layer perceptron neural network

The structure of convolutional neural network is described in following screenshot:

Structure Image

Training pic:

Structure Image

Alternate implementation:

https://colab.research.google.com/drive/1YLLPRb8J2KaHSaCz9JhM4hD92084dFSa

devanagricharacterrecognition's People

Contributors

tusharambelkar avatar

Stargazers

 avatar  avatar  avatar

devanagricharacterrecognition's Issues

Regarding word level recognition

Hi,
Will this code work for word level recognition?
Say i pass a image containing words in different line,will the model handle that??

Please let me know.

Thanks and regards.

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.