Skip to content
AI.info

Evaluation

Computer Vision Metrics Across Tasks

Evaluate vision systems with task-specific matching, overlap, localization, temporal, and perceptual measures while preserving operational meaning.

By the end you can

A nearly correct box can be counted as entirely wrong

Object detection evaluation first decides whether a predicted box matches a reference object. That decision comes from a rule somebody wrote down. The PASCAL Visual Object Classes challenge wrote it down in 2010. A detection counted as correct only if the overlap ratio between the predicted and the ground-truth box exceeded 0.5. Repeats were charged for, and the paper says so plainly: “Multiple detections of the same object in an image were considered false detections e.g. 5 detections of a single object counted as 1 correct detection and 4 false detections”.

Then the rule moved and the detections stayed where they were. On the class car the measured AP “drops steeply for thresholds above 50%”, and lowering the requirement to 10% raised measured AP by around 7.5%. Same boxes, same model, different number. A small localization shift can push overlap below the threshold and convert a plausible detection into a false positive plus a false negative. The detector did not get worse. The rule moved.

COCO set the scale most detectors are now measured on. Released in 2014, it “contains photos of 91 objects types” and carries “a total of 2.5 million labeled instances in 328k images”. None of that fixes the matching rule. The threshold that turns a predicted box into a hit comes from the evaluation protocol, not from the dataset.

Before interpreting a vision score, inspect the matching protocol that created it.

Visual

Tasks and their core comparison objects

Different outputs require different notions of agreement. Classification compares class decisions or probabilities for an image. Detection matches predicted boxes or regions to reference instances. Segmentation compares pixel or region assignments. Pose measures landmark distance under scale or visibility rules. Tracking has to judge detection and identity continuity at once.

That last row is the one a public benchmark has recently rewritten. The older tracking measures split the task badly, and in 2020 seven researchers proposed a replacement: HOTA, Higher Order Tracking Accuracy. Luiten and his co-authors give the diagnosis in one line: “Previous metrics overemphasize the importance of either detection or association.” HOTA decomposes into detection, association and localization sub-metrics instead.

The KITTI multi-object tracking benchmark now says “We evaluate submitted results using the metrics HOTA, CLEAR MOT and MT/PT/ML. We rank methods by HOTA.”, and it dates the switch: “On 25.02.2021 we have updated the evaluation to use the HOTA metrics as the main evaluation metrics”. A tracker's rank on that leaderboard changed on a day in February 2021. Not one line of its code changed.

FigureHierarchy · 5 levels
  • Image classification

    Compare class decisions or probabilities for an image.

    • Object detection

      Match predicted boxes or regions to reference instances.

      • Segmentation

        Compare pixel or region assignments through overlap and boundary measures.

        • Pose and keypoints

          Measure landmark distance under scale or visibility rules.

          • Tracking

            Evaluate detection, identity continuity, association, and temporal fragmentation.

Example

Average precision depends on matching and confidence ordering

A detector's AP can change without retraining. AP is produced by a published parameter block, not by the model.

COCO's detection evaluation page defines 12 metrics. The primary AP is averaged over 10 IoU thresholds, .50 to .95 in steps of .05, and the page gives the reason: “Averaging over IoUs rewards detectors with better localization.” The same page fixes the area bands. Small is area below 32^2, medium 32^2 to 96^2, large above 96^2. It caps the count too: “All metrics are computed allowing for at most 100 top-scoring detections per image (across all categories)”. And it records that roughly 41% of COCO objects are small, 34% medium and 24% large.

The two protocols part company at the threshold. Oksuz and colleagues describe the split the same way: “While a single intersection-over-union (IoU) threshold, which is 0.5, is used in PASCAL VOC [8]; a range of IoU thresholds (from 0.5 to 0.95) are used in MSCOCO”. Not one item in that block is a property of your detector.

  • IoU threshold: COCO labels its AP at IoU=.50 “(PASCAL VOC metric)” and its AP at IoU=.75 “(strict metric)”. Requiring 0.75 instead of 0.50 rewards more precise localization. On the class car, the threshold alone moved about 7.5 points of AP.
  • Object size: the bands are cut at 32^2 and 96^2 pixels, in a dataset that is roughly 41% small objects. A few-pixel shift costs proportionally most on the largest slice of the benchmark.
  • Max detections: at most 100 top-scoring detections per image, across all categories. In a crowded scene that cap removes recall the detector actually had.
  • Confidence ordering: MSCOCO interpolates the precision-recall curve at 101 points, against 11 in PASCAL VOC 2007 — “the average AP over this range of IoU thresholds is also called mAP”. Oksuz and colleagues also show three detection results with very different recall-precision curves and the same AP=0.5.
  • Annotation policy: ignore regions, crowd labels and box tightness alter matching, and the reference itself carries error. Northcutt and colleagues report: “Errors in test sets are numerous and widespread: we estimate an average of at least 3.3% errors across the 10 datasets, where for example label errors comprise at least 6% of the ImageNet validation set.”

Comparison

IoU and Dice emphasize overlap differently

Both compare predicted and reference regions. Intersection over Union divides the intersection by the union of the two regions. It ranges from zero to one, penalizes extra and missing area, and is the quantity a matching threshold is applied to. The Dice coefficient is twice the intersection divided by the total predicted and reference area. It is closely related to F1 computed over pixels, is standard in medical segmentation, and reads higher than IoU for the same overlap.

They are the same family, and they share its blind spot. Both score area. Neither scores where the boundary sits. That is why the Metrics Reloaded consortium recommends pairing an overlap-based metric with a boundary-based one, taking normalized surface distance as the default partner. Area says how much of the shape you got. It does not say where you got it.

FigureComparison · 2 columns

Intersection over Union

Intersection divided by the union of predicted and reference regions.

  • Ranges from zero to one
  • Used for box and mask matching
  • Penalizes extra and missing area
  • Threshold choice affects matches

Dice coefficient

Twice the intersection divided by total predicted and reference area.

  • Closely related to F1 for pixels
  • Often used in medical segmentation
  • Higher than IoU for same overlap
  • Can hide boundary location

Perceptual quality is not one number

Image-generation metrics such as FID compare feature distributions, and they move on things that are not the model. In 2022 three researchers saved the same FFHQ images as lossless PNG and as JPEG at quality 100, 90 and 75, then measured FID against the PNG version: 0.23, 6.08 and 20.96, with PSNR at or above 39 dB. Parmar and his co-authors say what happened: “While the images are perceptually similar, this induces changes in the Inception-V3 activations, resulting in large FID.”

The size of that artefact is the point. StyleGAN2 scores around 3 on FFHQ, and “variations across recent methods are typically within 1 FID on FFHQ”. Saving through PIL's default quality of 75 “results in a high score (21)”. A file-format decision made before evaluation begins is larger than the entire measured spread between competing generators.

A separate group at Google Research found another kind of instability. FID contradicts human raters. It does not reflect gradual improvement of iterative text-to-image models, it does not capture distortion levels, and it “produces inconsistent results when varying the sample size”.

Human studies may assess realism, prompt adherence, preservation, preference, or harmful artifacts. A lower distributional distance does not prove that every image is faithful, diverse, safe, or free of memorization.

Generation evaluation should separate realism, coverage, conditioning, preservation, and safety.

Analogy

Fitting a transparent stencil over an outline

When a transparent predicted stencil is laid over a reference shape, overlap metrics reward the area the two have in common. A small shift can matter very differently for a large field and a tiny lesion.

A stencil has one crisp edge. A reference boundary often does not, and in three dimensions it may not be a line at all. Size and tolerance decide what a geometric score is capable of noticing.

The same pixel displacement has different meaning at different scales.

Key idea

Pixel overlap can miss boundary quality

A single horse mask makes the gap visible, and in 2021 five researchers measured it. Mask R-CNN scores 89% Mask IoU on that mask, with “low-fidelity, blobby boundaries”. BMask R-CNN reaches 92% and PointRend 97%. Visibly better contours are worth +3% and +8%. Score the same three masks with Boundary IoU and they come out at 69%, 78% and 91%. The same two improvements are now +9% and +22%. Cheng and his co-authors state the property directly: “Boundary IoU is significantly more sensitive than the standard Mask IoU measure to boundary errors for large objects and does not over-penalize errors on smaller objects”. One measure barely noticed what the other made obvious.

A biomedical consortium reached the same conclusion independently. Metrics Reloaded, published in Nature Methods in February 2024, starts from the finding that “chosen performance metrics often do not reflect the domain interest”. Its answer is “the novel concept of a problem fingerprint”: record the domain interest first, then the properties of the target structure, the dataset and the algorithm output. On overlap the consortium is blunt: “Key weaknesses of overlap-based metrics include shape unawareness and limitations when dealing with small structures or high size variability. Our general recommendation is therefore to complement an overlap-based metric with a boundary-based metric.”

A segmentation can therefore achieve strong Dice by capturing a large object while missing a thin but clinically important boundary. The score will not say so. Boundary F-scores, Hausdorff-style distances, normalized surface distance, or task-specific tolerances are what reveal it.

The correct segmentation metric depends on what the mask will be used to measure.

Steps

Build a vision evaluation suite

Combine benchmark geometry with the conditions of image formation, in five steps: freeze annotation rules; define matching; report scale slices; stress acquisition; connect to use.

Step 1 is not bookkeeping. Northcutt and colleagues counted 2,916 validated label errors in the ImageNet validation set, about 6% of it. Of those, 1,428 were correctable and 597 multi-label. With corrected labels, ResNet-18 outperforms ResNet-50 once the prevalence of originally mislabeled test examples rises by just 6%. A separate team re-annotated the same validation set and found recent classifiers' gains to be “substantially smaller than those reported on the original labels”. The reference the geometry is compared against is itself an artefact with an error rate. Repair it and the ranking moves.

Step 3 is what catches a single accuracy figure covering two populations. In 2018 Buolamwini and Gebru audited three commercial gender classifiers on the Pilot Parliaments Benchmark. Their abstract: “We evaluate 3 commercial gender classification systems using our dataset and show that darker-skinned females are the most misclassified group (with error rates of up to 34.7%). The maximum error rate for lighter-skinned males is 0.8%.” The worst case was IBM's, on darker-skinned females. Between best- and worst-classified groups the gap was 34.4 points. One overall accuracy number shows none of that.

Step 4 has been run at national scale. NIST pushed 18.27 million images of 8.49 million people through 189 mostly commercial algorithms from 99 developers. Its report, in December 2019: “We found empirical evidence for the existence of demographic differentials in the majority of contemporary face recognition algorithms that we evaluated”. False positive rates often varied by factors of 10 to beyond 100 across demographics. So slice by lighting, compression, blur, device, geography and domain shift. Then measure latency, abstention, human correction and downstream task impact.

FigureProcess · 5 steps
  1. 1. Freeze annotation rules

    Document object boundaries, visibility, ignore regions, and ambiguous cases.

  2. 2. Define matching

    Specify IoU, keypoint tolerance, assignment, and duplicate handling.

  3. 3. Report scale slices

    Separate small, medium, large, crowded, occluded, and low-quality cases.

  4. 4. Stress acquisition

    Test lighting, compression, blur, device, geography, and domain shift.

  5. 5. Connect to use

    Measure latency, abstention, human correction, and downstream task impact.

Key takeaways