Lessons › Chapter 9: Computer vision
Filters and feature maps
The first layer has many filters, each producing its own feature map. They learn to respond to simple things: edges at different angles, patches of color.
Watch it move. This lesson is interactive on Gradient Lab: every step is an animated scene you can replay.
Start the interactive lessonStep by step
From lines to faces
Maya asks how a network gets from simple edges to recognizing a face on an ID card.
Layer 1: edges and colors
The first layer has many filters, each producing its own feature map. They learn to respond to simple things: edges at different angles, patches of color.
Layer 2: textures and corners
The next layer’s filters look at layer 1’s maps, not at pixels. They combine edges into corners, stripes and textures. Maps get smaller, but there are more of them.
Layer 3: parts
Deeper still, filters respond to meaningful parts: an eye, a wheel, the curve of a letter. Nobody programmed these. They emerge from training.
Last layers: whole objects
The final layers combine parts into whole objects and output a probability for each class. Simple to complex, one layer at a time: that’s the core idea of a convolutional network.
In real life: a car that reads road signs
Driver-assistance cameras use networks like this to recognize speed signs, lane markings and pedestrians. Early layers pick out edges and red patches; later layers put them together into “stop sign”.
Quick check: What do the first layers of a CNN usually detect?
- Simple edges and colors (correct)
- Whole objects
- Text captions
Early filters see small patches, so they learn simple patterns; deeper layers combine them.
Pseudocode
layer 1 filters find: edges and color blobs layer 2 combines them: corners, textures, simple shapes layer 3 combines those: eyes, wheels, letters last layers: whole objects → “cat”, “car”, “stop sign”