Skip to content
AI.info

Computer vision

Vision Evaluation and Error Analysis Across Tasks

Build a unified evaluation framework for classification, detection, segmentation, tracking, retrieval, generation, calibration, and human workflows.

By the end you can

Key idea

A metric is a contract about what counts as an error

Before calculating a number, define the prediction unit, ground-truth unit, matching rule, threshold, averaging scheme, and excluded cases. Small choices can change the result substantially.

How substantially has been proved rather than asserted. FID and Inception Score are biased estimators, and the size of the bias depends on the model being scored. Two scores are therefore not two readings on one scale. Chong and Forsyth showed this in 2020, and their abstract states the consequence flatly: “This effect cannot be fixed by evaluating at a fixed number of samples. This means all comparisons using FID or IS as currently computed are unreliable.”

The implementation half arrived in 2022 with clean-fid. The score also shifts with details such as image resizing and JPEG compression. On StyleGAN2 with LSUN Churches, lossy compression alone moved FID from 4.00 to 3.48.

That is a metric change produced by a file format, not by a model. Report the evaluation protocol beside the metric. A bare “mAP,” “IoU,” or “accuracy” is incomplete, and so is a bare FID.

Lossy compression alone moved FID from 4.00 to 3.48 on StyleGAN2 with LSUN Churches; the protocol is not context around the metric, it is part of it.

Comparison

Different outputs require different notions of agreement

Choose metrics that reflect the structure of the prediction. Classification compares labels, scores and decisions per example: confusion matrix, precision and recall, calibration, with a defect class as the everyday case. Detection and segmentation match spatial predictions to objects or pixels under IoU thresholds, scoring AP and recall and slicing by boundary or size, as with a lesion mask. Tracking and retrieval evaluate ranked, linked or identity-consistent sequences — rank metrics, ID switches, track fragmentation, vehicle tracking. Generation and restoration have no single ground truth. They are judged instead on fidelity, diversity, adherence to a prompt or source contract, memorization and safety, as in an image editor.

Which metric a field agrees to use is itself a contested, dated decision. Multi-object tracking went years without a settled answer. The HOTA paper, published in the International Journal of Computer Vision in 2020, opens with the diagnosis: “Multi-object tracking (MOT) has been notoriously difficult to evaluate. Previous metrics overemphasize the importance of either detection or association.” MOTA over-weights detection. IDF1 over-weights association. HOTA decomposes instead into sub-metrics covering five basic error types, so detection quality and association quality can be read apart.

The KITTI tracking benchmark switched its official ranking to HOTA on 25 February 2021. What the leaderboard measures changed that day. Nothing in any submitted model did.

On the generation side the instability is formal. Because the FID bias term depends on the model being scored, two systems' FIDs are not two readings of one instrument.

FigureComparison · 4 columns

Classification

Compare labels, scores, and decisions per example.

  • Confusion matrix
  • Precision and recall
  • Calibration
  • Example: defect class

Detection and segmentation

Match spatial predictions to objects or pixels.

  • IoU thresholds
  • AP and recall
  • Boundary or size slices
  • Example: lesion mask

Tracking and retrieval

Evaluate ranked, linked, or identity-consistent sequences.

  • Rank metrics
  • ID switches
  • Track fragmentation
  • Example: vehicle tracking

Generation and restoration

Evaluate sets, fidelity, diversity, preservation, and human judgment.

  • No single ground truth
  • Prompt or source contract
  • Memorization and safety
  • Example: image editor

Visual

Five layers of evidence for a vision product

A model can pass one layer and fail another. Data validity asks whether the sample is representative, correctly labeled, independent and well documented. Task performance covers accuracy, localization, ranking, calibration and robustness. Decision policy is thresholds, abstention, capacity and fallback. Human interaction is correction, anchoring, trust, workload and accessibility. Operational outcome is safety, delay, cost, equity, quality and incident rate.

Calibration shows how a layer can be measured, declared settled, and then need measuring again. A 2017 paper at ICML reported a regression nobody was looking for: “While neural networks today are undoubtedly more accurate than they were a decade ago, we discover with great surprise that modern neural networks are no longer well-calibrated.” Guo and colleagues put expected calibration error “typically between 4 to 10%” at 15 bins, across standard vision and NLP datasets. The most effective fix was single-parameter temperature scaling. One parameter repaired a failure that accuracy had entirely concealed.

Four years later the question was re-run at scale. Minderer and colleagues took 180 models from 16 families and evaluated each on 79 ImageNet-scale datasets and 28 metric variants. They found the most recent models, notably the non-convolutional ones, among the best calibrated.

So the 2017 finding was a fact about the architectures of 2017. A product that inherited its threshold policy from that generation is running a decision layer tuned to a measurement that has since partly reversed. Each layer carries its own date.

FigureLayers · 5 layers
  1. 01

    Data validity

    Representative, correctly labeled, independent, and well documented.

  2. 02

    Task performance

    Accuracy, localization, ranking, calibration, and robustness.

  3. 03

    Decision policy

    Thresholds, abstention, capacity, and fallback.

  4. 04

    Human interaction

    Correction, anchoring, trust, workload, and accessibility.

  5. 05

    Operational outcome

    Safety, delay, cost, equity, quality, and incident rate.

Matching rules decide who receives credit

Object detection may match a prediction to one ground-truth object using IoU and confidence order. Tracking adds temporal identity. Retrieval uses ranked relevance.

How that temporal identity is weighted against detection is a live design choice, not a convention. MOTA over-weights detection. IDF1 over-weights association. HOTA decomposes into sub-metrics covering five basic error types, so neither swamps the other. The KITTI Vision Benchmark Suite now states “We rank methods by HOTA” on its multi-object tracking evaluation page, and dates the switch to 25 February 2021. A tracker's rank has a metric and a date attached to it.

Inspect alternative thresholds and duplicate handling. A model can improve at loose overlap while degrading the precise localization the product actually requires.

Spatial and temporal metrics encode a definition of acceptable correspondence.

Analogy

Scoring a decathlon instead of one race

Judges rate an athlete through sprinting, jumping, endurance, technique, and rule compliance. One event score cannot summarize every capability or consequence.

Each decathlon event is scored on its own, while product metrics are often correlated and weighted by unequal harm. A scorecard rather than one trophy number is what the case argues for.

A vision system needs a portfolio of evidence tied to use.

Example

Slices that reveal hidden regressions

Define slices before launch and expand them from observed failures. The size of what an average can hide has been measured twice, by different institutions with different methods and different subjects.

NIST's Face Recognition Vendor Test ran 18.27 million images of 8.49 million people through 189 mostly commercial algorithms from 99 developers. The report came out in December 2019. Its executive summary states: “Across demographics, false positives rates often vary by factors of 10 to beyond 100 times.”

A far smaller study had reached the same territory two years earlier. Buolamwini and Gebru measured error rates up to 34.7% for darker-skinned females on three commercial gender classifiers, against a maximum of 0.8% for lighter-skinned males.

A hundredfold spread in false positives and a 34.7%-against-0.8% gap are both compatible with a respectable aggregate score. That is the argument for defining slices in advance. An average does not report its own variance across the groups inside it.

  • Object size and crowding: Small or overlapping instances often fail first.
  • Acquisition quality: Blur, exposure, compression, and occlusion alter evidence.
  • Domain and device: Sites, cameras, scanners, seasons, and software versions differ.
  • Population and context: Demographics, mobility aids, clothing, anatomy, or geography matter by use — the Gender Shades gap ran from 0.8% to 34.7% on the same three classifiers.
  • Rare class and severity: Aggregate averages underweight critical events.
  • Workflow state: New users, escalated cases, rechecks, and fallback paths can have distinct behavior.

Steps

Turn failures into an evidence-backed improvement plan

Error analysis should narrow causes rather than produce a gallery of bad examples.

A toolbox for exactly that arrived at ECCV in 2020. TIDE's abstract states the contribution precisely: “We segment errors into six types and, crucially, are the first to introduce a technique for measuring the contribution of each error in a way that isolates its effect on overall performance.” The six are Cls (classification), Loc (localization), Both, Dupe (duplicate), Bkg (background) and Miss (missed ground truth). Each is scored by the mAP that removing it would recover.

That isolation is the point. Two detectors at the same mAP can be spending their error budget in different places, and the total does not say which. A gallery of bad images cannot rank the fixes. A per-type mAP recovery can.

The loop that follows has five steps. Sample errors systematically, stratifying by type, score, severity and slice rather than selecting memorable cases. Verify labels and inputs, separating annotation error, ambiguity, capture failure and model failure. Cluster mechanisms by scale, context, boundary, class, device or workflow. Test hypotheses with ablations, counterfactuals, retraining or policy changes on held-out data. Then prioritize by impact, estimating frequency, harm, fixability, review burden and regression risk.

FigureProcess · 5 steps
  1. 1. Sample errors systematically

    Stratify by type, score, severity, and slice rather than selecting memorable cases.

  2. 2. Verify labels and inputs

    Separate annotation error, ambiguity, capture failure, and model failure.

  3. 3. Cluster mechanisms

    Group errors by scale, context, boundary, class, device, or workflow.

  4. 4. Test hypotheses

    Use ablations, counterfactuals, retraining, or policy changes on held-out data.

  5. 5. Prioritize by impact

    Estimate frequency, harm, fixability, review burden, and regression risk.

Key idea

Repeated tuning can consume the credibility of a test set

If teams inspect test errors and repeatedly modify data, thresholds, or architecture, the test set becomes part of what the team is tuning. The reported number can drift upward while the model generalizes no better.

Keep separate validation data to iterate on, restrict test access, version benchmarks, and confirm on a fresh sample before major claims.

That confirmation has been run in public. Recht and colleagues rebuilt the CIFAR-10 and ImageNet test sets following the original collection process, then re-scored existing models. Their 2019 abstract: “We evaluate a broad range of models and find accuracy drops of 3% - 15% on CIFAR-10 and 11% - 14% on ImageNet.” No model changed; only the sample did. They attributed the drop to the models' inability to generalize to slightly harder images rather than to adaptivity.

Then the replication itself was audited. Engstrom and colleagues identified a statistical bias in the replication process. After correcting for it, only an estimated 3.6% ± 1.5% of the original 11.7% ± 1.0% ImageNet drop remained unaccounted for. The moral is the lesson's own. A measurement of a measurement has a protocol too, and it has to be checked before its number is quoted.

The answer key can be the defect rather than the sample. A 2021 audit of 10 of the most-used benchmarks estimates at least 3.3% label errors on average across their test sets, and at least 6% in the ImageNet validation set. Crowdworkers confirmed 51% of the algorithmically flagged candidates.

A test set is an evidence budget, not an infinite dashboard.

Example

Practice: build a scorecard for autonomous shelf auditing

A mobile robot detects products, reads labels, estimates stock, and sends uncertain cases to employees. Rather than inventing a metric list, copy the shape of a protocol a regulator has already accepted.

On 11 April 2018 the FDA granted De Novo DEN180001 to IDx-DR, an autonomous system for diabetic retinopathy. The thresholds it had to clear were fixed before the trial ran: 85.0% sensitivity and 82.5% specificity. Of 900 participants enrolled at 10 primary-care sites, 819 were fully analyzable (92%). The decision summary reports the headline result in one sentence: “IDx-DR correctly identified 173 of the 198 fully analyzable participants with fundus mtmDR+, thus observed sensitivity was at 87.4% (95%CI, 81.9% - 92.9%).”

The rest of the scorecard is just as specific. Observed specificity was 89.5% (95% CI 86.9–93.1%). The enrichment-corrected figures were 87.2% and 90.7%. Imageability was reported too, at 96.1% (819/852), together with PPV 72.7% and NPV 95.7% at 23.8% prevalence.

Notice what that carries besides an accuracy figure: thresholds set in advance, confidence intervals on every rate, the fraction of cases the system could not analyze at all, corrected as well as observed numbers, and predictive values stated at a named prevalence. Build the shelf audit the same way.

  • Define metrics for detection, OCR, duplicate counting, and shelf-level inventory error — and fix each passing threshold before the run, as DEN180001 fixed 85.0% sensitivity and 82.5% specificity in advance.
  • Add slices for glare, occlusion, small packaging, store layout, and new products, and report the analyzable fraction explicitly, the way the trial reported 819 of 900 participants and 96.1% imageability.
  • Choose thresholds that respect employee review capacity, and state predictive values at the prevalence you actually expect rather than the one your sample happened to have — the IDx-DR summary gives PPV 72.7% and NPV 95.7% at 23.8% prevalence.
  • Measure correction time and inventory impact rather than model metrics alone.
  • Create a release gate and a fresh-test policy for future updates, remembering that a rebuilt test set moved published accuracy by 11–14 points on ImageNet without any model changing.

Position

A leaderboard ranking is a fact about the test set

Two models, one number each, and the larger number wins. That is how a benchmark table gets read, and it is the wrong reading. The ranking is a property of the images and the labels that produced it.

The test sets of 10 of the most-used benchmarks were audited in 2021 by Northcutt and colleagues. Their abstract does not hedge: “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.” Crowdworkers confirmed 51% of the algorithmically flagged candidates.

Then comes the result that should end the habit. On ImageNet with corrected labels, ResNet-18 outperforms ResNet-50 once the prevalence of originally mislabeled test examples rises by just 6%. On CIFAR-10, VGG-11 overtakes VGG-19 at 5%. It takes only that much noise in the answer key to reorder two textbook models.

The same problem has been approached from the other side. Recht and colleagues rebuilt the CIFAR-10 and ImageNet test sets following the original collection process, and measured accuracy drops of 3%–15% on CIFAR-10 and 11%–14% on ImageNet. No model changed; only the sample did. Even that verdict was provisional. Engstrom and colleagues corrected a statistical bias in the replication process, leaving only an estimated 3.6% ± 1.5% of the original 11.7% ± 1.0% ImageNet drop unaccounted for.

Even a gap that survives both tests does not say what it is made of. TIDE splits detection error into six types — classification, localization, both at once, duplicate, background and missed ground truth — and scores each by the mAP that removing it would recover. Two detectors at equal mAP can be failing in different places. The product cares which one. The total does not say.

So the useful sentence is never that a model is state of the art. It is the protocol: this prediction unit, this matching rule, this threshold, this averaging scheme, these excluded cases, this answer key with this error rate. A ranking without them is a claim about one sample of images. Treat it as provisional until a fresh sample, drawn the same way, says the same thing.

Two textbook models trade places on a 6 percent shift in how many test labels were wrong to begin with.

Key takeaways