In YOLO object detection, confidence tells whether a grid location contains an object and how well its predicted bounding box fits. Empty cells should approach zero; occupied cells should become more confident as box overlap improves. section 12.2.2 section 12.2.4
A confidence target for one grid cell
Suppose a grid cell contains an object. Its confidence target is the Intersection over Union (IoU) between the predicted box and the labeled box. If the cell is empty, its target is zero. A better-fitting box therefore produces a higher learned confidence, while a poor or absent detection should remain low. section 12.2.4
Use these rules when interpreting or training confidence:
- Treat confidence as distinct from the class prediction: YOLO emits box-related values and a separate class probability map. section 12.2.2 section 12.4
- Train confidence with squared error against zero for empty cells or IoU for cells containing objects. section 12.2.4
- Reduce the influence of empty-cell confidence errors so the many background cells do not overwhelm training. section 12.2.4
Figure 12.4 YOLO outputs as visualized in the first YOLO paper
Visualizes YOLO’s grid-level outputs, including candidate boxes and their confidence values. section 12.2.2












