← Project overview

Industrial Visual Anomaly Detection · Localization

Inspection examples and localization behavior

The scalar metrics matter, but localization quality is easiest to understand by looking at actual anomaly maps. This page combines the defense inspection gallery with the PatchCore reference-memory analysis and qualitative results.

Interactive inspection gallery: all 15 categories

These are the curated PatchCore outputs used by the defense demo. Select a category to inspect two real evaluated examples. The images are precomputed results, not browser-side model inference.

1 · SourceInput component image.
2 · Ground truthDataset defect mask.
3 · EvidenceContinuous anomaly response.
4 · DecisionThresholded predicted region.
PatchCore four-panel result for Bottle, Broken Large
Bottle · Broken large. Evaluated PatchCore result.
PatchCore four-panel result for Bottle, Broken Small
Bottle · Broken small. Evaluated PatchCore result.

Source imagery: MVTec AD. The project records the dataset under CC BY-NC-SA 4.0; these derived evaluation panels are shown here for educational/project documentation with attribution. MVTec AD dataset · project data-license note.

PatchCore reference-memory approach

PatchCore builds a compact memory of normal local image features and scores test patches by their distance from that reference.

Simplified conceptual diagram showing normal images passing through a frozen pretrained ResNet-18 into patch embeddings, coreset selection, and a compact memory bank; inference compares new patch embeddings to that memory and applies an optional threshold to PatchCore scores
Reference-memory path. A frozen pretrained ResNet-18 produces patch embeddings, coreset selection reduces the normal reference, and test patches are scored by distance to that memory before thresholding.

Qualitative localization results

These evaluated outputs span four MVTec AD categories; each shows the input, ground-truth mask, continuous anomaly-map overlay, and thresholded prediction.

PatchCore four-panel result for a bottle with a large broken rim
Bottle · broken large. The anomaly response follows the damaged rim, with some spill around the circular boundary.
PatchCore four-panel result for a cable with a bent wire
Cable · bent wire. The strongest response is concentrated on the displaced copper strands, with a smaller secondary response elsewhere.
PatchCore four-panel result for a carpet color defect
Carpet · color defect. A compact high-score region aligns with the discolored patch against the repetitive textile background.
PatchCore four-panel result for a cracked hazelnut
Hazelnut · crack. The response covers the opened shell and the thresholded contour tracks the dominant damaged region.

Selected from regenerated PatchCore outputs used in the project evaluation. Open any result for a full-size view.

Evaluation choices

Given the extreme pixel imbalance, localization reporting uses AUPIMO rather than relying on pixel AUROC alone, while image-level evaluation uses F1 and precision-recall behavior with threshold sensitivity treated explicitly.

Defect prevalence also varies sharply by category: anomalous-pixel ratios range from roughly 0.34% for screw to 14.5% for metal nut. That heterogeneity is reflected in both threshold behavior and localization difficulty.

Spatial distribution analysis from the project report
Spatial structure. Defect location and morphology vary by category, creating a risk of positional shortcuts.
Threshold sensitivity analysis from the project report
Threshold sensitivity. Precision and recall vary materially with the operating threshold.

Evaluated PatchCore baseline

0.929mean image-level F1
0.988mean image-level PR-AUC
0.603mean pixel-level AUPIMO

Across the completed 15-category baseline, AUPIMO reached 0.982 for bottle and 0.972 for leather, while zipper fell to 0.251. Screw was the hardest image-level category at F1 0.796.