用主成分分析建模正常图像特征子空间,零训练实现高精度异常检测。
SubspaceAD: Training-Free Few-Shot Anomaly Detection via Subspace Modeling
- 冻结DINOv2提取正常图像块特征,用PCA学习其低维子空间。
- 一shot设置下在MVTec-AD上图像/像素级AUROC达97.1%/97.5%。
- 无需训练、提示调优或内存库,适合工业缺陷检测场景。
工业视觉检测中的异常检测常面临每类仅少数正常样本的挑战。现有少样本方法虽表现优异,但多依赖记忆库、辅助数据集或视觉语言模型的多模态调优。本文质疑:在视觉基础模型的特征表示下,是否仍需如此复杂?为此提出SubspaceAD,一种零训练方法,分两步进行:首先用冻结的DINOv2骨干网络从少量正常图像中提取块级特征;其次对这些特征拟合主成分分析(PCA)模型,以估计正常变化的低维子空间。推理时通过该子空间的重构残差生成可解释且统计可靠的异常分数。尽管结构简单,SubspaceAD在单样本与少样本设置下均达到最先进性能,无需训练、提示调优或内存库。在单样本异常检测设置中,于MVTec-AD数据集上图像级和像素级AUROC分别达97.1%和97.5%,在VisA数据集上分别为93.2%和98.2%,超越现有最优结果。代码与演示见https://github.com/CLendering/SubspaceAD。
原文摘要 · Abstract (English)
Detecting visual anomalies in industrial inspection often requires training with only a few normal images per category. Recent few-shot methods achieve strong results employing foundation-model features, but typically rely on memory banks, auxiliary datasets, or multi-modal tuning of vision-language models. We therefore question whether such complexity is necessary given the feature representations of vision foundation models. To answer this question, we introduce SubspaceAD, a training-free method, that operates in two simple stages. First, patch-level features are extracted from a small set of normal images by a frozen DINOv2 backbone. Second, a Principal Component Analysis (PCA) model is fit to these features to estimate the low-dimensional subspace of normal variations. At inference, anomalies are detected via the reconstruction residual with respect to this subspace, producing interpretable and statistically grounded anomaly scores. Despite its simplicity, SubspaceAD achieves state-of-the-art performance across one-shot and few-shot settings without training, prompt tuning, or memory banks. In the one-shot anomaly detection setting, SubspaceAD achieves image-level and pixel-level AUROC of 97.1% and 97.5% on the MVTec-AD dataset, and 93.2% and 98.2% on the VisA dataset, respectively, surpassing prior state-of-the-art results. Code and demo are available at https://github.com/CLendering/SubspaceAD.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。