All AD Workbench algorithms produce the same outputs: a per-pixel anomaly heatmap and one score for the image. The decision is score ≥ Threshold → NG. They differ in what they use to extract features and how they measure anomaly. That difference sets the data volume they need, their speed and the defect types they handle best.
Two Training Approaches
A. Statistics / feature collection (1-pass) — PaDiM, PatchCore, SPADE, AnomalyDINO, WinCLIP, HoleMetric, two Tiled variants
These scan the normal images once, collecting features or computing mean and covariance. There is no backpropagation, so there are no epochs. Training takes a few seconds to a few minutes. They store the collected features, so the model file can be large.
B. Gradient descent training — EfficientAD, FastFlow (20 epochs), Dinomaly2 (5,000 iterations)
These actually train network weights, so they take longer. In return, inference is fast and the model file is small. They are candidates when the line takt time is tight.
The 11 at a Glance
| Algorithm | Feature extraction | Anomaly measure | Main strength |
|---|---|---|---|
| PaDiM | WideResNet50-2 | Mahalanobis distance to a per-position Gaussian | Fixed-position targets, sharp defect location |
| PatchCore | WideResNet50-2 | k-nearest distance to a memory bank | Top-tier precision (recommended default) |
| SPADE | WideResNet50-2 | Per-position minimum distance to K similar normal images | Simple, fast setup with small data |
| WinCLIP | CLIP ViT-B-16+ | Similarity to "normal/defective" text | Try immediately with almost no normal images |
| EfficientAD | Lightweight dedicated network | Teacher–Student mismatch + reconstruction error | Very fast inference |
| FastFlow | WideResNet50-2 | Probability density of a normalizing flow | Small model, fast inference |
| AnomalyDINO | DINOv2 ViT | Nearest cosine distance of patch tokens | Complex shapes, few-shot, position variation |
| Dinomaly2 | DINOv2 + decoder | Encoder–decoder feature difference | Merges several views into one model |
| HoleMetric | Classical vision | Pixel/cell statistics after alignment | Fine hole and cell shapes, CPU, 3 s training |
| AnomalyDINO Tiled | DINOv2 ViT-B/14 | Per-tile banks at native resolution | Fine defects at high resolution, foreign material, cracks |
| PatchCore Tiled | WideResNet50-2 | Per-tile coreset banks | 20+ normal images, fine surface defects |
What Foundation Models Changed
WinCLIP, AnomalyDINO and Dinomaly2 use the features of general-purpose vision models pretrained on more than 100 million images (CLIP, DINOv2). These models already represent object structure well. Even with only a few normal images, they extract features that separate normal from anomalous. WinCLIP uses CLIP, which learned images and text together. Even with zero normal images, it tries to judge by similarity to the text "part without flaws" and "scratched part" (zero-shot). It is useful for judging whether inspection is feasible before you collect data.
Fine Defects at High Resolution: Tiling
Most models shrink the image to around 512 pixels. If you shrink a 2048-pixel original to a quarter, a 4-pixel-diameter blocked hole becomes 1 pixel and disappears. The tiled approach first aligns the part. It then splits the image at native resolution into 518-pixel tiles (10% overlap) and builds a separate bank for each tile. One hole appears as a 4×4 patch in the original, so cell-level defects stay in the features.
HoleMetric uses alignment and statistics, with no deep learning. It measures brightness, dark ratio and deviation for each hole (cell). It explains which cell caused an NG in cell_report.csv. We recommend using it together with AnomalyDINO Tiled, which is strong on irregular anomalies (foreign material, cracks).
Selection Guide
| Situation | Recommended | Why |
|---|---|---|
| 0–10 normal images (feasibility check) | WinCLIP · AnomalyDINO | Try right away with zero/few-shot |
| 10–50 normal images | AnomalyDINO · SPADE · HoleMetric · Tiled | Training-free bank or statistics methods |
| 50–300 normal images | PatchCore · AnomalyDINO · PaDiM | Top-tier precision |
| 300+ normal images | PatchCore · Dinomaly2 | Dinomaly2 covers several views with one model |
| Fixed in a jig, always the same spot | PaDiM · PatchCore · HoleMetric | Position-specific reference matches exactly |
| Target moves or rotates slightly | AnomalyDINO | Relatively robust to position change |
| Complex shapes such as connectors and molded parts | AnomalyDINO · Dinomaly2 | Better at representing complex structure |
| Fine hole and pin shapes (2048px) | HoleMetric + AnomalyDINO Tiled | Cell-level measurement at native resolution |
| Tight inline takt time | EfficientAD · FastFlow | Fast inference, light model |
In the End, Decide by Experiment
The table above is only a starting point. For the same part, the ranking changes with lighting and defect type. In AD Workbench, check several candidate algorithms in Setup and press Auto Run. It runs all of them on the same training and evaluation data, so you can compare score distributions and heatmaps side by side. Model Evaluation and Field Operations covers the comparison criteria.