Giter VIP home page Giter VIP logo

neural-ocr's Introduction

Neural Network OCR

We propose the design, implementation, training, and evaluation of a feed-forward neural network adapted to the task of optical character recognition (OCR), in particular as applied to the recognition of handwritten digits. We define a precise metric for measuring the success of such a network on real-world data. We experimentally measure the efficacy of the neural network under variation of certain parameters of its construction and seek to maximize a precise quantity expressing the success of the neural network versus the difficulty in constructing and training it.

Authors

Training

We define the success of the neural network as the ratio of correctly recognized digits. The network will be trained in handwritten digit-recognition with 10,000 images derived from the MNIST database using a simple script. We use Otsu thresholding to convert each image from grayscale to black and white, and resize each image from 28x28 to 6x6, thus reducing the dimensionality of the input. The number of training samples used is a parameter that will be varied for the purpose of experimentation.

Evaluation

Evaluation of the neural network will be performed using image samples from MNIST distinct from the training data. We will evaluate the system varying parameters such as

  • the number of training samples per digit,
  • the number of layers in the neural network,
  • the number of neurons per hidden layer,
  • the weight of the bias,
  • the learning rate coefficient used in back-propagation,
  • the response threshold for the sigmoid function.

For experimentation purposes, the success of the neural network in performing OCR will be measured as a function of each of these parameters separately. We will experimentally determine the values of these parameters that maximize the training efficiency.

Building

This program is built using the OpenCV library, which is compatible with Windows, OS X, and Linux.

If you are using Linux, you can install OpenCV via most package managers; for example, in Debian/Ubuntu:

sudo apt-get install libopencv-dev

Or in OSX:

sudo port install opencv

You may have to change the INCLUDE variable in the Makefile to point to the location in which the library is installed.

Running

Once built, the program may be run with the above parameters set via command-line flags:

  • -t: the number of training samples per digit,
  • -T: the number of testing samples per digit,
  • -l: the number of hidden layers; default = 2,
  • -b: the weight of the bias,
  • -a: the learning rate for back propagation,
  • -r: the response threshold for the sigmoid function,
  • -h: the number of neurons per hidden layer.

License

This project is licensed under the MIT open source license. See the LICENSE file for details.

neural-ocr's People

Watchers

 avatar  avatar  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.