arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2408.00372cs.CV
收藏

基于一致性建模的少样本缺陷图像生成

Few-shot Defect Image Generation based on Consistency Modeling

Institute of Automation, Chinese Academy of Sciences(中国科学院自动化研究所);School of Artificial Intelligence, University of Chinese Academy of Sciences(中国科学院大学人工智能学院);CASI Vision Technology CO., LTD.(中科视景科技有限公司)

Qingfeng Shi, Jing Wei, Fei Shen, Zhengtao Zhang

AI总结:

本文提出DefectDiffu文本引导扩散方法,通过建模多产品间背景与缺陷一致性并调制扰动方向,实现少样本甚至零样本的高质量多样化缺陷图像及掩码生成。

摘要:

图像生成可以解决缺陷检测中标注数据不足的问题。大多数缺陷生成方法仅在单一产品上训练,未考虑多个产品之间的一致性,导致生成结果的质量和多样性较差。为解决这些问题,我们提出了DefectDiffu,一种新颖的文本引导扩散方法,用于在多个产品之间同时建模产品内背景一致性和产品间缺陷一致性,并调制一致性扰动方向以控制产品类型和缺陷强度,从而实现多样化的缺陷图像生成。首先,我们利用文本编码器为解耦集成架构的背景、缺陷和融合部分分别提供一致性提示,从而将缺陷与正常背景解耦。其次,我们提出双重自由策略,通过一致性方向的两阶段扰动生成缺陷图像,从而通过调整扰动尺度来控制产品类型和缺陷强度。此外,DefectDiffu可以利用缺陷部分的交叉注意力图生成缺陷掩码标注。最后,为了提高小缺陷和掩码的生成质量,我们提出了自适应注意力增强损失以增加对缺陷的关注。实验结果表明,DefectDiffu在生成质量和多样性方面超越了最先进的方法,从而有效提升了下游缺陷检测性能。此外,缺陷扰动方向可以在不同产品之间迁移,实现零样本缺陷生成,这对解决数据不足问题非常有益。代码可在https://github.com/FFDD-diffusion/DefectDiffu获取。

英文摘要:

Image generation can solve insufficient labeled data issues in defect detection. Most defect generation methods are only trained on a single product without considering the consistencies among multiple products, leading to poor quality and diversity of generated results. To address these issues, we propose DefectDiffu, a novel text-guided diffusion method to model both intra-product background consistency and inter-product defect consistency across multiple products and modulate the consistency perturbation directions to control product type and defect strength, achieving diversified defect image generation. Firstly, we leverage a text encoder to separately provide consistency prompts for background, defect, and fusion parts of the disentangled integrated architecture, thereby disentangling defects and normal backgrounds. Secondly, we propose the double-free strategy to generate defect images through two-stage perturbation of consistency direction, thereby controlling product type and defect strength by adjusting the perturbation scale. Besides, DefectDiffu can generate defect mask annotations utilizing cross-attention maps from the defect part. Finally, to improve the generation quality of small defects and masks, we propose the adaptive attention-enhance loss to increase the attention to defects. Experimental results demonstrate that DefectDiffu surpasses state-of-the-art methods in terms of generation quality and diversity, thus effectively improving downstream defection performance. Moreover, defect perturbation directions can be transferred among various products to achieve zero-shot defect generation, which is highly beneficial for addressing insufficient data issues. The code are available at https://github.com/FFDD-diffusion/DefectDiffu.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑