基于轻量化YOLOv7-tiny的船舶目标检测算法

展开
  • (1.集美大学 轮机工程学院,福建 厦门 361021;2.集美大学 福建省船舶与海洋工程重点实验室,福建 厦门 361021;3.集美大学 航海学院,福建 厦门 361021;4.厦门安麦信自动化科技有限公司,福建 厦门 361000;5.厦门三丰鑫科技有限公司,福建 厦门 361001)
丘锐聪(2000-),男,硕士研究生,研究方向:图像识别与目标检测。E-mail: 793578549@qq.com 周海峰*(1970-),男,博士,教授,硕士生导师,研究方向:智能信息处理、光机电一体化和仿生机理以及节能等方面的研究。E-mail: zhfeng216@163.com

网络出版日期: 2023-11-25

基金资助

国家自然科学基金(51179074);福建省自然科学基金(2021J01839);集美大学安麦信产学研项目(S20127)

Ship target detection algorithm based on lightweight YOLOv7-tiny

Expand
  • (1.Marine Engineering College, Jimei University, Xiamen 361021, China; 2. Key Laboratory of Shipping and Ocean Engineering of Fujian Province, Jimei University, Xiamen 361021, China; 3. Navigation College, Jimei University, Xiamen 361021, China;  4. Xiamen Anmaixin Automation Technology Co., LTD., Xiamen 361000, China; 5. Xiamen Sanfengxin Technology Co., LTD., Xiamen 361001, China)

Online published: 2023-11-25

摘要

为了解决船舶目标检测算法参数量与计算量大,以及内河环境下近岸复杂背景影响和船舶相互遮挡导致船舶检测困难的问题,基于YOLOv7-tiny做出改进,提出MED-YOLO船舶目标检测轻量化算法。首先,使用MobileNetV3网络作为主干特征提取网络,极大地降低了模型计算成本;其次,将EMA注意力模块引入颈部网络,构建EMA-ELAN模块,增强网络多维度感知和多尺度特征提取能力;然后,选用将尺度感知、空间感知和任务感知三合一的Dyhead作为改进模型的检测头部,以获得更强的特征表达能力;最后,使用具有动态非单调聚焦机制的WIoU作为模型边界框损失函数,提高模型应对船舶遮挡情况的能力,提升检测性能。实验结果表明,MED-YOLO相较于YOLOv7-tiny在参数量与计算量方面分别减少了39.8%和55.0%,精度与mAP@0.5分别提高了1.4%和1.0%,达到了98.3%和98.9%,在实现轻量化的同时具有更好的检测性能,满足了计算资源受限环境下的部署需求,具有一定的工程实际意义。

本文引用格式

丘锐聪, 周海峰, 陈颖, 张兴杰, 黄金满, 翁卫征 . 基于轻量化YOLOv7-tiny的船舶目标检测算法[J]. 大连海事大学学报, 2024 , 50(2) : 31 -40 . DOI: 10.16411/j.cnki.issn1006-7736.2024.02.004

Abstract

To solve the problem of the large number of parameters and computation of ship target detection algorithm, as well as the difficulties of ship detection caused by the influence of the nearshore complex backgrounds and the mutual occlusion of ships in inland river environments, this paper makes improvements based on YOLOv7-tiny and proposes a lightweight algorithm MED-YOLO for ship target detection. Firstly, the MobileNetV3 network is used as the backbone feature extraction network, which greatly reduces the calculation cost of the model. Secondly, EMA attention module was introduced into the neck network, and EMA-ELAN module was constructed to enhance the multi-dimensional perception and multi-scale feature extraction capability of the network. Then, Dyhead, which combines scale perception, spatial perception, and task perception, is selected as the detection head of the improved model to obtain stronger feature expression ability. Finally, WIoU with dynamic non-monotonic focusing mechanism is used as the bounding box loss function to improve the model's ability to cope with ship occlusion and improve the detection performance. The experimental results show that compared with YOLOv7-tiny, MED-YOLO has 39.8% fewer parameters and 55.0% less computation, and its precision and mAP@0.5 have increased by 1.4% and 1.0% respectively, reaching 98.3% and 98.9%, which not only achieves lightweight, but also has better detection performance. It meets the deployment requirements in the environment with limited computing resources, and has certain practical engineering significance.

参考文献

[1]XU C A, SU H, GAO L, et al. Feature aligned ship detection based on improved RPDet in SAR images[J]. Displays, 2022, 74: 102191.
[2]GAO Y, WU Z, REN M, et al. Improved YOLOv4 based on attention mechanism for ship detection in SAR images[J]. IEEE Access, 2022, 10: 23785-23797.
[3]王文亮, 李延祥, 张一帆, 等. MPANet-YOLOv5: 多路径聚合网络复杂海域目标检测[J]. 湖南大学学报(自然科学版), 2022, 49(10): 69−76.
WANG W L, LI Y X, ZHANG Y F, et al MPANet YOLOv5: Multipath Aggregation Network for Complex Sea Area Target Detection[J]. Journal of Hunan University (Natural Science Edition), 2022, 49(10): 69-76. (in Chinese)
[4]张晓鹏, 许志远, 曲胜, 等. 基于改进 YOLOv5 深度学习的海上船舶识别算法[J]. 大连海洋大学学报, 2022, 37(5): 866−872.
ZHANG X P, Xu Z Y, QU S, et al. Marine ship recognition algorithm based on improved YOLOv5 deep learning[J]. Journal of Dalian Ocean University, 2022, 37 (5): 866-872. (in Chinese)
[5]赵鹏飞, 谢林柏, 彭力. 融合注意力机制的深层次小目标检测算法[J]. 计算机科学与探索, 2022, 16(4): 927-937. 
ZHAO P F, XIE L B, PENG L. Deep level small object detection algorithm based on attention mechanism fusion[J]. Computer Science and Exploration, 2022, 16(4): 927-937. (in Chinese)
[6]LIU Y, WANG X. SAR Ship Detection Based on Improved YOLOv7-Tiny[C]//2022 IEEE 8th International Conference on Computer and Communications (ICCC). IEEE, 2022: 2166-2170.
[7]HOWARD A, SADNLER M, CHU G, et al. Searching for mobilenetv3[C]//Proceedings of the IEEE/CVF International Conference on Computer Vision. 2019: 1314-1324.
[8]OUYANG D, HE S, ZHANG G, et al. Efficient Multi-Scale Attention Module with Cross-Spatial Learning[C]//ICASSP 2023-2023 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP). IEEE, 2023: 1-5.
[9]DAI X, CHEN Y, XIAO B, et al. Dynamic head: Unifying object detection heads with attentions[C]//Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. 2021: 7373-7382.
[10]TONG Z, CHEN Y, XU Z, et al. Wise-IoU: Bounding Box Regression Loss with Dynamic Focusing Mechanism[J]. arXiv preprint arXiv: 2301.10051, 2023.
[11]WANG C Y, BOCHKOVSKLY A, LIAO H Y M. YOLOv7: Trainable bag-of-freebies sets new state-of-the-art for realtime object detectors[C]//Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. 2023: 7464-7475.
[12]LIN T Y, DOLLÁR P, GIRSHICK R, et al. Feature pyramid networks for object detection[C]// Proceedings of the 2017 IEEE Conference on Computer Vision and Pattern Recognition. Washington, DC; IEEE Computer Society, 2017: 2117-2125.
[13]LIU S, QI L, QIN H, et al. Path aggregation network for instance segmentation [C]//Proceedings of the IEEE 2018 Conference on Computer Vision and Pattern Recognition. Washington, DC; IEEE Computer Society, 2018: 8759-8768.
[14]HOWARD A G, ZHU M, CHEN B, et al. Mobilenets: Efficient convolutional neural networks for mobile vision applications[J]. arXiv preprint arXiv: 1704. 04861, 2017.
[15]SANDLER M, HOWARD A, ZHU M, et al. Mobilenetv2: Inverted residuals and linear bottlenecks[C]//Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. 2018: 4510-4520.
[16]CHENG D, MENG G, CHENG G, et al. SeNet: Structured edge network for sea-land segmentation[J]. IEEE Geoscience and Remote Sensing Letters, 2016, 14(2): 247-251.
[17]WOO S, PARK J, LEE J Y et al. Cbam: Convolutional block attention module[C]//Proceedings of the European Conference on Computer Vision(ECCV). 2018: 3-19.
[18]ZHANG Y F, REN W, ZHANG Z, et al. Focal and efficient IOU loss for accurate bounding box regression[J]. Neurocomputing, 2022, 506: 146-157.
[19]SHAO Z, WU W, WANG Z, et al. Seaships: A large-scale precisely annotated dataset for ship detection[J]. IEEE transactions on multimedia, 2018, 20(10): 2593-2604.
[20]REDMON J, FARHADI A. Yolov3: An incremental improvement[C]//IEEE Conference on Computer Vision and Pattern Recognition, 2018: 1804.02767.
[21]BOCHKOVSKIY A, WANG C Y, LIAO H Y M. Yolov4: Optimal Speed and Accuracy of Object Detection[C]//IEEE Conference on Computer Vision and Pattern Recognition. 2020. ArXiv: 2004.10934.
[22]REN S, HE K, GIRSHICK R, et al. Faster R-CNN: Towards real-time object detection with region proposal networks[J]. Advances in Neural Information Processing Systems, 2015, 28.
[23]LIU W, ANGUELOV D, ERHAN D, et al. Ssd: Single shot multibox detector[C]. European Conference on Computer Vision, Springer, Cham, 2016: 21-37.
文章导航

/