Lensa ML
Lensa ML

How CNNs See the World

Step 1 of 6

An Image Is Just Numbers

Every pixel is a grid of intensity values the network can read

Grid Resolution: 8x8
4x48x8
8x8 Grayscale008020022018030002018012080240120000004022010000040160240180200000030200140002060020220120008020014018020040000601802006000
RESOLUTION
8x8
TOTAL PIXELS
64
HOVER PIXEL
--
0
Black
128
Mid-gray
255
White

A neural network can't "see" photos like you do. It reads a grid of numbers — each pixel is an intensity from 0 (black) to 255 (white). Drag the slider to see how resolution affects detail.

Step 1 of 6: An Image Is Just Numbers

Every pixel is a grid of intensity values the network can read

Grid Resolution: 8x8
4x48x8
8x8 Grayscale008020022018030002018012080240120000004022010000040160240180200000030200140002060020220120008020014018020040000601802006000
RESOLUTION
8x8
TOTAL PIXELS
64
HOVER PIXEL
--
0
Black
128
Mid-gray
255
White

A neural network can't "see" photos like you do. It reads a grid of numbers — each pixel is an intensity from 0 (black) to 255 (white). Drag the slider to see how resolution affects detail.

Step 2 of 6: The Sliding Filter

A small kernel sweeps across the image, computing dot products everywhere

Kernel Position: (0, 0) — cell 1/36
Input (8x8)008020022018030002018012080240120000004022010000040160240180200000030200140002060020220120008020014018020040000601802006000x3x3 Kernel-1-1-1000+1+1+1=-80each position fills one cell belowFeature Map (6x6)-8000000000000000000000000000000000000
POSITION
(0,0)
DOT PRODUCT
-80
CELLS FILLED
1

A 3x3 kernel slides across the image one pixel at a time. At each position, it multiplies and sums — a dot product. Drag the slider to move the kernel manually, or press Play to animate.

Step 3 of 6: What Filters See

Different kernels detect edges, corners, textures — each produces a feature map

Kernel-1-1-1000111->RawReLU->After ReLU0000011000601400000001020400000140280420490290500016036020000
RAW SUM
-340
RELU SUM
2770
ACTIVE CELLS
15/36
ReLU(x) = max(0, x) — negatives clamped to zero, keeping only positive activations

Each kernel is a feature detector. Click the presets above to see how different kernels produce different feature maps. ReLU zeros out negative values — if the filter didn't match, the neuron stays silent.

Step 4 of 6: Shrink to Essentials

Max pooling keeps the strongest signals and throws away the rest

Stride: 2 — Output: 3x3
Stride 1 (overlap)Stride 2 (no overlap)
Pool Position: (0, 0) — cell 1/9
6x6 Feature Map0000011000601400000001020400000140280420490290500016036020000->2x2 Window0000=0max(0, 0, 0, 0)max of each 2x2 region fills one cell below3x3 Pooled014011040014042049050
INPUT SIZE
6x6
OUTPUT SIZE
3x3
REDUCTION
75%

Max pooling slides a 2x2 window and keeps only the maximum. Try changing the stride: stride 1 overlaps windows, stride 2 halves the map. This makes the network invariant to small shifts.

Step 5 of 6: Layers Build Meaning

Edges → textures → parts → objects — each layer sees more

Network Depth: 4 layers
1 layer4 layers
---Edges & lines32x32Layer 1horizontal edgesvertical edgesdiagonals//\Textures16x16Layer 2cornerscurvespatternsoAoParts8x8Layer 3eyesearswheels[=]Objects4x4Layer 4cat facedog breedcar typesimple to complex — each layer builds on the one before
DEPTH
4
FEATURE MAPS
256
MAP SIZE
4x4
COMPLEXITY
Full

A CNN stacks conv + ReLU + pool blocks. Drag the slider to add layers: early layers detect simple edges, deeper layers combine those into textures, parts, and whole objects.

Step 6 of 6: From Maps to Meaning

Flatten the final maps and let a dense network decide: what is this?

Feature MapsFlatten1DDenseDensesoftmaxPredictionsCat91%Dog5%Bird3%Fish1%
CAT
91%
DOG
5%
BIRD
3%
FISH
1%
Conv features
Flatten 1D
Dense classify
Softmax probs

Toggle between inputs above to see how predictions change. The final feature maps get flattened, fed through dense layers, then softmax turns scores into probabilities. The highest is the network's answer: Cat (91%).