detection_map¶
Formula¶
detection_map computes average precision per label and returns the mean across labels. A prediction matches a ground-truth box when IoU is at least 0.5.
Hand-Computable Example¶
One predicted box with bounding box [0, 0, 2, 2] and one ground-truth box with the same bounding box.
Expected output: 1.0.
Edge Cases¶
- Missing detection arrays return
0.0. - No ground-truth boxes returns
1.0only when there are also no predictions. - Invalid boxes raise an error.
Limitations¶
This is a compact deterministic implementation for local regression checks. It is not a replacement for full COCO-style evaluation tooling.
Test References¶
tests/golden/test_openloop_metrics_golden.pytests/test_openloop_metrics.py