计算机与现代化 ›› 2022, Vol. 0 ›› Issue (08): 114-120.

• 图像处理 • 上一篇    下一篇

基于卷积自编码器的医用玻璃瓶口缺陷检测方法

  

  1. (四川大学机械工程学院,四川成都610065)
  • 出版日期:2022-08-22 发布日期:2022-08-22
  • 作者简介:任秋霖(1995—),男,四川通江人,硕士研究生,研究方向:机器视觉,异常检测,E-mail: renqiulin@hotmail.com; 通信作者:任德均(1971—),男,四川成都人,副教授,博士,研究方向:机器智能,机器视觉,E-mail: rendejun@scu.edu.com; 李鑫(1995—),男,硕士研究生,研究方向:深度学习,模型加速,E-mail: 1632121372@qq.com; 闫宗一(1997—),男,硕士研究生,研究方向:机器人,深度学习,E-mail: 1835752347@qq.com; 曹林杰(1997—),男,硕士研究生,研究方向:嵌入式系统,E-mail: 961151622@qq.com。

Medical Glass Bottle Mouth Defect Detection Method Based on Convolutional Autoencoder

  1. (School of Mechanical Engineering, Sichuan University, Chengdu 610065, China)
  • Online:2022-08-22 Published:2022-08-22

摘要: 为解决缺陷检测中缺陷样本数量少、种类多、难以提供足够的数据来进行有监督深度学习模型训练的问题,本文利用工业生产中大量易获取没有缺陷的正样本数据,建立Encoder-Decoder结构的卷积自编码网络缺陷检测模型,将空间和通道注意力的卷积注意力模块嵌入编码器中增强网络特征提取能力。在编码阶段加入上下文信息模块,获得更大的感受野,减小计算量。同时,结合多尺度结构相似性MS-SSIM和L1损失来改善图像重构效果,使用峰值信噪比PSNR衡量重构误差并判别异常。实验结果表明,提出的医用玻璃瓶口缺陷检测方法能够准确检出缺陷数据和分割缺陷区域,精确度为99.45%、召回率为97.63%、漏检率为0.55%、误检率为2.93%。该方法能够准确检出玻璃瓶口缺陷,定位缺陷区域,同时图像重构耗时短,仅需10.37 ms左右,能够实现准确、高效的自动化产品质量检测。

关键词: 医用玻璃瓶, 缺陷检测, 卷积自编码器, 注意力机制, 峰值信噪比

Abstract: To solve the problem of a small number and variety of defect samples in defect detection, which makes it difficult to provide enough data for training of supervised deep learning models, this paper uses a large amount of easily accessible positive sample data (without defects) in industrial production to built an auto-encoder model of convolutional network with Encoder-Decoder structure, and embeds the convolutional attention module combining spatial and channel attention in the encoder to enhance the network feature extraction ability. We added the contextual information module in the encoding stage to obtain a larger perceptual field and reduce the computational requirements. Meanwhile, multi-scale structural similarity MS-SSIM and L1 loss were combined to improve the quality of reconstructed images, and peak signal-to-noise ratio (PSNR) was used to measure reconstruction error and discriminate anomalies. The experimental results show that the proposed medical glass bottle defect detection method can accurately detect the defect data and segment the defect region with 99.45% accuracy, 97.63% recall rate, 0.55% miss detection rate, and 2.93% false detection rate. The method can accurately detect the glass bottle defect and locate the defect area, and the image reconstruction time is short, only about 10.37 ms, which can achieve accurate and efficient automated product quality inspection.

Key words: medical glass bottles, defect detection, convolutional self-encoder, attentional mechanism, peak signal-to-noise ratio