• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

计算机工程与科学 ›› 2022, Vol. 44 ›› Issue (12): 2206-2212.

• 图形与图像 • 上一篇    下一篇

一种基于pix2pix改进的工业缺陷数据增强方法

罗月童,段昶,江佩峰,周波   

  1. (合肥工业大学计算机与信息学院,安徽 合肥 230601)


  • 收稿日期:2021-05-31 修回日期:2021-08-27 接受日期:2022-12-25 出版日期:2022-12-25 发布日期:2023-01-05
  • 基金资助:
    国家自然科学基金(61602146);国家重点基础研究发展计划 (2017YFB1402200);安徽省科技攻关计划 (1604d0802009)

An improved industrial defect data augmentation method based on pix2pix

LUO Yue-tong,DUAN Chang,JIANG Pei-feng,ZHUO Bo   

  1. (School of Computer Science and Information Engineering,Hefei University of Technology,Hefei  230601,China)
  • Received:2021-05-31 Revised:2021-08-27 Accepted:2022-12-25 Online:2022-12-25 Published:2023-01-05

摘要: 基于深度学习的目标检测算法在工业检测中应用广泛,为解决工业缺陷数据不足的问题,提出了一种基于pix2pix改进的缺陷数据增强方法。从加强生成器和判别器对图像中缺陷区域的注意力出发,针对pix2pix进行了如下改进:(1)仅将整幅图像的缺陷区域作为判别器的输入,以此提升生成器对缺陷区域的注意力,同时,判别器采用了更小的卷积核提取缺陷区域的特征;(2)仅将图像中所有缺陷区域的平均生成对抗损失作为该图像的生成对抗损失,使网络更加关注缺陷区域的特征学习。在工业LED缺陷数据集上的实验结果表明,本方法生成的缺陷具有更逼真的视觉效果和更低的FID指数,同时有效提升了基于RetinaNet算法的缺陷检测精度。

关键词: 目标检测, 数据增强, pix2pix, 注意力

Abstract: The object detection method based on deep learning is widely used in industrial inspection. In order to solve the problem of insufficient industrial defect data, an improved defect data augmentation algorithm based on pip2pix is proposed. Starting from the enhancement of the generator and discriminators attention to the defect area in the image, the following improvements have been made to pix2pix:(1)Only the defect area of the entire image is used as the input of the discriminator to enhance the generators attention to the defect area. At the same time, the discriminator uses a smaller convolution kernel to extract the characteristics of the defect area. (2)Only the average generation confrontation loss of all defect regions in the image is used as the generation confrontation loss of the image, so that the network pays more attention to the defects regional feature learning. The experimental results on the industrial LED defect dataset show that the defects generated by the proposed method have more realistic visual effects, lower FID, and effectively improve the accuracy of defect detection based on the RetinaNet algorithm.

Key words: object detection, data augmentation, pix2pix, attention