Computer Vision

Bounding Box

A bounding box is the rectangle drawn around an object in an image to mark its position and size. Detection models predict them, and annotators draw them to create training data.

What is a bounding box?

A bounding box is a rectangle that encloses an object in an image. It is the standard way to say where something is in computer vision: object detection models output one box per object, and annotators draw boxes to create training data. A box is stored as four numbers, either a corner plus width and height or the coordinates of two opposite corners, in pixels or as fractions of the image size.

A box carries a class label and, when a model predicts it, a confidence score. A predicted box is scored against the labeled one with intersection over union (IoU), the overlapping area divided by the combined area; a detection usually counts as correct above 0.5.

Why bounding boxes matter

Boxes are the cheapest useful spatial label. Drawing one takes seconds, while tracing an exact outline for image segmentation takes minutes. For a parcel carrier counting packages on a belt, a box gives all the precision needed. Box coordinates also become data: a yard management system converts a trailer’s box into a parking spot, and a shelf camera maps a box to a planogram slot.

What to watch for

  • Coordinate conventions differ between annotation formats, and a silent mismatch shifts every box in the dataset.
  • Rotated or elongated objects fit rectangles poorly, so consider oriented boxes or segmentation for items such as pipes and vehicles seen from above.
  • Write a labeling rule for partly hidden objects, because inconsistent boxes on occluded items degrade model quality.

← Back to AI Glossary