GPSP-CLIP: learning generic pseudo-state prompts for flexible zero-shot anomaly detection
摘要
Large-scale foundation models such as Contrastive Language-Image Pre-training (CLIP) have shown great potential in zero-shot anomaly detection (ZSAD) task, allowing a single model to generalize to unseen categories without fine-tuning on specific classes. However, existing ZSAD methods often rely on rigid prompt designs, which makes them difficult to adapt to the diverse characteristics of industrial products. Additionally, the need to manually define category-specific and state-specific prompts limits their scalability and generalization. This paper proposes a generic pseudo-state prompting model based on CLIP (GPSP-CLIP) to address these challenges. The motivation behind GPSP-CLIP is to develop a flexible prompting method capable of representing normal and anomalous conditions across various applications without relying on predefined text prompts. Technically, GPSP-CLIP employs fully learnable parameters to generate broad, pseudo-state text features, enabling generalization across different industrial contexts. By employing distinct prompt learning strategies for anomaly classification and segmentation, GPSP-CLIP optimizes each task independently. This enables the model to effectively capture high-level semantics through global prompts while identifying fine-grained defect patterns via local prompts. Experimental results on the well-known MVTec and VisA datasets demonstrate improved performance, with a 1.8% improvement in AP for anomaly classification and a 1.3% gain in AUPRO for anomaly segmentation compared to state-of-the-art methods.