In printed circuit board (PCB) manufacturing, surface defects can significantly affect product quality. To address the performance degradation, high false detection rates, and missed detections caused by complex backgrounds in current intelligent inspection algorithms, this paper proposes CG-YOLOv8, a lightweight and improved model based on YOLOv8n for PCB surface defect detection. The proposed method optimizes the network architecture and compresses parameters to reduce model complexity while maintaining high detection accuracy, thereby enhancing the capability of identifying diverse defects under complex conditions. Specifically, a cascaded multi-receptive field (CMRF) module is adopted to replace the SPPF module in the backbone to improve feature perception, and an inverted residual mobile block (IRMB) is integrated into the C2f module to further enhance performance. Additionally, conventional convolution layers are replaced with GSConv to reduce computational cost, and a lightweight Convolutional Block Attention Module based Convolution (CBAMConv) module is introduced after Grouped Spatial Convolution (GSConv) to preserve accuracy through attention mechanisms. The detection head is also optimized by removing medium and large-scale detection layers, thereby enhancing the model’s ability to detect small-scale defects and further reducing complexity. Experimental results show that, compared to the original YOLOv8n, the proposed CG-YOLOv8 reduces parameter count by 53.9
Publications
- Article type
- Year
Article type
Year
Open Access
Article
Issue
Computers, Materials & Continua 2026, 86(1): 1-14
Published: 10 November 2025
Downloads:0
Total 1
京公网安备11010802044758号