Draw a picture and follow a computer step by step from pixels to a guess.
The picture · 16 × 16pixels
Show pixel values (0–255)
Buttons with a dashed border show shapes that are not one of the four classes the model knows. The model still has to pick the shape that resembles them most.
Click a filter below to begin.
Search for patterns with a filter (faltning)
Every filter is the same kind of tile: nine numbers, plus on one side and minus on the other. It is where the pluses and minuses sit that decides which kind of edge the filter responds to. Click ? beside a filter to see how.
Each filter finds different patterns
One filter is not enough to understand a picture. This is why real CNNs use many different filters at once. Click one or more maps and see how together they capture more and more of the picture.
The decision
Each filter map is summarised into one number: how strongly the filter responded. These four numbers are the model's entire memory of the picture.
The model compares the image signature with the four shapes it knows and makes a classification: the shape whose signature most resembles the picture's becomes the guess.
Does it matter where in the picture the shape sits?
Move the shape and keep an eye on two things: the feature map up in the picture card, and the signature here above.
moved 0 px
First the picture becomes a grid of numbers. A picture of 16 by 16 pixels becomes 256 numbers between 0 and 255.
Then four filters search the picture for different kinds of pattern. Each filter creates its own feature map of 196 numbers.
Each feature map is summarised into a single number describing how strongly that filter responded, in a step called pooling. Together the four numbers form a simple description of the picture. In this simulation we call it the image signature.
Finally the signature is compared with the four shapes the model knows, and the closest shape wins.
This is called a convolutional network in miniature. It rests on the same principle as face recognition and self-driving cars, but the real networks use millions of learned filters in many layers.
Our mini model and real image models rest on the same basic principle, but work at completely different scales.
Similarities
• Both see pictures as grids of numbers.
• Both use filters that slide across the picture looking for patterns.
• Both boil the picture down to a signature that drives the decision.
Differences
• In this simulation the filters are fixed in advance, whereas real CNNs work out for themselves which filters work best during training.
• Real networks stack many layers: the first layer sees edges, the next sees shapes, the next sees eyes, wheels, faces…
• The pictures are millions of pixels in colour, not 16×16 in greyscale.
• Our model knows 4 shapes. Real models can tell thousands of objects apart.
The model can only choose between four shapes: vertical line, horizontal line and the two slanted lines ╱ and ╲. If you draw anything else, such as a cross, a circle or a cat, it must still pick the closest shape, and then it becomes uncertain. The dashed ✚ and ◯ buttons are exactly such cases.
How does a computer see?
In this simulation you follow a simple image model as it goes from a grid of numbers to a guess about what the picture shows.
The model you build is called a convolutional neural network (CNN) . The technique lets computers interpret photos, recognise faces and read road signs. Here is how it works: