Unseen Visual Anomaly Generation

Han Sun, Yunkang Cao, Hao Dong, Olga Fink
2/9/2026

No official code found. Best implementation: EPFL-IMOS/AnomalyAny (306 stars, last commit 2025-06-30).

Abstract

Visual anomaly detection (AD) presents significant challenges due to the scarcity of anomalous data samples. While numerous works have been proposed to synthesize anomalous samples, these synthetic anomalies often lack authenticity or require extensive training data, limiting their applicability in real-world scenarios. In this work, we propose Anomaly Anything (AnomalyAny), a novel framework that leverages Stable Diffusion (SD)’s image generation capabilities to generate diverse and realistic unseen anomalies. By conditioning on a single normal sample during test time, AnomalyAny is able to generate unseen anomalies for arbitrary object types with text descriptions. Within AnomalyAny, we propose attention-guided anomaly optimization to direct SD’s attention on generating hard anomaly concepts. Additionally, we introduce prompt-guided anomaly refinement, incorporating detailed descriptions to further improve the generation quality. Extensive experiments on MVTec AD and VisA datasets demonstrate AnomalyAny’s ability in generating high-quality unseen anomalies and its effectiveness in enhancing downstream AD performance. Our demo and code are available at https://hansunhayden.github.io/CUT.github.io/.

View on arXivView PDF

Code Implementations(1)

Official implementation of "Unseen Visual Anomaly Generation" (CVPR 2025)

30622Python, Jupyter NotebookMay 19, 20251 years ago

Similar Papers

Cite this paper

@article{sun2026unseen,
  title  = {Unseen Visual Anomaly Generation},
  author = {Han Sun and Yunkang Cao and Hao Dong and Olga Fink},
  year   = {2026},
  eprint = {2406.01078},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2406.01078},
  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/2406.01078.svg)](https://codeofpaper.com/paper/2406.01078)

Discussion