MadCLIP: Few-shot Medical Anomaly Detection with CLIP

Mahshid Shiri, Cigdem Beyan, Vittorio Murino
6/30/2025
18 citations
cs.CV

Official code: mahshid1998/MadCLIP (33 stars, Python, MIT, last commit 2025-07-24).

Abstract

An innovative few-shot anomaly detection approach is presented, leveraging the pre-trained CLIP model for medical data, and adapting it for both image-level anomaly classification (AC) and pixel-level anomaly segmentation (AS). A dual-branch design is proposed to separately capture normal and abnormal features through learnable adapters in the CLIP vision encoder.

Show full abstract

To improve semantic alignment, learnable text prompts are employed to link visual features. Furthermore, SigLIP loss is applied to effectively handle the many-to-one relationship between images and unpaired text prompts, showcasing its adaptation in the medical field for the first time. Our approach is validated on multiple modalities, demonstrating superior performance over existing methods for AC and AS, in both same-dataset and cross-dataset evaluations. Unlike prior work, it does not rely on synthetic data or memory banks, and an ablation study confirms the contribution of each component. The code is available at https://github.com/mahshid1998/MadCLIP.

View on arXivView PDF

Code Implementations(1)

MIT

Official implementation of "MadCLIP: Few-shot Medical Anomaly Detection with CLIP" (MICCAI 2025, Early Accepted).

336PythonJun 18, 20251 years agoMIT

Similar Papers

Cite this paper

@article{shiri2025madclip,
  title  = {MadCLIP: Few-shot Medical Anomaly Detection with CLIP},
  author = {Mahshid Shiri and Cigdem Beyan and Vittorio Murino},
  year   = {2025},
  eprint = {2506.23810},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2506.23810v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2506.23810.svg)](https://codeofpaper.com/paper/2506.23810)

Discussion