More Than Classification
| Task | Output | Example |
|---|---|---|
| Classification | One label for the whole image | This is a dog |
| Localization | Label + one box | A dog is here |
| Object detection | Many labels + many boxes | Two dogs and a person, with positions |
| Semantic segmentation | A class for every pixel | Road, car, sky, pedestrian regions |
| Instance segmentation | Pixel masks for each object | Each person outlined separately |
Object Detection Basics
- Bounding box: a rectangle given by (x, y, width, height)
- Confidence: how sure the model is about the box
- IoU (Intersection over Union): how much a predicted box overlaps the true box. 1.0 is perfect, 0 is no overlap
- NMS (non-max suppression): removes duplicate boxes for the same object
- mAP: the standard score for detection quality
Popular Detection Models
| Model family | Idea |
|---|---|
| YOLO | Looks at the image once, very fast, good for real time |
| SSD | Predicts boxes at several scales, good for mobile |
| Faster R-CNN | Two stage, accurate but slower |
| KerasCV / KerasHub detectors | Ready-made detection models for Keras |
Segmentation and the U-Net Idea
A U-Net has an encoder that shrinks the image to learn what is in it, and a decoder that enlarges it back to the original size to say where it is. Skip connections copy detail from encoder to decoder.
The output has the same height and width as the input. Each pixel gets a probability, for example of belonging to the object.
Conclusion
Classification answers what is in the picture. Detection and segmentation answer where. For real projects, start from pretrained models and fine-tune.

