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

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

扫码查看
针对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表面缺陷图像的检测精度.
Lightweight PCB Defect Detection Method Based on Multi-scale Features and Attention Mechanism
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 gener-alization 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 per-ceive 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 co-efficient,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 accu-racy of PCB surface defect images.

deep supervisiondefect detectionlightweight networkattention mechanismU-Net

周永钦、王勇、王瑛

展开 >

广东工业大学计算机学院,广东 广州 510006

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

广东省重点领域研发计划项目

2021B0101420001

2024

计算机与现代化
江西省计算机学会 江西省计算技术研究所

计算机与现代化

CSTPCD
影响因子:0.472
ISSN:1006-2475
年,卷(期):2024.(2)
  • 27