SAR Ship Detection in Complex Marine Environments
Abstract
1. Introduction
- We propose a novel SAR ship detection network that integrates tunable frequency features with spatial features, effectively addressing challenges such as sea clutter, wind–wave disturbances, and nearshore interference. Unlike static frequency filters that apply fixed weights regardless of input, our learnable frequency parameters enable instance-level spectral adaptation optimized end-to-end with the detection objective.
- We design the TAS-FPN module to address the multi-scale nature of SAR ship targets. This module effectively tackles scale variations by integrating multi-scale features and leveraging the Triplet attention mechanism to enhance the discrimination between ship targets and background clutter. Unlike standard FPNs that treat spatial and channel dimensions independently, TAS-FPN employs cross-dimensional Triplet Attention to jointly model “what” (channel) and “where” (spatial) at each pyramid scale.
- We demonstrate the competitive performance of AFN-YOLO on the SSDD [32] and HRSID [33] datasets. The experimental results underscore its high detection accuracy and robustness in complex marine scenarios. Compared to the baseline YOLOv8, AFN-YOLO achieves consistent improvements on both SSDD and HRSID, with the most pronounced gains observed in high-clutter nearshore scenarios.
2. Methodology
2.1. Processing Flow of AFN-YOLO
2.2. Feature Extraction Network
2.2.1. C2f_FF Module
2.2.2. C2R Module
2.3. The Architecture of the TAS-FPN Model
2.4. Loss Function
3. Experiments and Results
3.1. Experimental Setup
3.2. Datasets
3.3. Evaluation Criteria
3.4. Results and Discussion
- (1)
- Comparison with Other Methods: To further verify the effectiveness of the proposed AFN-YOLO method, comparative experiments were conducted on two SAR ship detection datasets, namely SSDD and HRSID, against several mainstream object detection algorithms. The comparison methods include the two-stage detector Faster R-CNN, as well as the one-stage detectors FCOS, YOLOv5, YOLOv7, and YOLOv8. Since the proposed method belongs to the one-stage detection framework, one-stage detectors were mainly selected for comparison, while Faster R-CNN was introduced as a representative two-stage detector to provide a more comprehensive evaluation of the performance differences among different detection frameworks in SAR ship detection tasks. The experimental results are shown in Table 1. From the experimental results on the SSDD, it can be observed that the proposed AFN-YOLO achieves the best results in terms of Precision, Recall, and mAP@0.5, reaching 97.69%, 97.35%, and 98.75%, respectively. Compared with the YOLOv8 baseline model, AFN-YOLO improves Precision by 2.65 percentage points, Recall by 6.15 percentage points, and mAP@0.5 by 2.70 percentage points. Among these improvements, the increase in Recall is particularly significant, indicating that the proposed method can detect more true ship targets and effectively reduce the missed detection rate. Compared with YOLOv5, AFN-YOLO improves mAP@0.5 by 2.47 percentage points; compared with YOLOv7, it improves mAP@0.5 by 5.07 percentage points. These results demonstrate that the proposed method further enhances the recall capability for ship targets while maintaining high detection accuracy, making it particularly suitable for SAR image detection scenarios involving small targets and strong background interference. On the HRSID, AFN-YOLO also achieves the best overall performance, with Precision, Recall, and mAP@0.5 reaching 91.11%, 83.32%, and 91.65%, respectively. Compared with YOLOv8, AFN-YOLO also demonstrates superior performance. This indicates that on the HRSID, which has higher resolution and more complex scenes, the main advantages of the proposed method lie in effectively compensating for missed targets and improving overall detection performance. Compared with Faster R-CNN, FCOS, YOLOv5, and YOLOv7, AFN-YOLO improves mAP@0.5 by 13.67, 13.70, 8.31, and 8.01 percentage points, respectively, demonstrating its stronger feature representation capability and generalization ability in complex SAR ship detection tasks. The main reason for the above performance improvements is that the proposed method effectively combines frequency-domain information modeling with spatial-domain feature fusion. On the one hand, the C2f_FF module can supplement frequency-domain feature information that is often overlooked by traditional convolutional networks, thereby enhancing the separability between ship targets and background interference such as sea clutter and nearshore buildings. On the other hand, TAS-FPN adaptively fuses features from different levels, improving the model’s perception capability for multi-scale ship targets and enabling it to better detect densely distributed small targets and ship targets with significant scale variations. In addition, the improved feature representation and detection framework help the model maintain stable detection performance under complex sea conditions, nearshore areas, and strong background interference. Combining the quantitative results in Table 1 with the visual detection results in Figure 7, it can be seen that traditional detection methods are prone to false detections or missed detections under complex nearshore backgrounds and sea clutter interference. For example, YOLOv8 tends to misclassify background regions such as nearshore buildings, port facilities, or strong clutter areas as ship targets, while also missing some densely arranged small-scale ship targets. In contrast, AFN-YOLO can more accurately localize ship target regions and maintain higher detection completeness and stability under complex backgrounds. In summary, the proposed method outperforms existing mainstream detection algorithms on both the SSDD and HRSID, verifying its effectiveness and robustness in complex SAR ship detection tasks.
- (2)
- Ablation Study: To verify the effectiveness of the proposed modules, we conducted systematic ablation experiments on the SSDD. Starting from the YOLOv8n baseline, C2f_FF, C2R, TAS-FPN, triplet attention (TA), and the optimized loss function were progressively introduced to construct six model variants. For each variant, Precision (P), Recall (R), mAP@50, and mAP@50:95 were reported. The experimental results are summarized in Table 2.
- (3)
- Grad-CAM Visualization Analysis: To complement the quantitative ablation results, we generated Grad-CAM [35] attention heatmaps for different model variants on representative SAR images with complex nearshore backgrounds, as shown in Figure 8. In the heatmaps, reddish regions indicate areas that receive higher attention during detection. The baseline YOLOv8n model (Exp. 1) shows a relatively dispersed attention distribution, with activation regions appearing not only on ship targets but also on background structures such as docks, buildings, and coastal areas. This phenomenon is consistent with its limited recall performance and its tendency to confuse ship targets with complex background interference.
- (4)
- Error Analysis: Figure 8a shows a complex nearshore background scenario. The main difficulty of this scene lies in the fact that docks, breakwaters, coastal buildings, and ship targets exhibit similar radar backscattering intensities in SAR images. As a result, YOLOv8 tends to misclassify building edges as ships, leading to false alarms, or miss ships whose grayscale intensity is close to that of shore-based structures. As shown in the detection results in the second row, YOLOv8 produces obvious false detection boxes in the port area, incorrectly labeling rectangular buildings on land as ships. Meanwhile, it misses a berthed ship close to the dock on the left side. This target has extremely low grayscale contrast with the background, making it difficult for purely spatial-domain features to effectively distinguish it from shore-based structures. In contrast, the proposed AFN-YOLO employs adaptive frequency-domain processing through the C2f_FF module, exploiting the differences in spectral distributions between ship targets and buildings. The sharp edges of ships appear as specific high-frequency patterns in the frequency domain, whereas the smooth rooftops and roads of buildings are mainly concentrated in low-frequency components. Therefore, AFN-YOLO effectively suppresses shore-based background interference and focuses attention on real ship target regions. In the figure, AFN-YOLO provides correct detection boxes for all nearshore ships, with no false alarms or missed detections.
- (5)
- Efficiency Experiment: Table 3 presents the efficiency comparison between AFN-YOLO and YOLOv8n on the SSDD. Compared with YOLOv8n, AFN-YOLO improves Precision, Recall, and mAP@50 by 2.65%, 6.15%, and 2.70%, respectively, indicating that the proposed method can effectively enhance SAR ship detection performance. In terms of model complexity, the number of parameters of AFN-YOLO only increases from 3.01 M to 3.39 M, and the model file size increases from 6.2 MB to 7.0 MB, showing a relatively small overall increase. Although the inference speed decreases from 66.9 FPS to 54.3 FPS, corresponding to a reduction of approximately 18.8%, this overhead mainly comes from the Fourier transform and inverse Fourier transform operations in the C2f_FF module, as well as the cross-dimensional attention computation in TAS-FPN. Overall, AFN-YOLO achieves better detection accuracy while maintaining high inference efficiency and lightweight characteristics, demonstrating that its performance improvement mainly comes from frequency-domain feature fusion and attention mechanism design rather than a simple increase in model parameters.
4. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Xie, F.; Lin, B.; Liu, Y. Research on the coordinate attention mechanism fuse in a YOLOv5 deep learning detector for the SAR ship detection task. Sensors 2022, 22, 3370. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Li, S.; Fu, X.; Dong, J. Improved ship detection algorithm based on YOLOX for SAR outline enhancement image. Remote Sens. 2022, 14, 4070. [Google Scholar] [CrossRef] [Scilit]
- Yang, R.; Hu, Z.; Liu, Y.; Xu, Z. A Novel Polarimetric SAR Classification Method Integrating Pixel-Based and Patch-Based Classification. IEEE Geosci. Remote Sens. Lett. 2020, 17, 431–435. [Google Scholar] [CrossRef] [Scilit]
- Wang, N.; Li, B.; Wei, X.; Wang, Y.; Yan, H. Ship detection in spaceborne infrared image based on lightweight CNN and multisource feature cascade decision. IEEE Trans. Geosci. Remote Sens. 2021, 59, 4324–4339. [Google Scholar] [CrossRef] [Scilit]
- Li, X.; Li, D.; Liu, H.; Wan, J.; Chen, Z.; Liu, Q. A-BFPN: An Attention-Guided Balanced Feature Pyramid Network for SAR Ship Detection. Remote Sens. 2022, 14, 3829. [Google Scholar] [CrossRef] [Scilit]
- Feng, Y.; Chen, J.; Huang, Z.; Wan, H.; Xia, R.; Wu, B.; Sun, L.; Xing, M. A lightweight position-enhanced anchor-free algorithm for SAR ship detection. Remote Sens. 2022, 14, 1908. [Google Scholar] [CrossRef] [Scilit]
- Shao, Z.; Zhang, X.; Zhang, T.; Xu, X.; Zeng, T. RBFA-net: A rotated balanced feature-aligned network for rotated SAR ship detection and classification. Remote Sens. 2022, 14, 3345. [Google Scholar] [CrossRef] [Scilit]
- Atteia, G.; Collins, M.J. On the use of compact polarimetry sar for ship detection. ISPRS J. Photogramm. Remote Sens. 2013, 80, 1–9. [Google Scholar] [CrossRef] [Scilit]
- Wang, C.; Wang, Z.; Zhang, H.; Zhang, B.; Wu, F. A polsar ship detector based on a multi-polarimetric-feature combination using visual attention. Int. J. Remote Sens. 2014, 35, 7763–7774. [Google Scholar] [CrossRef] [Scilit]
- Wang, C.; Bi, F.; Chen, L.; Chen, J. A novel threshold template algorithm for ship detection in high-resolution SAR images. In Proceedings of the 2016 IEEE International Geoscience and Remote Sensing Symposium (IGARSS), Beijing, China, 10–15 July 2016; pp. 100–103. [Google Scholar]
- Levanon, N. Detection loss due to interfering targets in ordered statistics CFAR. IEEE Trans. Aerosp. Electron. Syst. 1988, 24, 678–681. [Google Scholar] [CrossRef] [Scilit]
- Touzi, R.; Lopes, A.; Bousquet, P. A statistical and geometrical edge detector for SAR images. IEEE Trans. Geosci. Remote Sens. 1988, 26, 764–773. [Google Scholar] [CrossRef] [Scilit]
- Barkat, M.; Varshney, P. Adaptive cell-averaging CFAR detection in distributed sensor networks. IEEE Trans. Aerosp. Electron. Syst. 1991, 27, 424–429. [Google Scholar] [CrossRef]
- Robey, F.; Fuhrmann, D.; Kelly, E.; Nitzberg, R. A CFAR adaptive matched filter detector. IEEE Trans. Aerosp. Electron. Syst. 1992, 28, 208–216. [Google Scholar] [CrossRef] [Scilit]
- Frery, A.; Muller, H.-J.; Yanasse, C.; Sant’Anna, S. A model for extremely heterogeneous clutter. IEEE Trans. Geosci. Remote Sens. 1997, 35, 648–659. [Google Scholar] [CrossRef] [Scilit]
- Qin, X.; Zhou, S.; Zou, H.; Gao, G. A CFAR detection algorithm for generalized gamma distributed background in high-resolution sar images. IEEE Geosci. Remote Sens. Lett. 2013, 10, 806–810. [Google Scholar] [CrossRef] [Scilit]
- Schwegmann, C.P.; Kleynhans, W.; Salmon, B.P. Manifold adaptation for constant false alarm rate ship detection in south african oceans. IEEE J. Sel. Top. Appl. Earth Obs. Remote Sens. 2015, 8, 3329–3337. [Google Scholar] [CrossRef] [Scilit]
- Wang, C.; Bi, F.; Zhang, W.; Chen, L. An intensity-space domain CFAR method for ship detection in HR SAR images. IEEE Geosci. Remote Sens. Lett. 2017, 14, 529–533. [Google Scholar] [CrossRef] [Scilit]
- Ren, S.; He, K.; Girshick, R.; Sun, J. Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks. IEEE Trans. Pattern Anal. Mach. Intell. 2017, 39, 1137–1149. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Nie, X.; Duan, M.; Ding, H.; Hu, B.; Wong, E.K. Attention Mask R-CNN for Ship Detection and Segmentation From Remote Sensing Images. IEEE Access 2020, 8, 9325–9334. [Google Scholar] [CrossRef] [Scilit]
- Ge, Z.; Liu, S.; Wang, F.; Li, Z.; Sun, J. YOLOX: Exceeding YOLO Series in 2021. arXiv 2021, arXiv:2107.08430. [Google Scholar]
- Redmon, J.; Farhadi, A. YOLOv3: An Incremental Improvement. arXiv 2018, arXiv:1804.02767. [Google Scholar]
- Bochkovskiy, A.; Wang, C.Y.; Liao, H. YOLOv4: Optimal Speed and Accuracy of Object Detection. arXiv 2020, arXiv:2004.10934. [Google Scholar]
- Berg, A.C.; Fu, C.Y.; Szegedy, C.; Anguelov, D.; Erhan, D.; Reed, S.; Liu, W. SSD: Single Shot MultiBox Detector. arXiv 2015, arXiv:1512.02325. [Google Scholar]
- Lin, T.-Y.; Goyal, P.; Girshick, R.; He, K.; Dollár, P. Focal loss for dense object detection. IEEE Trans. Pattern Anal. Mach. Intell. 2020, 42, 318–327. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Qin, C.; Wang, X.; Li, G.; He, Y. A Semi-Soft Label-Guided Network With Self-Distillation for SAR Inshore Ship Detection. IEEE Trans. Geosci. Remote Sens. 2023, 61, 5211814. [Google Scholar] [CrossRef] [Scilit]
- He, S.; Yuan, R.; Yang, Z.; Liu, J. D3S-Net: A Dense SAR Ship Detection Network for Dynamic Denoising and Structural Sparsity Deinterference. Digit. Signal Process. 2026, 182, 106295. [Google Scholar] [CrossRef] [Scilit]
- Wen, Z.; Ma, K.; Wan, H.; Chen, J.; Yang, W.; Huang, Z. YMCNet: Enhanced SAR Ship Detection in a Range-Compressed Domain Based on Structured State-Space. In IGARSS 2025-2025 IEEE International Geoscience and Remote Sensing Symposium; IEEE: New York, NY, USA, 2025. [Google Scholar]
- Zhang, J.; Li, S.; Dong, Y.; Pan, B.; Shi, Z. Hierarchical Similarity Alignment for Domain Adaptive Ship Detection in SAR Images. IEEE Trans. Geosci. Remote Sens. 2022, 60, 5240611. [Google Scholar] [CrossRef] [Scilit]
- Li, D.; Liang, Q.; Liu, H.; Liu, Q.; Liu, H.; Liao, G. A novel multidimensional domain deep learning network for sar ship detection. IEEE Trans. Geosci. Remote Sens. 2022, 60, 5203213. [Google Scholar] [CrossRef] [Scilit]
- Rao, Y.; Zhao, W.; Zhu, Z.; Lu, J.; Zhou, J. Global filter networks for image classification. In Advances in Neural Information Processing Systems; Ranzato, M., Beygelzimer, A., Dauphin, Y., Liang, P., Vaughan, J.W., Eds.; Curran Associates, Inc.: Red Hook, NY, USA, 2021; Volume 34, pp. 980–993. [Google Scholar]
- Zhang, T.; Zhang, X.; Li, J.; Xu, X.; Wang, B.; Zhan, X.; Xu, Y.; Ke, X.; Zeng, T.; Su, H.; et al. SAR Ship Detection Dataset (SSDD): Official Release and Comprehensive Data Analysis. Remote Sens. 2021, 13, 3690. [Google Scholar] [CrossRef] [Scilit]
- Wei, S.; Zeng, X.; Qu, Q.; Wang, M.; Su, H.; Shi, J. HRSID: A High-Resolution SAR Images Dataset for Ship Detection and Instance Segmentation. IEEE Access 2020, 8, 120234–120254. [Google Scholar] [CrossRef] [Scilit]
- Patro, B.N.; Namboodiri, V.P.; Agneeswaran, V.S. SpectFormer: Frequency and Attention is what you need in a Vision Transformer. arXiv 2023, arXiv:2304.06446. [Google Scholar]
- Cochran, W.T.; Cooley, J.W.; Favin, D.L.; Helms, H.D.; Kaenel, R.A.; Lang, W.W.; Maling, G.C.; Nelson, D.E.; Rader, C.M.; Welch, P.D. What is the fast Fourier transform? Proc. IEEE 1967, 55, 1664–1674. [Google Scholar] [CrossRef] [Scilit]
- Brigham, E.O. The Fast Fourier Transform and Its Applications; Prentice-Hall, Inc.: Hoboken, NJ, USA, 1988. [Google Scholar]
- Bracewell, R.N. The fourier transform. Sci. Am. 1989, 260, 86–95. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Cooley, J.W.; Lewis, P.A.; Welch, P.D. The fast Fourier transform and its applications. IEEE Trans. Educ. 1969, 12, 27–34. [Google Scholar] [CrossRef] [Scilit]
- Gevorgyan, Z. SIoU loss: More powerful learning for bounding box regression. arXiv 2022, arXiv:2205.12740. [Google Scholar]
- Misra, D.; Nalamada, T.; Arasanipalai, A.U.; Hou, Q. Rotate to attend: Convolutional triplet attention module. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, Waikoloa, HI, USA, 3–8 January 2021. [Google Scholar]
- Lin, T.-Y.; Goyal, P.; Girshick, R.; He, K.; Dollár, P. Focal loss for dense object detection. In Proceedings of the IEEE International Conference on Computer Vision, Venice, Italy, 22–29 October 2017. [Google Scholar]
- Li, X.; Wang, W.; Wu, L.; Chen, S.; Hu, X.; Li, J.; Tang, J.; Yang, J. Generalized focal loss: Learning qualified and distributed bounding boxes for dense object detection. Adv. Neural Inf. Process. Syst. 2020, 33, 21002–21012. [Google Scholar]
- Rezatofighi, H.; Tsoi, N.; Gwak, J.; Sadeghian, A.; Reid, I.; Savarese, S. Generalized Intersection over Union: A Metric and A Loss for Bounding Box Regression. arXiv 2019, arXiv:1902.09630. [Google Scholar]








| Model | Dataset | Precision | Recall | Map 0.5 |
|---|---|---|---|---|
| Faster R-CNN | SSDD | 81.63 | 85.31 | 89.63 |
| HRSID | 88.81 | 72.57 | 77.98 | |
| FCOS | SSDD | 84.15 | 92.52 | 90.61 |
| HRSID | 75.53 | 73.79 | 77.95 | |
| YOLOv5 | SSDD | 95.14 | 90.01 | 96.28 |
| HRSID | 84.69 | 75.11 | 83.34 | |
| YOLOv7 | SSDD | 91.05 | 84.92 | 93.68 |
| HRSID | 85.52 | 74.58 | 83.64 | |
| YOLOv8 | SSDD | 95.04 | 91.20 | 96.05 |
| HRSID | 90.07 | 83.15 | 90.40 | |
| AFN-YOLO | SSDD | 97.69 | 97.35 | 98.75 |
| HRSID | 91.11 | 83.32 | 91.65 |
| C2f_FF | C2R | TAS-FPN | TA | Loss | P (%) | R (%) | mAP@50 (%) | mAP@50:95 (%) | |
|---|---|---|---|---|---|---|---|---|---|
| 1 | 95.04 | 91.20 | 96.05 | 67.38 | |||||
| 2 | ✓ | 97.07 | 95.10 | 97.59 | 72.51 | ||||
| 3 | ✓ | ✓ | 97.31 | 95.92 | 97.88 | 73.64 | |||
| 4 | ✓ | ✓ | ✓ | 97.52 | 96.61 | 98.31 | 74.95 | ||
| 5 | ✓ | ✓ | ✓ | ✓ | 97.63 | 97.08 | 98.56 | 75.62 | |
| 6 | ✓ | ✓ | ✓ | ✓ | ✓ | 97.69 | 97.35 | 98.75 | 76.20 |
| P (%) | R (%) | mAP@50 (%) | Parameters (M) | FPS | Model Size (MB) | |
|---|---|---|---|---|---|---|
| YOLOv8n | 95.04 | 91.20 | 96.05 | 3.01 | 66.9 | 6.2 |
| AFN-YOLO | 97.69 | 97.35 | 98.75 | 3.39 | 54.3 | 7.0 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
Huang, W.; Dong, S.; Fan, Z.; Zhang, X. SAR Ship Detection in Complex Marine Environments. Computers 2026, 15, 437. https://doi.org/10.3390/computers15070437
Huang W, Dong S, Fan Z, Zhang X. SAR Ship Detection in Complex Marine Environments. Computers. 2026; 15(7):437. https://doi.org/10.3390/computers15070437
Chicago/Turabian StyleHuang, Weichen, Sihao Dong, Zhiheng Fan, and Xiaohu Zhang. 2026. "SAR Ship Detection in Complex Marine Environments" Computers 15, no. 7: 437. https://doi.org/10.3390/computers15070437
APA StyleHuang, W., Dong, S., Fan, Z., & Zhang, X. (2026). SAR Ship Detection in Complex Marine Environments. Computers, 15(7), 437. https://doi.org/10.3390/computers15070437
