|
基于改进YOLOv8模型的PCB电路板缺陷检测方法研究
|
Abstract:
针对现有PCB电路板缺陷检测方法普遍存在的准确率低、处理速度慢、适应性差等问题,本文设计提出了一种基于YOLOv8的改进电路板缺陷检测模型YOLOv8-PCB。该模型通过引入注意力机制,并结合数据增强和多尺度训练策略,能够有效提升缺陷检测准确率和处理速度。与此同时,考虑到PCB电路板的背景信息比较单一,通用目标检测模型性能受限的问题,本文进一步设计采用了一种LSKNet注意力机制,通过在特征提取时自适应动态调整目标感受视野,从而提升模型对小缺陷的目标检测能力。通过各项试验结果表明,本文提出的算法模型在测试数据集下的平均准确率、召回率分别为95.0%和93.3%,分别优于原始YOLOv8算法91.8%和90.9%。且模型参数量更小,在提升检测性能的同时能够兼顾算法计算效率,因此可以快速地、准确地实现PCB电路板的缺陷检测,为智慧工厂、智能装备等领域提供技术支持。
Aiming at the problems of low accuracy, slow processing speed and poor adaptability of existing PCB circuit board defect detection methods, this paper designed and proposed an improved circuit board defect detection model, YOLOV8-PCB, based on YOLOv8. By introducing an attention mechanism, combining data enhancement and a multi-scale training strategy, the model can effectively improve the accuracy and processing speed of defect detection. At the same time, considering that the background information of the PCB is relatively simple and the performance of the general tar-get detection model is limited, this paper further designed and adopted a LSKNet attention mecha-nism to improve the model’s target detection ability for small defects by dynamically adjusting the target perception field during feature extraction. The experimental results show that the average accuracy and recall rate of the proposed algorithm model under the test data set are 95.0% and 93.3%, respectively, which are better than 91.8% and 90.9% of the original YOLOv8 algorithm. Moreover, the number of model parameters is smaller, and the algorithm calculation efficiency can be taken into account while improving the detection performance, so the defect detection of PCB circuit boards can be quickly and accurately realized, providing technical support for smart facto-ries, intelligent equipment and other fields.
[1] | Lin, Y.L., Chiang, Y.M. and Hsu, H.C. (2018) Capacitor Detection in PCB Using YOLO Algorithm. 2018 International Conference on System Science and Engineering (ICSSE), New Taipei, 28-30 June 2018, 1-4.
https://doi.org/10.1109/ICSSE.2018.8520170 |
[2] | 宁健, 马淼, 柴立臣, 等. 深度学习的目标检测算法综述[J]. 信息记录材, 2022, 23(10): 1-4. |
[3] | Girshick, R., Donahue, J., Darrell, T., et al. (2014) Rich Feature Hierarchies for Accurate Object Detection and Semantic Segmentation. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Columbus, OH, 23-28 June 2014, 580-587. https://doi.org/10.1109/CVPR.2014.81 |
[4] | Jiang, H. and Learned-Miller, E. (2017) Face Detection with the Faster R-CNN. 2017 12th IEEE International Conference on Automatic Face & Gesture Recognition, Washington DC, 30 May-3 June 2017, 650-657.
https://doi.org/10.1109/FG.2017.82 |
[5] | Liu, W., Anguelov, D., Erhan, D., et al. (2016) SSD: Single Shot Multi-box Detector. Computer Vision-ECCV 2016: 14th European Conference, Amsterdam, 11-14 October 2016, 21-37. https://doi.org/10.1007/978-3-319-46448-0_2 |
[6] | Redmon, J., Divvala, S., Girshick, R., et al. (2016) You Only Look Once: Unified, Real-Time Object Detection. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Vegas, NV, 27-30 June 2016, 779-788.
https://doi.org/10.1109/CVPR.2016.91 |
[7] | Redmon, J. and Farhadi, A. (2017) YOLO9000: Better, Faster, Stronger. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Honolulu, HI, 21-26 July 2017, 7263-7271.
https://doi.org/10.1109/CVPR.2017.690 |
[8] | Jocher, G., Changyu, L., Hogan, A., et al. (2020) Ultralyt-ics/Yolov5: Initial Release. Zenodo.
https://ui.adsabs.harvard.edu/abs/2020zndo...3908560J |
[9] | Li, Y., Hou, Q., Zheng, Z., et al. (2023) Large Selec-tive Kernel Network for Remote Sensing Object Detection. 2023 IEEE/CVF International Conference on Computer Vi-sion (ICCV), Paris, 1-6 October 2023, 16748-16759.
https://doi.org/10.1109/ICCV51070.2023.01540 |
[10] | Jocher, G., Chaurasia, A. and Qiu, J. (2023) Ultralytics Yolov8. Code Repository.
https://github.com/ultralytics/ultralytics |
[11] | 韩强. 面向小目标检测的改进YOLOv8算法研究[D]: [硕士学位论文]. 长春: 吉林大学, 2023. |
[12] | Wang, C.Y., Bochkovskiy, A. and Liao, H.Y.M. (2023) YOLOv7: Trainable Bag-of-Freebies Sets New State-of-the-Art for Real-Time Object Detectors. Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Vancouver, BC, 17-24 June 2023, 7464-7475. https://doi.org/10.1109/CVPR52729.2023.00721 |