Ship target detection based on SAR images continues to face challenges due to environmental complexity,ship target dispersion,and scale diversity.This paper proposes a ship target detection algorithm specifically for SAR images.Firstly,a ship feature refinement module is developed based on deformable convolution to enhance the feature extraction capabilities for ship targets with significant aspect ratios.Secondly,a ship spatial pyramid aggregation structure is integrated at the end of the backbone network,thereby improving the global feature extraction capability for ship targets.Finally,a scale expansion feature pyramid network is designed to facilitate the interaction between shallow and deep feature information of the ship,thereby enhancing the detection capability for multiscale ship targets.Experimental results indicate that the proposed algorithm achieves a mean Average Precision(mAP)of 93.72%and an Fl score of 89.70%on the HRSID dataset,outperforming all the comparative methods and demonstrating effective detection performance.