Computer Vision: Learning to See with Convolutions

Contents

Computer Vision: Learning to See with Convolutions#

Twitter Handle LinkedIn Profile GitHub Profile Tag Tag

A 224×224 color image is 150,528 numbers. A dense layer reading every pixel into every hidden unit would need a weight matrix with tens of millions of entries — and would have to relearn the notion of an “edge” independently at every spatial location. Convolutional layers replace that wasteful wiring with a small kernel slid across the image, reusing the same handful of weights everywhere. That single change is why vision moved from hand-crafted features to learned representations.

This chapter builds the convolutional layer from first principles: why the design works (its four properties — locality, weight sharing, translation equivariance, and increasing abstraction), how the sliding-window computation actually proceeds (cross-correlation, padding, stride, channels), and how the input scale is set up so that what follows trains well. It is the visual counterpart to the initialization series; the two meet at the question of signal scale.

By the end of the chapter you will be able to compute a feature map by hand from a kernel, predict the output shape under any padding and stride, explain why the same edge detector is useful at every position, and standardize an image batch before training.

Prerequisites

Comfort with matrix multiplication and the MLP forward pass — permutation symmetry is useful context for why parameter sharing changes a layer’s symmetry structure. Notation follows the deep-learning notation page.

Roadmap#

  1. Convolutional Kernels: How CNNs Learn Local Patterns — the mechanism: cross-correlation versus true convolution, the sliding-window dot product, padding, stride, multi-channel inputs and outputs, and the output-shape formula, with a from-scratch implementation.

  2. Image Normalization vs Standardization — why the scale of the input pixels controls gradient scale and training stability, the difference between min-max normalization and zero-mean standardization, and when to use per-image, per-channel, or dataset statistics.

  3. CNN Design Principles — a concise reference for the four properties that make a layer “convolutional”, plus a glossary of the vocabulary (kernel, filter, feature map, receptive field) the chapter uses.

Summary#

If this introduction had to be one sentence: a convolutional layer sees an image through a small, reused kernel, and that reuse is what makes vision tractable — the rest of the chapter is the arithmetic of the slide and the setup of the input scale. Begin with the convolution mechanism for the arithmetic, or the design principles for the why.

Further reading

  • [Zhang et al., 2023], Ch. 7 Convolutional Neural Networks, the primary reference for the mechanism and properties covered here.