Visual tasks and inspection evidence
Classification assigns categories to an image. Detection locates individual objects using bounding boxes—rectangles specifying location and extent. Segmentation assigns image locations to regions. These visual task definitions specify different outputs: recognizing a defective scene does not identify every part or delineate its defect.
Grounding connects a reference to an inspectable image region. A referring expression such as “the scratched part beside the blue fixture” requires selecting among candidates using appearance, location and relationships. Referring-expression comprehension supplies that localization task; returning a region does not independently verify every property in its description.
One image, different outputs
ExampleCategory, extent, defect region and reference selection answer different tasks.
Category
Image-level output.
Scroll sideways if the figure extends beyond the screen.
- 1. Part A
- 2. Part B
- 3. Blue fixture
- 4. Scratch
Read coordinates and regions as data
X: 0–640 pixels; Y: 0–480 pixels, increasing down. Equal scale on both axes.
(200, 120); (300, 120); (300, 220); (200, 220)
(350, 120); (450, 120); (450, 220); (350, 220)
(310, 150); (340, 150); (340, 190); (310, 190)
(240, 140); (244, 140); (244, 200); (240, 200)
Defect present: (320, 300)
Detection
Separate object extents.
Scroll sideways if the figure extends beyond the screen.
- 1. Part A
- 2. Part B
- 3. Blue fixture
- 4. Scratch
- 5. A box
- 6. B box
Read coordinates and regions as data
X: 0–640 pixels; Y: 0–480 pixels, increasing down. Equal scale on both axes.
(200, 120); (300, 120); (300, 220); (200, 220)
(350, 120); (450, 120); (450, 220); (350, 220)
(310, 150); (340, 150); (340, 190); (310, 190)
(240, 140); (244, 140); (244, 200); (240, 200)
(195, 115); (305, 115); (305, 225); (195, 225); (195, 115)
(345, 115); (455, 115); (455, 225); (345, 225); (345, 115)
A: (250, 95)
B: (400, 95)
Segmentation
Defect-region membership.
Scroll sideways if the figure extends beyond the screen.
- 1. Part A
- 2. Part B
- 3. Blue fixture
- 4. Scratch
Read coordinates and regions as data
X: 0–640 pixels; Y: 0–480 pixels, increasing down. Equal scale on both axes.
(200, 120); (300, 120); (300, 220); (200, 220)
(350, 120); (450, 120); (450, 220); (350, 220)
(310, 150); (340, 150); (340, 190); (310, 190)
(240, 140); (244, 140); (244, 200); (240, 200)
Narrow defect region: (242, 270)
Grounding
Select a referred part.
Scroll sideways if the figure extends beyond the screen.
- 1. Part A
- 2. Part B
- 3. Blue fixture
- 4. Scratch
- 5. Selected region
Read coordinates and regions as data
X: 0–640 pixels; Y: 0–480 pixels, increasing down. Equal scale on both axes.
(200, 120); (300, 120); (300, 220); (200, 220)
(350, 120); (450, 120); (450, 220); (350, 220)
(310, 150); (340, 150); (340, 190); (310, 190)
(240, 140); (244, 140); (244, 200); (240, 200)
(195, 115); (305, 115); (305, 225); (195, 225); (195, 115)
Scratched part beside fixture: (320, 300)
The constructed workbench contains two parts, a narrow scratch and a blue fixture. Acquisition produces an observation; an encoder produces representations; a task head produces predictions. Inspection datasets such as MVTec distinguish image-level anomaly decisions from pixel-level defect localization. Neither benchmark task alone establishes fewer missed defects or a manageable review workload in a factory.
Pixels, capture and spatial sampling
A raster image is a grid of pixels: spatial samples with channel values, such as red, green and blue components. Resolution specifies grid dimensions. A decoded RGB image can be an H×W×3 array; its encoded file bytes are a different representation. Decoding must succeed before array dimensions or channel values can be trusted.
Pixels depend on illumination, surface reflectance and viewing geometry. Under ideal perspective, : camera-space position , depth and focal scale determine projected position . Increasing object size and distance together can preserve apparent size. Image formation therefore explains why a photograph does not uniquely determine physical dimensions or intrinsic surface color.
Samples do not determine hidden detail
ExampleTwo profiles agree at every recorded position.
One recorded sample sequence
Recorded points coincide despite the dip between them.
Scroll sideways if the figure extends beyond the screen.
- 1. Flat profile
- 2. Profile with narrow dip
- 3. Recorded samples
Read coordinates and regions as data
X: -0.2–4.2 pixels; Y: 0–1 dimensionless, increasing up. Axes scaled independently; screen angles and distances are not comparable.
(0, 0.5); (4, 0.5)
(0, 0.5); (1, 0.5); (1.5, 0.1); (2, 0.5); (4, 0.5)
(0, 0.5); (1, 0.5); (2, 0.5); (3, 0.5); (4, 0.5)
Exposure is the interval over which a sensor gathers light. Longer exposure collects more photons but can blur moving edges, including a narrow scratch. Digital gain amplifies existing measurements and noise; it does not collect additional photons. Color channels also reflect sensor filtering and reconstruction, rather than three independent full-resolution measurements at every location.
RGB numbers require a color-space interpretation. Encoded sRGB is nonlinear with respect to light: dividing an eight-bit channel by 255 changes its numeric range but does not linearize intensity. Follow the model's documented color and normalization conventions rather than automatically applying a physically motivated conversion.
Aliasing occurs when sampling makes distinct fine patterns indistinguishable. Low-pass filtering before downsampling reduces aliasing by removing unsupported detail. Enlarging the resulting array interpolates values; it cannot uniquely recover what was discarded.
Preprocessing and source coordinates
Decoder conventions belong in the input contract. OpenCV normally returns BGR channels and applies embedded EXIF orientation unless particular flags disable it. Record orientation before interpreting coordinates. Specify channel order, numeric range and normalization; identical shapes do not establish identical model inputs.
Use continuous XYXY edges, with x rightward and y downward. Letterboxing preserves aspect ratio through resizing and padding. For crop origin , actual resize factors and padding , transform every box corner consistently.
One box in two canvases
ExampleCrop offsets, scaling and padding all change coordinates.
Source
The orange box lies inside the dashed crop.
Scroll sideways if the figure extends beyond the screen.
- 1. Canvas
- 2. Retained image
- 3. Part box
Read coordinates and regions as data
X: 0–660 pixels; Y: 0–500 pixels, increasing down. Equal scale on both axes.
(0, 0); (640, 0); (640, 480); (0, 480); (0, 0)
(100, 60); (500, 60); (500, 360); (100, 360); (100, 60)
(200, 120); (300, 120); (300, 220); (200, 220)
Model input
The transformed box sits within the padded canvas.
Scroll sideways if the figure extends beyond the screen.
- 1. Canvas
- 2. Retained image
- 3. Part box
Read coordinates and regions as data
X: 0–660 pixels; Y: 0–500 pixels, increasing down. Equal scale on both axes.
(0, 0); (320, 0); (320, 320); (0, 320); (0, 0)
(0, 40); (320, 40); (320, 280); (0, 280); (0, 40)
(80, 88); (160, 88); (160, 168); (80, 168)
Padding: (160, 305)
Crop an oriented 640×480 source at (100,60), retaining 400×300 pixels. Resize to 320×240, then pad 40 pixels above and below. The source box (200,120,300,220) becomes (80,88,160,168). Store actual resized dimensions because rounding affects scale. Inversion recovers retained coordinates, not cropped or clamped extent.
Images and masks share geometric decisions but need different numerical treatment. Interpolating categorical labels can invent invalid category values; nearest-neighbor resampling selects existing labels. It can still erase thin regions during downsampling. Keep image identity and transformation history with predictions, following Evidence spans and coordinate mappings, so displayed regions remain tied to the correct source.
Spatial features and visual encoders
An encoder maps pixels to a representation used by later computations; Representations and the distinctions they preserve explains that prerequisite. A convolutional filter computes weighted sums over local neighborhoods and input channels. Reusing its weights across positions creates a feature map. Each output channel records a different learned response, potentially useful for edges, textures or more complex patterns.
Stride is the spacing between filter placements. Pooling summarizes neighborhoods, often by their maximum. A receptive field is the input region that can influence one output. For example, a 3×3 stride-one convolution followed by 2×2 stride-two pooling grows theoretical support from 3×3 to 4×4 while spacing outputs two input pixels apart. Learned weights ordinarily remain fixed during inference.
Spatial grids and pooled vectors
Aggregation changes how location remains accessible.
Read the diagram as text
- Pixel array.
- Convolutional grid.
- Patch embeddings.
- Contextual patch representations.
- Pooled image vector.
- Spatial task readout.
- Pixel array → Convolutional grid: Local filtering.
- Pixel array → Patch embeddings: Patch projection.
- Patch embeddings → Contextual patch representations: Positions and attention.
- Convolutional grid → Pooled image vector: Aggregate locations.
- Contextual patch representations → Pooled image vector: Aggregate locations.
- Convolutional grid → Spatial task readout: Retain grid indexing.
- Contextual patch representations → Spatial task readout: Retain patch indexing.
Coarse context reaches a finer grid
A pyramid output combines distinct information paths.
Read the diagram as text
- C4: backbone stride 16.
- C5: backbone stride 32.
- Lateral C4 projection.
- Coarse projected map.
- Combined fine map.
- P4: new stride-16 features.
- C4: backbone stride 16 → C5: backbone stride 32: Backbone processing.
- C4: backbone stride 16 → Lateral C4 projection: 1×1 projection.
- C5: backbone stride 32 → Coarse projected map: 1×1 projection.
- Lateral C4 projection → Combined fine map: Add lateral features.
- Coarse projected map → Combined fine map: Upsample ×2 and add.
- Combined fine map → P4: new stride-16 features: 3×3 convolution.
A Vision Transformer divides an image into patches, flattens each patch and projects it into a vector called a patch token. Positional information preserves where patches came from. Attention mixes their representations; its general mechanism belongs in Queries, keys, values and information mixing. The patch, its embedding and later contextual representation are distinct objects.
Equivariance means transforming an input transforms its output correspondingly; invariance means the output stays unchanged. Shared convolution supports translation equivariance under compatible shifts and boundaries. Striding breaks arbitrary one-pixel guarantees. Global pooling aggregates a spatial grid into a vector, removing explicit position indexing. Recognition can benefit from position tolerance while localization needs position to remain accessible.
A feature pyramid combines coarse context with finer spatial features. In FPN, lateral projections of backbone maps are added to upsampled coarser maps, then filtered to form new prediction features. The resulting P-levels are newly combined representations, not renamed backbone outputs. Upsampling alone cannot recover discarded detail; the lateral path supplies retained local information.
Recognition and category vocabularies
A task head converts features into task outputs. For classification, logits are unnormalized category scores. Softmax converts them into a distribution over mutually exclusive labels. During supervised fitting, cross-entropy penalizes low probability for the reference class. Fixed-parameter inference needs preprocessing and the forward computation, without parameter updates.
| Contract | Output meaning | Workbench interpretation |
|---|---|---|
| One exclusive label | Scores allocate probability across alternatives. | Normal versus defective, under a defined image-label policy. |
| Several simultaneous labels | Separate sigmoid outputs permit several positive labels; they need not sum to one. | Scratch and contamination can both be present. |
Separate binary losses do not imply that real-world labels are statistically independent. Neither output contract supplies an inventory of instance locations: “scratch present” leaves “scratch on part A” unresolved.
Closed-set recognition chooses among known categories, even when none describes the input. Open-set recognition permits rejecting unknown categories. A low-confidence rejection rule is not a reliable universal unknown detector: unfamiliar inputs can receive high scores.
Calibration concerns whether comparable predictions assigned probability p are correct roughly fraction p of the time. It differs from ranking, accuracy and agreement between annotators. A confident label is not individual proof; Probability calibration and selective automation explains how confidence becomes testable evidence.
Object candidates and bounding boxes
A detector returns category, box and score records. Box regression predicts position and extent. Proposal-based detection first generates candidate rectangles. Original Faster R-CNN uses anchors—reference rectangles at different scales and aspect ratios—and predicts objectness and box adjustments from shared features. Proposals are intermediate candidates, not final category-specific detections.
Dense detection instead predicts from many spatial locations. Original YOLO assigns responsibility to the grid cell containing an object's center, with a fixed number of box predictions per cell. Its score conventions combine object presence, predicted overlap and category information. These historical details do not describe every later model using the name; small-object localization remains a task to test.
Suppression can remove a real neighbor
ExampleGeometric overlap is not object identity.
Reference objects
Crowded workbench variation.
Scroll sideways if the figure extends beyond the screen.
- 1. Reference A
- 2. Reference B
Read coordinates and regions as data
X: 180–400 pixels; Y: 60–280 pixels, increasing down. Equal scale on both axes.
(200, 120); (300, 120); (300, 220); (200, 220); (200, 120)
(260, 120); (360, 120); (360, 220); (260, 220); (260, 120)
Scored candidates
D2 duplicates A; D3 covers the distinct neighboring B.
Scroll sideways if the figure extends beyond the screen.
- 1. D1: 0.9
- 2. D2: 0.8
- 3. D3: 0.7
Read coordinates and regions as data
X: 180–400 pixels; Y: 60–280 pixels, increasing down. Equal scale on both axes.
(200, 120); (300, 120); (300, 220); (200, 220); (200, 120)
(210, 120); (310, 120); (310, 220); (210, 220); (210, 120)
(260, 120); (360, 120); (360, 220); (260, 220); (260, 120)
Set prediction uses a fixed collection of outputs that can represent objects or no object. Original DETR trains with Hungarian matching: a minimum-total-cost one-to-one assignment between predictions and labeled objects. Matched outputs receive category and box losses; unmatched outputs learn no object. This coordinates supervision without an inference-time duplicate-removal stage, but does not guarantee correct or duplicate-free predictions.
Non-maximum suppression, or NMS, retains high-scoring candidates and removes lower-scoring boxes whose IoU exceeds a threshold. It compares predictions with predictions, not references. Separate classes when required; equal-score choices can vary by implementation. Overlap does not establish identity, so suppression can remove a real neighboring object.
Masks and object boundaries
A mask represents region membership at image locations. Semantic segmentation assigns categories to pixels; instance segmentation separates individual objects of the same category. Per-location scores retain uncertainty that selecting one hard label discards. A box encloses an extent but does not specify which enclosed pixels belong to the object.
Panoptic segmentation combines countable objects, called things, with regions such as sky, called stuff. Each pixel receives one category and, for things, an instance identifier. Segments do not overlap; void can mark unspecified pixels. These identifiers distinguish objects in one annotation, not persistent identities across video. The format describes visible regions rather than hidden completion.
Retained features support localization
The expanding path receives context and aligned fine features.
Read the diagram as text
- Fine contracting features.
- Coarse context features.
- Expanded coarse features.
- Cropped fine features.
- Concatenated features.
- Interior pixel logits.
- Fine contracting features → Coarse context features: Pool and convolve.
- Coarse context features → Expanded coarse features: Upsample and up-convolve.
- Fine contracting features → Cropped fine features: Crop for alignment.
- Cropped fine features → Concatenated features: Concatenate channels.
- Expanded coarse features → Concatenated features: Concatenate channels.
- Concatenated features → Interior pixel logits: Convolve and project.
Encoder-decoder segmentation compresses spatial information to gather context, then expands it for dense prediction. Original U-Net concatenates cropped fine-resolution features with expanding-path features. Cropping aligns maps because unpadded convolutions shrink them. A final projection produces per-pixel class logits; weighted cross-entropy supervises the map. Its output covers an interior region, rather than automatically preserving input dimensions.
Promptable segmentation lets a point, box or mask indicate a requested region. Original SAM combines a reusable image embedding, prompt encoding and mask decoder. A point can ambiguously indicate an object or a part, so multiple candidate masks may be returned. Their estimated overlap scores are predictions, not overlap measured against an available reference.
Fine boundaries require direct inspection. The portrait-segmentation example in Magic Editor describes missing hair strands that became obvious when a mask drove blur. Similarly, a plausible part mask can miss a narrow scratch or merge touching parts. Postprocessing may help, but its final measurement needs evaluation rather than visual plausibility alone.
Grounded references and spatial relationships
A vision-language system uses images and language together; alignment and fusion belong in Multimodal Models and Applications. For grounding, appearance, location and neighboring-object relationships help distinguish candidates. Store the selected region with source identity and coordinate convention. Localization establishes where the model points; verifying “scratched” requires checking the indicated surface.
Class names also need domain meaning. A volleyball “block” is an action; a cable defect named “thunderbolt” is not a lightning bolt. Descriptions can specify the intended appearance, but linguistic clarity does not establish that a model can perceive it.
Spatial claims require a reference frame and an operational definition. In an image, “left of” can compare horizontal box centers; containment can compare region membership. Neither box overlap nor pixel adjacency proves physical contact. Counting visible instances establishes a visible count, not the number hidden behind other surfaces.
Camera calibration relates image coordinates to viewing rays using lens and camera-pose parameters. A ray still does not specify a unique depth. Physical size and distance therefore need additional scale or geometric evidence; another calibrated view helps only when the same scene point can be matched. Image-relative coordinates alone are not metric measurements.
Visual supervision and annotation meaning
Training fits parameters against targets; inference applies fitted parameters, as explained in Training, fitted state, and inference. An image label supervises a category decision. It does not specify a defect's boundary. Box targets constrain location and extent; pixel targets constrain a dense map. Choosing target granularity determines what correctness the fitting objective can directly reward.
Amodal annotation estimates full object extent, including hidden portions. Visible-region annotation marks only observed portions. Both can label identical pixels differently; an inferred hidden boundary remains an interpretation.
Background means a defined non-target region. Void or ignored regions instead indicate that the annotation does not supply an ordinary evaluated target there. Do not silently turn uncertain boundaries into background. General disagreement handling belongs in Annotation, disagreement and correction.
Perception labels and policy decisions must remain separate. In one headphone-review workflow, hearing aids counted as a positive visual signal under the detector's convention but did not warrant a violation. A single rejection button mixed those judgments and could turn a permitted case into incorrect detector feedback. Other tasks may define the visual class differently.
Visual pretraining and valid transformations
Pretraining learns reusable features before task-specific adaptation. Self-supervised learning derives targets from the images themselves. Related-view training creates two augmented versions of an image and rewards their association against competing examples. SimCLR places a projection head after the encoder for this objective, then discards that head when using encoder representations downstream. Contrastive learning explains the general comparison mechanism.
Masked reconstruction provides a different target. MAE hides patches and sends only visible patch embeddings with positions through its encoder. A decoder combines encoded visible patches with mask tokens and predicts missing pixels. Loss is evaluated on masked locations; the decoder is later discarded. Reconstructing plausible content is a training signal, not proof that the actual hidden content is recoverable.
Related views supply supervision
The positive relationship comes from shared image origin.
Read the diagram as text
- Source image.
- Augmented view A.
- Augmented view B.
- Encoder representation A.
- Encoder representation B.
- Contrastive objective.
- Source image → Augmented view A: Independent augmentation.
- Source image → Augmented view B: Independent augmentation.
- Augmented view A → Encoder representation A: Shared encoder.
- Augmented view B → Encoder representation B: Shared encoder.
- Encoder representation A → Contrastive objective: Project for comparison.
- Encoder representation B → Contrastive objective: Project for comparison.
Hidden pixels are targets, not inputs
The encoder never receives the masked pixel content.
Read the diagram as text
- Source image.
- Visible patches with positions.
- Encoded visible patches.
- Mask tokens with positions.
- Decoder pixel predictions.
- Hidden source pixels.
- Masked-location loss.
- Source image → Visible patches with positions: Retain visible subset.
- Source image → Hidden source pixels: Reserve target pixels.
- Visible patches with positions → Encoded visible patches: Encode.
- Encoded visible patches → Decoder pixel predictions: Decode visible representations.
- Mask tokens with positions → Decoder pixel predictions: Supply missing positions.
- Decoder pixel predictions → Masked-location loss: Predicted pixels.
- Hidden source pixels → Masked-location loss: Reference pixels.
Augmentation deliberately transforms training examples. Label invariance assumes : transforming image x with T preserves target y. Spatial targets often require , where transforms the target too. A crop may remove the scratch; a flip may reverse left-of. Neither operation is automatically valid merely because it is common in classification.
Image-text pretraining rewards matching images and descriptions. CLIP learns separate encoders whose similarities distinguish paired examples from mismatches. At inference, candidate label descriptions can be compared with an image without fitting a new category head. This enables text-conditioned recognition, but similarity is not a calibrated truth probability and matching captions does not guarantee exact spatial perception.
The distinctions rewarded by supervision matter. Captions can describe oppositely oriented objects identically, weakening the incentive to preserve orientation. In a drawing game, visible words matching the requested scene also raised CLIP scores, creating a shortcut around drawing it. These examples motivate tests of the intended visual relationship rather than reliance on semantic similarity alone.
Richer annotations can amplify errors. Moondream's caption-expansion example turned an uncertain tiny object into a confidently described person and added unsupported detail. More descriptive training text is useful only when its added claims remain tied to visual evidence.
Task adaptation and frozen-feature baselines
Adaptation should address a diagnosed mismatch. A narrow image-understanding contract can be more useful than broad reasoning ability: extracting a mathematical expression and solving it require different capabilities. Prompted extraction can reduce integration effort, but convenience does not establish superiority over a dedicated detector.
| Route | What changes | Evidence required |
|---|---|---|
| Existing or zero-shot model | Inputs and supported label descriptions; no task-specific labeled fitting. | Relevant pretraining exposure is still possible; test the target population. |
| Region prompting | Points or boxes select an input interpretation; parameters remain fixed. | Validate candidate masks and boundaries. A prompt does not train a new category. |
| Linear probe | Fit a linear task head over frozen encoder features. | Task labels test whether the retained features support that readout. |
| Partial or full fine-tuning | Update selected components or the whole learned model. | Use task-appropriate labels and assess both intended-domain gains and transfer losses. |
Fine-tuning can improve in-distribution accuracy while worsening performance under distribution shift relative to frozen-feature probing. That observed possibility makes updating the encoder a testable intervention, not an automatic upgrade. Compare routes on protected cases with matched preprocessing and label meaning.
A reported ten-example-per-class detector comparison motivates collecting a small labeled baseline before accepting zero-shot performance. Its incomplete training specification prevents a universal ranking. Record label granularity, resolution and fitted components so a comparison identifies what actually changed.
Occlusion and unresolved visual evidence
Occlusion occurs when one surface hides another from view. Missing evidence also arises through cropping, blur and insufficient sampling. These differ from misinterpreting a clearly visible feature. Multiple underlying scenes can agree with the observed pixels, so a missing detection does not establish absence.
Another view can resolve ambiguity only if it supplies usable observations of the relevant surface. Occlusion, reflection and weak texture can still prevent correspondence. A reviewer can resolve an interpretation dispute when evidence is inspectable; neither human review nor a larger model guarantees recovery of a hidden fact.
One observation permits two completions
ExampleVisible extent does not determine hidden extent.
Observed
Only the orange fragment is visible beside the occluder.
Scroll sideways if the figure extends beyond the screen.
- 1. Visible part fragment
- 2. Occluding surface
Read coordinates and regions as data
X: 180–420 pixels; Y: 60–300 pixels, increasing down. Equal scale on both axes.
(200, 120); (250, 120); (250, 220); (200, 220)
(250, 100); (400, 100); (400, 240); (250, 240)
Possible completion A
The inferred boundary ends at x=300 behind the occluder.
Scroll sideways if the figure extends beyond the screen.
- 1. Visible part fragment
- 2. Occluding surface
- 3. Inferred hidden boundary
Read coordinates and regions as data
X: 180–420 pixels; Y: 60–300 pixels, increasing down. Equal scale on both axes.
(200, 120); (250, 120); (250, 220); (200, 220)
(250, 100); (400, 100); (400, 240); (250, 240)
(250, 120); (300, 120); (300, 220); (250, 220)
Possible completion B
The inferred boundary extends to x=380; visible evidence stays unchanged.
Scroll sideways if the figure extends beyond the screen.
- 1. Visible part fragment
- 2. Occluding surface
- 3. Inferred hidden boundary
Read coordinates and regions as data
X: 180–420 pixels; Y: 60–300 pixels, increasing down. Equal scale on both axes.
(200, 120); (250, 120); (250, 220); (200, 220)
(250, 100); (400, 100); (400, 240); (250, 240)
(250, 120); (380, 120); (380, 220); (250, 220)
Keep unresolved outcomes explicit. In a narrated product-image evaluation, neither source nor edited image established the stated wonton quantity, so the candidate was rejected. This illustrates a bounded rule: when a required fact cannot be verified, uncertainty must not silently become approval.
Capture changes and visual shortcuts
Distribution shift changes input or outcome patterns; Distribution shift and prediction coverage supplies the general definition. Visual changes include illumination, viewpoint, sensor response and background. JPEG compression can additionally damage fine detail through lossy encoding. A revised defect definition changes the target itself, rather than merely changing the observation.
Shortcut learning exploits an available correlation instead of the intended evidence. A defect classifier might learn a workbench background associated with rejected parts. Controlled background research keeps foregrounds while replacing backgrounds; comparing class-consistent and randomized replacements helps distinguish background signal from compositing artifacts. This is a useful test design, not measured factory performance.
| Change | Interpretation | Required distinction |
|---|---|---|
| Lighting changes; defect remains | Potential capture robustness test. | Verify that the evidence and target remain meaningful. |
| Scratch is added or removed | The intended answer may change. | Do not demand invariance to a changed target. |
| An unfamiliar part appears | The category vocabulary may be inadequate. | Unknown rejection differs from handling low-quality observations. |
Calibration can deteriorate under shift, including when temperature scaling worked on nearby validation data. A high confidence or an absence of alerts therefore does not certify continued correctness. Evaluate actual errors in changed conditions rather than treating uncertainty estimates as a substitute.
Visible text can alter CLIP's classification through a semantic shortcut. Multimodal instruction injection is different: attacker-controlled media influences generated responses or subsequent dialogue. Neither mechanism grants application authority. Treat inspected content as data; Prompt injection and instruction authority explains the control boundary.
Evaluation populations and capture boundaries
Evaluation claims need a population: familiar objects under new captures, unseen objects, new cameras or new sites. Coverage and independent assessment separates that claim from the sample. Group related captures before splitting; randomly assigning files can place nearly identical evidence on both sides. Object, session and site boundaries answer different generalization questions.
Group separation does not guarantee representative coverage. Include negative images, small defects, clutter, difficult lighting and consequential rare cases. Record uncertain labels rather than silently excluding them. RF100-VL illustrates varied viewpoints and imaging domains, but curated diversity is not a demonstrated random sample of a deployment.
Split independent groups, not files
ExampleRelated captures stay on one side of each boundary.
Read the diagram as text
- Object A: all captures.
- Object B: all captures.
- Object C: all captures.
- Fitting.
- Development.
- Protected assessment.
- Object A: all captures → Fitting: Assign entire group.
- Object B: all captures → Development: Assign entire group.
- Object C: all captures → Protected assessment: Assign entire group.
Class imbalance means some labels occur much more often than others. Training resampling changes which examples are encountered; loss weighting changes their optimization contribution. Either may help rare classes, but neither justifies balancing away deployment frequencies in evaluation. Overall accuracy can hide poor rare-defect detection.
Keep adaptation and threshold selection separate from final assessment, following Independent data boundaries. A protected test is informative only for the deployment conditions it represents. Preserve source identities, capture conditions, preprocessing versions and labeling policies so changes in measured performance can be interpreted.
Recognition and detection measurements
Define the counting unit before calculating a score. With “defective image” positive, a true positive is a correctly flagged defective image; a false positive flags a normal image; a false negative misses a defective image. Precision is TP/(TP+FP), and recall is TP/(TP+FN). Metrics, denominators and proxy failures explains why the same words can describe different units.
Detection evaluation first matches predictions to references using class and overlap rules. Ordinary references match once; duplicates become false positives. This differs from NMS between predictions and DETR assignment during training. The constructed list below has three reference parts, an IoU threshold of 0.5 and no ignored or crowd regions.
| Ranked prediction | Result | Cumulative precision | Cumulative recall |
|---|---|---|---|
| 0.9: matches A | TP | 1 | 1/3 |
| 0.8: duplicates A | FP | 1/2 | 1/3 |
| 0.7: matches B | TP | 2/3 | 2/3 |
| 0.6: wrong-class background box | FP; C remains missed | 1/2 | 2/3 |
Average precision summarizes interpolated precision across recall levels. Main COCO AP averages over classes and ten IoU thresholds, 0.50–0.95, using 101 recall levels and a 100-detection cap. AP50 is different. Filtering low scores beforehand can truncate recall; a pooled precision trace is not class-averaged AP.
Region overlap and boundary quality
Equal overlap, different omissions
ExampleAggregate agreement hides which region was missed.
Thin component missed
The thin reference component has no predicted pixels.
Scroll sideways if the figure extends beyond the screen.
- 1. Predicted main region
- 2. Reference main region
- 3. Reference thin region
Read coordinates and regions as data
X: 0–20 pixels; Y: 0–16 pixels, increasing down. Equal scale on both axes.
(2, 2); (12, 2); (12, 12); (2, 12)
(2, 2); (12, 2); (12, 12); (2, 12); (2, 2)
(16, 2); (17, 2); (17, 12); (16, 12); (16, 2)
Main-region edge missed
The thin component remains; the main region loses its left strip.
Scroll sideways if the figure extends beyond the screen.
- 1. Predicted main region
- 2. Predicted thin region
- 3. Reference main region
- 4. Reference thin region
Read coordinates and regions as data
X: 0–20 pixels; Y: 0–16 pixels, increasing down. Equal scale on both axes.
(3, 2); (12, 2); (12, 12); (3, 12)
(16, 2); (17, 2); (17, 12); (16, 12)
(2, 2); (12, 2); (12, 12); (2, 12); (2, 2)
(16, 2); (17, 2); (17, 12); (16, 12); (16, 2)
The illustrated reference contains a 100-pixel region and a separate 10-pixel thin region. Both predictions retain 100 pixels with no extras: IoU is 100/110 ≈ 0.909 and Dice is 200/210 ≈ 0.952. One misses the entire thin region; the other misses an edge strip. Equal overlap scores can conceal different inspection consequences.
Averaging rules matter. Cityscapes accumulates a dataset confusion matrix before computing class IoUs, excludes ignored-reference contributions as specified, and omits undefined zero-union classes from its mean. Predicting an ignored category at a valid reference pixel still misses that reference category. Averaging per-image IoUs or replacing undefined classes with zero changes the result.
Boundary IoU compares interior bands near reference and predicted contours. Band width controls sensitivity. Dilation, erosion and displacement fixtures expose boundary errors, but a boundary-only score can underweight distant interior errors. Evaluate the required region and contour properties together; neither establishes physical defect dimensions without a measurement model.
Evidence for grounded and spatial claims
Object recognition can succeed while relationships fail. Winoground pairs two images with captions containing the same words in different orders. Text scoring checks both caption choices; image scoring checks both image choices; group scoring requires all comparisons. This probes compositional matching, not region localization or every form of spatial reasoning.
| Controlled change | Expected judgment |
|---|---|
| Swap part positions | The left-of target changes; object categories remain. |
| Move the scratch to the other part | Property attribution changes independently of region identity. |
| Add a visible part | Visible-instance count increases; check each localized instance. |
| Remove the requested target | No valid referring region remains; a forced selection fails. |
Positions change the correct referent
ExampleRecognizing both parts cannot determine the relation.
A is left of the fixture
A's center lies left of the fixture center.
Scroll sideways if the figure extends beyond the screen.
- 1. Part A
- 2. Part B
- 3. Blue fixture
- 4. Scratch on A
- 5. Selected part to fixture
Read coordinates and regions as data
X: 0–640 pixels; Y: 0–480 pixels, increasing down. Equal scale on both axes.
(200, 120); (300, 120); (300, 220); (200, 220)
(350, 120); (450, 120); (450, 220); (350, 220)
(310, 150); (340, 150); (340, 190); (310, 190)
(240, 140); (244, 140); (244, 200); (240, 200)
(250, 270); (325, 270)
A: (250, 100)
B: (400, 100)
B is left of the fixture
Positions swapped.
Scroll sideways if the figure extends beyond the screen.
- 1. Part A
- 2. Part B
- 3. Blue fixture
- 4. Scratch on A
- 5. Selected part to fixture
Read coordinates and regions as data
X: 0–640 pixels; Y: 0–480 pixels, increasing down. Equal scale on both axes.
(350, 120); (450, 120); (450, 220); (350, 220)
(200, 120); (300, 120); (300, 220); (200, 220)
(310, 150); (340, 150); (340, 190); (310, 190)
(390, 140); (394, 140); (394, 200); (390, 200)
(250, 270); (325, 270)
A: (400, 100)
B: (250, 100)
Score region selection, attributed properties, relations and answerability separately before accepting the complete claim. Explicit judgment criteria must resolve ambiguous cases. A fluent explanation is insufficient: narrated orientation failures included invented supporting details. Removing the image or consulting another model can be a diagnostic control, but neither alone establishes grounded reasoning.
| Experiment | What changed | Supported interpretation |
|---|---|---|
| LLaVA resolution comparison | Resolution and vision-encoder checkpoint changed together. | Configuration-specific benchmark differences cannot isolate resolution alone. |
| Visual-token scaling | Trained configurations used different token budgets and compression. | Task-dependent tradeoffs; text-recognition tasks were especially sensitive. This was not one unchanged full checkpoint. |
| Training-free PruMerge | Weights stayed fixed; token selection and merging changed representations. | A closer control, but token count alone does not specify the intervention. Equal-budget selection methods differed. |
Operating decisions and reassessment
Usefulness requires comparison with an existing or simpler process under intended acquisition conditions. Measure missed defects per inspected part, erroneous rejections, review fraction and total processing time. Define acceptable limits before comparison. MVTec supplies inspection-like prediction tasks, not evidence that this workbench workflow reduces losses or labor.
Selective prediction accepts some outputs and withholds others. Coverage is the accepted fraction; selective risk is error among accepted cases. Threshold changes alter that subset, so assess both quantities on representative labeled data. Zero coverage leaves conditional risk undefined. Probability calibration and selective automation explains the statistical requirements; confidence alone neither controls risk nor authorizes rejection.
| Observed failure | Consequence | Bounded response |
|---|---|---|
| Correct model box, displaced source overlay | Review examines the wrong region. | Repair and test the coordinate transformation independently of model quality. |
| Required quantity is not visible | The image cannot support approval. | Keep the result unresolved or obtain another observation. |
| Unnecessary enhancement | Compute is spent and acceptable imagery may degrade. | Evaluate routing errors separately from the subsequent transformation. |
| New-camera confidence remains high while errors rise | Previously selected thresholds no longer justify acceptance. | Reassess errors and coverage in the changed conditions. |
A useful regional input must preserve both the defect and enough context to assign it to a part. If tight crops reveal scratches but remove containing boundaries, more confident classification does not resolve ownership. Compare context-preserving crops before shifting ambiguous cases into automatic rejection. Measure resulting misses, false rejections and review demand together.
Validate the complete path: decoding, orientation, preprocessing, coordinate mapping, displayed evidence and policy handling. Bind conclusions to camera, model, transform, label and threshold versions. Maintain regression cases that reflect real use. Capture changes, changed target definitions or consequential new failures require reassessment; there is no universal camera-change acceptance threshold.
Protected development comparisons justify advancing a candidate for independent assessment, not claiming operational improvement. Live evidence and causal improvement covers that next claim; Evaluation records and reassessment explains how conclusions remain attached to their conditions. Tables suffice here because the decision depends on evidence and consequences, rather than a universal processing sequence.
Open questions
Isolating resolution from representation changes remains difficult. Encoder checkpoints, connectors, token-selection methods and training often change together. Progress would hold learned weights fixed where possible, specify the intervention and separately report text recognition, counting and spatial relations, including failures rather than only aggregate averages.
A unified grounding evaluation must separate correct regions, true attributes, valid relations and absent targets. Matching benchmarks cover only parts of this obligation, while ambiguous descriptions complicate reference judgments. Progress would provide independently adjudicated cases and separate scores before reporting complete-claim correctness.
Recapture policies must improve available evidence without creating excessive repeat work. Another view can remain occluded or difficult to match, and an uncertainty score does not identify which observation would resolve a fact. Progress would measure resolved claims, remaining errors and recapture burden under defined capture failures.
Camera-change reassessment needs task-specific evidence rather than universal thresholds. Changes can affect defect visibility, calibration and review demand differently. Progress would compare configurations on new object/session groups and demonstrate acceptable per-part misses, false rejections and review load before expanding use.




























































































































































