Deep Learning

Convolution, visualized

A convolution slides a small grid of numbers — a kernel — across an image, multiplying and summing as it goes, to produce a new 'feature map'. Different kernels detect different things: edges, corners, textures.

Convolutional neural networks (CNNs) learn these kernels automatically, stacking them to recognise increasingly complex patterns — from edges, to eyes, to faces. This tool shows the single operation everything else is built on.

Slide the kernel across the image

Kernel

input 5×5feature map3

Window (1,1)

3

sum of the 9 overlapping cells × the kernel weights

The edge kernel gives ~0 on flat areas and a big value right at the light/dark boundary — it has detected an edge.

Step 1 / 9

Free · runs entirely in your browser · nothing to install

How to use it

  1. Slide the kernel over the image grid one position at a time.
  2. Watch each output cell fill in as the kernel multiplies and sums.
  3. Notice how an edge in the image produces a bright response in the feature map.

What you'll take away

  • What a kernel (filter) is and how it scans an image.
  • Why convolution is great at finding local patterns like edges.
  • How stacked convolutions build up to object recognition.

Want to actually build this?

This demo is one moment inside a full Math to Machine lesson — predict, build, and explain the concept, with an AI tutor that gives hints, not answers. The first five lessons are free.

FAQ

What is convolution in a CNN?
It's the operation of sliding a small learned filter across an image and computing a weighted sum at each position, producing a feature map that highlights where a particular pattern appears.
Why do CNNs use convolution instead of regular layers?
Convolution reuses the same small filter everywhere in the image, so it needs far fewer parameters and naturally detects patterns regardless of where they appear — ideal for images.

More Deep Learning tools