WinCLIP: Zero-/Few-Shot Anomaly Classification and Segmentation

Jongheon Jeong, Yang Zou, Taewan Kim, Dongqing Zhang, Avinash Ravichandran +1 more
2/14/2026

No official code found. Best implementation: caoyunkang/WinClip (429 stars, MIT, last commit 2024-03-16). 1 more below.

Abstract

Visual anomaly classification and segmentation are vital for automating industrial quality inspection. The focus of prior research in the field has been on training custom models for each quality inspection task, which requires task-specific images and annotation. In this paper we move away from this regime, addressing zero-shot and few-normal-shot anomaly classification and segmentation. Recently CLIP, a vision-language model, has shown revolutionary generality with competitive zero-/few-shot performance in comparison to full-supervision. But CLIP falls short on anomaly classification and segmentation tasks. Hence, we propose window-based CLIP (WinCLIP) with (1) a compositional ensemble on state words and prompt templates and (2) efficient extraction and aggregation of window/patch/image-level features aligned with text. We also propose its few-normal-shot extension Win-CLIP+, which uses complementary information from normal images. In MVTec-AD (and VisA), without further tuning, WinCLIP achieves 91.8%/85.1% (78.1%/79.6%) AU-ROC in zero-shot anomaly classification and segmentation while WinCLIP + does 93.1%/95.2% (83.8%/96.4%) in 1-normal-shot, surpassing state-of-the-art by large margins.

View on arXivView PDF

Code Implementations(2)

mala-lab/WinCLIPCommunity68%
GPL-3.0

Implementation of CVPR'23 paper "WinCLIP: Zero-/few-shot anomaly classification and segmentation". It successfully reproduces the same zero-/few-shot AD performance as that in the original paper.

7312PythonMar 11, 20241 years agoGPL-3.0
anomaly-detectionclipfew-shot-anomaly-detectionfoundation-modelsvision-language-model+1 more
caoyunkang/WinClipCommunity66%
MIT

[CVPR 2023] Unofficial re-implementation of "WinCLIP: Zero-/Few-Shot Anomaly Classification and Segmentation".

42949Shell, PythonMay 21, 20232 years agoMIT

Similar Papers

Cite this paper

@article{jeong2026winclip,
  title  = {WinCLIP: Zero-/Few-Shot Anomaly Classification and Segmentation},
  author = {Jongheon Jeong and Yang Zou and Taewan Kim and Dongqing Zhang and Avinash Ravichandran and O. Dabeer},
  year   = {2026},
  eprint = {2303.14814},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/pdf/2303.14814},
  journal = {CVPR 2023 2023}
}

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/2303.14814.svg)](https://codeofpaper.com/paper/2303.14814)

Discussion