There is no “seven” inside your computer. There’s a grid where every pixel is a brightness value — 0 for black, 255 for white. Everything a neural network does starts from this humble spreadsheet.
Hover (or tap) a pixel to inspect it. A real photo works the same way, just bigger — a 12-megapixel photo is 36 million of these numbers (three per pixel: red, green, blue).
So the real question is: how do you get from a grid of numbers to “this is a 7”? The answer starts with a surprisingly simple operation.
Take a small grid of weights — a kernel (also called a filter). Slide it over the image. At every stop, multiply each pixel under the window by the matching weight and add everything up. That single sum becomes one pixel of a new image called a feature map.
That’s it. That’s a convolution. Watch it run:
Two details worth noticing. The output is slightly smaller (10×10 → 8×8) because the window can’t hang off the edge. And the same nine weights are reused at every position — a kernel has no idea where it is, it only knows what it’s looking at. Hold that thought; it’s the superpower.
A kernel lights up wherever the image locally matches its pattern. One kernel fires on vertical edges, another on horizontal ones, another on diagonals. A convolutional layer runs many kernels in parallel, producing a stack of feature maps — one per kernel.
Draw something and watch four detectors respond in real time:
Feature maps come out signed: positive where the pattern matched, negative where its opposite did. After each convolution, the network applies a brutally simple rule to every value — ReLU (rectified linear unit): if it’s negative, make it zero.
The map becomes a clean “heat map” of where the feature was found. This little kink is also what makes deep networks possible: without a nonlinearity between them, stacked convolutions would collapse into one big (and much weaker) linear filter.
Next the network shrinks the map. Max pooling slides a 2×2 window (in steps of 2) and keeps only the strongest value in each block. The map halves in size, but the detections survive.
Here’s where it becomes a network. The pooled feature maps are themselves images — so convolve them. A second layer of kernels doesn’t see pixels anymore; it sees combinations of first-layer features: a vertical edge meeting a horizontal one is a corner, edges arranged in a ring are a loop.
Layer by layer, the maps get smaller in space but richer in meaning: edges → textures and corners → parts → whole objects. Below is a live two-layer stack running on your drawing:
In a real network the pattern is exactly this, just bigger: dozens of layers, hundreds of kernels per layer, millions of images of training. And nobody writes the kernels — training nudges their weights until useful detectors emerge.
After the last layer, the spatial maps are tiny but each value means something high-level: “whiskery texture here”, “pointy ear-ish corner there”. The network flattens them into one long list and feeds it to a final, ordinary layer that computes a score for every class. A function called softmax then turns raw scores into probabilities that sum to 100%.
That’s the whole journey: numbers → edges → parts → scores → probabilities.
One kernel, reused everywhere. Nine numbers scan the whole image instead of every pixel needing its own weight — millions of times fewer parameters, and far less data needed to learn them.
Because the kernel is the same everywhere, a cat in the corner triggers the same detectors as a cat in the middle. The network learns what, not where — and pooling adds extra wiggle room.
Simple detectors compose into complex ones, layer by layer. No one programs “ear” or “wheel” — those concepts condense out of edges, the way words condense out of letters.
This recipe — convolve, ReLU, pool, repeat, classify — powered the 2012 AlexNet moment that kicked off the deep-learning era, and it still runs your phone’s face unlock, photo search, medical image screening, and the vision systems in cars. Newer architectures remix the details, but the core idea on this page is still how machines see.
Everything above runs live in your browser — every feature map is a real convolution of whatever you drew. Nothing is prerendered.