Skip to content
StackDecode
AI & ML Atlas
Deep LearningarchitectureInteractive simulation

Convolutional Neural Networks (CNN)

Networks that slide small learnable filters over images to detect patterns.

The idea

A convolution applies the same small filter at every position, so a pattern such as an edge is detected anywhere in the image with very few weights. Pooling shrinks the maps, and deeper layers combine edges into textures, parts and objects.

output size = ⌊(n + 2p − k) / s⌋ + 1

Watch it run

This is a real computation, not a drawing. Pause, step, change the settings, or try new random data.

imagefilterfeature map00000000111000111000111000000000000010-120-210-1
  • positive
  • negative

A small vertical edges filter (3×3 numbers) will slide over the image. At each spot it multiplies pixel by weight and adds everything up.

1/18

The same small filter is reused everywhere: that sharing is what makes convolutions efficient.

Step by step

  1. 1Slide each filter over the image, multiplying and summing to make a feature map.
  2. 2Apply a non-linearity such as ReLU.
  3. 3Downsample with pooling.
  4. 4Repeat with more filters in deeper layers.
  5. 5Flatten and classify with fully connected layers.

Where it is used

Image classification, detection, medical imaging, audio spectrograms.

Watch out for

Not rotation- or scale-invariant on its own; needs lots of labelled data or augmentation.

Related