基于改进的EP-RTDETR小目标PCB表面缺陷检测

Improved EP-RTDETR based surface defect detection on PCB

  • 摘要: 针对印刷电路板(printed circuit board, PCB)缺陷检测过程中,因包含丰富的小目标缺陷,易出现漏检、误检现象,提出一种基于改进增强金字塔实时检测变换器(enhance pyramid real time detection transformer, EP-RTDETR)小目标PCB表面缺陷检测算法。首先,使用CSPDarknet替代原始骨干网络,以增强模型的特征提取能力;其次,设空间移动卷积门控线性单元 (spatial moving point convolutional gated linear unit, SMPCGLU)模块改造C2f中的Bottleneck,增强了特征的门控调制能力和空间自适应性;再次,引入可学习位置编码,改进尺度交互机制,增强对不同位置信息的响应能力;然后,基于跨尺度特征融合模块(cross-scale feature-fusion module, CCFM)模块设计小目标增强金字塔结构(small object enhance pyramid, SOEP),增强的特征层和精细的特征融合使模型能够更准确地定位和识别小目标;最后,设计MPDIoU (minimum point distance-based intersection over union)+NWD (normalized wasserstein distance)loss,在加快模型收敛速度的同时更加关注小目标缺陷,回归结果更加准确。试验结果表明,相较于基准模型,准确率P提高了4.6%,召回率R提高了5.1%,平均精度均值mAP50提高了4.6%,参数量减少了16.38 M,浮点数减少了48.3,FPS提高了8.51 s,能够更好地进行小目标PCB表面缺陷检测。

     

    Abstract: Aiming at the printed circuit board (PCB) defect detection process, which is prone to leakage and misdetection due to the inclusion of abundant small-target defects, an improved EP-RTDETR-based small-target PCB surface defect detection algorithm is proposed. Firstly, CSPDarknet is used to replace the original backbone network to enhance the feature extraction capability of the model. Secondly, the SMPCGLU module is designed to modify the Bottleneck in C2f, which enhances the gated modulation capability and spatial adaptability of the features. Thirdly, the learnable position coding is introduced to improve the scale-interaction mechanism and to enhance the responsiveness to different positional information. Fourthly, small target enhanced pyramid structure small object enhance pyramid (SOEP) is designed based on cross-channel feature mixing (CCFM) module, and the enhanced feature layer and fine feature fusion enable the model to locate and identify the small targets more accurately. Finally, MPDIoU (minimum point distance-based intersection over union)+NWD (normalized wasserstein distance) loss is designed, which accelerates the convergence speed of the model while focusing more on the small target defects, and the regression results are more accurate. The experimental results show that compared with the benchmark model, P improves by 4.6%, R improves by 5.1%, mAP50 improves by 4.6%, the amount of parameters reduces by 16.38 m, the number of floating points reduces by 48.3, and the FPS improves by 8.51, which is able to perform better small target PCB surface defect detection.

     

/

返回文章
返回