arXiv:2507.17176cs.CV2025-07被引 2

用剪枝与轻量化改进YOLOv8,提升PCB微小缺陷检测精度与速度

Multi-Scale PCB Defect Detection with YOLOv8 Network Improved via Pruning and Lightweight Network

  • 采用轻量骨干网络与多尺度特征融合增强小目标感知
  • 在公开数据集上mAP0.5达99.32%,较YOLOv8n提升10.13%
  • 适合工业实时检测场景,尤其适用于高密度PCB缺陷识别

随着印刷电路板(PCB)设计密度和生产速度的提高,传统缺陷检测模型难以兼顾精度与计算成本,无法满足微小缺陷高精度、实时检测的需求。本文提出一种基于改进YOLOv8的多尺度PCB缺陷检测方法,综合运用小目标敏感策略、网络轻量化与自适应剪枝技术,优化了主干网络、颈部网络、检测头、损失函数及剪枝率。骨干网采用参数更少的Ghost-HGNetv2结构,提取多层次图像语义特征以精准定位缺陷;颈部引入参数少的C2f-Faster模块,强化多层级特征融合能力;检测头设计新型GCDetect结构,共享分组卷积权重完成分类与回归任务,显著减少参数量;同时设计内部-边界MPDIoU损失函数,提升微小目标检测与定位性能。最后通过优化的自适应剪枝率进一步压缩模型复杂度。实验表明,在公开的PCB缺陷数据集上,mAP0.5达到99.32%,mAP0.5:0.9为75.18%,相比YOLOv8n提升10.13%。

原文摘要 · Abstract (English)

With the high density of printed circuit board (PCB) design and the high speed of production, the traditional PCB defect detection model is difficult to take into account the accuracy and computational cost, and cannot meet the requirements of high accuracy and real-time detection of tiny defects. Therefore, in this paper, a multi-scale PCB defect detection method is improved with YOLOv8 using a comprehensive strategy of tiny target sensitivity strategy, network lightweighting and adaptive pruning, which is able to improve the detection speed and accuracy by optimizing the backbone network, the neck network and the detection head, the loss function and the adaptive pruning rate. Firstly, a Ghost-HGNetv2 structure with fewer parameters is used in the backbone network, and multilevel features are used to extract image semantic features to discover accurate defects. Secondly, we integrate C2f-Faster with small number of parameters in the neck section to enhance the ability of multi-level feature fusion. Next, in the Head part, we design a new GCDetect detection head, which allows the prediction of bounding boxes and categories to share the weights of GroupConv, and uses a small number of grouping convolutions to accomplish the regression and classification tasks, which significantly reduces the number of parameters while maintaining the accuracy of detection. We also design the Inner-MPDIoU boundary loss function to improve the detection and localization of tiny targets. Finally, the model was pruned by an optimized adaptive pruning rate to further reduce the complexity of the model. Experimental results show that the model exhibits advantages in terms of accuracy and speed. On the publicly available PCB defect dataset, mAP0.5 reaches 99.32% and mAP0.5:0.9 reaches 75.18%, which is 10.13% higher compared to YOLOv8n.

缺陷检测YOLOv8轻量化PCB

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。