Skip to content
AI.info

Computer vision

Computer Vision as Measurement and Decision Engineering

Build a practical map of computer vision by separating physical scenes, captured images, model outputs, and product decisions.

By the end you can

A camera does not deliver ground truth

A warehouse camera records a pallet near a loading bay; the image depends on lens position, exposure, motion, compression, and which parts of the scene are hidden.

A model may detect a pallet, estimate its distance, track its movement, or decide whether a safety zone is blocked: those are different tasks with different evidence and failure costs.

The field's habit of measuring itself came from one benchmark. Russakovsky and eleven co-authors described the ImageNet Large Scale Visual Recognition Challenge in 2015 as “a benchmark in object category classification and detection on hundreds of object categories and millions of images”. It “has been run annually from 2010 to present, attracting participation from more than fifty institutions”. Their paper compares “the state-of-the-art computer vision accuracy with human accuracy”. That comparison became the scoreboard.

A number that large is still a number about one collection of photographs. And how large the gap between two collections really is has itself been contested in print. Recht and three colleagues rebuilt the ImageNet and CIFAR-10 test sets, re-running the original collection procedures. They reported in 2019: “We evaluate a broad range of models and find accuracy drops of 3% - 15% on CIFAR-10 and 11% - 14% on ImageNet.” Nothing about the models had changed. Only the photographs had.

Then a separate MIT group re-analysed the same ImageNet-v2 replication. Engstrom and five co-authors corrected for statistical bias in the replication procedure itself and concluded in 2020 that “only an estimated 3.6% ± 1.5% of the original 11.7% ± 1.0% accuracy drop remains unaccounted for”. Two labs, one benchmark, two different sizes for the same hole. An accuracy figure is a property of a dataset and of how that dataset was assembled. The measurement of the dataset is itself a measurement, with error bars.

Computer vision begins with a measurement question, not with an architecture.

Visual

Six layers between the world and an action

This map prevents a model score from being mistaken for direct knowledge of the scene. Six layers stand between the world and an action. In the physical scene, objects, surfaces, light, motion, and occlusion exist before any image is captured. In the imaging process, optics, sensor settings, viewpoint, timing, and compression create a partial measurement. In the dataset and labels, sampling and annotation convert selected measurements into training evidence. In the representation and model, features and learned parameters transform pixels into task-specific outputs. In the decision policy, thresholds, rules, temporal logic, and human review determine what happens next. In the operational outcome, the system affects safety, cost, access, diagnosis, or user experience.

The layers are easiest to see when they come apart under load. On 18 March 2018, in Tempe, Arizona, a self-driving test vehicle struck a pedestrian. The NTSB's preliminary report, HWY18MH010, released that May, walks down the stack in four pages.

The imaging layer worked. The Uber ATG automated driving system registered radar and LIDAR observations of the pedestrian about 6 seconds before impact, travelling at 43 mph. The representation layer did not settle: “As the vehicle and pedestrian paths converged, the self-driving system software classified the pedestrian as an unknown object, as a vehicle, and then as a bicycle with varying expectations of future travel path.” The decision layer reached its own conclusion 1.3 seconds before impact — that emergency braking was needed — and had no authority to act on it. Uber had disabled emergency braking manoeuvres under computer control.

The layers behaved differently: the imaging layer worked, the representation layer never settled, and the decision layer could not act. Only the last one produced the outcome. In December 2020 GAO placed the same crash among accidents “caused in part by the drivers' overreliance on the automated technologies in the vehicle”. A single verdict of "the vision system failed" would have located the fault in the wrong layer.

FigureLayers · 6 layers
  1. 01

    Physical scene

    Objects, surfaces, light, motion, and occlusion exist before any image is captured.

  2. 02

    Imaging process

    Optics, sensor settings, viewpoint, timing, and compression create a partial measurement.

  3. 03

    Dataset and labels

    Sampling and annotation convert selected measurements into training evidence.

  4. 04

    Representation and model

    Features and learned parameters transform pixels into task-specific outputs.

  5. 05

    Decision policy

    Thresholds, rules, temporal logic, and human review determine what happens next.

  6. 06

    Operational outcome

    The system affects safety, cost, access, diagnosis, or user experience.

Predict first

Which hospital took this X-ray?

A team trains networks to detect pneumonia on chest radiographs from two hospital systems, separately and pooled, and they score well on test sets drawn from the same hospitals. Then the team trains a network of the same kind on a different question, using radiographs from three hospital systems: which of them did this radiograph come from?

How often do you expect it to get that right: about as often as guessing, somewhat better than guessing, or almost every time?

Settle on an answer, then read on — the next section is the reveal

Comparison

Visual tasks that share pixels but not success criteria

One image can support several tasks. Yet each task defines a different output contract. Classification predicts which categories describe an image or crop and returns one or several labels; its typical failure is a background shortcut, and its evidence is class and slice performance. Detection locates and classifies individual objects, returning boxes, labels, and scores, and typically misses small objects. Segmentation assigns labels to pixels or instances, returning masks or regions, and typically erodes boundaries. Geometry and motion estimate depth, pose, correspondence, or trajectories, returning coordinates or fields, and typically fail through scale or drift error. Retrieval and generation return ranked items or generated images and typically fail through semantic mismatch.

"Background shortcut" is the cheapest of those phrases to write and the most expensive to discover late. One study measured it precisely. Zech and five co-authors drew 158,323 chest radiographs from three institutions — 112,120 from NIH, 42,396 from Mount Sinai, 3,807 from Indiana University — trained pneumonia-detection CNNs on the NIH and Mount Sinai images, kept Indiana for external testing, and found better internal than external performance in 3 of 5 natural comparisons. Then they trained a CNN on a question the pneumonia task never asked: which hospital system a radiograph came from. Their 2018 paper in PLOS Medicine reports the answer: “CNNs were able to directly detect hospital system of a radiograph for 99.95% NIH (22,050/22,062) and 99.98% MSH (8,386/8,388) radiographs.”

The case became the standard illustration of shortcut learning. Geirhos and colleagues, surveying the phenomenon in 2020, compressed it into a single model that “had unexpectedly learned to identify particular hospital systems with near-perfect accuracy”, by picking up a hospital-specific metal token. The paper itself is more careful: a CNN trained for the purpose named the hospital, and the pneumonia models showed the cost, AUC 0.931 on the pooled internal test set against 0.815 at Indiana. The classification contract had been satisfied on the internal test set. The measurement question — does this chest have pneumonia — had been answered only in part: ranking cases by each hospital's pneumonia prevalence alone, without looking at a lung, scored AUC 0.861 on that same internal test set. The output contract tells you what shape the answer has. Only slice evidence tells you what the answer is about.

FigureComparison · 5 columns

Classification

Predict which categories describe an image or crop.

  • Output: one or several labels
  • Typical failure: background shortcut
  • Example: product category
  • Evidence: class and slice performance

Detection

Locate and classify individual objects.

  • Output: boxes, labels, and scores
  • Typical failure: missed small objects
  • Example: vehicles at an intersection
  • Evidence: matching and localization metrics

Segmentation

Assign labels to pixels or object instances.

  • Output: masks or regions
  • Typical failure: boundary erosion
  • Example: road surface damage
  • Evidence: overlap and boundary quality

Geometry and motion

Estimate depth, pose, correspondence, or trajectories.

  • Output: coordinates or fields
  • Typical failure: scale or drift error
  • Example: robot navigation
  • Evidence: geometric and temporal consistency

Retrieval and generation

Find related media or synthesize new pixels.

  • Output: ranked items or generated images
  • Typical failure: semantic mismatch
  • Example: visual search or editing
  • Evidence: relevance, fidelity, and provenance

Example

Five questions hidden inside a simple photograph

Human observers resolve many visual ambiguities using context that a deployed system may not possess. How much that context is worth can be measured, and on faces it has been. NIST's December 2019 report on demographic effects in face recognition, NISTIR 8280, ran four operational US government datasets through the largest test of its kind: “Together these datasets allowed us to process a total of 18.27 million images of 8.49 million people through 189 mostly commercial algorithms from 99 developers.”

The headline result is not an average, and that is the point. “Across demographics, false positives rates often vary by factors of 10 to beyond 100 times”. They run highest in West and East African and East Asian faces on the high-quality application photos, and lowest in Eastern European faces. False negative differentials usually vary by factors below 3. One reported accuracy number can sit on top of a hundredfold spread in the error that actually causes harm.

  • Visibility: A partly hidden worker may occupy only a few pixels, so the label “person present” depends on the required evidence threshold.
  • Scale: A defect that spans twelve pixels at one camera position may disappear after resizing or a change in crop policy.
  • Identity: Two frames may show the same vehicle, but appearance changes with angle, lighting, and temporary occlusion — and the resulting identity error is not spread evenly across subjects. Four years after NISTIR 8280, in April 2024, GAO reported that NIST officials “told us that they have observed improvements in accuracy over time related to demographic differences; however, false positive rates are still higher for certain demographic groups that are not sufficiently represented in the training data such as elderly East Asian women and elderly East African women”.
  • Geometry: A large nearby object and a small distant object can project to similar image sizes without camera or scene context.
  • Semantics: A red region could mean rust, paint, heat, or a warning light; pixels alone do not choose the business meaning. In the Tempe report the same pedestrian was read as an unknown object, then a vehicle, then a bicycle inside the roughly 6 seconds between first detection and impact — three business meanings, each with its own expected travel path, for one person.

Analogy

A chain of scientific instruments

One sample in a laboratory passes through a microscope, a technician, an analysis program, and a reporting rule. Each stage can add noise, bias, or an interpretation choice.

A microscope follows a fixed physical formula, while a vision model can learn internal features from data. Errors must still be localized to a stage.

Debug the entire evidence chain, not only the neural network.

Key idea

A confident prediction is still conditional evidence

A detector score depends on training data, model design, preprocessing, and the candidate being evaluated; it is not automatically a calibrated probability that an object exists. That is a measured finding rather than a caution. Guo and three colleagues opened a 2017 paper with it: “We discover that modern neural networks, unlike those from a decade ago, are poorly calibrated.” They also showed that a single-parameter temperature scaling repairs most of the gap.

The finding then acquired a date stamp. Eight authors at Google Brain revisited the same question in 2021 and found that the most recent models, notably those not using convolutions, are among the best calibrated. Calibration is a property of your model measured on your data, not a fixed law of the field. That is exactly why it has to be measured rather than assumed, in either direction.

A detector also reads more of the picture than the product intends. Rosenfeld and colleagues produced detector failures in 2018 “by replacing image sub-regions by another sub-image that contains a trained object”, a move they called “object transplanting”. The impact was not local. Modifying an image this way “is shown to have a non-local impact on object detection”, and “slight changes in object position can affect its identity according to an object detector as well as that of other objects in the image”. A detector reading a scene is reading the whole scene, whether or not the product wants it to.

The product must therefore decide how scores interact with thresholds, temporal confirmation, human review, and the cost of false alarms. When it declines to decide, someone else writes the policy later, under worse conditions. GAO recorded in April 2024: “Since 2019, there have been at least six instances reported in the press in which people were falsely arrested for crimes they did not commit based on inaccurate biometric matches—all of those individuals have been African American.”

In Williams v. City of Detroit the parties settled on 28 June 2024. The ACLU press release describing the settlement states that “Police will be prohibited from arresting people based solely on facial recognition results, or on the results of photo lineups directly following a facial recognition search.” The settlement further requires an audit of every case since 2017 in which the technology was used to obtain an arrest warrant. The release notes that Williams's “case is one of three known wrongful arrests where Detroit police relied on facial recognition technology”. The missing decision policy was eventually supplied — by a court settlement, after the three known wrongful arrests the release counts, with an audit reaching back to 2017.

Model confidence is not the same thing as operational certainty.

Steps

Frame a vision problem before collecting images

Use this sequence to prevent a camera project from becoming an untestable model demo. First, define the decision: state what action or judgment the system must support. Second, specify the visible evidence: list viewpoints, sensors, timing, resolution, and metadata available at decision time. Third, choose the output contract: decide whether the product needs labels, boxes, masks, coordinates, rankings, or generated content. Fourth, enumerate difficult conditions, including occlusion, blur, rare objects, domain shifts, and ambiguous annotations. Fifth, connect metrics to consequences: map task errors to missed events, false interventions, review load, latency, and safety.

One authorized system shows what steps one and three look like when they genuinely come first. On 11 April 2018 the FDA granted De Novo request DEN180001 to IDx LLC for IDx-DR, with the decision recorded as "granted (DENG)". It created a new device classification named “diabetic retinopathy detection device”. The output contract in that system is the decision itself: it emits one of two screening results rather than a score for a clinician to threshold, and a third output, insufficient image quality, when the photographs cannot be graded. Lesson 10 returns to that third answer.

The pivotal trial behind the authorization “enrolled 900 subjects, with no history of DR at primary care clinics”, at 10 such clinics. Abràmoff and four co-authors reported in npj Digital Medicine in 2018: “The AI system exceeded all pre-specified superiority endpoints at sensitivity of 87.2% (95% CI, 81.8–91.2%) (>85%), specificity of 90.7% (95% CI, 88.3–92.7%) (>82.5%), and imageability rate of 96.1% (95% CI, 94.6–97.3%)”. Sensitivity is the share of people with the disease whom the system flagged; specificity is the share of people without it whom the system cleared.

Read that sentence for its structure rather than its numbers. The endpoints were pre-specified, with a threshold to beat written down before the trial ran, because the decision the device makes had been defined before the images were collected. Imageability sits in the list beside sensitivity and specificity. That is the imaging layer being scored as part of the product, rather than assumed away.

FigureProcess · 5 steps
  1. 1. Define the decision

    State what action or judgment the system must support.

  2. 2. Specify the visible evidence

    List viewpoints, sensors, timing, resolution, and metadata available at decision time.

  3. 3. Choose the output contract

    Decide whether the product needs labels, boxes, masks, coordinates, rankings, or generated content.

  4. 4. Enumerate difficult conditions

    Include occlusion, blur, rare objects, domain shifts, and ambiguous annotations.

  5. 5. Connect metrics to consequences

    Map task errors to missed events, false interventions, review load, latency, and safety.

Example

The five framing steps, run on the loading-bay camera

This lesson opened with a warehouse camera watching a pallet near a loading bay. The camera is the lesson's; every figure below (mounting height, frame rate, the three-frame rule, the thirty-second cost) is invented for the exercise, so that each step has something concrete to decide.

  • 1. Define the decision: whether the painted safety zone in front of bay 3 is occupied, which holds the automatic door and lights a warning for forklift drivers. A pallet label for the whole image does not answer that.
  • 2. Specify the visible evidence: one ceiling camera about 5 m up, 15 frames a second, plus the door's open or closed state from the controller. Anything behind the racking is not visible and cannot be promised.
  • 3. Choose the output contract: a yes or no for “zone occupied”, computed by intersecting person and pallet masks with the zone's polygon and confirmed on 3 consecutive frames, 0.2 seconds at 15 frames a second.
  • 4. Enumerate difficult conditions: a worker crouching behind a pallet, glare off shrink-wrap when the bay door is open, the night shift's lighting, and a pallet left half across the painted line.
  • 5. Connect metrics to consequences: a missed person in the zone is a possible collision; a false “occupied” holds the door for about thirty seconds of forklift time. So recall on people is reported on its own, on the crouching and night slices, and false holds are counted per shift rather than folded into one accuracy.

How this path relates to neighboring paths

This course focuses on visual evidence, task design, image and video data, geometry, evaluation, domain-specific systems, and deployment; it uses architecture concepts only when they clarify a vision failure.

The deeper mechanics of CNNs, Transformers, autoencoders, and diffusion networks belong to the architecture path. Other paths cover generic optimization, governance, and MLOps more fully.

The objective is system-level visual literacy without duplicating the entire AI curriculum.

Key takeaways