YOLO-SUMAS: Improved Printed Circuit Board Defect Detection and Identification Research Based on YOLOv8
Abstract
:1. Introduction
- Adding the SCSA attention mechanism enhances the generalization ability in visual tasks such as image classification, target detection, and semantic segmentation.
- Introducing Unified-IoU loss function, optimized for high-quality targets. Unified-IoU introduces the FocalBox method, which allocates weights by scaling the prediction frames with the real frames and employs an annealing strategy (introducing the dynamic parameter epoch), which gradually shifts the model’s attention from the low-quality prediction frames to the high-quality prediction frames, balancing the training speed and detection accuracy.
- The backbone part combines the Universal Inverted Bottleneck (UIB) module of MobileNetV4 to form the C2fUIB model, which improves the performance of the lightweight network, and the MobileMQA attention mechanism further optimizes the inference speed of the mobile gas pedal.
- The neck part combines the novel network structure of SDI and ASF-YOLO to enhance the performance of target detection and segmentation tasks. The SDI module and the weighted bidirectional feature pyramid network of ASF-YOLO enhance the semantic and detailed information of the image to achieve excellent performance in instance segmentation.
- The effectiveness of each part of this paper and the performance advantages of the proposed algorithm are verified by image enhancement, ablation experiments, and comparison experiments on the PKU-MARKET-PCB public dataset.
2. Methodology
2.1. Overall Architecture of YOLO-SUMAS
2.2. Key Technical Innovations
2.2.1. SCSA Attention Mechanism [29]
2.2.2. Loss Function [30]
2.2.3. Neural Network Architecture [31]
2.2.4. Neck Network Architecture
- Triple Feature Encoder (TFE) module
- 2.
- Channel and Position Attention Mechanism (CPAM)
- Spatial and channel attention mechanism
- 2.
- Semantic and detail injection SDI module
- 3.
- Smooth convolution
2.3. Synergistic Mechanism Analysis
- SCSA dynamically focuses the local details (such as missing solder joints) and global semantics (such as short circuit areas) of PCB defects through spatial-channel co-attention. Its progressive channel compression strategy reduces redundant computations and provides highly discriminative features for subsequent modules. As well, the optimized features of SCSA output are lightweight processed by the UIB module of MobileNetV4 (Figure 3) to reduce the number of parameters while retaining key information.
- The UIB module of MobileNetV4 combines with the inverted bottleneck structure to achieve efficient multi-scale feature extraction on the mobile terminal. Its MobileMQA attention reduces the amount of computation through spatial downsampling, and forms a two-stage optimization of “coarse sift-fining” with SCSA. In addition, the features of MobileNetV4 after lightweight are input into ASF-SDI Neck, and the small target details are enhanced by weighted bidirectional pyramid to avoid information loss caused by lightweight.
- Through the semantic-detail injection module, ASF-SDI fuses high-level semantics (such as defect categories) with low-level geometric features (such as edge shapes) to solve the problem of large differences in PCB defect sizes. In addition, after multi-scale feature optimization, ASF-SDI and Unified-IoU refine the localization by dynamic bounding box scaling to reduce missed detection of overlapping defects.
- Unified-IoU introduces a bidirectional weight allocation strategy, which imposes higher loss weights on low confidence prediction boxes (difficult samples), and uses cosine decay to balance training speed and accuracy. The loss optimization results of Unified-IoU reverse guide the feature extraction priorities of SCSA and MobileNetV4, forming an end-to-end optimization and closed-loop feedback to the overall framework.
2.4. Implementation Details
3. Experimental Results and Discussion
3.1. Dataset
3.1.1. Data Set Division
3.1.2. Conversion of the Dataset
3.2. Experimental Platform
3.2.1. Experiment Configuration
3.2.2. Experimental Parameters for This Experiment
3.2.3. Experimental Evaluation Metrics
3.3. Experimental Results
3.3.1. Comparison Experiments
3.3.2. Comparison Results
3.3.3. Performance Data Visualization
3.3.4. Optimization of Module Ablation Experiment
- Independent Module Contribution Analysis
- 2.
- The analysis of the module synergistic effect
3.3.5. Comparison with Other Models
4. Visualization Deployment
5. Conclusions
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Jiang, W.; Li, T.; Zhang, S.; Chen, W.; Yang, J. PCB defects target detection combining multi-scale and attention mechanism. Eng. Appl. Artif. Intell. 2023, 123, 106359. [Google Scholar] [CrossRef]
- Zhou, Y.; Yuan, M.; Zhang, J.; Ding, G.; Qin, S. Review of vision-based defect detection research and its perspectives for printed circuit board. J. Manuf. Syst. 2023, 70, 557–578. [Google Scholar] [CrossRef]
- Zhang, H.; Jiang, L.; Li, C. CS-ResNet: Cost-sensitive residual convolutional neural network for PCB cosmetic defect detection. Expert Syst. Appl. 2021, 185, 115673. [Google Scholar] [CrossRef]
- Cong, S.; Shang, Z.; Huang, Q. Detection for printed circuit boards (PCBs) delamination defects using optical/thermal fusion imaging technique. Infrared Phys. Technol. 2022, 127, 104399. [Google Scholar] [CrossRef]
- Wang, F.; Zhou, Y.; Zhang, X.; Li, Z.; Weng, J.; Qiang, G.; Chen, M.; Wang, Y.; Yue, H.; Liu, J. Laser-induced thermography: An effective detection approach for multiple-type defects of printed circuit boards (PCBs) multilayer complex structure. Measurement 2023, 206, 112307. [Google Scholar] [CrossRef]
- El Belghiti Alaoui, N.; Cassou, A.; Tounsi, P.; Boyer, A.; Viard, A. Using infrared thermal responses for PCBA production tests: Feasibility study. Microelectron. Reliab. 2019, 100, 113354. [Google Scholar] [CrossRef]
- Girshick, R.; Donahue, J.; Darrell, T.; Malik, J. Rich feature hierarchies for accurate object detection and semantic segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Columbus, OH, USA, 23–18 June 2014. [Google Scholar]
- He, K.; Zhang, X.; Ren, S.; Sun, J. Spatial pyramid pooling in deep convolutional networks for visual recognition. IEEE Trans. Pattern Anal. Mach. Intell. 2015, 37, 1904–1916. [Google Scholar] [CrossRef]
- Girshick, R. Fast r-cnn. In Proceedings of the IEEE International Conference on Computer Vision, Santiago, Chile, 7–13 December 2015; IEEE: Piscataway, NJ, USA, 2015; Volume 2, pp. 1440–1448. [Google Scholar]
- Ren, S. Faster r-cnn: Towards real-time object detection with region proposal networks. arXiv 2015, arXiv:150601497. [Google Scholar] [CrossRef]
- Redmon, J.; Farhadi, A. YOLO9000: Better, faster, stronger. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Honolulu, HI, USA, 21–16 July 2017. [Google Scholar]
- Redmon, J. Yolov3: An incremental improvement. arXiv 2018, arXiv:1804.02767. [Google Scholar]
- Bochkovskiy, A.; Wang, C.-Y.; Liao, H.-Y.M. Yolov4: Optimal speed and accuracy of object detection. arXiv 2020, arXiv:2004.10934. [Google Scholar]
- Li, C.; Li, L.; Jiang, H.; Weng, K.; Geng, Y.; Li, L.; Ke, Z.; Li, Q.; Cheng, M.; Nie, W.; et al. YOLOv6: A single-stage object detection framework for industrial applications. arXiv 2022, arXiv:2209.02976. [Google Scholar]
- Wang, C.-Y.; Bochkovskiy, A.; Liao, H.-Y.M. YOLOv7: Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Vancouver, BC, Canada, 17–24 June 2023. [Google Scholar]
- Liu, W.; Anguelov, D.; Erhan, D.; Szegedy, C.; Reed, S.; Fu, C.-Y.; Berg, A.C. SSD: Single shot multibox detector. In Proceedings of the Computer Vision–ECCV 2016: 14th European Conference, Amsterdam, The Netherlands, 11–14 October 2016; Part I 14. Springer: Berlin/Heidelberg, Germany, 2016. [Google Scholar]
- Tang, S.; He, F.; Huang, X.; Yang, J. Online PCB defect detector on a new PCB defect dataset. arXiv 2019, arXiv:190206197. [Google Scholar]
- Li, C.J.; Qu, Z.; Wang, S.Y.; Bao, K.H.; Wang, S.Y. A method of defect detection for focal hard samples PCB based on extended FPN model. IEEE Trans. Compon. Packag. Manuf. Technol. 2021, 12, 217–227. [Google Scholar] [CrossRef]
- Ding, R.; Dai, L.; Li, G.; Liu, H. TDD-net: A tiny defect detection network for printed circuit boards. CAAI Trans. Intell. Technol. 2019, 4, 110–116. [Google Scholar] [CrossRef]
- Wu, L.; Zhang, L.; Zhou, Q. Printed circuit board quality detection method integrating lightweight network and dual attention mechanism. IEEE Access 2022, 10, 87617–87629. [Google Scholar] [CrossRef]
- Tsai, D.-M.; Chou, Y.-H. Fast and precise positioning in PCBs using deep neural network regression. IEEE Trans. Instrum. Meas. 2019, 69, 4692–4701. [Google Scholar] [CrossRef]
- Chen, W.; Huang, Z.; Mu, Q.; Sun, Y. PCB defect detection method based on transformer-YOLO. IEEE Access 2022, 10, 129480–129489. [Google Scholar] [CrossRef]
- Tang, J.; Liu, S.; Zhao, D.; Tang, L.; Zou, W.; Zheng, B. PCB-YOLO: An improved detection algorithm of PCB surface defects based on YOLOv5. Sustainability 2023, 15, 5963. [Google Scholar] [CrossRef]
- Annaby, M.; Fouda, Y.; Rushdi, M.A. Improved normalized cross-correlation for defect detection in printed-circuit boards. IEEE Trans. Semicond. Manuf. 2019, 32, 199–211. [Google Scholar] [CrossRef]
- Bhattacharya, A.; Cloutier, S.G. End-to-end deep learning framework for printed circuit board manufacturing defect classification. Sci. Rep. 2022, 12, 12559. [Google Scholar] [CrossRef]
- Spadaro, G.; Vetrano, G.; Penna, B.; Serena, A. Towards One-Shot PCB Component Detection with YOLO. In Proceedings of the Image Analysis and Processing—ICIAP 2023 Workshops, Udine, Italy, 11–15 September 2023. [Google Scholar]
- Benjumea, A.; Teeti, I.; Cuzzolin, F.; Bradley, A. YOLO-Z: Improving small object detection in YOLOv5 for autonomous vehicles. arXiv 2021, arXiv:2112.11798. [Google Scholar]
- Chen, X.; Wu, Y.; He, X.; Ming, W. A comprehensive review of deep learning-based PCB defect detection. IEEE Access 2023, 11, 139017–139038. [Google Scholar] [CrossRef]
- Si, Y.; Xu, H.; Zhu, X.; Zhang, W.; Dong, Y.; Chen, Y.; Li, H. SCSA: Exploring the synergistic effects between spatial and channel attention. arXiv 2024, arXiv:240705128. [Google Scholar] [CrossRef]
- Luo, X.; Cai, Z.; Shao, B.; Wang, Y. Unified-IoU: For High-Quality Object Detection. arXiv 2024, arXiv:240806636. [Google Scholar]
- Qin, D.; Leichner, C.; Delakis, M.; Fornoni, M.; Luo, S.; Yang, F.; Wang, W.; Banbury, C.; Ye, C.; Akin, B.; et al. MobileNetV4: Universal models for the mobile ecosystem. In Proceedings of the European Conference on Computer Vision, Milan, Italy, 29 September–4 October 2024; Springer: Berlin/Heidelberg, Germany, 2024. [Google Scholar]
- Kang, M.; Ting, C.M.; Ting, F.F.; Phan, R.C.W. ASF-YOLO: A novel YOLO model with attentional scale sequence fusion for cell instance segmentation. Image Vis. Comput. 2024, 147, 105057. [Google Scholar] [CrossRef]
- Peng, Y.; Sonka, M.; Chen, D.Z. U-net v2: Rethinking the skip connections of u-net for medical image segmentation. arXiv 2023, arXiv:231117791. [Google Scholar]
- Liu, G.; Wen, H. Printed circuit board defect detection based on MobileNet-Yolo-Fast. J. Electron. Imaging 2021, 30, 043004. [Google Scholar] [CrossRef]
- Li, X.; Zhang, Z.; Zhao, P. Improvement of YOLOv8 Detection Algorithm for Worker-Related Objectives in Construction Scenarios. In Electronic Engineering and Informatics; IOS Press: Amsterdam, The Netherlands, 2024; pp. 745–757. [Google Scholar]
- Zhao, Y.; Lv, W.; Xu, S.; Wei, J.; Wang, G.; Dang, Q.; Liu, Y.; Chen, J. Detrs beat yolos on real-time object detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Seattle, WA, USA, 16–22 June 2024. [Google Scholar]
- Wang, J.; Xie, X.; Liu, G.; Wu, L. A Lightweight PCB Defect Detection Algorithm Based on Improved YOLOv8-PCB. Symmetry 2025, 17, 309. [Google Scholar] [CrossRef]
- Wang, C.-Y.; Yeh, I.-H.; Mark Liao, H.-Y. Yolov9: Learning what you want to learn using programmable gradient information. In Proceedings of the European Conference on Computer Vision, Milan, Italy, 29 September–4 October 2024; Springer: Berlin/Heidelberg, Germany, 2024. [Google Scholar]
- Wang, A.; Chen, H.; Liu, L.; Chen, K.; Lin, Z.; Han, J. YOLOv10: Real-Time End-to-End Object Detection [J/OL]. arXiv 2024, arXiv:2405.14458. [Google Scholar]
- Khanam, R.; Hussain, M. Yolov11: An overview of the key architectural enhancements. arXiv 2024, arXiv:241017725. [Google Scholar]
Configure | Version |
---|---|
CPU | 16 vCPU Intel(R) Xeon(R) Platinum 8481C |
GPU | RTX 4090D (24 GB) |
Python | 3.8 (ubuntu20.04) |
PyTorch | 2.0.0 |
Cuda | 11.8 |
Classes | P (%) | Recall (%) | mAP@50 (%) | Params (M) | GFLOPs |
---|---|---|---|---|---|
CBAM | 96.8 | 94 | 96.8 | 3.07 | 8.1 |
CoordAtt | 96.4 | 94.6 | 97.2 | 3.01 | 8.1 |
ECA | 96.6 | 95.2 | 97.4 | 3.01 | 8.1 |
GAM | 96.3 | 94.1 | 96.7 | 4.65 | 9.4 |
SCSA | 97.2 | 94.7 | 97.5 | 3.04 | 8.2 |
P (%) | R (%) | FPS | F1 | Params (M) | GFLOPs | mAP@50 (%) | AP@50(%) | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Open Circuit | Short Circuits | Spurious Copper | Missing Hole | Mouse Bite | Spur | ||||||||
YOLOv8n | 97.6 | 90 | 338.96 | 0.93 | 3.01 | 8.1 | 94.4 | 99.5 | 96 | 90.5 | 98.8 | 95.1 | 86.7 |
YOLO-SUMAS | 98.8 | 99.2 | 383.46 | 0.99 | 3.04 | 8.2 | 99.1 | 99.2 | 98.6 | 99.1 | 99.2 | 99.3 | 99.4 |
YOLOv8 | YOLO-SUMAS (Ours) | YOLOv8 | YOLO-SUMAS (Ours) |
---|---|---|---|
a | b | m | n |
c | d | o | p |
e | f | q | r |
g | h | s | t |
i | j | u | v |
k | l | w | x |
SCSA | Unified-IoU | MobileNetV4 | ASF-SDI | P (%) | Recall (%) | mAP50 (%) | F1 | |
---|---|---|---|---|---|---|---|---|
Exp1 | ✓ | ✕ | ✕ | ✕ | 97.2 | 94.7 | 97.5 | 0.96 |
Exp2 | ✕ | ✓ | ✕ | ✕ | 97 | 92.5 | 94.5 | 0.95 |
Exp3 | ✕ | ✕ | ✓ | ✕ | 96.6 | 95.5 | 97.7 | 0.96 |
Exp4 | ✕ | ✕ | ✕ | ✓ | 96.7 | 88.8 | 94.9 | 0.92 |
Exp5 | ✓ | ✓ | ✕ | ✕ | 98.2 | 94.4 | 97.6 | 0.96 |
Exp6 | ✓ | ✓ | ✓ | ✕ | 97.9 | 98.1 | 98.7 | 0.98 |
Exp7 | ✓ | ✓ | ✓ | ✓ | 98.8 | 99.2 | 99.1 | 0.99 |
Classes | P (%) | R (%) | mAP@50 (%) | F1 | Params (M) |
---|---|---|---|---|---|
Faster R-CNN [35] | 61.4 | 75.6 | 71.1 | 67.8 | - |
SSD [16] | - | - | 72.3 | - | 25.1 |
RTEDTR [36] | 96.8 | 94.6 | 96.5 | 95.69 | 19.88 |
Centernet [37] | - | - | 94.69 | - | 32.7 |
YOLOv3 [12] | 96.4 | 93.3 | 95.5 | 94.82 | 61.55 |
YOLOv5 | 98.6 | 94.0 | 97.5 | 96.2 | 9.1 |
YOLOv6 [14] | 93.4 | 89.10 | 94.00 | 91.2 | 4.23 |
YOLOv7 [15] | 96.0 | 89.9 | 93.6 | 92.8 | 6.0 |
YOLOv8n | 97.6 | 90 | 94.4 | 93.0 | 3.01 |
YOLOv9 [38] | 98.1 | 95.4 | 97.8 | 96.7 | 6.2 |
YOLOv10n [39] | 96.8 | 88.6 | 94.3 | 92.52 | 2.27 |
YOLOv11 [40] | 98.9 | 94.6 | 97.6 | 96.7 | 9.4 |
YOLO-SUMAS (Ours) | 98.8 | 99.2 | 99.1 | 99.0 | 3.33 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Tang, Y.; Liu, R.; Wang, S. YOLO-SUMAS: Improved Printed Circuit Board Defect Detection and Identification Research Based on YOLOv8. Micromachines 2025, 16, 509. https://doi.org/10.3390/mi16050509
Tang Y, Liu R, Wang S. YOLO-SUMAS: Improved Printed Circuit Board Defect Detection and Identification Research Based on YOLOv8. Micromachines. 2025; 16(5):509. https://doi.org/10.3390/mi16050509
Chicago/Turabian StyleTang, Ying, Runhao Liu, and Sheng Wang. 2025. "YOLO-SUMAS: Improved Printed Circuit Board Defect Detection and Identification Research Based on YOLOv8" Micromachines 16, no. 5: 509. https://doi.org/10.3390/mi16050509
APA StyleTang, Y., Liu, R., & Wang, S. (2025). YOLO-SUMAS: Improved Printed Circuit Board Defect Detection and Identification Research Based on YOLOv8. Micromachines, 16(5), 509. https://doi.org/10.3390/mi16050509