Input Image
Conv Filter (Layer 1)
Animation Speed
Scan speed
5
View Layer
Statistics
~5 K
Parameters
16
Feature Maps
0
Scan X
0
Scan Y
A Convolutional Layer slides a small filter (kernel) over the input image. At each position the element-wise product is summed to produce one value in the feature map — detecting patterns like edges or textures.

About the Convolutional Neural Network Visualiser

This simulation walks a small image through a CNN one layer at a time. An 8×8 pixel input is convolved with a 3×3 kernel: at every position the filter is multiplied element-wise with the underlying patch and summed to form a feature map. That map then passes through a ReLU activation, f(x)=max(0,x), a 2×2 max-pooling step, a second convolution and a final activation, mirroring how real CNNs build features hierarchically.

The controls let you pick an input pattern (Digit 7, X mark, circle, edge or checker), choose the Layer-1 kernel (horizontal edge, vertical edge, sharpen or blur), set the scan speed and step through the View Layer tabs (Input, Conv1, ReLU, Pool, Conv2, Output). CNNs built on exactly these operations power image classification, face detection, medical-scan analysis and the vision systems in self-driving cars.

Frequently Asked Questions

What is a convolutional neural network?

A convolutional neural network, or CNN, is a deep-learning model designed for grid-like data such as images. Instead of connecting every pixel to every neuron, it slides small learnable filters across the input to detect local patterns like edges and textures, then stacks these into deeper, more abstract features.

How does the convolution step in this simulation work?

A 3×3 kernel is positioned over each pixel of the 8×8 input. The nine kernel weights are multiplied by the nine pixels beneath them and the products are summed into a single output value. Repeating this across the whole image produces a feature map, which is then normalised to a 0 to 1 range for display.

What do the four filter buttons actually do?

Each button loads a different 3×3 kernel. Edge H detects horizontal brightness transitions, Edge V detects vertical ones, Sharpen enhances fine detail by subtracting the local average from the centre pixel, and Blur is a box filter that averages neighbouring pixels to smooth the image.

Why is the ReLU activation needed?

ReLU applies f(x)=max(0,x), clamping every negative value to zero. This introduces non-linearity, which lets the network represent complex, curved decision boundaries rather than just linear combinations of pixels. Without a non-linear activation, stacking many layers would collapse into a single linear transform.

What does max pooling achieve?

The 2×2 max-pooling layer takes the largest value in each non-overlapping 2×2 window, halving the width and height. This keeps the strongest activations, reduces computation and gives the network a degree of translation invariance, so a feature is recognised even if it shifts by a pixel or two.

Are the filters in this demo learned or fixed?

They are fixed, hand-chosen kernels used to make the maths visible. In a trained CNN the kernel weights are learned automatically through backpropagation and gradient descent, so the network discovers whichever filters best minimise its loss on the training data rather than relying on classic edge or blur kernels.

Why does the feature map get smaller after pooling?

Pooling combines four neighbouring values into one, so an 8×8 map becomes 4×4. Shrinking the spatial dimensions while increasing the number of feature channels is the core CNN pattern: deeper layers see a smaller, coarser grid but represent richer, higher-level concepts such as corners and curves.

What do the statistics like Scan X and Scan Y mean?

Scan X and Scan Y show the current column and row of the kernel as it sweeps across the input during the Conv1 animation. Parameters estimates the total trainable weights in this tiny network, and Feature Maps shows how many channels the active layer produces, rising from 8 to 16 in the deeper layers.

Is this an accurate representation of a real CNN?

The operations are faithful: genuine convolution, ReLU, max pooling and a second convolution in the correct order. It is simplified for clarity, using a single small image, hand-set kernels, normalised display values and no actual training, so it teaches the mechanics rather than reproducing the scale of a production network.

Where are CNNs used in the real world?

CNNs underpin most modern computer vision. They classify objects in photos, read handwritten digits, detect tumours in medical scans, recognise faces, power augmented-reality filters and feed the perception systems of autonomous vehicles. The same convolve, activate and pool building blocks shown here scale up to these applications.