Project idea · ungraded

Handwritten Digit Recogniser

Train a neural network that recognises handwritten digits, then try it on digits you draw yourself. Start with the small 8×8 digits that ship with scikit-learn, then move to MNIST's 28×28 images.

You will use

Milestones

Build the smallest working version first. Ticks are saved in this browser only.

Stretch goals

  • Add dropout and compare validation curves; save the best model with its state_dict.
  • Replace the MLP with a small CNN (see the Computer Vision topic).
  • Make a tiny web page or FastAPI endpoint where you draw a digit and get a prediction.

Data

Run it yourself

pip install torch torchvision scikit-learn matplotlib
python train_digits.py

A CPU is enough: an MLP on MNIST trains in a few minutes.