arXiv:2505.09263cs.CVcs.AI2025-05中稿 · ECCV

用少量真实异常样本生成逼真异常图像,提升工业质检模型性能

Few-Shot Anomaly-Driven Generation for Anomaly Classification and Segmentation

  • 基于少量真实异常样本学习分布,注入嵌入向量引导生成
  • 生成的异常图像使检测模型在分类与分割任务上分别提升5.8%和1.5%
  • 适用于异常样本稀缺的工业缺陷检测场景

工业检测中异常样本稀少,导致异常检测困难。现有方法常通过噪声或外部数据合成异常,但生成异常与真实异常存在显著语义差距,影响检测效果。为此,本文提出少样本异常驱动生成(AnoGen)方法,仅需少量真实异常样本即可引导扩散模型生成逼真且多样化的异常图像,从而增强异常检测模型训练。方法分三阶段:第一阶段基于少量真实异常学习异常分布并编码为嵌入;第二阶段利用该嵌入与给定边界框,指导扩散模型在特定物体或纹理上生成真实异常;第三阶段采用弱监督检测方法,使用生成异常训练更强的检测模型。以DRAEM和DesTSeg为基础模型,在通用工业异常检测数据集MVTec上验证,生成异常使分类与分割任务性能均提升,其中DRAEM和DesTSeg在分割任务的AU-PR指标分别提高5.8%和1.5%。代码与生成数据已开源。

原文摘要 · Abstract (English)

Anomaly detection is a practical and challenging task due to the scarcity of anomaly samples in industrial inspection. Some existing anomaly detection methods address this issue by synthesizing anomalies with noise or external data. However, there is always a large semantic gap between synthetic and real-world anomalies, resulting in weak performance in anomaly detection. To solve the problem, we propose a few-shot Anomaly-driven Generation (AnoGen) method, which guides the diffusion model to generate realistic and diverse anomalies with only a few real anomalies, thereby benefiting training anomaly detection models. Specifically, our work is divided into three stages. In the first stage, we learn the anomaly distribution based on a few given real anomalies and inject the learned knowledge into an embedding. In the second stage, we use the embedding and given bounding boxes to guide the diffusion model to generate realistic and diverse anomalies on specific objects (or textures). In the final stage, we propose a weakly-supervised anomaly detection method to train a more powerful model with generated anomalies. Our method builds upon DRAEM and DesTSeg as the foundation model and conducts experiments on the commonly used industrial anomaly detection dataset, MVTec. The experiments demonstrate that our generated anomalies effectively improve the model performance of both anomaly classification and segmentation tasks simultaneously, \eg, DRAEM and DseTSeg achieved a 5.8\% and 1.5\% improvement in AU-PR metric on segmentation task, respectively. The code and generated anomalous data are available at https://github.com/gaobb/AnoGen.

异常检测扩散模型少样本生成工业质检

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