无线电工程2025,Vol.55Issue(5):949-958,10.DOI:10.3969/j.issn.1003-3106.2025.05.006
改进YOLOv5s算法的PCB缺陷检测方法
PCB Defect Detection with Improved YOLOv5s Algorithm
摘要
Abstract
To enhance the accuracy and efficiency of Printed Circuit Board(PCB)defect detection,an improved YOLOv5s algorithm,named YOLOv5-pbe,is proposed.This algorithm incorporates four key optimizations.First,the Positional Self-Attention(PSA)mechanism is introduced into the backbone network,strengthening the extraction of critical features and improving the overall efficiency of feature extraction.Second,the Path Aggregation Network(PANet)structure in the neck network is replaced with a Bidirectional Feature Pyramid Network(BiFPN),enhancing the multi-scale feature fusion and improving the utilization of low-level features,especially performing outstandingly in detecting tiny defects.Third,a high-resolution detection head based on the P2 feature map is added,which is specifically designed for tiny PCB defects and addresses the deficiency of the original YOLOv5s algorithm in detecting tiny objects.Fourth,the Expected Intersection over Union(EIoU)loss function is adopted to replace the Complete Intersection over Union(CIoU)loss function,reducing the geometric mismatches in bounding boxes and significantly improving the precision of bounding box regression.Experimental results demonstrate that the YOLOv5-pbe algorithm outperforms the YOLOv5s algorithm in all metrics,with a 6.8%improvement in mean Average Precision(mAP@0.5),2.8%in precision,and 8.7%in recall,showing exceptional performance in detecting tiny defects.It provides a reliable solution for efficient PCB defect detection in industrial applications and has broad application prospects.关键词
PCB缺陷检测/极化自注意力机制/微小目标检测/YOLOv5sKey words
PCB defect detection/PSA/tiny object detection/YOLOv5s分类
计算机与自动化引用本文复制引用
赵奕翔,苏检德,何富运,郑泳泉..改进YOLOv5s算法的PCB缺陷检测方法[J].无线电工程,2025,55(5):949-958,10.基金项目
国家自然科学基金(62062014)National Natural Science Foundation of China(62062014) (62062014)