随着电子设备的广泛应用,印刷电路板(Printed Circuit Board,PCB)在电子制造行业中具有重要意义.然而,由于制造过程中的不完美和环境因素的干扰,PCB上可能存在微小的缺陷.因此,开发高效准确的缺陷检测算法对于确保产品质量至关重要.针对PCB微小缺陷检测问题,本文提出了一种基于多维注意力机制的高精度PCB微小缺陷检测算法.为降低网络的模型参数量和计算量,引入部分卷积(Partial Convolution,PConv),将ELAN(Efficient Layer Aggregation Network)模块设计为更加高效的P-ELAN,同时,为增强网络对微小缺陷的特征提取能力,引入多维注意力机制(Multi-Dimensional Attention Mechanism,MDAM)的全维动态卷积(Omni-dimensional Dynamic Convolution,ODConv)并结合部分卷积,设计了POD-CSP(Partial ODconv-Cross Stage Partial)和POD-MP(Partial ODconv-Max Pooling)跨阶段部分网络模块,提出了OD-Neck结构.最后,本文基于(Youo Only Look Once version 7,YOLOv7)提出了对小目标更加高效的YOLO-POD模型,并在训练阶段采用一种新颖的Alpha-SIoU损失函数对网络进行优化.实验结果表明,YOLO-POD的检测精确率和召回率分别达到了98.31%和97.09%,并在多个指标上取得了领先优势,尤其是对于更严格的(mean Average Precision at IoU threshold of 0.75,mAP75)指标,比原始的YOLOv7模型提高28%.验证了YOLO-POD在PCB缺陷检测性能中具有较高的准确性和鲁棒性,满足高精度的检测要求,可为PCB制造行业提供有效的检测解决方案.
YOLO-POD:High-Precision PCB Tiny-Defect Detection Algorithm Based on Multi-Dimensional Attention Mechanism
With the widespread application of electronic devices,printed circuit boards (PCB) hold significant impor-tance in the electronics manufacturing industry. However,due to imperfections in the manufacturing process and interfer-ence from environmental factors,tiny defects may in PCB. Therefore,the development of efficient and accurate defect de-tection algorithms is crucial in ensuring product quality. To address the challenge of detecting tiny defects on PCB,this pa-per proposes a high-precision PCB tiny defect detection algorithm based on multi-dimensional attention mechanism. To re-duce model parameters and computational complexity,partial convolution (PConv) is introduced,and the ELAN module is redesigned as the more efficient P-ELAN. Additionally,to enhance the network's feature extraction capability for tiny de-fects,the omni-dimensional dynamic convolution (ODConv) based on the multi-dimensional attention mechanism (MDAM) is introduced. By combining partial convolution,the POD-CSP (Partial ODConv-Cross Stage Partial) and POD-MP (Partial ODConv-Max Pooling) cross-stage partial network modules are designed,along with the OD-Neck structure. Fi-nally,based on YOLOv7,a more efficient YOLO-POD model for small object detection is proposed,and the network is op-timized during the training phase using a novel loss function called Alpha-SIoU. Experimental results demonstrate that YO-LO-POD achieves a detection precision of 98.31% and recall rate of 97.09%,exhibiting substantial advantages across multi-ple metrics. Notably,it achieves a 28% improvement over the original YOLOv7 model,as to more stringent mAP75 metric. These results validate the high accuracy and robustness of YOLO-POD in PCB defect detection,fulfilling the requirements for high-precision detection and providing an effective detection solution for the PCB manufacturing industry.