计算机与现代化 ›› 2024, Vol. 0 ›› Issue (02): 88-92.doi: 10.3969/j.issn.1006-2475.2024.02.014

• 人工智能 • 上一篇    下一篇

基于多尺度特征及注意力机制的轻量化PCB缺陷检测方法#br#


  

  1. (广东工业大学计算机学院,广东 广州  510006)
  • 出版日期:2024-02-19 发布日期:2024-03-19
  • 作者简介: 作者简介:周永钦(1996—),男,硕士研究生,研究方向:深度学习与目标检测,E-mail: 1391889724@qq.com; 通信作者:王勇(1968—),男,教授,博士,研究方向:深度学习与目标检测,虚拟仿真,物联网与智能决策,E-mail: 13928887919@126.com; 王瑛,女,副教授,研究方向:目标检测,大数据。
  • 基金资助:
    广东省重点领域研发计划项目(2021B0101420001)
      

Lightweight PCB Defect Detection Method Based on Multi-scale Features and Attention Mechanism

  1. (School of Computer Science and Technology, Guangdong University of Technology, Guangzhou 510006, China)
  • Online:2024-02-19 Published:2024-03-19

摘要: 摘要:针对PCB表面背景影响缺陷检测以及检测模型过大消耗资源的问题,提出一种可以有效提取多尺度信息和边缘信息的轻量化网络模型SL-Unet用于PCB表面缺陷检测。SL-Unet以U-Net结构作为主干网络,首先,利用U型残差结构捕获主干网络中每一维度的多尺度信息,加强浅层信息与深层信息的交流,并引入DropBlock模块提升模型的泛化能力;其次,利用解码器的边缘信息完成深度监督,并融入轻量级通道注意力模块提升边缘信息的特征依赖,以引导主干网络在提取特征时能感知缺陷的边缘信息;然后,通过边缘感知模块构建多级联合损失,用于整体模型的优化;最后,采用Leaky ReLU函数替换网络中的ReLU函数,提高模型对负区间的特征提取能力。实验结果表明SL-Unet的Dice系数、交并比、图像检测帧率和模型大小指标分别达到79.3%、67.4%、22 帧/s和3.46 MB,极大地保证了模型的轻量化并显著提升了PCB表面缺陷图像的检测精度。

关键词: 关键词:深度监督, 缺陷检测, 轻量化网络, 注意力机制, U-Net

Abstract: Abstract: To address the issues of surface background interference in PCB defect detection and resource consumption caused by large detection models, a lightweight network model called SL-Unet is proposed for effective extraction of multi-scale and edge information in PCB surface defect detection. SL-Unet utilizes the U-Net structure as the backbone network. Firstly, the U-shaped residual structure is used to capture multi-scale information in each dimension of the backbone network, strengthening the communication between shallow and deep information, and introducing the DropBlock module to improve the model’s generalization ability. Secondly, the edge information of the decoder is used to complete deep supervision, and a lightweight channel attention module is incorporated to enhance the feature dependence of edge information, guiding the backbone network to perceive the edge information of defects when extracting features. Then, a multi-level joint loss is constructed through the edge-aware module for the optimization of the overall model. Finally, the Leaky ReLU function is used to replace the ReLU function in the network, improving the model’s feature extraction ability in the negative interval. Experimental results show that the Dice coefficient, intersection over union, image detection frame rate and model size indicators of SL-Unet reach 79.3%, 67.4%, 22 frames/s and 3.46MB, respectively, greatly ensuring the lightweight of the model and significantly improving the detection accuracy of PCB surface defect images.

Key words: Key words: deep supervision, defect detection, lightweight network, attention mechanism, U-Net

中图分类号: