S ScienceFairProjects.info
Medium⏱ time2 hr$ cost0

Hand-Drawn Digit Classifier

Train a tiny neural network in the browser to recognise digits you draw with a mouse.

Start building ↓
fig — working model Result first

The build

Step 01

Load the data

Pull in labelled 28×28 digit images.

Step 02

Define the model

Stack input, hidden and a 10-way softmax output.

Step 03

Train it

Run a few epochs and watch accuracy climb past 95%.

Step 04

Draw & predict

Sketch a number and let the model name it.

Working Principle

The network learns patterns of pixels for each digit during training, then matches your drawing to the most similar learned pattern.

The science behind it

A closer look

Training nudges thousands of weights via gradient descent until outputs match labels; softmax turns scores into probabilities.

Take it further

Variables to test

  • 1 Shrink the hidden layer — how few neurons still hit 90%?
  • 2 Feed messy digits — where does it confidently fail?

More AI