

浏览全部资源
扫码关注微信
1.常州工业职业技术学院 智能控制学院, 江苏 常州 213164
2.常州工业职业技术学院 邓建军工匠学院, 江苏 常州 213164
3.大连海洋大学 应用技术学院, 辽宁 大连 116300
Received:19 March 2026,
Revised:2026-04-15,
Published:05 May 2026
移动端阅览
GAO Xue, YUAN Fei, HUO Yanfei. PCB defect detection algorithm based on improved DEIM[J]. Chinese Journal of Liquid Crystals and Displays, 2026, 41(5): 700-716.
GAO Xue, YUAN Fei, HUO Yanfei. PCB defect detection algorithm based on improved DEIM[J]. Chinese Journal of Liquid Crystals and Displays, 2026, 41(5): 700-716. DOI: 10.37188/CJLCD.2026-0045. CSTR: 32172.14.CJLCD.2026-0045.
针对印刷电路板(Printed Circuit Board, PCB)表面缺陷目标尺寸小、背景复杂、分布密集以及现有检测算法难以兼顾精度与速度的问题,本文提出基于OL-HAIM(OverLoCK-HAFB-APKConv with Improved Matching)的PCB缺陷检测算法。该算法首先采用先概览后细看(OverLoCK)主干网络,通过深层级分解策略(DDS)和上下文混合动态卷积(ContMix)降低计算复杂度并增强小目标特征表达;其次设计了分层注意力融合模块(HAFB)替代基于CNN的跨尺度特征融合模块(CCFF)结构,通过局部-全局注意力机制提升微小缺陷检测能力;最后引入自适应逐点卷积(APKConv),通过可学习偏移量实现感受野自适应变形,精准捕获不同形态缺陷特征。实验结果表明,OL-HAIM在PCB-DEFECT数据集上的IoU阈值为0.5时的平均精度均值(mAP@0.5)达97.6%,较基线模型提升4.8个百分点;该模型参数量仅为13.8M,每秒浮点运算次数(FLOPS)降至23.6G,在RK3588嵌入式平台上的推理速度达55.7帧/s(FPS)。在NEU-DET(Northeastern University Surface Defect Detection Dataset)和MS COCO(Microsoft Common Objects in Context)数据集上的跨域实验验证了算法的泛化能力。在某PCB生产线实地采集样本上的现场测试中,模型的mAP@0.5达95.1%,于RK3588嵌入式平台的推理速度达55.4 FPS,兼顾了实地场景下的高精度检测与实时性需求。本文方法为工业现场PCB缺陷实时检测提供了兼顾高精度与轻量化部署的有效方案。
To address the challenges of small-sized targets, complex background, dense distribution of Printed Circuit Board(PCB) surface defects, and the difficulty of existing detection algorithms in balancing accuracy and speed, this paper proposes a PCB defect detection algorithm based on OverLoCK-HAFB-APKConv with Improved Matching(OL-HAIM). First, an Overview-first-Look-Closely-next(OverLoCK) backbone network is adopted, which leverages a Deep-level Decomposition Strategy(DDS) and Context-Mixing Dynamic Convolution(ContMix) to reduce computational complexity while enhancing feature representation for small targets. Second, a Hierarchical Attention Fusion Block(HAFB) is designed to replace the CNN-based Cross-scale Feature Fusion(CCFF) structure, exploiting a local-global attention mechanism to improve the detection capability for minute defects. Finally, an Adaptive Pointwise Kernel Convolution (APKConv) is introduced, which achieves adaptive deformation of the receptive field via learnable offsets to accurately capture defects of diverse morphologies. Experimental results demonstrate that OL-HAIM attains a mean Average Precision at IoU threshold of 0.5(mAP@0.5) of 97.6% on the PCB-DEFECT dataset, representing a 4.8 percentage-point improvement over the baseline, with only 13.8M parameters and Floating Point Operations Per Second(FLOPS) reduced to 23.6G, while achieving an inference speed of 55.7 frames/s(FPS) on the RK3588 embedded platform. Cross-domain experiments on the Northeastern University Surface Defect Detection Dataset(NEU-DET) and Microsoft Common Objects in Context(MS COCO) datasets further verify the generalization capability of the proposed algorithm. On field-collected samples from an actual PCB production line, the model achieves an mAP@0.5 of 95.1% and an inference speed of 55.4 FPS on the RK3588 embedded platform, concurrently meeting the requirements of high-accuracy detection and real-time performance in practical scenarios. The proposed method provides an effective solution that reconciles high accuracy with lightweight deployability for real-time PCB defect inspection in industrial settings.
杨彦萍 , 高军伟 , 刘兆龙 , 等 . 基于改进YOLO11的印刷电路板表面缺陷检测算法 [J]. 液晶与显示 , 2025 , 40 ( 10 ): 1545 - 1556 . doi: 10.37188/cjlcd.2025-0137 http://dx.doi.org/10.37188/cjlcd.2025-0137
YANG Y P , GAO J W , LIU Z L , et al . Surface defect detection on printed circuit boards based on improved YOLO11 [J]. Chinese Journal of Liquid Crystals and Displays , 2025 , 40 ( 10 ): 1545 - 1556 . (in Chinese) . doi: 10.37188/cjlcd.2025-0137 http://dx.doi.org/10.37188/cjlcd.2025-0137
李江 , 骆炜 , 陈豪 , 等 . 基于改进RT-DETR的PCBA管脚焊点缺陷检测方法 [J]. 液晶与显示 , 2025 , 40 ( 10 ): 1532 - 1544 . doi: 10.37188/cjlcd.2025-0143 http://dx.doi.org/10.37188/cjlcd.2025-0143
LI J , LUO W , CHEN H , et al . PCBA pin solder defect detection method based on improved RT-DETR [J]. Chinese Journal of Liquid Crystals and Displays , 2025 , 40 ( 10 ): 1532 - 1544 . (in Chinese) . doi: 10.37188/cjlcd.2025-0143 http://dx.doi.org/10.37188/cjlcd.2025-0143
WENINGER D , SERNA S , RANNO L , et al . Advances in waveguide to waveguide couplers for 3D integrated photonic packaging [J]. Light: Science & Applications , 2026 , 15 ( 1 ): 17 . doi: 10.1038/s41377-025-02048-w http://dx.doi.org/10.1038/s41377-025-02048-w
HE C S , ZHAO L , ZHANG S , et al . Intrinsic topological hinge states induced by boundary gauge fields in photonic metamaterials [J]. eLight , 2025 , 5 ( 1 ): 19 . doi: 10.1186/s43593-025-00097-7 http://dx.doi.org/10.1186/s43593-025-00097-7
ANNABY M H , FOUDA Y M , RUSHDI M A . Improved normalized cross-correlation for defect detection in printed-circuit boards [J]. IEEE Transactions on Semiconductor Manufacturing , 2019 , 32 ( 2 ): 199 - 211 . doi: 10.1109/tsm.2019.2911062 http://dx.doi.org/10.1109/tsm.2019.2911062
TSAI D M , HUANG C K . Defect detection in electronic surfaces using template-based Fourier image reconstruction [J]. IEEE Transactions on Components, Packaging and Manufacturing Technology , 2019 , 9 ( 1 ): 163 - 172 . doi: 10.1109/tcpmt.2018.2873744 http://dx.doi.org/10.1109/tcpmt.2018.2873744
HU B , WANG J H . Detection of PCB surface defects with improved faster-RCNN and feature pyramid network [J]. IEEE Access , 2020 , 8 : 108335 - 108345 . doi: 10.1109/access.2020.3001349 http://dx.doi.org/10.1109/access.2020.3001349
REDMON J , DIVVALA S , GIRSHICK R , et al . You only look once: unified, real-time object detection [C]// Proceedings of the 2016 IEEE Conference on Computer Vision and Pattern Recognition . Las Vegas : IEEE , 2016 : 779 - 788 . doi: 10.1109/cvpr.2016.91 http://dx.doi.org/10.1109/cvpr.2016.91
YUAN M H , ZHOU Y B , REN X Y , et al . YOLO-HMC: An improved method for PCB surface defect detection [J]. IEEE Transactions on Instrumentation and Measurement , 2024 , 73 : 2001611 . doi: 10.1109/tim.2024.3351241 http://dx.doi.org/10.1109/tim.2024.3351241
周著国 , 鲁玉军 , 吕利叶 . 基于改进YOLOv5s的印刷电路板缺陷检测算法 [J]. 浙江大学学报(工学版) , 2025 , 59 ( 8 ): 1608 - 1616 .
ZHOU Z G , LU Y J , LV L Y . Improved YOLOv5s-based algorithm for printed circuit board defect detection [J]. Journal of Zhejiang University (Engineering Science) , 2025 , 59 ( 8 ): 1608 - 1616 . (in Chinese)
ZHOU Z G , LU Y J , LV L Y . Real-time surface defect detection algorithm for printed circuit boards based on improved YOLOv11n [J]. The Journal of Supercomputing , 2025 , 81 ( 10 ): 1148 . doi: 10.1007/s11227-025-07625-9 http://dx.doi.org/10.1007/s11227-025-07625-9
孟伟君 , 安雯 , 马素刚 , 等 . 基于特征增强与自适应阈值非极大值抑制的目标检测算法 [J]. 北京航空航天大学学报 , 2025 , 51 ( 7 ): 2349 - 2359 .
MENG W J , AN W , MA S G , et al . An object detection algorithm based on feature enhancement and adaptive threshold non-maximum suppression [J]. Journal of Beijing University of Aeronautics and Astronautics , 2025 , 51 ( 7 ): 2349 - 2359 . (in Chinese)
CARION N , MASSA F , SYNNAEVE G , et al . End-to-end object detection with transformers [C]// Proceedings of the 16th European Conference on Computer Vision . Glasgow : Springer , 2020 : 213 - 229 . doi: 10.1007/978-3-030-58452-8_13 http://dx.doi.org/10.1007/978-3-030-58452-8_13
ZHAO Y A , LV W Y , XU S L , et al . DETRs beat YOLOs on real-time object detection [C]// Proceedings of the 2024 IEEE/CVF Conference on Computer Vision and Pattern Recognition . Seattle : IEEE , 2024 : 16965 - 16974 . doi: 10.1109/cvpr52733.2024.01605 http://dx.doi.org/10.1109/cvpr52733.2024.01605
WANG Y S , WU B B , ZHANG L H , et al . Enhanced PCB defect detection via HSA-RTDETR on RT-DETR [J]. Scientific Reports , 2025 , 15 : 31783 . doi: 10.1038/s41598-025-11394-z http://dx.doi.org/10.1038/s41598-025-11394-z
李鹏 , 余珺泽 , 于涛 , 等 . 基于轻量化RT-DETR的PCB缺陷检测算法 [J]. 计算机工程与设计 , 2025 , 46 ( 9 ): 2714 - 2721 .
LI P , YU J Z , YU T , et al . PCB defect detection algorithm based on lightweight RT-DETR [J]. Computer Engineering and Design , 2025 , 46 ( 9 ): 2714 - 2721 . (in Chinese)
HUANG S H , LU Z C , CUN X D , et al . DEIM: DETR with improved matching for fast convergence [C]// Proceedings of the 2025 IEEE/CVF Conference on Computer Vision and Pattern Recognition . Nashville : IEEE , 2025 : 15162 - 15171 . doi: 10.1109/cvpr52734.2025.01412 http://dx.doi.org/10.1109/cvpr52734.2025.01412
ZHAO X L , ZHANG H F , SONG C H , et al . Lightweight intelligent detection algorithm for surface defects in printed circuit board [J]. Computers & Industrial Engineering , 2025 , 203 : 111030 . doi: 10.1016/j.cie.2025.111030 http://dx.doi.org/10.1016/j.cie.2025.111030
GAO Z W , LI Y Y , YUAN S H . DECNet: an efficient improved model for printed circuit board surface defect detection [J]. Signal, Image and Video Processing , 2026 , 20 ( 4 ): 188 . doi: 10.1007/s11760-026-05175-y http://dx.doi.org/10.1007/s11760-026-05175-y
ZHU L Y , WANG S , CHEN M F , et al . Subtle defect detection network: more accurately detect subtle defects on the printed circuit board surface [J]. Engineering Applications of Artificial Intelligence , 2025 , 152 : 110765 . doi: 10.1016/j.engappai.2025.110765 http://dx.doi.org/10.1016/j.engappai.2025.110765
朱黎颖 , 王森 , 沈爱萍 , 等 . 复杂背景下的电路板表面焊接缺陷视觉检测 [J]. 光学 精密工程 , 2024 , 32 ( 14 ): 2256 - 2271 . doi: 10.37188/ope.20243214.2256 http://dx.doi.org/10.37188/ope.20243214.2256
ZHU L Y , WANG S , SHEN A P , et al . Visual inspection of soldering defects on board surfaces against complex backgrounds [J]. Optics and Precision Engineering , 2024 , 32 ( 14 ): 2256 - 2271 . (in Chinese) . doi: 10.37188/ope.20243214.2256 http://dx.doi.org/10.37188/ope.20243214.2256
欧宇枫 , 王嘉宏 . 基于双分支特征提取的小目标印刷电路板缺陷检测方法 [J/OL]. 计算机应用 , 2026 : 1 - 9 . https://link.cnki.net/urlid/51.1307.TP.20251107.1547.014 https://link.cnki.net/urlid/51.1307.TP.20251107.1547.014 . doi: 10.1016/j.asoc.2025.114072 http://dx.doi.org/10.1016/j.asoc.2025.114072
OU Y F , WANG J H . Small target printed circuit board defect detection method based on dual-branch feature extraction [J/OL]. Journal of Computer Applications , 2026 : 1 - 9 . https://link.cnki.net/urlid/51.1307.TP. 20251107.1547.014 https://link.cnki.net/urlid/51.1307.TP.20251107.1547.014 . (in Chinese) . doi: 10.1016/j.asoc.2025.114072 http://dx.doi.org/10.1016/j.asoc.2025.114072
魏嘉敏 , 续欣莹 , 韩晖 , 等 . 基于YOLO-HorL的轻量级PCB缺陷检测算法 [J]. 计算机工程与设计 , 2025 , 46 ( 11 ): 3283 - 3291 .
WEI J M , XU X Y , HAN H , et al . Lightweight PCB defect detection algorithm based on YOLO-HorL [J]. Computer Engineering and Design , 2025 , 46 ( 11 ): 3283 - 3291 . (in Chinese)
LOU M , YU Y Z . OverLoCK: An overview-first-look-closely-next ConvNet with context-mixing dynamic kernels [C]// Proceedings of the 2025 IEEE/CVF Conference on Computer Vision and Pattern Recognition . Nashville : IEEE , 2025 : 128 - 138 . doi: 10.1109/cvpr52734.2025.00021 http://dx.doi.org/10.1109/cvpr52734.2025.00021
ZHANG X , SONG Y Z , SONG T T , et al . AKConv: Convolutional kernel with arbitrary sampled shapes and arbitrary number of parameters [J/OL]. arXiv , 2024 : 2311 . 11587 .
WANG A , CHEN H , LIN Z J , et al . Rep ViT: Revisiting mobile CNN from ViT perspective [C]// Proceedings of the 2024 IEEE/CVF Conference on Computer Vision and Pattern Recognition . Seattle : IEEE , 2024 : 15909 - 15920 . doi: 10.1109/cvpr52733.2024.01506 http://dx.doi.org/10.1109/cvpr52733.2024.01506
YE T , WANG Z , QIN Y , et al . A hypergraph computing and knowledge-enhanced framework for forklift pallet pose estimation [J]. Annals of the New York Academy of Sciences , 2026 , 1556 ( 1 ): e70219 . doi: 10.1111/nyas.70219 http://dx.doi.org/10.1111/nyas.70219
HOWARD A G , ZHU M , CHEN B , et al . MobileNets: Efficient convolutional neural networks for mobile vision applications [J/OL]. arXiv , 2017 : 1704 . 04861 . doi: 10.48550/arXiv.1704.04861 http://dx.doi.org/10.48550/arXiv.1704.04861
陈名渝 , 谢玥辰 , 吕雄涛 , 等 . 冷轧钢表面与内部缺陷检测研究 [J]. 中国光学(中英文) , 2024 , 17 ( 4 ): 823 - 833 . doi: 10.37188/co.2023-0189 http://dx.doi.org/10.37188/co.2023-0189
CHEN M Y , XIE Y C , LV X T , et al . Detection of surface and internal defects in cold rolled steel [J]. Chinese Optics , 2024 , 17 ( 4 ): 823 - 833 . (in Chinese) . doi: 10.37188/co.2023-0189 http://dx.doi.org/10.37188/co.2023-0189
PENG Y S , LI H B , WU P X , et al . D-FINE: Redefine regression task in DETRs as fine-grained distribution refinement [C]// Proceedings of the 13th International Conference on Learning Representations . Singapore : OpenReview.net , 2025 : 1 - 23 .
蒋仕飞 , 张兆国 , 王法安 , 等 . 纸膜双层缺陷检测的视觉成像光场设计 [J]. 中国光学(中英文) , 2024 , 17 ( 2 ): 354 - 365 . doi: 10.37188/co.2023-0134 http://dx.doi.org/10.37188/co.2023-0134
JIANG S F , ZHANG Z G , WANG F A , et al . Design of optical field of vision imaging for defect detection of paper and transparent film [J]. Chinese Optics , 2024 , 17 ( 2 ): 354 - 365 . (in Chinese) . doi: 10.37188/co.2023-0134 http://dx.doi.org/10.37188/co.2023-0134
0
Views
139
下载量
0
CSCD
Publicity Resources
Related Articles
Related Author
Related Institution
京公网安备11010802024621