计算机科学
异常检测
人工智能
光学(聚焦)
一般化
限制
模式识别(心理学)
适应(眼睛)
计算机视觉
机器学习
目标检测
目视检查
可视化
编码(集合论)
特征提取
冗余(工程)
训练集
图像(数学)
对比度(视觉)
数据挖掘
特征(语言学)
空间分析
作者
Qianan Fang,Wenxi Lv,Qinliang Su
标识
DOI:10.1145/3746027.3755635
摘要
Visual anomaly detection has been widely used in industrial inspection and medical diagnosis. Existing methods typically demand substantial training samples, limiting their utility in zero-/few-shot scenarios. While recent efforts have leveraged CLIP's zero-shot recognition capability for this task, they often ignore optimizing visual features to focus on local anomalies, reducing their efficacy. In this work, we propose AF-CLIP (Anomaly-Focused CLIP) by dramatically enhancing its visual representations to focus on local defects. Our approach introduces a lightweight adapter that emphasizes anomaly-relevant patterns in visual features, simultaneously optimizing both class-level features for image classification and patch-level features for precise localization. To capture anomalies of different sizes and improve detection accuracy, prior to the adapter, we develop a multi-scale spatial aggregation mechanism to effectively consolidate neighborhood context. Complementing these visual enhancements, we design learnable textual prompts that generically characterize normal and abnormal states. After optimization on auxiliary datasets using a composite objective function, AF-CLIP demonstrates strong zero-shot detection capability. Our method is also extended to few-shot scenarios by extra memory banks. Experimental results across diverse industrial and medical datasets demonstrate the effectiveness and generalization of our proposed method. Code is available at https://github.com/Faustinaqq/AF-CLIP.
科研通智能强力驱动
Strongly Powered by AbleSci AI