Please visit smaiya-mnist-cnn for the Web Application. Below is a snippet from the web application. The application outputs the predicted digit. It also provides the confidence and other possibilities, if the confidence level of the prediction is < 99%
We train a handwritten digit classifier using the MNIST data set with Convolutional Neural Network using Keras with tensorflow backend. The model achieves an accuracy of 99.4%. The most common mis-classified digit are from 9 to 4. Below is the block diagram of the CNN that is used to train the model
Below are few selected images for which the model correctly and incorrectly predicts the digit. We can see how 9 can be mistaken for a 4 even to a common person from these images