Industrial anomaly detection improved by self-optimizing prompt generation
CORE: Contrast-and-Reflect for Self-Supervised Prompt Optimization in Anomaly Synthesis
Computer Vision and Pattern Recognition
Summary
Detecting faults in industrial products is hard because there are few examples of problems to learn from. The authors designed a way to create realistic examples of defects without needing many real ones. They use large multimodal AI models that can improve their own instructions to generate these examples, helping better detect issues automatically. Their method works without special training and adapts to different kinds of defects.
What this means in practice
- •For industrial quality control teams: Create realistic defect examples to improve automatic inspection accuracy when real faulty samples are scarce.
- •For computer vision engineers: Integrate self-optimizing prompt generation with existing anomaly detection models to boost performance without retraining.
Authors
Haoxiang Rao, Fang Zhao, Zhao Wang, Weijia Li, Chenyang Si, Caifeng Shan
Abstract
Industrial anomaly detection (AD) is bottlenecked by the scarcity of anomalous samples, making high-fidelity anomaly synthesis crucial for improving downstream performance. However, existing methods either rely on scarce real anomaly references or auxiliary data, while lacking complex reasoning and iterative optimization capabilities for generating realistic defects in open-set scenarios. To address these challenges, we propose CORE, a cost-efficient and training-free prompt optimization framework based on Large Multimodal Models (LMMs), which unifies zero-shot and one-shot anomaly synthesis. CORE first introduces an Anomaly Context Grounding module to transform sparse user context into defect-aware generation context, which is subsequently instantiated as structured anomaly prompts that disentangle normal-region preservation from anomaly-specific variation, enabling controllable and faithful defect generation. Furthermore, CORE autonomously refines prompts through a self-supervised contrast-and-reflect mechanism. This design empowers general-purpose LMMs to synthesize realistic anomalies under both zero-shot and one-shot settings without task-specific training. Extensive experiments on MVTec-AD and VisA demonstrate that CORE synthesizes realistic and diverse anomalies, yielding superior improvements in downstream AD performance. Furthermore, its model-agnostic and plug-and-play paradigm enables effortless integration with diverse LMMs, facilitating adaptation to unseen open-set scenarios.