Hand Drawn Digit Predictor

Requirements:

  1. Pytorch
  2. Torchvison
  3. Torchinfo
  4. Matplotlib
  5. Numpy
  6. Pygame

How to run:

  1. Open terminal and navigate to the project folder
  2. (OPTIONAL) Type 'python model.py' and hit 'Enter' - this will retrain the model
  3. Check the project folder for a file named 'trained_model.pth'
  4. In terminal, type 'python draw.py' and hit 'Enter'
  5. Enjoy

How to draw:

  1. Simply use your left mouse button to draw any digit.
  2. Hit 'c' at any time to clear the screen and start fresh
  3. Hit 'Enter' at any time to submit your drawing for the model to predict.
  4. After the model gives a prediction, either hit 'c' or keep drawing onto the current drawing.