Giter Site home page Giter Site logo

ocr's Introduction

OCR

For hand written text identification (OCR)

To refer the Data set please use the Following Dataset : https://www.kaggle.com/vaibhao/handwritten-characters

THe dataset contains 39 categories including :

  1. Alphabtes (small and caps merged together just to avoid mis classification) -- > 26
  2. Digits (1 to 9) : Digit 0 is added to character O for avoiding misclassification
  3. Some special characters which include &, #, $, @

The data set contains Train and Validation folders containing 0.8+ Milion Training Records and 20,000 + validation records ALl image are of 32,32 pixel black and white image..

The arechitecture used to train the model is CNN along with deep learning network running paraller to CNN: Please refer the Flow diagram below :

Model_Architecture

  • Added Requirment files. Use

    pip install -r /path/to/requirements.txt #for installation of requirements.
    

Description: -

  1. For Inference :
  • Put all your image documents to the SampleTestForms which you want to extract infomation from image.

  • getText.py and ParseDocument_v2.py these 2 files sould be there in same folder as these files are used to identifying the Text from the scanned image document.

  • configure the ParseDocument_v2.py file wiht the Model Path and label paths. The default location of all models and label files are inside Model folder. please change if you are storing these files elsewhere.

  • Run getText.py file in command prompt ==> Program will fetch the hand writtern characters, print it on screen and simultaneoulsy it will create a csv file with all the informations in Output directory(located inside current working directory).

  • all the cropped and processed images will be there inside the RuntimeImages folder for troubleshooting..(if required)

  1. For Model Training:
  • The Data should be present in in folder structure.

i.e.

 * ParentFolder 
 * |--Train ----
 * |        ----
 * |        ----
 * |
 * |--Validation ----
 * |             ----
 * |             ----
  • Edit the CNN_mainScript.py file and configure the Training data path, Validation Data path, Number of classes, Learning rate, batchSize, regularization parameter.

  • Edit the LSTM_Training.py file and update the Following parameters

  1. Model checkpoint == Enter the name of model and path to which the Model get saved after each epochs if validation loss is reduced.
  2. Label File Name
  3. Update the details at the bottom of the file.

Note: This OCR model is tuned for the sample forms added in the SampleTestForm folder. If you are trying for something different than the mentioned form then you have to tune the code in order to incorporate new changes ...

Check for the demostration : https://www.linkedin.com/feed/update/urn:li:activity:6454087778501259264

ocr's People

Contributors

vaibhavkhamgaonkar avatar

Watchers

James Cloos avatar Shan KM 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.