February 26, 2026
Questions:
Why does a CNN outperform every other method for image classification/regression tasks?
What is meant by “the universal hierarchy”?
Why does transfer learning against ImageNet work?
When might ImageNet features not be useful?
How do we fine tune a pre-trained model?
What is LoRA? Main gist?
Last time: the transfer learning toolkit.
All of these answer the question “what is in this image?” with a single label.
Today: what if we need to know where? And what if we need to know for every pixel?
To summarize everything so far:
Take a pretrained backbone (ImageNet ResNet, etc.)
Choose adaptation strategy (frozen / fine-tuned / LoRA)
Add augmentation
Train with early stopping
This covers the vast majority of practical image classification and regression tasks.
Nobody trains from scratch in 2026 unless they’re doing research or working on a fundamentally new modality.
Everything so far classifies whole images — one label per image.
But many real tasks require spatial outputs:
Object detection: where are the objects and what are they? → bounding boxes + labels
Semantic segmentation: which pixels belong to each class? → per-pixel labels
The naive approach: slide a classifier window across the image at multiple scales.
The key insight: the CNN backbone already computes a spatial grid of features.
The \(7 \times 7 \times 512\) feature map before GAP tells us where features are, not just that they’re present.
For classification, we averaged this away with GAP. For detection, we keep the spatial information and add a detection head on top.
YOLO takes a pretrained CNN backbone and replaces the single classification head with two heads:
Classification head — what’s in each grid cell?
Regression head — where exactly is the bounding box? (x, y, width, height)
One forward pass through the backbone + both heads = full detection.
That’s why it’s called “You Only Look Once” — detection as a single regression problem, not a pipeline.
The backbone is the same ResNet/VGG we’ve been studying all block.
Transfer learning applies directly — the backbone is pretrained on ImageNet.
The detection heads are trained on detection data (e.g., COCO with bounding box annotations).
Fast enough for real-time video — which is why YOLO is the standard for deployed detection systems.