In the name of God
This repository contains implementation of LeNet-5 (Handwritten Character Recognition) by Tensorflow and the network tested with the mnist dataset and hoda dataset.
To train the network with mnist dataset, type the following command at the command prompt:
python3 ./train_mnist.py
Sample images from mnist dataset:
Train Accuracy = 0.121
Test Accuracy = 0.121
Validation Accuracy = 0.128
Train Accuracy = 0.963
Test Accuracy = 0.966
Validation Accuracy = 0.964
Train Accuracy = 0.976
Test Accuracy = 0.976
Validation Accuracy = 0.977
...
Train Accuracy = 1.000
Test Accuracy = 0.992
Validation Accuracy = 0.992
...
Final Train Accuracy = 1.000
Final Test Accuracy = 0.992
Final Validation Accuracy = 0.993
To evaluate the network with mnist dataset, type the following command at the command prompt:
python3 ./evaluate_mnist.py
To train the network with hoda dataset, type the following command at the command prompt:
python3 ./train_hoda.py
Sample images from hoda dataset:
Train Accuracy = 0.093
Test Accuracy = 0.110
Remaining Accuracy = 0.101
Train Accuracy = 0.982
Test Accuracy = 0.962
Remaining Accuracy = 0.967
Train Accuracy = 0.986
Test Accuracy = 0.972
Remaining Accuracy = 0.977
...
Train Accuracy = 1.000
Test Accuracy = 0.992
Remaining Accuracy = 0.994
...
Final Train Accuracy = 1.000
Final Test Accuracy = 0.993
Final Remaining Accuracy = 0.995
To evaluate the network with hoda dataset, type the following command at the command prompt:
python3 ./evaluate_hoda.py
- Python 3
- numpy
- opencv-python
- tensorflow
- http://yann.lecun.com/exdb/lenet/
- http://yann.lecun.com/exdb/publis/pdf/lecun-98.pdf
- http://yann.lecun.com/exdb/mnist/
- http://farsiocr.ir/مجموعه-داده/مجموعه-ارقام-دستنویس-هدی
- http://dadegan.ir/catalog/hoda
- https://www.tensorflow.org/
- https://github.com/amir-saniyan/HodaDatasetReader
- https://github.com/amir-saniyan/LeNet-5