A Two-Stage Framework for SAR Near-Shore Ship Detection via Segmentation Guidance and Enhanced Diffusion
Yuanjie Bai, Hangzai Luo, Lulu Liu, Sheng ZhongDetecting ships near the coast in Synthetic Aperture Radar (SAR) images is an important task. However, achieving accurate detection in these scenarios remains a significant challenge. The complex coastal topologies and multiple scattering effects frequently induce severe shore–sea feature aliasing, which conventional end-to-end detectors struggle to untangle due to their inherent architectural conflicts between background suppression and fine-grained localization. To address this issue, we propose a two-stage generative framework named Segmentation Guidance and Enhanced Diffusion (SGED). In the first stage, an Enhanced Attention U-Net (EAU-Net) is specifically tailored for robust shore–sea separation. By integrating adaptive Signal-to-Noise Ratio (SNR) masking, lightweight Transformer bottlenecks, and an Edge-Aware Composite Loss, EAU-Net isolates the maritime search space, achieving a Dice Similarity Coefficient (DSC) of 0.9047 and an 85.30% Near-Shore Coverage Accuracy (NSCA). Building upon this refined prior, the second stage introduces a SAR-Enhanced Diffusion Detector (SAR-DDet). It constructs a structural–statistical dual-verification mechanism by embedding Pixel Difference Convolution (PDC) and Constant False Alarm Rate (CFAR) soft attention into the multi-scale features. Coupled with a Normalized Wasserstein Distance (NWD) loss and a four-step DDIM iterative denoising process, SAR-DDet effectively mitigates small-target gradient vanishing and corrects bounding box coordinate quantization errors. Experiments on a near-shore subset of the HRSID benchmark demonstrate that SGED achieves competitive performance. It achieves an mAP of 62.35%, an AP75 of 74.67%, and a small-target APS of 60.14%, with consistent improvements over monolithic baseline architectures on this dataset.