Skip to content

An implementation of Neural Networks from scratch in python using only numpy for MNIST dataset .

Notifications You must be signed in to change notification settings

bharathikannann/digit-recognition

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Digit Recognition

Getting started

  • Clone this repository https://github.com/bharathikannan1311/digit-recognition

Implementations

  1. Neural Network from Scratch - for better understanding of how neural network works.
  2. Tensorflow - the same problem solved using tensorflow.
  3. Tensorflowjs - Classifying digits in the browser.
  4. Tensorflowjs - Webcam - Classifying the sign from the webcam in the browser.
  • A simple implementation of Neural Network from scratch in python. It does not use any Deeplearning library like tensorflow and all of the functions are implemented from scratch only using numpy for better understanding of concepts and how Neural Networks work.

  • It will be much slower when compared to the same problem solved using tensorflow because we can use much better optimization techniques. This code can be used for learning purposes.

  • Here we will be using MNIST dataset for digit recognition.

  • Prerequisites

    • Numpy - Numerical scientific computing library.
    • Matplotlib - Plotting library.
    • Python-mnist - for loading mnist dataset
    • MNIST Dataset - Dataset for Digit Recognition
      • Create MNIST directory and download the dataset and store it in this directory.

This code is not as efficient and takes long time to converge and the same problem solved through tensorflow will be much efficient and we can use better optimization techniques and Convolutional Neural Networks are suitable for Image Datasets.

  • The same problem implemented in tensorflow with Convolutional Neural Networks and adam optimizer.

  • Prerequisites

  • It's accuracy on the mnist test set is about 98.9%.

Accuracy Plot

  • Implemented using Tensorflowjs library.
  • It trains the model in the browser when launched and then it then classifies the digit that we draw in the browser.

Model Architecture


Perdictions


Loss and Accuracy

  • We need to train the model in the browser by taking sign pictures as input from the webcam as training data.
  • Then we can use our model to classify for new inputs.

Video demo - link

About

An implementation of Neural Networks from scratch in python using only numpy for MNIST dataset .

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published