Module 07 β Computer Vision ποΈ
Welcome to Phase 3. Here we specialize the general skills you've built into the architecture that made deep learning famous: the convolutional neural network.
Everything through Module 06 was general-purpose β tensors, autograd, models, training, saving. Now we apply it to a specific, high-impact domain: images. You could flatten a picture into a long vector and feed it to the nn.Linear layers from Module 03, but you'd throw away the single most important fact about an image: that nearby pixels are related, and that a cat is a cat whether it's in the top-left or bottom-right of the frame. Fully-connected layers are blind to this spatial structure and would need an astronomical number of parameters to cope. Convolutional Neural Networks (CNNs) were designed precisely to exploit spatial structure, and they're the reason computers can now recognize objects, read handwriting, and diagnose scans.
The core idea is the convolution: instead of connecting every pixel to every neuron, a small learnable filter slides across the image looking for a local pattern β an edge, a texture, a curve β everywhere at once. Stack these layers and the network learns a hierarchy, from simple edges in early layers to whole objects in deep ones. This module teaches the two building blocks (Conv2d and MaxPool2d), how to assemble them into a working CNN, and then the pragmatic superpower of modern vision: transfer learning β starting from a model someone else trained on millions of images and adapting it to your problem with a fraction of the data and compute.
This module is split into three sub-modules β work through them in order.
π Sub-Modules
| # | Sub-Module | What you'll learn |
|---|---|---|
| 01 | Convolutions | Why convolutions beat dense layers for images; nn.Conv2d, kernels, channels, feature maps |
| 02 | CNN Architecture | nn.MaxPool2d and stacking conv β pool β classifier into a complete CNN |
| 03 | Transfer Learning | Reusing pretrained models by freezing layers and fine-tuning a new head |
| 04 | Image Classification Project | An end-to-end capstone: data β CNN β train β save best β evaluate, on FashionMNIST |
π― By the end of this module, you'll be able to...
- Explain what a convolution does and why CNNs suit images so well.
- Build a complete CNN from
Conv2d,MaxPool2d, andLinearlayers. - Adapt a pretrained network to your own dataset with transfer learning.
- Assemble everything into a complete, runnable image-classification project.
β Prerequisites
All of Phases 1 and 2 β especially building models (Module 03), the data pipeline with image transforms (Module 04), and the training loop (Module 05).
β¬ οΈ Prev module: 06 Β· Saving & Loading Β· β‘οΈ Next module: 08 Β· NLP & Transformers