Computer Vision · Intermediate level

Intermediate level · Module 6: Object Detection with YOLO · Lesson 1 of 3

How Object Detectors Work

Learners study bounding boxes, the YOLO label format, IoU and non-maximum suppression, and how a single-stage detector predicts boxes and classes in one pass.

In this lesson you will

  • Explain bounding boxes, IoU and non-maximum suppression
  • Describe how YOLO predicts objects

Key concepts

bounding box formatsYOLO labels (class, x_center, y_center, width, height, normalised)IoUconfidence scorenon-maximum suppression

The lesson

A bounding box can be stored as corners (x1, y1, x2, y2) or as centre, width and height. YOLO label files contain one line per object: class index, then x_center, y_center, width and height, each divided by the image width or height so that values are between 0 and 1.

IoU between two boxes is the area of their overlap divided by the area of their union. A detection usually counts as correct if its IoU with a true box is at least 0.5 and the class matches.

YOLO (You Only Look Once) predicts boxes, confidence scores and classes for the whole image in one forward pass, which makes it fast. Many overlapping boxes are predicted for the same object; non-maximum suppression keeps the highest-scoring box and removes others that overlap it strongly.

Step by step

  1. Convert three boxes between corner and YOLO formats by hand.
  2. Compute IoU for two overlapping boxes.
  3. Apply non-maximum suppression by hand to five scored boxes.
  4. Read the abstract of the original YOLO paper.

Practice activity

Complete a worksheet on box formats, IoU and non-maximum suppression.

Expected result: Correct conversions, IoU values and NMS results.

Check your understanding

  1. What IoU threshold commonly defines a correct detection?

    Show answer

    0.5.

  2. What does non-maximum suppression remove?

    Show answer

    Lower-scoring boxes that strongly overlap a higher-scoring box for the same object.

Further learning

Taught live by an instructor — online or in person. Free course lessons are for self-study and do not lead to a certificate — see registration options.