Skip to content

A neural-network based handwritten digit recognition system, coded from scratch.

Notifications You must be signed in to change notification settings

vpuru98/Digit-Recognizer

Repository files navigation

Digit-Recognizer

A neural-network based handwritten digit recognition system.

About

Digit-Recognizer is a simple handwritten digit recognition system which employs an artificial neural network to classify a 28 X 28 image into one of the ten decimal digits. The recognition system uses the MNIST dataset of handwritten digits for training the neural network, which consists of a training set of 60,000 and a test set of 10,000 binary encoded images.

The artificial neural network is coded from scratch in python (the system does make use of python's Numpy package to optimize its matrix operations). The currently trained neural network shows upto 97.5% accuracy of prediction on the test set. Some of features of the neural network include:

  • Mini Batch Optimization
  • Adam Optimizer
  • Batch Normalization

The GUI for the project is made using the pygame library.

Further improvements to the project :

  • Drop-out Regularization
  • Learning Rate Decay

Usage

First, install the required libraries.

pip3 install -r requirements.txt

Next, run the following command to draw a digit and obtain a prediction

python3 draw.py

To preview the first 100 images of the training or the test set, run the following commands:

python3 preview_train.py
python3 preview_test.py

To view the code, run the jupyter notebook within the ANN directory

Example

About

A neural-network based handwritten digit recognition system, coded from scratch.

Topics

Resources

Stars

Watchers

Forks