AnomalyDINO: Boosting Patch-based Few-shot Anomaly Detection with DINOv2
About
Recent advances in multimodal foundation models have set new standards in few-shot anomaly detection. This paper explores whether high-quality visual features alone are sufficient to rival existing state-of-the-art vision-language models. We affirm this by adapting DINOv2 for one-shot and few-shot anomaly detection, with a focus on industrial applications. We show that this approach does not only rival existing techniques but can even outmatch them in many settings. Our proposed vision-only approach, AnomalyDINO, follows the well-established patch-level deep nearest neighbor paradigm, and enables both image-level anomaly prediction and pixel-level anomaly segmentation. The approach is methodologically simple and training-free and, thus, does not require any additional data for fine-tuning or meta-learning. The approach is methodologically simple and training-free and, thus, does not require any additional data for fine-tuning or meta-learning. Despite its simplicity, AnomalyDINO achieves state-of-the-art results in one- and few-shot anomaly detection (e.g., pushing the one-shot performance on MVTec-AD from an AUROC of 93.1% to 96.6%). The reduced overhead, coupled with its outstanding few-shot performance, makes AnomalyDINO a strong candidate for fast deployment, e.g., in industrial contexts.
Key insights
What problem does AnomalyDINO solve?
It tackles few-shot industrial anomaly detection—spotting defects using only one or a few normal reference images. The method stores DINOv2 patch features from normal samples in a memory bank, then flags test patches whose nearest-neighbor distance is high, enabling image-level scoring and pixel-level segmentation without training.
How does it differ from prior work?
Unlike vision-language methods needing prompt engineering or meta-training, AnomalyDINO is training-free and vision-only. On MVTec-AD one-shot detection, it raises AUROC from 93.1% (WinCLIP+) to 96.6%, evaluated across 15 MVTec-AD and 12 VisA categories at 1–16 shots.
What is it useful for in practice?
The paper positions AnomalyDINO as a candidate for fast industrial deployment due to simplicity and low latency—roughly 60ms per image at 448px on an NVIDIA A40. No actual production deployment is documented; usefulness is demonstrated through benchmark results on MVTec-AD and VisA only.
What limitations do the authors note?
The method detects only low-level sensory anomalies, not semantic ones (e.g., 'Cable Swap' yields 50.2% AUROC). Performance depends heavily on reference sample quality in the few-shot regime, and DINOv2's PCA-based masking can fail for certain objects. The authors plan to improve batched zero-shot performance and explore better masking.