FB-CLIP:基于前景-背景解耦的细粒度零样本异常检测
FB-CLIP: Fine-Grained Zero-Shot Anomaly Detection with Foreground-Background Disentanglement
对做视觉异常检测的人,这篇给出了一个可复用的思路:用 CLIP 的文本端多粒度表示(EOT、全局池化、注意力加权词元)配合视觉端沿身份/语义/空间三个维度的软分离与背景抑制,缓解前景背景特征纠缠;SCR 用正常/异常文本原型对齐图像特征,可直接迁移到其他零样本定位任务。
原文依据 multi-view soft separation along identity, semantic, and spatial dimensions, together with background suppression
摘要译文
由模型翻译 · 术语统一 · 请对照原文核对关键结论细粒度异常检测在工业与医学应用中至关重要,但带标注的异常样本往往稀缺,使零样本检测颇具挑战。尽管 CLIP 等视觉语言模型提供了有前景的解决方案,但它们难以处理前景-背景特征纠缠与粗粒度文本语义的问题。我们提出 FB-CLIP,一个通过多策略文本表示与前景-背景分离来增强异常定位的框架。在文本模态中,它结合文本末端(End-of-Text)特征、全局池化表示与注意力加权词元特征,以获得更丰富的语义线索。在视觉模态中,沿身份、语义与空间三个维度的多视图软分离,连同背景抑制,减少了干扰并提升了判别性。语义一致性正则化(SCR)将图像特征与正常及异常文本原型对齐,抑制不确定匹配并扩大语义间隔。实验表明,FB-CLIP 能有效从复杂背景中区分异常,在零样本设定下实现准确的细粒度异常检测与定位。代码:https://github.com/Xi-Mu-Yu/FB-CLIP 。
英文原文摘要 1252 字符
Fine-grained anomaly detection is crucial in industrial and medical applications, but labeled anomalies are often scarce, making zero-shot detection challenging. While vision-language models like CLIP offer promising solutions, they struggle with foreground-background feature entanglement and coarse textual semantics. We propose FB-CLIP, a framework that enhances anomaly localization via multi-strategy textual representations and foreground-background separation. In the textual modality, it combines End-of-Text features, global-pooled representations, and attention-weighted token features for richer semantic cues. In the visual modality, multi-view soft separation along identity, semantic, and spatial dimensions, together with background suppression, reduces interference and improves discriminability. Semantic Consistency Regularization (SCR) aligns image features with normal and abnormal textual prototypes, suppressing uncertain matches and enlarging semantic gaps. Experiments show that FB-CLIP effectively distinguishes anomalies from complex backgrounds, achieving accurate fine-grained anomaly detection and localization under zero-shot settings. Code : \href https://github.com/Xi-Mu-Yu/FB-CLIP https://github.com/Xi-Mu-Yu/FB-CLIP .