Anomagic: Crossmodal Prompt-driven Zero-shot Anomaly Generation

Authors

  • Yuxin Jiang Huazhong University of Science and Technology
  • Wei Luo Tsinghua University
  • Hui Zhang Hunan University
  • Qiyu Chen Institute of Automation, Chinese Academy of Sciences
  • Haiming Yao Tsinghua University
  • Weiming Shen Huazhong University of Science and Technology, Tsinghua University
  • Yunkang Cao Hunan University

DOI:

https://doi.org/10.1609/aaai.v40i7.37466

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.

Downloads

Published

2026-03-14

How to Cite

Jiang, Y., Luo, W., Zhang, H., Chen, Q., Yao, H., Shen, W., & Cao, Y. (2026). Anomagic: Crossmodal Prompt-driven Zero-shot Anomaly Generation. Proceedings of the AAAI Conference on Artificial Intelligence, 40(7), 5485–5493. https://doi.org/10.1609/aaai.v40i7.37466

Issue

Section

AAAI Technical Track on Computer Vision IV