arXiv:2508.11550cs.CV2025-08被引 2

无需训练即可生成高保真异常图像,提升工业检测数据质量。

Training-Free Anomaly Generation via Dual-Attention Enhancement in Diffusion Model

  • 通过双注意力机制增强扩散模型,精准定位异常区域。
  • 在MVTec AD和VisA上生成的异常图像真实度高,保持原图其余部分不变。
  • 适合缺乏异常数据的工业缺陷检测场景,直接提升下游任务性能。

工业异常检测在制造领域至关重要,但长期面临数据稀缺问题。现有异常生成方法或保真度不足,或需额外训练数据。为此,我们提出无需训练的异常生成框架AAG,基于Stable Diffusion(SD)的强大生成能力,仅需正常图像、掩码和简单文本提示,即可在指定区域生成逼真自然的异常,同时保持其他区域内容不变。具体地,提出跨注意力增强(CAE),重构SD中的跨注意力机制,提升特定区域视觉标记与文本嵌入的相似性,使生成结果符合文本描述;同时提出自注意力增强(SAE),提升正常视觉标记与异常视觉标记间的相似性,确保生成异常与原始图像模式一致。在MVTec AD和VisA数据集上的大量实验表明,AAG在异常生成方面表现优异,且生成的异常图像能显著提升多种下游异常检测任务的性能。

原文摘要 · Abstract (English)

Industrial anomaly detection (AD) plays a significant role in manufacturing where a long-standing challenge is data scarcity. A growing body of works have emerged to address insufficient anomaly data via anomaly generation. However, these anomaly generation methods suffer from lack of fidelity or need to be trained with extra data. To this end, we propose a training-free anomaly generation framework dubbed AAG, which is based on Stable Diffusion (SD)'s strong generation ability for effective anomaly image generation. Given a normal image, mask and a simple text prompt, AAG can generate realistic and natural anomalies in the specific regions and simultaneously keep contents in other regions unchanged. In particular, we propose Cross-Attention Enhancement (CAE) to re-engineer the cross-attention mechanism within Stable Diffusion based on the given mask. CAE increases the similarity between visual tokens in specific regions and text embeddings, which guides these generated visual tokens in accordance with the text description. Besides, generated anomalies need to be more natural and plausible with object in given image. We propose Self-Attention Enhancement (SAE) which improves similarity between each normal visual token and anomaly visual tokens. SAE ensures that generated anomalies are coherent with original pattern. Extensive experiments on MVTec AD and VisA datasets demonstrate effectiveness of AAG in anomaly generation and its utility. Furthermore, anomaly images generated by AAG can bolster performance of various downstream anomaly inspection tasks.

异常生成扩散模型工业检测无训练

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。