|
|
|
| PCB defect detection algorithm based on detail enhancement and cross-scale attention fusion |
Chunjuan LIU1( ),Yihang BAO1,Xiaosuo WU1,*( ),Haowen YAN1,Tieshuan ZHU2,Haoran ZHAO1 |
1. School of Electronic and Information Engineering, Lanzhou Jiaotong University, Lanzhou 730070, China 2. China Railway First Survey and Design Institute Group Co., Ltd., Xi’an 710043, China |
|
|
|
Abstract An improved algorithm for printed circuit board (PCB) defect detection, named DCFA-DETR, was proposed to address the challenge of balancing detection accuracy and speed arising from the multi-scale variations and fine-grained features of PCB surface defects and complex circuit backgrounds. DCFA-DETR was developed based on the RT-DETR baseline. In the backbone, detail-enhanced convolution (DEConv) and wavelet pooling were introduced to enhance the algorithm’s capability of representing high-frequency details, such as defect edges, from the source. In the neck, a rectangular context-aware feature pyramid network (RCAFPN) and a high-resolution cross-attention module (HRCAM) were designed to aggregate multi-scale contextual information efficiently, fusing shallow high-resolution features to improve the detection performance for tiny-target defects. Furthermore, the dynamic focusing mechanism of the Wise-IoUv3 loss function was utilized to optimize the regression precision of bounding boxes. Experiments were conducted on the PKU-Market-PCB dataset. DCFA-DETR achieved an mAP50 of 97.0%, an mAP50-95 of 57.3%, and an inference speed of 84.4 FPS for single image inputs. The proposed algorithm balances detection accuracy and speed effectively.
|
|
Received: 18 November 2025
Published: 16 October 2026
|
|
|
| Fund: 国家重点研发计划资助项目(2022YFB3903604);甘肃省自然科学基金资助项目(21JR7RA310);青海理工学院“昆仑英才”人才引进科研项目(W2023-QLGKLYCZX-034). |
|
Corresponding Authors:
Xiaosuo WU
E-mail: liuchj@mail.lzjtu.cn;43452740@qq.com
|
基于细节增强和跨尺度注意力融合的PCB缺陷检测算法
印刷电路板(PCB)表面缺陷尺度多变、特征精细且电路背景复杂,导致缺陷检测的精度与速度难以平衡,为此提出改进的PCB缺陷检测算法DCFA-DETR. 以RT-DETR为基线,将细节增强卷积(DEConv)与小波池化引入骨干网络,从源头强化算法对高频细节(如缺陷边缘)的表征能力. 颈部设计矩形上下文感知特征金字塔网络(RCAFPN)和高分辨率交叉注意力模块(HRCAM),高效聚合多尺度上下文信息,通过融合浅层高分辨率特征提升检测微小目标缺陷的性能,利用Wise-IoUv3损失函数的动态聚焦机制优化边界框的回归精度. 实验结果表明,DCFA-DETR在PKU-Market-PCB数据集上的mAP50达到97.0%,mAP50-95达到57.3%,单张图片推理速度为84.4 帧/s. 所提算法在检测精度与速度间取得了平衡.
关键词:
印制电路板(PCB),
缺陷检测,
RT-DETR,
多尺度特征融合,
小波池化
|
|
| [1] |
BALAKRISHNAN T, SENGAR S S. RepVGG-GELAN: enhanced GELAN with VGG-STYLE convnets for brain tumour detection [C]// Computer Vision and Image Processing. Cham: Springer, 2026: 417–430.
|
|
|
| [2] |
ZHENG X, ZHENG S, KONG Y, et al Recent advances in surface defect inspection of industrial products using deep learning techniques[J]. The International Journal of Advanced Manufacturing Technology, 2021, 113 (1): 35- 58
doi: 10.1007/s00170-021-06592-8
|
|
|
| [3] |
YANG J, WANG C, JIANG B, et al Visual perception enabled industry intelligence: state of the art, challenges and prospects[J]. IEEE Transactions on Industrial Informatics, 2021, 17 (3): 2204- 2219
doi: 10.1109/TII.2020.2998818
|
|
|
| [4] |
CHEN X, WU Y, HE X, et al A comprehensive review of deep learning-based PCB defect detection[J]. IEEE Access, 2023, 11: 139017- 139038
doi: 10.1109/ACCESS.2023.3339561
|
|
|
| [5] |
REN S, HE K, GIRSHICK R, et al Faster R-CNN: towards real-time object detection with region proposal networks[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2017, 39 (6): 1137- 1149
doi: 10.1109/TPAMI.2016.2577031
|
|
|
| [6] |
REDMON J, DIVVALA S, GIRSHICK R, et al. You only look once: unified, real-time object detection [C]// Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. Las Vegas: IEEE, 2016: 779–788.
|
|
|
| [7] |
VARGHESE R, M S. YOLOv8: a novel object detection algorithm with enhanced performance and robustness [C]// Proceedings of the International Conference on Advances in Data Engineering and Intelligent Computing Systems. Chennai: IEEE, 2024: 1–6.
|
|
|
| [8] |
WANG C Y, YEH I H, MARK LIAO H Y. YOLOv9: learning what you want toLearn using programmable gradient information [C]// Computer Vision – ECCV 2024. Cham: Springer, 2025: 1–21.
|
|
|
| [9] |
WANG A, CHEN H, LIU L, et al. YOLOv10: real-time end-to-end object detection [C]// Proceedings of the Advances in Neural Information Processing Systems 37. Vancouver: NeurIPS, 2024: 107984–108011.
|
|
|
| [10] |
SABERIRONAGHI A, REN J, EL-GINDY M Defect detection methods for industrial products using deep learning techniques: a review[J]. Algorithms, 2023, 16 (2): 95
doi: 10.3390/a16020095
|
|
|
| [11] |
卞佰成, 陈田, 吴入军, 等 基于改进YOLOv3的印刷电路板缺陷检测算法[J]. 浙江大学学报: 工学版, 2023, 57 (4): 735- 743 BIAN Baicheng, CHEN Tian, WU Rujun, et al Improved YOLOv3-based defect detection algorithm for printed circuit board[J]. Journal of Zhejiang University: Engineering Science, 2023, 57 (4): 735- 743
doi: 10.3785/j.issn.1008-973X.2023.04.011
|
|
|
| [12] |
LI K, ZHONG X, HAN Y Pcb defect detection based on a novel dual-domain high-frequency adaptive enhanced pooling method[J]. Cluster Computing, 2025, 28 (11): 707
doi: 10.1007/s10586-025-05438-2
|
|
|
| [13] |
周著国, 鲁玉军, 吕利叶 基于改进YOLOv5s的印刷电路板缺陷检测算法[J]. 浙江大学学报: 工学版, 2025, 59 (8): 1608- 1616 ZHOU Zhuoguo, LU Yujun, LV Liye Improved YOLOv5s-based algorithm for printed circuit board defect detection[J]. Journal of Zhejiang University: Engineering Science, 2025, 59 (8): 1608- 1616
doi: 10.3785/j.issn.1008-973X.2025.08.007
|
|
|
| [14] |
VASWANI A, SHAZEER N, PARMAR N, et al. Attention is all you need [C]// Proceedings of the 31st International Conference on Neural Information Processing Systems. [S.l.]: Curran Associates Inc. , 2017: 6000–6010.
|
|
|
| [15] |
CARION N, MASSA F, SYNNAEVE G, et al. End-to-end object detection with transformers [C]// Computer Vision – ECCV 2020. Cham: Springer, 2020: 213–229.
|
|
|
| [16] |
ZHU X, SU W, LU L, et al. Deformable DETR: deformable transformers for end-to-end object detection [EB/OL]. (2021–03–18)[2025–10–07]. https://arxiv.org/pdf/2010.04159.
|
|
|
| [17] |
LIU S, LI F, ZHANG H, et al. DAB-DETR: dynamic anchor boxes are better queries for DETR [EB/OL]. (2022–03–30)[2025–10–07]. https://arxiv.org/pdf/2201.12329.
|
|
|
| [18] |
LI F, ZHANG H, LIU S, et al. DN-DETR: accelerate DETR training by introducing query denoising [C]// Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. New Orleans: IEEE, 2023: 13619–13627.
|
|
|
| [19] |
ZHANG H, LI F, LIU S, et al. DINO: DETR with improved denoising anchor boxes for end-to-end object detection [EB/OL]. (2022–07–11)[2025–10–07]. https://arxiv.org/pdf/2203.03605.
|
|
|
| [20] |
ZHAO Y, LV W, XU S, et al. DETRs beat YOLOs on real-time object detection [C]// Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. Seattle: IEEE, 2024: 16965–16974.
|
|
|
| [21] |
CHEN Z, HE Z, LU Z M DEA-net: single image dehazing based on detail-enhanced convolution and content-guided attention[J]. IEEE Transactions on Image Processing, 2024, 33: 1002- 1015
doi: 10.1109/TIP.2024.3354108
|
|
|
| [22] |
WILLIAMS T, LI R Y. Wavelet pooling for convolutional neural networks [C]// Proceedings of the International Conference on Learning Representations. Vancouver: [s.n.], 2018: 1–12.
|
|
|
| [23] |
LIN H, CHENG X, WU X, et al. CAT: cross attention in vision transformer [C]// Proceedings of the IEEE International Conference on Multimedia and Expo. Taipei. IEEE, 2022: 1–6.
|
|
|
| [24] |
TONG Z, CHEN Y, XU Z, et al. Wise-IoU: bounding box regression loss with dynamic focusing mechanism [EB/OL]. (2023–04–08)[2025–10–07]. https://arxiv.org/pdf/2301.10051.
|
|
|
| [25] |
DING X, XIA C, ZHANG X, et al. RepMLP: re-parameterizing convolutions into fully-connected layers for image recognition [EB/OL]. (2022–03–30)[2025–10–07]. https://arxiv.org/pdf/2105.01883.
|
|
|
|
Viewed |
|
|
|
Full text
|
|
|
|
|
Abstract
|
|
|
|
|
Cited |
|
|
|
|
| |
Shared |
|
|
|
|
| |
Discussed |
|
|
|
|