计算机工程与应用 ›› 2024, Vol. 60 ›› Issue (21): 205-214.DOI: 10.3778/j.issn.1002-8331.2403-0444

• 图形图像处理 • 上一篇    下一篇

改进YOLOv8的轻量化轴承缺陷检测算法

姚景丽,程光,万飞,朱德平   

  1. 1.北京联合大学 北京市信息服务工程重点实验室,北京 100101
    2.北京联合大学 前沿智能技术研究院,北京 100101
  • 出版日期:2024-11-01 发布日期:2024-10-25

Improved Lightweight Bearing Defect Detection Algorithm of YOLOv8

YAO Jingli, CHENG Guang, WAN Fei, ZHU Deping   

  1. 1.Beijing Key Laboratory of Information Service Engineering, Beijing Union University, Beijing 100101, China
    2.Frontier Intelligent Technology Research Institute, Beijing Union University, Beijing 100101, China
  • Online:2024-11-01 Published:2024-10-25

摘要: 针对轴承表面缺陷检测存在小目标检测精度低、模型复杂的问题,提出一种改进YOLOv8的轻量级轴承缺陷检测算法YOLO-SSW。在主干网络中添加3-D注意力机制SimAM,在不增加参数的前提下,使模型更加关注轴承表面缺陷特征的提取和表达;在颈部网络中嵌入C2f_SCConv模块,以减少空间维度和通道维度上的特征冗余,降低模型的计算负载;添加新的小目标检测层用于检测轴承表面的小尺寸缺陷,提高模型对小目标的检测能力;使用基于动态非单调聚焦机制的Wise-IoU作为边界框回归损失函数,加快网络的收敛速度。实验结果表明,改进算法的mAP达到了91.5%,比原算法提升了2.9个百分点,模型参数量仅为2.7×106,计算量为11.8 GFLOPs,在提高检测精度的同时节约了计算资源。

关键词: 缺陷检测, 轻量级网络, YOLOv8, SimAM

Abstract: Aiming at the problems of low accuracy of small targets, complex models, and difficulty in deploying edge devices for bearing surface defect detection, a lightweight bearing defect detection algorithm YOLO-SSW with improved YOLOv8 is proposed. Firstly, the 3-D attention mechanism SimAM is added to the backbone network to make the model pay more attention to the extraction and expression of bearing surface defect features without increasing parameters. Secondly, the C2f_SCConv module is embedded in the neck network to reduce feature redundancy in both spatial and channel dimensions and decrease the computational load of the model. Then, a new small target detection layer is added for detecting small-size defects on the bearing surface to improve the  ability of the model to detect small targets. Finally, Wise-IoU based on a dynamic non-monotonic focusing mechanism is utilized as the bounding box regression loss function to accelerate the convergence speed of the network. The experimental results show that the mAP of the improved algorithm is 91.5%, which is 2.9% higher than the original algorithm. The model has only 2.7 million parameters and 11.8 GFLOPs of computation, which not only improves detection accuracy but also saves computational resources.

Key words: defect detection, lightweight network, YOLOv8, SimAM