Journal of Computer Applications ›› 2023, Vol. 43 ›› Issue (3): 923-929.DOI: 10.11772/j.issn.1001-9081.2022071096

• Multimedia computing and computer simulation • Previous Articles    

Lightweight ship target detection algorithm based on improved YOLOv5

Jiadong LI1,2(), Danpu ZHANG2, Yaqiong FAN2, Jianfeng YANG2   

  1. 1.The 2nd Institute of China Aerospace Science and Industry Corporation,Beijing 100039,China
    2.Changfeng Science Technology Industry Group Company Limited,Beijing Aerospace Changfeng Company Limited,Beijing 100039,China
  • Received:2022-07-28 Revised:2022-09-21 Accepted:2022-09-21 Online:2022-11-16 Published:2023-03-10
  • Contact: Jiadong LI
  • About author:ZHANG Danpu, born in 1986, Ph. D., senior engineer. Her research interests include intelligent video analysis, big data analysis.
    FAN Yaqiong, born in 1984, M. S., research fellow. Her research interests include image processing, data analysis and mining.
    YANG Jianfeng, born in 1991, M. S. His research interests include image processing, machine learning.
  • Supported by:
    National Key Research and Development Program of China(2020YFC0833406)

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

李佳东1,2(), 张丹普2, 范亚琼2, 杨剑锋2   

  1. 1.中国航天科工集团第二研究院,北京 100039
    2.北京航天长峰股份有限公司 北京航天长峰科技工业集团有限公司,北京 100039
  • 通讯作者: 李佳东
  • 作者简介:李佳东(1998—),男,河北邯郸人,硕士研究生,主要研究方向:深度学习、图像处理
    张丹普(1986—),女,河南平顶山人,高级工程师,博士,主要研究方向:视频智能分析、大数据分析
    范亚琼(1984—),女,山西祁县人,研究员,硕士,主要研究方向:图像处理、数据分析挖掘
    杨剑锋(1991—),男,四川成都人,硕士,主要研究方向:图像处理、机器学习。
  • 基金资助:
    国家重点研发计划项目(2020YFC0833406)

Abstract:

Aiming at the problem of low accuracy of ship target detection at sea, a lightweight ship target detection algorithm YOLOShip was proposed on the basis of the improved YOLOv5. Firstly, dilated convolution and channel attention were introduced into Spatial Pyramid Pooling-Fast (SPPF) module, which integrated spatial feature details of different scales, strengthened semantic information, and improved the model’s ability to distinguish foreground and background. Secondly, coordinate attention and lightweight mixed depthwise convolution were introduced into Feature Pyramid Network (FPN) and Path Aggregation Network (PAN) structures to strengthen important features in the network, obtain features with more detailed information, and improve model detection ability and positioning precision. Thirdly, considering the uneven distribution and relatively small scale changes of targets in the dataset, the model performance was further improved while the model was simplified by modifying the anchors and decreasing the number of detection heads. Finally, a more flexible Polynomial Loss (PolyLoss) was introduced to optimize Binary Cross Entropy Loss (BCE Loss) to improve the model convergence speed and model precision. Experimental results show that on dataset SeaShips, in comparison with YOLOv5s,YOLOShip has the Precision, Recall, mAP@0.5 and mAP@0.5:0.95 increased by 4.2, 5.7, 4.6 and 8.5 percentage points. Thus, by using the proposed algorithm, better detection precision can be obtained while meeting the requirements of detection speed, effectively achieving high-speed and high-precision ship detection.

Key words: ship detection, YOLOv5 (You Only Look Once version 5), attention mechanism, dilated convolution, mixed depthwise convolution

摘要:

针对海上船舶目标检测准确率不高的问题,提出一种基于改进YOLOv5的轻量级船舶目标检测算法YOLOShip。首先将空洞卷积与通道注意力(CA)引入空间金字塔快速池化(SPPF)模块,以融合不同尺度的空间特征细节信息,强化语义信息,提升区分前景与背景的能力;其次将协同注意力与轻量化的混合深度卷积引入特征金字塔网络(FPN)和路径聚合网络(PAN)结构中,以强化网络中的重要特征,获取含有更多细节信息的特征,并提升模型检测能力及定位精度;然后考虑到数据集中目标分布不均匀及尺度变化相对较小的特点,在修改锚框,减少检测头数量以精简模型的同时进一步提升模型性能;最后,引入更加灵活的多项式损失(PolyLoss)以优化二元交叉熵损失(BCE Loss),提升模型收敛速度及模型精度。在SeaShips数据集上的实验结果表明,相较于YOLOv5s,YOLOShip的精确率、召回率、mAP@0.5与mAP@0.5:0.95分别提升4.2、5.7、4.6和8.5个百分点,能在满足检测速度要求的同时得到更优的检测精度,有效地实现了高速、高精度的船舶检测。

关键词: 船舶检测, YOLOv5, 注意力机制, 空洞卷积, 混合深度卷积

CLC Number: