← AI Activities Svenska

Computer Vision with CNNs

Draw a picture and follow, step by step, how a computer goes from pixels to a guess.

The Image 16 × 16 pixels
Show pixel values (0–255)
Click a filter below to get started.
Look for patterns with a filter (convolution)
Each filter finds different patterns
One filter is not enough to understand an image. That 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 image.
The Decision
Each filter map is summed into one number: how much the filter reacted. Four numbers – that is the model's entire memory of the image.
The model compares the image’s signature with the four shapes it knows and makes a classification: the shape whose signature is most similar becomes the guess.
Our mini model and real image models share the same basic principle, but differ enormously in scale.

Similarities
• Both see images as a grid of numbers.
• Both use filters that slide over the image looking for patterns.
• Both boil the image down to a signature that drives the decision.

Differences
• In this simulation the filters are fixed in advance, while real CNNs learn for themselves which filters work best during training.
• Real networks stack many layers: the first layer sees edges, the next assembles them into shapes, and later layers recognize eyes, wheels, faces…
• The images are millions of pixels in color, not 16×16 in grayscale.
• Our model knows 4 shapes. Real models can tell thousands of objects apart.
The model can only choose among four shapes – vertical line, horizontal line, cross, and circle. If you draw something completely different, such as a house or a cat, it still has to pick the shape that resembles the image most – just less confidently.
First, the image becomes a grid of numbers. A 16-by-16-pixel image becomes 256 numbers between 0 and 255.

Then four different filters search the image for different types of patterns. Each filter creates its own feature map with 196 numbers.

Each feature map is then summarized into a single number describing how strongly that filter reacted – a step called pooling. Together, the four numbers form a simple description of the image. In this simulation we call it the image’s signature.

Finally, the signature is compared with the four shapes the model knows, and the most similar shape wins.

This is a miniature convolutional neural network. It works on the same principle as facial recognition and self-driving cars, but real networks use millions of learned filters across many layers.

How does a computer see?

In this simulation you will follow how a simple image model goes from reading an image as a grid of numbers to guessing what the image shows.

The model you will build is called a convolutional neural network (CNN) – a technique that lets computers interpret photos, recognize faces, and read road signs. Here is how it works:

1The image becomes numbers
2Filters search for patterns
3Maps show matches
4The model guesses
5Explore freely