基于YOLOv12的PCB缺陷检测系统研究
Research on PCB Defect Detection System Based on YOLOv12
DOI: 10.12677/sea.2026.151011, PDF,    科研立项经费支持
作者: 佟 磊:河北软件职业技术学院软件工程系,河北 保定;河北省智能互联装备与多模态大数据应用技术研发中心,河北 保定
关键词: PCB缺陷检测YOLOv12PyQt5可视化系统实时检测PCB Defect Detection YOLOv12 PyQt5 Visual System Real-Time Detection
摘要: 针对传统PCB缺陷检测方法主观性强、漏检率高、泛化能力弱的问题,本文设计并实现了一种基于YOLOv12的PCB缺陷自动化检测系统。系统采用数据层、业务层、表现层三级架构,以DeepPCB数据集为训练基础,通过YOLOv12的注意力机制与高效特征聚合网络,实现对开路、短路、鼠咬等6类典型PCB缺陷的精准识别与定位。基于PyQt5构建可视化交互界面,集成缺陷检测、台账管理、数据导出等核心功能,单张图像检测耗时 ≤ 20 ms,满足工业场景实时检测需求,为电子制造业质检智能化升级提供技术支撑。
Abstract: Aiming at the problems of strong subjectivity, high missing detection rate and weak generalization ability of traditional PCB defect detection methods, this paper designs and implements an automated PCB defect detection system based on YOLOv12. The system adopts a three-level architecture consisting of data layer, business layer and presentation layer. Based on the DeepPCB dataset for training, it realizes accurate identification and localization of 6 types of typical PCB defects such as open circuit, short circuit and rat-bite through the attention mechanism and efficient feature aggregation network of YOLOv12. A visual interactive interface is built based on PyQt5, which integrates core functions including defect detection, account management and data export. The detection time of a single image is ≤20 ms, which meets the real-time detection requirements in industrial scenarios, and provides technical support for the intelligent upgrading of quality inspection in the electronic manufacturing industry.
文章引用:佟磊. 基于YOLOv12的PCB缺陷检测系统研究[J]. 软件工程与应用, 2026, 15(1): 107-115. https://doi.org/10.12677/sea.2026.151011

参考文献

[1] Redmon, J., Divvala, S., Girshick, R. and Farhadi, A. (2016) You Only Look Once: Unified, Real-Time Object Detection. 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, 27-30 June 2016, 779-788. [Google Scholar] [CrossRef
[2] 王玲, 向北平, 张晓勇. 改进YOLOv7的PCB缺陷检测算法[J]. 机械科学与技术, 2025, 44(1): 9-18.
[3] Xia, K., Lv, Z., Liu, K., Lu, Z., Zhou, C., Zhu, H., et al. (2023) Global Contextual Attention Augmented YOLO with Convmixer Prediction Heads for PCB Surface Defect Detection. Scientific Reports, 13, Article No. 9805. [Google Scholar] [CrossRef] [PubMed]
[4] 吴葛, 朱宇凡, 贾泽宁. 改进YOLO11的PCB表面缺陷检测方法[J]. 电子测量技术, 2025, 48(14): 631-645.
[5] Tian, Y., Ye, Q. and David, D. (2025) YOLOv12: Attention-Centric Real-Time Object Detectors.
https://arxiv.org/abs/2502.12524
[6] Tang, S., He, F., Huang, X., et al. (2019) Online PCB Defect Detector on a New PCB Defect Dataset. arXiv:1902.06197.
[7] 朱文伟. PyQt5从入门到精通[M]. 北京: 清华大学出版社, 2023.