Object Detection and Segmentation — Beyond "What Is This?"

Classifying a whole image as "cat" is only the beginning of computer vision. Real applications need to know where the cat is, how many objects there are, and sometimes exactly which pixels belong to each one. Object detection and segmentation answer those harder questions, and they power self-driving cars, medical imaging, and photo editing. This post covers the main vision tasks beyond classification and how they build on the CNN foundation.

Posts 3–4 built CNNs for image classification (“what is this image?”). This post covers the richer tasks that most real vision applications actually need — localizing and delineating objects — and shows how they extend the CNN. Understanding the task hierarchy (classification → detection → segmentation) is understanding what computer vision can actually do.

The task hierarchy

Vision tasks form a ladder of increasing spatial detail, and knowing which rung your problem is on determines the approach:

The ladder goes from what (classification) to what + where + how many (detection) to what + exact shape (segmentation) to what + exact shape + which instance (instance segmentation). More detail is more useful but harder and more expensive — so you pick the least-detailed task that solves your problem (a defect-presence check needs only classification; an autonomous vehicle needs detection or segmentation).

How detection and segmentation work

These harder tasks build on the CNN backbone (posts 3–4) — the learned feature hierarchy — and add machinery to produce spatial outputs:

The unifying idea: all of these reuse the CNN’s learned features (so they inherit the representation power of posts 3–4) and add task-specific “heads” that turn those features into the spatial output the task needs — boxes, pixel maps, or masks. You don’t start from scratch for detection or segmentation; you build on a pretrained backbone (post 7), which is why the CNN foundation matters so much.

Where these tasks matter — and the practical picture

Detection and segmentation are where computer vision meets high-stakes applications:

The practical reality mirrors the rest of the series: you rarely build these from scratch. You take a pretrained model (a YOLO for detection, a U-Net or Mask R-CNN for segmentation) and fine-tune it on your data (post 7), because training these from zero needs enormous labeled data and compute. The key skills are choosing the right task (the least detail that solves your problem — classification vs detection vs segmentation), choosing the right speed/accuracy trade-off (one-stage vs two-stage), and getting the labeled data — which for detection and segmentation is expensive (bounding boxes and especially pixel masks are costly to annotate), often the real bottleneck. Understanding the task hierarchy and how each builds on the CNN lets you scope a vision problem correctly: decide what spatial detail you actually need, pick a proven architecture for it, and invest where it counts — usually in data and in matching the task to the real requirement.

The throughline: beyond whole-image classification (“what is this?”), real vision climbs a task hierarchy of increasing spatial detail — object detection (every object’s bounding box + class: what + where + how many), semantic segmentation (label every pixel by class — dense scene understanding, but not individual objects), and instance segmentation (every pixel and separate instances — the richest). All build on the CNN backbone (posts 3–4) plus task-specific heads: detection splits into two-stage (R-CNN — accurate, slower) vs one-stage (YOLO/SSD — real-time) detectors (speed-vs-accuracy trade-off), segmentation uses fully-convolutional encoder-decoders (U-Net — a medical-imaging workhorse), and instance segmentation (Mask R-CNN) combines both. They power autonomous vehicles, medical imaging, satellite imagery, robotics, and photo editing — and in practice you fine-tune a pretrained model (post 7), so the key skills are choosing the least-detailed task that solves the problem, the right speed/accuracy trade-off, and getting the expensive labeled data (boxes/masks) that’s usually the real bottleneck.

Key takeaways

Further reading

Sources & References