ROBOTICS 101Concept explainer

Convolutional Neural Networks

A convolutional neural network, or CNN, applies the same small filters across the whole image. The first layer finds simple things like edges. Later layers combine them into corners, curves, and parts. Pooling shrinks the maps so the network cares less about exact position.

Draw in the box with the pointer.

One layer

Each filter \(K_k\), here a 7 by 7 grid of weights, is convolved with the input, a bias is added, and negative values are cut off by the ReLU. Max pooling then keeps the largest value in each small block:

$$F_k = \operatorname{ReLU}(K_k * I + b_k) \qquad P_k(x, y) = \max_{(i,j) \in \text{block}} F_k(2x + i,\ 2y + j)$$

What to notice

The four first-layer filters here are fixed Gabor filters, small striped patterns that respond to strokes at one angle: vertical, horizontal, and two diagonals. Draw an L and the vertical and horizontal maps light up. Draw an X and the diagonal maps do. The second layer combines pooled maps, so its "corner" map lights only where a vertical and a horizontal edge meet. In a trained CNN the filters are learned rather than designed, but the first layer usually ends up looking much like these.