Crane: Context-Guided Prompt Learning and Attention Refinement for Zero-Shot Anomaly Detection
Not on the map. Why?
Abstract (arXiv)
Zero-shot anomaly detection and localization aims to learn from source-domain data and generalize to unseen target domains without target-domain samples. Recent CLIP-based methods perform inference by comparing visual features with normal and abnormal textual prototypes; however, dense localization remains substantially weaker than image-level detection, especially for small or subtle abnormal regions. We identify two key limitations behind this gap: CLIP's vision encoder is primarily optimized for global image-text alignment, which limits its ability to preserve fine-grained spatial details, and the learned normal/abnormal text representations are not sufficiently aligned with dense visual features. To address these limitations, we propose Crane (Context-Guided Prompt Learning and Attention Refinement), a CLIP-based framework that first adapts the vision encoder with a correlation-based attention module to better preserve local visual structure. Second, it conditions learnable normal and abnormal prompts on global image context during training, improving instance-aware text-vision alignment. Third, it incorporates anomaly-aware local-to-global fusion, which injects anomaly-relevant patch features into the global image representation for more sensitive image-level detection. Finally, we show that the same correlation-based attention design can exploit spatial correlations from DINOv2, yielding a boosted variant, Crane+, with stronger localization ability. Across seven industrial benchmarks, Crane improves mean image-level AP by 4.5% over the strongest compared baseline, while Crane+ improves mean pixel-level AUPRO by 9.0%. The code is available at https://github.com/Alireza99Salehi/Crane.
Key facts. Cited by 3 papers in the map (data through 14 Oct 2026). Builds on 54 of its 77 references that are in the map. First posted on arXiv 15 Apr 2025.
Builds on
54 of 77 references.
References · 54
- 2021Learning Transferable Visual Models From Natural Language Supervisioncited by 33,744
- 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 30,186
- 2023Segment Anythingcited by 8,234
- 2023DINOv2: Learning Robust Visual Features without Supervisioncited by 7,974
- 2021Emerging Properties in Self-Supervised Vision Transformerscited by 6,968
- 2022BLIP: Bootstrapping Language-Image Pre-training for Unified Vision-Language Understanding and Generationcited by 4,322
- 2021Learning to Prompt for Vision-Language Modelscited by 2,281
- 2021Towards Total Recall in Industrial Anomaly Detectioncited by 776
- 2017Generalised Dice overlap as a deep learning loss function for highly unbalanced segmentationscited by 620
- 2021LiT: Zero-Shot Transfer with Locked-image text Tuningcited by 577
- 2017Skin Lesion Analysis Toward Melanoma Detection: A Challenge at the 2017 International Symposium on Biomedical Imaging (ISBI), Hosted by the International Skin Imaging Collaboration (ISIC)cited by 549
- 2020A Unifying Review of Deep and Shallow Anomaly Detectioncited by 425
38 more
- 2022Anomaly Detection via Reverse Distillation from One-Class Embeddingcited by 421
- 2022SPot-the-Difference Self-Supervised Pre-training for Anomaly Detection and Segmentationcited by 400
- 2019Uninformed Students: Student-Teacher Anomaly Detection with Discriminative Latent Embeddingscited by 386
- 2021CFLOW-AD: Real-Time Unsupervised Anomaly Detection with Localization via Conditional Normalizing Flowscited by 321
- 2023WinCLIP: Zero-/Few-Shot Anomaly Classification and Segmentationcited by 315
- 2019Deep Semi-Supervised Anomaly Detectioncited by 291
- 2020Multiresolution Knowledge Distillation for Anomaly Detectioncited by 285
- 2023AnomalyCLIP: Object-agnostic Prompt Learning for Zero-shot Anomaly Detectioncited by 271
- 2023SimpleNet: A Simple Network for Image Anomaly Detection and Localizationcited by 256
- 2021FastFlow: Unsupervised Anomaly Detection and Localization via 2D Normalizing Flowscited by 227
- 2021VT-ADL: A Vision Transformer Network for Image Anomaly Detection and Localizationcited by 223
- 2016Skin Lesion Analysis toward Melanoma Detection: A Challenge at the International Symposium on Biomedical Imaging (ISBI) 2016, hosted by the International Skin Imaging Collaboration (ISIC)cited by 198
- 2023EfficientAD: Accurate Visual Anomaly Detection at Millisecond-Level Latenciescited by 160
- 2021A Unified Survey on Anomaly, Novelty, Open-Set, and Out-of-Distribution Detection: Solutions and Future Challengescited by 154
- 2019Deep Anomaly Detection with Deviation Networkscited by 153
- 2023Deep Industrial Image Anomaly Detection: A Surveycited by 148
- 2019Segmentation-Based Deep-Learning Approach for Surface-Defect Detectioncited by 145
- 2023APRIL-GAN: A Zero-/Few-Shot Anomaly Classification and Segmentation Method for CVPR 2023 VAND Workshop Challenge Tracks 1&2: 1st Place on Zero-shot AD and 4th Place on Few-shot ADcited by 130
- 2024AdaCLIP: Adapting CLIP with Hybrid Learnable Prompts for Zero-Shot Anomaly Detectioncited by 127
- 2024ClearCLIP: Decomposing CLIP Representations for Dense Vision-Language Inferencecited by 113
- 2023AnomalyDiffusion: Few-Shot Anomaly Image Generation with Diffusion Modelcited by 111
- 2024ProxyCLIP: Proxy Attention Improves CLIP for Open-Vocabulary Segmentationcited by 111
- 2022Catching Both Gray and Black Swans: Open-set Supervised Anomaly Detectioncited by 104
- 2024PromptAD: Learning Prompts with only Normal Samples for Few-Shot Anomaly Detectioncited by 98
- 2023CLIP-DINOiser: Teaching CLIP a few DINO tricks for open-vocabulary semantic segmentationcited by 96
- 2024Toward Generalist Anomaly Detection via In-context Residual Learning with Few-shot Sample Promptscited by 89
- 2022Anomaly Detection in Autonomous Driving: A Surveycited by 87
- 2024A Unified Anomaly Synthesis Strategy with Gradient Ascent for Industrial Anomaly Detection and Localizationcited by 74
- 2023Consistency-guided Prompt Learning for Vision-Language Modelscited by 73
- 2025AA-CLIP: Enhancing Zero-shot Anomaly Detection via Anomaly-Aware CLIPcited by 73
- 2022Explicit Boundary Guided Semi-Push-Pull Contrastive Learning for Supervised Anomaly Detectioncited by 72
- 2023CLIP-AD: A Language-Guided Staged Dual-Path Model for Zero-shot Anomaly Detectioncited by 58
- 2022Prototypical Residual Networks for Anomaly Detection and Localizationcited by 56
- 2022Bayesian Prompt Learning for Image-Language Model Generalizationcited by 51
- 2024VCP-CLIP: A visual context prompting model for zero-shot anomaly segmentationcited by 50
- 2024ClipSAM: CLIP and SAM Collaboration for Zero-Shot Anomaly Segmentationcited by 49
- 2023DiffusionAD: Norm-guided One-step Denoising Diffusion for Anomaly Detectioncited by 46
- 2023TransFusion -- A Transparency-Based Diffusion Model for Anomaly Detectioncited by 43
50 most cited of 54 All 54 (JSON)
Built on by
Citing papers per year: 2025: 2; 2026: 1.
3 papers.