Draw a digit from 0 to 9
A small neural network, trained on the MNIST set of handwritten digits, guesses what you drew and how sure it is.
Your drawing
The model guesses when you lift your pen.
Drawing area. Draw a digit with a mouse, finger or stylus.
Your guess appears here
Draw a digit in the box.
The model didn't answer
Confidence for each digit
What the model sees: your drawing cropped, centred and shrunk to 28 × 28 grey pixels, the size of the images it learned from.
Loading the test results...
Where it gets confused
Each row is the real digit and each column is the model's guess. Darker cells hold more test digits. The diagonal is the correct answers.
Most common mistakes
Among the test digits it got wrong.
By digit
How well it does on each digit.
Precision: when the model says 3, how often it really is a 3.
Recall: of all the real 3s, how many the model calls 3.
F1: one number that balances the two.
From your pen to a guess
- You draw on a white square. When you lift your pen, your browser finds the edges of your drawing, centres it in a square and shrinks it to 28 × 28 grey pixels, the same format as the training images.
- Only that small image is sent to the server. Your full drawing never leaves your browser.
- The server runs a convolutional neural network. Two convolution layers pick out strokes, corners and curves. Two dense layers turn those features into a score for each digit.
- The scores become ten probabilities that add up to 100%. The highest one is the guess, and the bars show the rest.
- The image is discarded after the guess. Nothing is saved or used for training.
The network learned from MNIST, a public set of 70,000 handwritten digits written by American high school students and census staff. It has never seen your handwriting, so unusual styles can fool it. Try a 7 with a crossbar, or a 1 with a long base.