Principle:Obss Sahi COCO Evaluation
| Knowledge Sources | |
|---|---|
| Domains | Object_Detection, Evaluation, Metrics |
| Last Updated | 2026-02-08 12:00 GMT |
Overview
A standardized evaluation protocol that measures object detection performance using Average Precision (AP) and Average Recall (AR) metrics across multiple IoU thresholds and object size categories.
Description
COCO evaluation is the de facto standard for benchmarking object detection models. It provides a comprehensive assessment by computing metrics across multiple dimensions:
Average Precision (AP):
- mAP: Mean AP averaged over IoU thresholds from 0.50 to 0.95 (step 0.05)
- mAP50: AP at IoU threshold 0.50 (the PASCAL VOC metric)
- mAP75: AP at IoU threshold 0.75 (strict localization)
- mAP_s/m/l: AP for small, medium, and large objects
Average Recall (AR):
- AR_s/m/l: AR for small, medium, and large objects at a fixed number of max detections
SAHI extends the standard COCO evaluation with:
- Custom area ranges: Configurable boundaries for small/medium/large categories (default: [1024, 9216, 10^10] pixels^2)
- Custom max detections: Default 500 (vs pycocotools default of 100) to handle dense scenes
- Per-class AP: Optional classwise evaluation with tabular output
- Cross-scale metrics: mAP50_s/m/l for detailed size-specific analysis at IoU=0.50
Usage
Use COCO evaluation to benchmark detection model performance, compare sliced vs non-sliced inference, or assess the impact of different postprocessing strategies. It is the standard evaluation step after running inference and generating COCO-format prediction results.
Theoretical Basis
Average Precision is computed as the area under the precision-recall curve:
Where precision p is interpolated at all recall levels r. In practice, COCO uses 101-point interpolation.
IoU (Intersection over Union):
A detection is a True Positive if IoU with a ground truth box exceeds the threshold and the ground truth box has not already been matched. Otherwise, it is a False Positive.
Object size categories are defined by bounding box area:
| Category | Default Area Range (pixels^2) |
|---|---|
| Small | 0 - 1024 |
| Medium | 1024 - 9216 |
| Large | 9216 - 10^10 |
These boundaries are configurable in SAHI's evaluation, allowing fine-tuned analysis for datasets with different object size distributions.