arXiv:2504.11895cs.CV2025-04被引 2

仅用1张正常图,就能精准检测异常,无需训练。

Search is All You Need for Few-shot Anomaly Detection

  • 用最近邻搜索代替复杂模型,简单高效。
  • 每类仅1张正常样本,图像级准确率超94%。
  • 适合样本稀缺的工业检测场景。

少样本异常检测(FSAD)在工业检测中至关重要,但需仅用少量正常图像建模正常分布。现有方法多依赖语言与视觉融合的多模态大模型,需复杂提示工程与手动调优。本文提出VisionAD,一种基于最近邻搜索的简洁框架,在单类与多类FSAD上均超越现有最优性能。其包含四个核心组件:(1)可扩展的视觉基础模型提取通用且区分性强的特征;(2)双重增强策略——支持端增强提升特征匹配适应性,查询端增强弥补单视图预测遗漏;(3)多层特征融合,以极低计算开销捕捉全局上下文与局部细节;(4)类别感知视觉记忆库,实现高效的一对多多类检测。在MVTec-AD、VisA和Real-IAD基准上评估显示,仅用1张正常图像作为支持,图像级AUROC分别达97.4%、94.8%和70.8%,显著优于当前最优方法(+1.6%、+3.2%、+1.4%)。该方法无须训练,少样本能力强,特别适用于样本稀少或获取成本高的真实场景。代码已开源。

原文摘要 · Abstract (English)

Few-shot anomaly detection (FSAD) has emerged as a crucial yet challenging task in industrial inspection, where normal distribution modeling must be accomplished with only a few normal images. While existing approaches typically employ multi-modal foundation models combining language and vision modalities for prompt-guided anomaly detection, these methods often demand sophisticated prompt engineering and extensive manual tuning. In this paper, we demonstrate that a straightforward nearest-neighbor search framework can surpass state-of-the-art performance in both single-class and multi-class FSAD scenarios. Our proposed method, VisionAD, consists of four simple yet essential components: (1) scalable vision foundation models that extract universal and discriminative features; (2) dual augmentation strategies - support augmentation to enhance feature matching adaptability and query augmentation to address the oversights of single-view prediction; (3) multi-layer feature integration that captures both low-frequency global context and high-frequency local details with minimal computational overhead; and (4) a class-aware visual memory bank enabling efficient one-for-all multi-class detection. Extensive evaluations across MVTec-AD, VisA, and Real-IAD benchmarks demonstrate VisionAD's exceptional performance. Using only 1 normal images as support, our method achieves remarkable image-level AUROC scores of 97.4%, 94.8%, and 70.8% respectively, outperforming current state-of-the-art approaches by significant margins (+1.6%, +3.2%, and +1.4%). The training-free nature and superior few-shot capabilities of VisionAD make it particularly appealing for real-world applications where samples are scarce or expensive to obtain. Code is available at https://github.com/Qiqigeww/VisionAD.

异常检测少样本最近邻工业检测

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。