Purpose of this project is to build a neural network with TensorFlow(TF). The network was trained with mnist dataset to recognize hand written digits (0-9). Numbers were written with paint and fed to the network, results are shown below.
- mnist datasets
- install packages using pip with requirements_gpu.txt.
- tensorflow-gpu==1.0.1 requires cuda installation
- alternatively the cpu version of tensorflow can be used instead
- Generate config.ini with configInit.py (modify configInit.py to point to the appropriate paths)
Label : Expected output | MP : multilayer perceptron | RNN : recurrent neural network
Label | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 7 | 8 | 9 | blank |
MP Output | 0 | 1 | 2 | 3 | 5 | 5 | 5 | 8 | 1 | 8 | 9 | 5 |
RNN Output | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 7 | 8 | 9 | 1 |
Image | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Using the multilayer perceptron the accuracy obtained was 96.73%, the recurrent neural network however manage to score 98.87. Although 2% may seem small the results shows that it makes a big difference.
- sentdex : https://pythonprogramming.net/
- mnist data : http://yann.lecun.com/exdb/mnist/