Abstract:In the task of ship target detection in synthetic aperture radar (SAR) images, the diverse scales of different targets pose significant challenges to detection algorithms. To address these challenges, a BAPT-YOLOv8n algorithm is proposed. Built upon the YOLOv8n framework, this algorithm enhances the fusion capability of multi-level features and the feature extraction capability for multi-scale targets by introducing convolutional block attention modules to reconstruct the neck pyramid network. Additionally, employing a Transformer-based detection head structure further improves feature representation and context utilization, thereby enhancing the detection performance of small targets. Comparative experiments on the HRSID and SSDD datasets show that the proposed algorithm achieves detection accuracies of 93.6% and 98.9%, respectively, surpassing other benchmark algorithms. Ablation experiments further validate the effectiveness of each improvement in the algorithm, demonstrating its capability to better adapt to multi-scale ship target detection tasks.