CLIP-LMFA: Few-Shot Anomaly Detection via Large Language Model-Driven Hybrid Prompts and Multi-scale Adaptive Fusion
摘要
Industrial anomaly detection plays a key role in ensuring production quality and operational safety. Although large-scale language vision models are gradually applied to the field of industrial anomaly detection due to their advantages in few-shot scenarios, their limited semantic generalization ability and lack of fine-grained spatial sensitivity hinder their deployment in real-world and high-precision industrial environments. To address these challenges, we propose a CLIP-LMFA framework for few-shot anomaly detection based on CLIP. We introduce a hybrid textual prompt strategy driven by a large language model (LLM) to enhance semantic discrimination while reducing the manual design cost. We design a multi-scale local adaptive fusion (MFEAF) encoder that can jointly capture global semantics and local fine-grained anomalies to achieve pixel-level anomaly segmentation. Without additional fine-tuning or retraining, CLIP-LMFA achieves significant performance improvements on benchmark datasets, outperforming the baseline by 1.3% and 4.5% in the I-AUROC test on the MVTec-AD and Brain datasets, respectively, demonstrating its effectiveness and practicality in real-world industrial applications. Our code is available on: https://github.com/PRICAI25/CLIP-LMFA .