Computer Engineering and Applications ›› 2023, Vol. 59 ›› Issue (15): 243-252.DOI: 10.3778/j.issn.1002-8331.2304-0109

• Graphics and Image Processing • Previous Articles     Next Articles

Improved SAR Ship Detection Algorithm for YOLOv7

XIAO Zhenjiu, LIN Bohan, QU Haicheng   

  1. School of Software, Liaoning University of Technology, Huludao, Liaoning 125105, China
  • Online:2023-08-01 Published:2023-08-01



  1. 辽宁工程技术大学 软件学院,辽宁 葫芦岛 125105

Abstract: In order to solve the problem of low accuracy of ship detection for small target ships and complex backgrounds in synthetic aperture radar(SAR) images, while making the model more lightweight, a SAR ship detection algorithm with improved YOLOv7 is proposed. The REP-PConv-ELAN module is built in the YOLOv7 backbone network to replace the original ELAN, which reduces the computation and memory consumption of the network, speeds up the inference speed, and enhances the extraction capability of the network for target features; the ConvNeXt Block is incorporated in the feature fusion part to accelerate the network to extract and fuse the feature information of complex targets. Then the global attention mechanism(GAM) is added to the down-sampling stage to build a sampling module for capturing global features(MP-GAM), which performs feature capture and feature fusion in channel dimension and spatial dimension to realize the interaction of multidimensional information and improve the ability of network to capture key features of ships in complex backgrounds. A new metric NWD is introduced at the regression loss function of the detection head to replace IoU to enhance the detection capability of small targets. Experimental comparisons are conducted on the HRSID dataset, and the improved method improves the AP value by 10.04?percentage points, the accuracy by 3.61?percentage points, and the recall by 15.15?percentage points compared to YOLOv7. The accuracy is significantly improved compared with the current mainstream algorithm. The experimental results show that the improved algorithm can effectively improve the false and missed detections of ships.

Key words: SAR images, ship detection, YOLOv7, partial convolution, global attention mechanism, NWD metric, ConvNeXt Block

摘要: 为了解决合成孔径雷达(synthetic aperture radar,SAR)图像中小目标舰船和复杂背景下舰船检测精度低的问题,并使模型更加轻量化,提出了一种改进YOLOv7的SAR舰船检测算法。在YOLOv7主干网络构建REP-PConv-ELAN模块替换原ELAN,减少网络的计算量和内存占用,加快推理速度,同时增强网络对目标特征的提取能力;在特征融合部分融入ConvNeXt Block加速网络提取和融合复杂目标的特征信息;再把全局注意力机制(GAM)加入至下采样阶段,构建一种用来捕捉全局特征的采样模块(MP-GAM),在通道维度和空间维度上进行特征捕捉和特征融合,实现多维信息的交互,提高网络对复杂背景下舰船的关键特征捕捉能力;在检测头的回归损失函数处引入新度量NWD替换IoU,增强对小目标的检测能力。在HRSID数据集上进行了实验对比,改进后的方法相比于YOLOv7,模型的参数量和计算量显著减少;AP值提升了10.04个百分点,准确率提升了3.61个百分点,召回率提升了15.15个百分点。与目前的主流算法对比,精度明显提高。实验结果表明,改进算法能有效提升SAR舰船检测精度,显著改善复杂舰船的误检和漏检情况。

关键词: SAR图像, 舰船检测, YOLOv7, 部分卷积, 全局注意力机制, NWD度量, ConvNeXt Block