天津科技 ›› 2025, Vol. 52 ›› Issue (04): 64-69.

• 基础研究 • 上一篇    下一篇

基于YOLOv5算法模型改进的轻量化船舶目标检测算法

张波   

  1. 中海油能源发展股份有限公司采油服务分公司 天津 300452
  • 收稿日期:2025-03-03 出版日期:2025-04-25 发布日期:2026-01-06

Lightweight ship target detection algorithm based on improved YOLOv5 algorithm model

ZHANG Bo   

  1. CNOOC Energy Technology & Services-Oil Production Services Co.,Tianjin 300452,China
  • Received:2025-03-03 Online:2025-04-25 Published:2026-01-06

摘要: 基于视觉传感器的环境感知设备在液化天然气(LNG)船舶实现自主航行过程中发挥着重要作用。海上环境复杂及船舶存在多样性,现有的船舶目标检测算法难以同时满足检测高精度和实时性的要求,为此提出一种轻量化的船舶目标检测算法。基于YOLOv5算法,使用MobileNetv3结构替换YOLOv5的主干特征提取网络,以大幅减少主干网络的参数量及降低网络计算量;在特征融合网络的末端添加卷积注意力模块(CBAM),以增强有用特征的权重,优化目标检测的精度;采用K-means++聚类算法获取适用于船舶目标检测的初始anchor;利用自建数据集对模型进行训练及评估。结果表明,改进YOLOv5 MC模型的平均精度均值(mAP)高达95.66%,较YOLOv5、YOLOv5 M模型分别提高了2.75%和4.7%;该模型的参数量较YOLOv5模型降低了81.5%,约为45.40 MB;传输帧率达到39.55帧/s,满足LNG船舶检测的实时性要求,在检测小目标与遮挡目标中效果良好。

关键词: 液化天然气, 船舶目标检测, YOLOv5, MobileNetv3, 卷积注意力模块

Abstract: Environmental perception equipment based on visual sensors plays a critical role in enabling autonomous navigation of liquefied natural gas (LNG) vessels. Due to the complex sea environment and the diversity of ships,the existing ship target detection algorithm can hardly meet the requirements of both high accuracy and real-time detection. To address the above problems,a lightweight ship target detection algorithm is proposed. Based on the YOLOv5 algorithm model,the MobileNetv3 structure is used to replace the backbone of YOLOv5,which significantly reduces the number of parameters in the backbone network and the amount of network computation. The Convolutional Block Attention Module (CBAM) is also added at the end of the feature fusion network to enhance the weight of useful features and optimize the accuracy of target detection. The initial anchor for ship target detection is obtained by K-means++ clustering algorithm,and the model is trained and evaluated by using the self-built dataset. The experimental results show that the improved YOLOv5 MC model has a mAP of 95.66%,which is 2.75% and 4.7% higher than YOLOv5 and YOLOv5 M models,respectively. The number of parameters of the model is reduced by 81.5% compared with the YOLOv5 model,which is about 45.40 MB. FPS reaches 39.55 frames per second,meeting the requirements of LNG vessels for real-time detection,and achieving good results in detecting small and occluded targets.

Key words: liquefied natural gas (LNG), ship target detection, YOLOv5, MobileNetv3, Convolutional Block Attention Module (CBAM)

中图分类号: