Object Detection

Identifying both what objects appear in an image and where they are located.

How close is the box around a specimen card?

A detector labels a rectangular card correctly but draws its box slightly to the right. You can measure the location error separately from the class label.

  1. Reference box

    A reviewer outlines a card 40 units wide and 20 units high. Its area is 800 square units.

  2. Predicted box

    The prediction has the same dimensions and sits 10 units to the right. The shared region is 30 × 20 = 600 square units.

  3. Score the overlap

    The union is 800 + 800 − 600 = 1,000 square units. Intersection over union is 600 ÷ 1,000 = 0.60.

Solid outline · reference card. Dashed outline · predicted box shifted right. Three quarters of each box overlap.

A good box is only one part of detection

Choose a matching rule appropriate to the task. If the threshold is 0.50, this box passes the overlap test. If it is 0.75, it fails. A detector can also miss a second card, report the wrong class or produce duplicate boxes around the same card.

Why It Matters In AI

Detection is one of the most practical computer-vision tasks because many workflows need location as much as recognition. A system may need to spot pedestrians in traffic, products on a shelf, tumors in a scan, defects on a line, or vehicles in an aerial image. That makes object detection a core building block for real-time systems, robotics, inspection, retail analytics, and remote sensing.

Object detection often works alongside image classification, tracking, and segmentation. The classification says what something is, the detection says where it is, and the downstream system decides what to do next.

Follow the idea

Image classification assigns a category without drawing a location.

Precision helps interpret surplus detections that do not match real objects.

Related concepts (5)

Examples in the AI guides

More chapter examples (4)
Related Yenra articles (3)

Source · Torchvision definition of box intersection over union

Return to Object Detection in the A–Z glossary