Giter VIP home page Giter VIP logo

handwritten_digit_recognizer's Introduction

Handwritten Digit Recognizer

This is a small tool I've written for learning Tensorflow to recognize handwritten digits. You can write a digit in the box with mouse or tablet, and the program will recognize it and display the probabilities of each categories. Press the right mouse button to clear the image. Click the button on the right, and the program will save the image in the corresponding directory.

normal

Requirements:

  • Python
  • PySide
  • Tensorflow
  • python-opencv
  • numpy

Running:

Before use, you need to execute the following command to install dependencies.

sudo pip install -r requirements.txt

Then you can run the tool by the following command:

python recognize.py

Theory

The tool uses a simple neural network architecture shown in the table below to recognize digits. The network is trained on the MNIST dataset (http://yann.lecun.com/exdb/mnist/).

layer parameter shape
input 28x28x1
conv kernel 5x5 filters 6 strides 1 padding 2 28x28x6
relu 28x28x6
pool max_pooling stride 2 14x14x6
conv kernel 5x5 filters 16 strides 1 padding 0 10x10x16
relu 10x10x16
pool max_pooling stride 2 5x5x16
conv kernel 5x5 filters 32 strides 1 padding 0 1x1x32
flatten 32
dense hidden_units 64 64
relu 64
dense hidden_units 10 10
output

You can modify the relevant code in tf_predict.py to use your own neural network architecture.

Thanks to Yann LeCun, for both MNIST and LeNet-5.

handwritten_digit_recognizer's People

Contributors

jsyzgaochao avatar

Stargazers

 avatar

Watchers

 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.