arXiv:2505.09926cs.CVcs.AI2025-05AAAI被引 46

无需微调,用简单适配器让CLIP跨域检测异常,效果领先。

AdaptCLIP: Adapting CLIP for Universal Visual Anomaly Detection

  • 交替学习视觉与文本表示,提升适应能力。
  • 在12个工业医疗数据集上达到当前最佳性能。
  • 训练一次即可零/少样本泛化到新领域,适合实际部署。

通用视觉异常检测旨在不需额外微调的情况下,识别来自新型或未见视觉领域的异常,这对开放场景至关重要。近期研究显示,预训练的视觉语言模型如CLIP仅需零个或少量正常图像即可展现强大泛化能力。然而,现有方法在提示模板设计、复杂标记交互或需要额外微调方面存在困难,导致灵活性不足。本文提出一种名为AdaptCLIP的简单而有效的方法,基于两个关键洞察:其一,应交替而非联合学习自适应的视觉与文本表示;其二,查询与正常图像提示之间的对比学习应融合上下文与对齐残差特征,而非仅依赖残差特征。AdaptCLIP将CLIP模型作为基础服务,在输入或输出端仅添加三个简单适配器——视觉适配器、文本适配器和提示-查询适配器。该方法支持跨域零/少样本泛化,并在基数据集训练后,可在目标域实现无训练部署。AdaptCLIP在12个工业与医疗领域的异常检测基准上取得当前最优表现,显著优于现有竞争方法。代码与模型将公开于https://github.com/gaobb/AdaptCLIP。

原文摘要 · Abstract (English)

Universal visual anomaly detection aims to identify anomalies from novel or unseen vision domains without additional fine-tuning, which is critical in open scenarios. Recent studies have demonstrated that pre-trained vision-language models like CLIP exhibit strong generalization with just zero or a few normal images. However, existing methods struggle with designing prompt templates, complex token interactions, or requiring additional fine-tuning, resulting in limited flexibility. In this work, we present a simple yet effective method called AdaptCLIP based on two key insights. First, adaptive visual and textual representations should be learned alternately rather than jointly. Second, comparative learning between query and normal image prompt should incorporate both contextual and aligned residual features, rather than relying solely on residual features. AdaptCLIP treats CLIP models as a foundational service, adding only three simple adapters, visual adapter, textual adapter, and prompt-query adapter, at its input or output ends. AdaptCLIP supports zero-/few-shot generalization across domains and possesses a training-free manner on target domains once trained on a base dataset. AdaptCLIP achieves state-of-the-art performance on 12 anomaly detection benchmarks from industrial and medical domains, significantly outperforming existing competitive methods. We will make the code and model of AdaptCLIP available at https://github.com/gaobb/AdaptCLIP.

异常检测CLIP零样本视觉语言模型

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