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
- Describe computer vision as a measurement pipeline rather than a generic image-labeling problem
- Distinguish recognition, localization, geometry, motion, retrieval, generation, and document tasks
- Identify ambiguities introduced by sensing, annotation, and downstream decision rules
- Frame a vision project around evidence, uncertainty, and operational consequences
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.
Every layer failed differently, and 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.
- 01
Physical scene
Objects, surfaces, light, motion, and occlusion exist before any image is captured.
- 02
Imaging process
Optics, sensor settings, viewpoint, timing, and compression create a partial measurement.
- 03
Dataset and labels
Sampling and annotation convert selected measurements into training evidence.
- 04
Representation and model
Features and learned parameters transform pixels into task-specific outputs.
- 05
Decision policy
Thresholds, rules, temporal logic, and human review determine what happens next.
- 06
Operational outcome
The system affects safety, cost, access, diagnosis, or user experience.
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 trained pneumonia-detection CNNs on 158,323 chest radiographs from three institutions — 112,120 from NIH, 42,396 from Mount Sinai, 3,807 from Indiana University — and found better internal than external performance in 3 of 5 natural comparisons. Then they asked the networks a question nobody had trained them to answer. 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, restated it as a model that “had unexpectedly learned to identify particular hospital systems with near-perfect accuracy”, by picking up a hospital-specific metal token. The classification contract had been satisfied on the internal test set. The measurement question — does this chest have pneumonia — had not been answered at all. The output contract tells you what shape the answer has. Only slice evidence tells you what the answer is about.
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, six years and several arrests after the scores started being used.
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 a two-option referral rather than a score for a clinician to threshold.
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%)”.
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.
1. Define the decision
State what action or judgment the system must support.
2. Specify the visible evidence
List viewpoints, sensors, timing, resolution, and metadata available at decision time.
3. Choose the output contract
Decide whether the product needs labels, boxes, masks, coordinates, rankings, or generated content.
4. Enumerate difficult conditions
Include occlusion, blur, rare objects, domain shifts, and ambiguous annotations.
5. Connect metrics to consequences
Map task errors to missed events, false interventions, review load, latency, and safety.
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
- Computer vision converts partial visual measurements into task outputs, not direct knowledge of the world: Recht and colleagues changed only the photographs and measured accuracy drops of 11%–14% on ImageNet and 3%–15% on CIFAR-10.
- Classification, detection, segmentation, geometry, tracking, retrieval, and generation require different output contracts — and a contract can be the decision itself, as in IDx-DR's two-option referral output.
- Sensor conditions and annotation choices can create errors before model training begins: Zech and co-authors' pneumonia CNNs identified the source hospital system for 99.95% of NIH and 99.98% of Mount Sinai radiographs.
- A score becomes useful only when a decision policy connects it to a consequence; in Williams v. City of Detroit that policy was written on 28 June 2024 by settlement, after arrests had already been made on matches alone.
- Average metrics should be complemented by slices that reflect visibility, scale, environment, and operational cost — NISTIR 8280 found false positive rates varying across demographic groups by factors of 10 to beyond 100 times.
- A defensible vision project starts with the decision, evidence boundary, and failure conditions: in Tempe the pedestrian's identity changed three times in about 6 seconds and the decision layer had no braking authority left to use.