|
改进YOLOv11的缺陷检测算法
|
Abstract:
PCB缺陷检测是电子制造业质量控制的重要组成部分。PCB板在生产过程中可能遭遇各种环境与工艺因素的影响缺陷类型复杂多样,准确检测这些缺陷是提高生产效率和电子产品质量的关键。针对PCB缺陷特点,本文提出了一种结合多头混合自注意力机制改进YOLOv11n模型的PCB缺陷检测方法,以提高检测精度和鲁棒性。通过将MMSA嵌入YOLOv11n框架的Backbone和Neck部分,增加的小目标检测层,增强对PCB缺陷特征的提取与融合能力,提升了对PCB微小缺陷的识别能力。实验结果表明,该方法在PKU-Market-PCB数据集上实现了94.8%的mAP@0.5,相较于YOLOv11n提升了1.6%,且优于其他主流检测算法,显示了其在PCB缺陷检测中的显著优势。
PCB defect detection is a crucial component of quality control in the electronics manufacturing industry. During production, PCBs may encounter a variety of environmental and process factors, leading to complex and diverse types of defects. Accurately detecting these defects is key to improving production efficiency and the quality of electronic products. In response to the characteristics of PCB defects, this study proposes a PCB defect detection method that improves the YOLOv11n model by integrating a multi-head mixed self-attention mechanism (MMSA) to enhance detection accuracy and robustness. By embedding MMSA into the Backbone and Neck sections of the YOLOv11n framework, and adding a small target detection layer, this approach enhances the capability to extract and merge features of PCB defects, thus improving the recognition of minute PCB flaws. Experimental results demonstrate that this method achieves an mAP@0.5 of 94.8% on the PKU-Market-PCB dataset, which is a 1.6% improvement over the YOLOv11n baseline and surpasses other mainstream detection algorithms, highlighting its significant advantages in PCB defect detection.
[1] | Lin, G., Liu, K., Xia, X. and Yan, R. (2022) An Efficient and Intelligent Detection Method for Fabric Defects Based on Improved Yolov5. Sensors, 23, Article 97. https://doi.org/10.3390/s23010097 |
[2] | Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A.N., et al. (2017) Attention Is All You Need. Proceedings of the 31st International Conference on Neural Information Processing Systems, Long Beach, 4-9 December 2017, 6000-6010. |
[3] | Dosovitskiy, A. (2020) An Image Is Worth 16x16 Words: Transformers for Image Recognition at Scale. arXiv: 2010.11929. |
[4] | Guo, M., Xu, T., Liu, J., Liu, Z., Jiang, P., Mu, T., et al. (2022) Attention Mechanisms in Computer Vision: A Survey. Computational Visual Media, 8, 331-368. https://doi.org/10.1007/s41095-022-0271-y |
[5] | Wan, D., Lu, R., Shen, S., Xu, T., Lang, X. and Ren, Z. (2023) Mixed Local Channel Attention for Object Detection. Engineering Applications of Artificial Intelligence, 123, Article 106442. https://doi.org/10.1016/j.engappai.2023.106442 |
[6] | Wang, Q., Wu, B., Zhu, P., Li, P., Zuo, W. and Hu, Q. (2020). ECA-Net: Efficient Channel Attention for Deep Convolutional Neural Networks. 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Seattle, 13-19 June 2020, 11531-11539. https://doi.org/10.1109/cvpr42600.2020.01155 |
[7] | Terven, J., Córdova-Esparza, D. and Romero-González, J. (2023) A Comprehensive Review of YOLO Architectures in Computer Vision: From YOLOv1 to YOLOv8 and YOLO-NAS. Machine Learning and Knowledge Extraction, 5, 1680-1716. https://doi.org/10.3390/make5040083 |
[8] | Redmon, J., Divvala, S., Girshick, R. and Farhadi, A. (2016) You Only Look Once: Unified, Real-Time Object Detection. 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, 27-30 June 2016, 779-788. https://doi.org/10.1109/cvpr.2016.91 |
[9] | Wang, C., Yeh, I. and Mark Liao, H. (2024) YOLOv9: Learning What You Want to Learn Using Programmable Gradient Information. Computer Vision—ECCV 2024, Milan, 29 September-4 October 2024, 1-21. https://doi.org/10.1007/978-3-031-72751-1_1 |
[10] | Wang, A., Chen, H., Liu, L., et al. (2024) YOLOv10: Real-Time End-to-End Object Detection. arXiv: 2405.14458. |