Anomagic: Crossmodal Prompt-driven Zero-shot Anomaly Generation

Yuxin Jiang, Wei Luo, Hui Zhang, Qiyu Chen, Haiming Yao +2 more
11/13/2025
cs.CVcs.AI

No official code found. Best implementation: yuxin-jiang/Anomagic (159 stars, last commit 2026-04-25).

Abstract

We propose Anomagic, a zero-shot anomaly generation method that produces semantically coherent anomalies without requiring any exemplar anomalies. By unifying both visual and textual cues through a crossmodal prompt encoding scheme, Anomagic leverages rich contextual information to steer an inpainting-based generation pipeline. A subsequent contrastive refinement strategy enforces precise alignment between synthesized anomalies and their masks, thereby bolstering downstream anomaly detection accuracy. To facilitate training, we introduce AnomVerse, a collection of 12,987 anomaly-mask-caption triplets assembled from 13 publicly available datasets, where captions are automatically generated by multimodal large language models using structured visual prompts and template-based textual hints. Extensive experiments demonstrate that Anomagic trained on AnomVerse can synthesize more realistic and varied anomalies than prior methods, yielding superior improvements in downstream anomaly detection. Furthermore, Anomagic can generate anomalies for any normal-category image using user-defined prompts, establishing a versatile foundation model for anomaly generation.

View on arXivView PDF

Code Implementations(1)

[AAAI 2026] The Official Implementation for "Anomagic: Crossmodal Prompt-driven Zero-shot Anomaly Generation"

1599CSS, HTMLNov 14, 20255 months ago
anomaly-detectioncomputer-visiondiffusion-modelsmultimodal-llmtext-to-image+1 more

Similar Papers

Cite this paper

@article{jiang2025anomagic,
  title  = {Anomagic: Crossmodal Prompt-driven Zero-shot Anomaly Generation},
  author = {Yuxin Jiang and Wei Luo and Hui Zhang and Qiyu Chen and Haiming Yao and Weiming Shen and Yunkang Cao},
  year   = {2025},
  eprint = {2511.10020},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2511.10020v1}
}

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

Discussion