AboutWhat I doProjectsLabContact
Blog·Sin jerga·09/07/2026·2 min

You draw a 7 and it knows: what happens inside

Your drawing becomes 784 numbers, the 784 numbers become ten probabilities, and the highest one wins. The full journey, jargon-free, with the experiment inside the article.

You draw a 7 and it knows: what happens inside

When you draw a digit on the screen and the computer recognises it, it is not "seeing" anything. It is doing arithmetic. And the arithmetic is so unmysterious it fits in a short article. At the end there is a canvas for you to draw on and check I am not exaggerating, with a little window that shows something almost nobody lets you see: exactly what reaches the model.

First, your drawing becomes numbers. The image is reduced to a grid of 28 by 28 cells — 784 in total — and each cell stores a single number: how much ink it holds, from 0 (none) to 1 (full stroke). Your seven, with all its personality and hurry, is reduced to 784 numbers between zero and one. Everything the model will ever know about you is that.

Then, the arithmetic. Each of those 784 numbers is multiplied by a weight — one of the little dials from the previous article — and added up. That repeats across 128 different combinations, and once more down to ten outputs: one per digit. The ten become percentages that sum to 100. If "7" takes 93%, the model says seven. There is nothing else: multiply, add, compare.

Where do the weights come from? From seeing 30,000 digits drawn by real people, one by one, adjusting the dials with every mistake just like in the valley of small steps. The model living in this page was trained that way, and it gets 97.3% of digits it has never seen right. The remaining 2.7% matters too: nobody honest will sell you a model that is always right.

Look at the little "what the model sees" window: your big, expressive drawing, turned into a blurry 28x28 thumbnail. That thumbnail IS the model looking. Try drawing a 7 in a corner, or a tiny one, or one with the European crossbar. When it fails — it will —, you are watching live the limit of what it learned from its 30,000 examples. Models do not understand digits: they recognise resemblance to what they have already seen.

Next time your phone reads an ID or a bank processes a cheque, you know what is underneath: a grid of numbers, a lot of multiplication and a contest of percentages. The code for this demo is public, like everything on this site.

Shall we connect?

Let's talk: feedback, collaboration or an opportunity.

You can write to me about a project, a technical question, to give me feedback, or about an internship or a first junior role. I always reply.

Write to me

Keep reading:

hola@jmwebsoluciones.com