计算机与现代化

• 算法设计与分析 • 上一篇    

基于改进型SSD算法的空瓶表面缺陷检测

  

  1. (四川大学机械工程学院,四川成都610065)
  • 收稿日期:2019-12-28 出版日期:2020-04-22 发布日期:2020-04-24
  • 作者简介:吴华运(1993-),男,河南信阳人,硕士研究生,研究方向:机器视觉,图像处理,E-mail: 875972102@qq.com; 通信作者:任德均(1971-),男,副教授,博士,研究方向:嵌入式控制系统,机器视觉,E-mail: rendejun@scu.edu.cn; 付磊(1995-),男,硕士研究生,研究方向:机器视觉,E-mail: 914508730@qq.com; 郜明(1996-),男,硕士研究生,研究方向:机器视觉,E-mail: 1204563110@qq.com; 吕义昭(1992-),男,硕士研究生,研究方向:嵌入式控制,E-mail: 1247736542@qq.com; 邱吕(1996-),女,硕士研究生,研究方向:机器视觉,E-mail: 2391361235@qq.com。

Surface Defect Detection of Empty Bottles Based on Improved SSD Algorithm

  1. (School of Mechanical Engineering, Sichuan University, Chengdu 610065, China)
  • Received:2019-12-28 Online:2020-04-22 Published:2020-04-24

摘要: 注塑空瓶在生产过程中瓶身表面会产生大量缺陷,这些缺陷对产品的外观和使用造成重要的影响。传统的人工检测由于劳动强度高、检测效率低等缺点已不适用,基于机器视觉的传统检测算法对于复杂的场景变化,所提取的特征通常很难用于缺陷分类和识别。因此,提出一种基于SSD算法,对注塑空瓶表面缺陷进行检测。考虑空瓶表面缺陷较小,特征难以提取,为提高检测效果,在SSD网络结构中加入特征融合模块,为预测层提供丰富的语义特征;同时在网络中引入注意力机制,增加网络的特征提取能力,有效地提高网络的检测精度。通过用空瓶表面缺陷数据集对本文的方法进行验证,准确率为98.3%,漏检率为0.74%,误检率为0.96%,mAP为96.5%,相比原始的SSD算法的mAP,本文算法提高了近5.6个百分点。

关键词: 缺陷检测, 卷积神经网络, 注意力机制, 尺度特征融合模块, 全局上下文模块

Abstract: Injection empty bottles can produce a large number of defects on the surface of bottles during production, and these defects have a significant impact on the appearance and use of the product. The traditional manual detection is no longer applicable due to the shortcomings of high labor intensity and low detection efficiency. For the traditional scene detection algorithms based on machine vision, the extracted features are often difficult to be used for defect classification and recognition for complex scene changes. Therefore, this paper proposes an SSD-based algorithm to detect the surface defects of injection empty bottles. Considering that the surface defect of empty bottle is small, it is difficult to extract features. In order to improve the detection effect, a feature fusion module is added to the SSD network structure to provide rich semantic features for the prediction layer. At the same time, an attention mechanism is introduced in the network to increase the feature extraction capability of the network and effectively improve the detection accuracy of the network. The method of this paper is verified on the empty bottle surface defect data set. The accuracy rate is 98.3%, the missed detection rate is 0.74%, the false detection rate is 0.96%, and the mAP is 96.5%. Compared with the mAP of original SSD algorithm, the algorithm in this paper improves by nearly 5.6 percentage points.

Key words: defect detection, convolutional neural network, attention mechanism, scale feature fusion module, global context block

中图分类号: