This paper considers zero-shot Anomaly Detection (AD), performing AD without reference images of the test objects. We propose a framework called CLIP-AD to leverage the zero-shot capabilities of the large vision-language model CLIP. Firstly, we reinterpret the text prompts design from a distributional perspective and propose a Representative Vector Selection (RVS) paradigm to obtain improved text features. Secondly, we note opposite predictions and irrelevant highlights in the direct computation of the anomaly maps. To address these issues, we introduce a Staged Dual-Path model (SDP) that leverages features from various levels and applies architecture and feature surgery. Lastly, delving deeply into the two phenomena, we point out that the image and text features are not aligned in the joint embedding space. Thus, we introduce a fine-tuning strategy by adding linear layers and construct an extended model SDP+, further enhancing the performance. Abundant experiments demonstrate the effectiveness of our approach, e.g., on MVTec-AD, SDP outperforms the SOTA WinCLIP by +4.2/+10.7 in segmentation metrics F1-max/PRO, while SDP+ achieves +8.3/+20.5 improvements.
翻译:本文研究零样本异常检测(Anomaly Detection, AD)问题,即在无需测试对象参考图像的情况下进行异常检测。我们提出名为CLIP-AD的框架,利用大型视觉语言模型CLIP的零样本能力。首先,我们从分布视角重新诠释文本提示设计,并提出代表性向量选择(RVS)范式以获取更优的文本特征。其次,我们发现在异常图的直接计算中存在预测结果相悖及无关高亮问题。为解决这些问题,我们引入分阶段双路径模型(SDP),该模型利用不同层级的特征并实施架构与特征修正。最后,深入探究上述两种现象后,我们指出现有图像特征与文本特征在联合嵌入空间中未对齐。为此,我们通过添加线性层引入微调策略,构建扩展模型SDP+,进一步提升性能。大量实验证明了方法的有效性:例如在MVTec-AD数据集上,SDP在分割指标F1-max/PRO上分别超越当前最优方法WinCLIP达+4.2/+10.7,而SDP+则实现了+8.3/+20.5的改进。