Computer Engineering and Applications ›› 2024, Vol. 60 ›› Issue (5): 321-327.DOI: 10.3778/j.issn.1002-8331.2306-0425

• Engineering and Applications • Previous Articles     Next Articles

Improved YOLOv5 Model for Surface Defect Detection of Automotive Gear Components

ZHU Deping, CHENG Guang, YAO Jingli   

  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-03-01 Published:2024-03-01

改进YOLOv5的汽车齿轮配件表面缺陷检测

朱德平,程光,姚景丽   

  1. 1.北京联合大学 北京市信息服务工程重点实验室,北京 100101
    2.北京联合大学 前沿智能技术研究院,北京 100101

Abstract: Aiming at the problems of low efficiency and poor precision in surface defect detection of automotive gear components, an improved defect detection method YOLO-CNF based on YOLOv5 is proposed. Firstly, add the CBAM attention module to the backbone network to make the model pay more attention to the defect areas of gear components and improve the ability to identify small defects. Secondly, the F2C module is designed to fuse shallow features, which alleviates the problem of the loss of small defect location information to a certain extent. Finally, NWD is used to optimize the regression loss to reduce the sensitivity to small target position deviations, and further improving the accuracy and precision of target positions. The experimental results show that the average precision of the improved algorithm reaches 86.7%, which is 3.2 percentage points higher than the original algorithm, and the detection speed is 43 frames per second. The improved algorithm basically meets the needs of the surface defect detection of automotive gear components.

Key words: defect detection, gear components, convolutional block attention network (CBAM), fuse features, normalized Wasserstein distance (NWD)

摘要: 针对汽车齿轮配件表面缺陷检测存在效率低和精度差的问题,提出一种基于YOLOv5改进的缺陷检测模型YOLO-CNF。在骨干网络中增加CBAM注意力模块,使模型更加关注齿轮配件的缺陷区域,提高对微小缺陷的识别能力;设计了F2C模块用于融合浅层特征,在一定程度上缓解了微小缺陷位置信息丢失的问题;利用NWD(normalized Wasserstein distance)对回归损失进行优化,减少对小目标位置偏差的敏感性,从而进一步提高目标位置的准确率和精度。实验结果表明,改进模型的平均精度均值达到了86.7%,相较于原始模型提高了3.2个百分点,检测速度为43?帧/s,基本满足了对汽车齿轮配件表面缺陷检测的需求。

关键词: 缺陷检测, 齿轮配件, CBAM, 特征融合, NWD距离