Skip to content

Recognize Handwritten Digits(persian/english) with Neural Networks

Notifications You must be signed in to change notification settings

mhsharifi96/Hand-Digits-Recognition-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Handwritten Digit Recognition using neural network

Requirements

  • Python 3.5 +
  • Numpy
  • cv2
  • matplotlib
  • tensorflow

Usage

In this code use two dataset:

1. MNIST for recognize english digits

2. HODA for recognize persian digits

3. Install Requirements

In NN dir

A module to implement the stochastic gradient descent learning algorithm for a feedforward neural network. Gradients are calculated using backpropagation. Note that I have focused on making the code simple, easily readable, and easily modifiable. It is not optimized, and omits many desirable features.

1. If you recognize english digits run python mnist_main.py

2. If you recognize persian digits run python hoda_main.py

In tensorflow dir

Handwritten Digits with TensorFlow

1. If you recognize english digits run python ts_main.py

Result

persian digits

$ python3 hoda_main.py 

Reading train dataset (Train 60000.cdb)...
Reading test dataset (Test 20000.cdb)...
Epoch 0 : 17882 / 20000 accuracy:89.41 
Epoch 1 : 18402 / 20000 accuracy:92.01 
Epoch 2 : 18584 / 20000 accuracy:92.92 
...

english digits

$ python mnist_main.py

Epoch 0 : 9043 / 10000 accuracy:90.42
Epoch 1 : 9191 / 10000 accuracy:91.91 
Epoch 2 : 9285 / 10000 accuracy:92.85 
Epoch 3 : 9295 / 10000 accuracy:92.95 
Epoch 4 : 9383 / 10000 accuracy:93.83 
Epoch 5 : 9391 / 10000 accuracy:93.91
...

reference

Using neural nets to recognize handwritten digits

Hoda

tensorflow

Handwritten Digits with TensorFlow

Releases

No releases published

Packages

No packages published

Languages