UniVAD: A Training-free Unified Model for Few-shot Visual Anomaly Detection

Zhaopeng Gu, Bingke Zhu, Guibo Zhu, Yingying Chen, Ming Tang +1 more
2/9/2026

No official code found. Best implementation: FantasticGNU/UniVAD (226 stars, last commit 2025-10-20). 1 more below.

Abstract

Visual Anomaly Detection (VAD) aims to identify abnormal samples in images that deviate from normal patterns, covering multiple domains, including industrial, logical, and medical fields. Due to the domain gaps between these fields, existing VAD methods are typically tailored to each domain, with specialized detection techniques and model architectures that are difficult to generalize across different domains. Moreover, even within the same domain, current VAD approaches often require large amounts of normal samples to train class-specific models, resulting in poor generalizability and hindering unified evaluation across domains. To address this issue, we propose a generalized few-shot VAD method, UniVAD, capable of detecting anomalies across various domains, with a training-free unified model. UniVAD only needs few normal samples as references during testing to detect anomalies in previously unseen objects, without training on the specific domain. Specifically, UniVAD employs a Contextual Component Clustering (C3) module based on clustering and vision foundation models to segment components within the image accurately, and leverages Component-Aware Patch Matching (CAPM) and Graph-Enhanced Component Modeling (GECM) modules to detect anomalies at different semantic levels, which are aggregated to produce the final detection result. We conduct experiments on nine datasets spanning industrial, logical, and medical fields, and the results demonstrate that UniVAD achieves state-of-the-art performance in few-shot anomaly detection tasks across multiple domains, outperforming domain-specific anomaly detection models. Code is available at https://github.com/FantasticGNU/UniVAD.

View on arXivView PDF

Code Implementations(2)

[AAAI 2026] AnomalyMoE: Towards a Language-free Generalist Model for Unified Visual Anomaly Detection

313PythonNov 16, 202511 months agoNOASSERTION

[CVPR 2025] UniVAD: A Training-free Unified Model for Few-shot Visual Anomaly Detection

22625C++, CudaMar 6, 20251 years agoNOASSERTION

Similar Papers

Cite this paper

@article{gu2026univad,
  title  = {UniVAD: A Training-free Unified Model for Few-shot Visual Anomaly Detection},
  author = {Zhaopeng Gu and Bingke Zhu and Guibo Zhu and Yingying Chen and Ming Tang and Jinqiao Wang},
  year   = {2026},
  eprint = {2412.03342},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2412.03342},
  journal = {CVPR 2024 2024}
}

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

Discussion