AnomalyPainter: Vision-Language-Diffusion Synergy for Zero-Shot Realistic and Diverse Industrial Anomaly Synthesis

Zhangyu Lai, Yilin Lu, Xinyang Li, Jianghang Lin, Yansong Qu, Liujuan Cao, Ming Li, Rongrong JiarXiv 2025 · DOI

Introduction

In industrial quality control, the scarcity of real-world anomaly samples—such as cracks, stains, or structural defects—presents a significant challenge for training robust anomaly detection models. Existing synthesis techniques generally fall into two categories, both suffering from a fundamental diversity-realism trade-off. Zero-shot methods like CutPaste or DRAEM offer high diversity by pasting arbitrary textures, yet they often produce unrealistic artifacts with abrupt boundaries. Conversely, few-shot generative methods like AnoDiff achieve higher realism but are prone to overfitting, resulting in a narrow range of synthesized defects.

AnomalyPainter addresses this gap by leveraging the "world knowledge" of Vision-Language Large Models (VLLMs) and the generative capabilities of Latent Diffusion Models (LDMs). This zero-shot framework synthesizes realistic and diverse anomalies without requiring any real-world defect samples for training.

Methodology

The AnomalyPainter pipeline consists of three primary stages: Anomaly Description & Matching, Texture Library Construction, and Adaptive Texture Anomaly Generation.

The three-stage AnomalyPainter pipeline: (1) Anomaly Description Generation & Matching, (2) Professional Texture Library Construction, and (3) Adaptive Texture Anomaly Generation.

First, a VLLM (e.g., GPT-4V) is queried to identify potential anomalies for a given object (e.g., "What kind of anomaly may happen to a cashew?"). The resulting descriptions, such as "cracked" or "moldy," are encoded using CLIP. These embeddings are then matched against Tex-9K, a newly introduced library of 8,792 professional texture assets across 75 categories, to select the most relevant visual patterns.

The final stage involves Texture-Aware Latent Initialization (TALI). Using a Latent Diffusion Model (SDXL) guided by ControlNet, the system paints the selected texture onto a normal image. TALI ensures seamless blending by mixing the latents of the normal image and the texture at a specific noise timestep ($T^*$). The authors identified $T^*=16$ (in a 20-step process) as the optimal point to balance anomaly visibility with geometric stability.

Experimental Results

The framework was evaluated on the MVTec AD and VisA benchmarks. AnomalyPainter achieved state-of-the-art performance, significantly improving both synthesis quality and downstream detection accuracy.

Visual comparison of synthesized anomalies. AnomalyPainter generates diverse and realistic defects (e.g., 'Broken', 'Melt', 'Burnt') across various categories compared to the unrealistic or repetitive outputs of RealNet and AnoDiff.

Quantitatively, AnomalyPainter achieved a 93.9% Image-level AUC and 96.2% Pixel-level AUC on the VisA dataset, outperforming the previous best zero-shot method, RealNet, by over 3%. Furthermore, the method produces high-resolution (1024x1024) images that preserve structural details while maintaining natural transitions between the anomaly and the background.

Conclusion

AnomalyPainter demonstrates that the synergy between VLLMs and diffusion models can effectively bypass the need for real-world anomaly data. By utilizing a professional texture library and a novel latent initialization strategy, it breaks the diversity-realism trade-off. While the current framework excels at texture-based defects, future work will focus on addressing global layout anomalies, such as missing components or incorrect object orientations.

Summary updated

BibTeX
@misc{lai2025anomalypainter,
  author = {Zhangyu Lai and Yilin Lu and Xinyang Li and Jianghang Lin and Yansong Qu and Liujuan Cao and Ming Li and Rongrong Ji},
  title = {{AnomalyPainter: Vision-Language-Diffusion Synergy for Zero-Shot Realistic and Diverse Industrial Anomaly Synthesis}},
  year = {2025},
  eprint = {2503.07253},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2503.07253},
}
Figure