English

AnoStyler: Text-Driven Localized Anomaly Generation via Lightweight Style Transfer

Computer Vision and Pattern Recognition 2025-11-11 v1

Abstract

Anomaly generation has been widely explored to address the scarcity of anomaly images in real-world data. However, existing methods typically suffer from at least one of the following limitations, hindering their practical deployment: (1) lack of visual realism in generated anomalies; (2) dependence on large amounts of real images; and (3) use of memory-intensive, heavyweight model architectures. To overcome these limitations, we propose AnoStyler, a lightweight yet effective method that frames zero-shot anomaly generation as text-guided style transfer. Given a single normal image along with its category label and expected defect type, an anomaly mask indicating the localized anomaly regions and two-class text prompts representing the normal and anomaly states are generated using generalizable category-agnostic procedures. A lightweight U-Net model trained with CLIP-based loss functions is used to stylize the normal image into a visually realistic anomaly image, where anomalies are localized by the anomaly mask and semantically aligned with the text prompts. Extensive experiments on the MVTec-AD and VisA datasets show that AnoStyler outperforms existing anomaly generation methods in generating high-quality and diverse anomaly images. Furthermore, using these generated anomalies helps enhance anomaly detection performance.

Keywords

Cite

@article{arxiv.2511.06687,
  title  = {AnoStyler: Text-Driven Localized Anomaly Generation via Lightweight Style Transfer},
  author = {Yulim So and Seokho Kang},
  journal= {arXiv preprint arXiv:2511.06687},
  year   = {2025}
}

Comments

Accepted to AAAI 2026

R2 v1 2026-07-01T07:28:54.567Z