Return
A lightweight PCB defect detection method based on group convolution and adaptive pruning
DOI:10.7717/peerj-cs.3243.png)
Abstract
En 中文
To address the inherent trade-off between detection accuracy and model complexity when performing printed circuit board (PCB) defect detection on resource-constrained industrial platforms, this article proposes a lightweight optimized model based on You Only Look Once version 8 nano (YOLOv8n). Specifically, we introduce a novel lightweight module, Cross Stage Partial Networks with Fusion and Star_Block (C2f_Star), which integrates the Cross Stage Partial Networks with Fusion (C2f) structure with the Star_Block structure, thereby significantly reducing model complexity. Concurrently, we design a lightweight detection head, Group Convolution and cross-task weight Sharing Detection head (GS_Detect), which further reduces computational overhead by incorporating Group Convolution (GroupConv) and a cross-task weight sharing mechanism. Given that most PCB defects typically manifest as small targets, we propose replacing the original complete intersection over union (CIoU) loss function with the Inner Minimum Point Distance intersection over union (Inner-MPDIoU) loss function. This novel function integrates auxiliary bounding box techniques with the Minimum Point Distance intersection over union (MPDIoU) to enhance localization accuracy. Furthermore, we adopt a structured pruning strategy based on layer adaptive multi-granularity pruning (LAMP) to eliminate redundant connections, further reducing model parameters and computational costs. Experimental validation on an enhanced PKU-Market-PCB dataset demonstrates that the proposed model outperforms the baseline YOLOv8n model across multiple key metrics: the number of parameters is reduced by 60%, computational cost is decreased by 51%, model size is reduced by 60%, and detection accuracy is improved from 95.0% to 96.7%, representing an increase of 1.7 percentage points. The experimental results fully validate the superior performance of this model in terms of accuracy, efficiency, and complexity, highlighting its significant potential for real-time industrial defect detection applications.
Keywords:
YOLOv8n
PCB defect detection
Lightweight model
Model pruning
Grouped convolution
Journal
IF:
2.5
Papers:
3.4K
Citations:
6.9K

