基于生成式样本合成的工件缺陷样本数据增强

    Method for Data Augmentation of Workpiece Defect Samples Based on Generative Sample Synthesis

    • 摘要: 针对深度学习模型在工业缺陷视觉检测领域中因样本稀缺而难以较好训练的问题,本文提出一种融合生成对抗网络(Generative Adversarial Network, GAN) 和基于物理的渲染(Physically Based Rendering, PBR) 流程的生成式样本合成方法用于数据增强。该方法以ConSinGAN为缺陷特征扩增模型,并通过引入坐标注意力机制(Coordinate Attention, CA) 来优化鉴别器,使其能更精确识别图像中的缺陷特征。同时调整损失函数,引入重构损失与多尺度结构相似度损失的加权组合以缓解小样本训练中的梯度消失问题并提高生成质量。采用PBR流程输出扩增样本,首先为待扩增样本的工件构建三维模型,然后利用泊松融合将扩增的缺陷特征与原始模型贴图融合,最后在虚拟生产环境中通过虚拟相机渲染输出工件缺陷样本。在公共数据集下的实验结果表明该方法可以对给定的工件缺陷小样本进行有效的数据增强。

       

      Abstract: To address the problem of severe lack of defect data in workpieces to train the deep-learning-based defect visual detection systems, this paper introduces a generative sample synthesis method that integrates generative adversarial networks (GAN) with a physical-based rendering (PBR) pipeline for data augmentation. The method employs ConSinGAN as the defect feature generation model and enhances the discriminator by incorporating a coordinate attention (CA) mechanism, enabling more precise identification of defect features in images. Additionally, the loss function is adjusted by introducing a weighted combination of reconstruction loss and multi-scale structural similarity loss to alleviate the gradient vanishing in small sample training and improve the quality of generated samples. The PBR pipeline is used to output the augmented samples, which first constructs a 3D model for the workpiece to be augmented, and then use poisson blending to merge the generated defect features with the original model texture. Finally, defect samples of the workpiece are rendered in a simulated production environment using a virtual camera. Experimental results on public datasets demonstrate the effectiveness of the proposed method in augmenting small samples of workpiece defects.

       

    /

    返回文章
    返回