Abstract
With the expanding application of synthetic aperture radar (SAR) in ocean monitoring and port regulation, nearshore ship detection based on SAR image faces notable challenges arising from strong background scattering, dense target occlusion, and large pose variations. Therefore, this paper proposes a two-stage oriented detection network named EARS-Net to improve the accuracy of ship detection in complex nearshore environments. Specifically, a lightweight convolutional block attention module (CBAM) is embedded into the high-level semantic stages of ResNet50 to enhance discriminative ship features while suppressing interference from port infrastructures and shoreline structures. Then, the dynamic angle regression loss (DAL) is proposed, and the angle weight function is designed according to the ship direction distribution characteristics, which allocates higher regression weight to the ship target with larger tilt angle, improving the defect of insufficient positioning accuracy for large angle ships. Moreover, a training strategy that combines focal loss, multi-scale training, and rotated online hard example mining (ROHEM) is employed to alleviate sample imbalance and improve generalization in dense scenes. Experimental results on the nearshore subset of the SSDD show that EARS-Net achieves an average precision (AP) of 0.903 on the test set, demonstrating reliable detection capability under complex backgrounds and dense target distributions. These results validate the effectiveness of our method and highlight its potential as a practical engineering solution for enhancing port situational awareness and coastal security monitoring.
1. Introduction
With the rapid advancement of synthetic aperture radar (SAR) imaging technology, SAR satellite image has become increasingly valuable in military reconnaissance, ocean monitoring, and maritime traffic management due to its all-day and all-weather sensing capability [1]. Ship detection based on SAR image has emerged as an important research topic in remote sensing image interpretation and plays a key role in maritime security monitoring and port situational awareness [1,2,3]. Most existing studies on SAR ship detection focus on offshore scenarios, where satisfactory performance has been achieved under relatively simple and homogeneous sea-surface backgrounds. However, nearshore areas are located at the land–sea interface and are characterized by much more complex imaging conditions, which makes ship detection considerably more challenging. Nearshore ships are often critical targets for both strategic and management purposes, and accurate detection is therefore essential for port security surveillance and coastal situational awareness. As a result, there is a strong need for high-reliability SAR ship detection methods specifically designed for complex nearshore environments [4].
The challenges of nearshore SAR ship detection can be summarized as follows. First, nearshore scenes commonly contain man-made structures such as port facilities, docks, breakwaters, and shoreline constructions. In SAR images, these structures often present strong scattering highlights and geometric patterns similar to those of ships, which can lead to target confusion and a higher false-alarm rate, especially under heterogeneous coastal clutter [5,6,7]. Such background complexity is also reflected in cross-sensor SAR studies, where domain shift between different satellite-borne SAR sources can substantially degrade detection performance, indicating that nearshore clutter is not only strong but also highly variable across acquisition conditions [8]. Second, nearshore ships are frequently moored or anchored with small inter-target spacing and tend to appear in dense layouts [9]. Mutual occlusion and echo superposition among densely distributed ships result in highly overlapped candidate detections, which not only increases the difficulty of separating adjacent targets but also aggravates missed detections during non-maximum suppression (NMS) [10,11,12]. Recent inshore-focused studies further report that dense layouts introduce severe annotation overlap and ambiguous supervision, which can amplify NMS-related misses and make instance separation a primary bottleneck in crowded ports [13]. Third, nearshore ships exhibit diverse poses due to berth layouts, channel directions, and operational modes, yielding a wide range of orientations. Under side-looking SAR imaging geometry, the spatial distribution of ship scattering centers varies with orientation, making angle regression particularly sensitive: even small angular errors may cause considerable displacement of the bounding-box vertices [12]. Conventional horizontal bounding boxes (HBBs) cannot effectively encode ship orientation and often fail to separate adjacent targets accurately [14]. For SAR ships, which are typically high-aspect-ratio and orientation-sensitive, oriented detectors have shown clear advantages by explicitly modeling rotation and leveraging SAR-specific scattering cues, yet regression stability can still be challenged in complex coastal scenes [15]. Although DiffusionDet [16] is efficient and widely applicable, its axis-aligned formulation leads to loose enclosures for arbitrarily oriented targets with large aspect ratios such as ships. This introduces substantial background pixels and causes severe overlap in crowded scenes. These effects directly result in inaccurate localization and poor separation of neighboring ships. There are also pixel level segmentation (PSeg) methods with high target extraction accuracy. For example, Mask R-CNN [17] can provide the most accurate target contour information. However, such methods usually rely on extremely fine pixel level labeling, and the cost of data preparation is far higher than that of bounding box labeling. In addition, compared with the standard boundary box detection process, the segmentation network [18] needs to calculate and output the mask of each target, which brings higher computational complexity and memory overhead. The above shortcomings are particularly prominent for SAR ship detection, which often needs to process large-scale images and has certain requirements for real time.
In recent years, deep learning has driven significant progress in CNN-based SAR ship detection [19,20]. Early studies commonly modeled ships using HBB, which can be efficient in offshore scenarios. However, performance is substantially constrained in complex nearshore environments due to arbitrary orientations and dense occlusions. Rotated object detection has therefore gained increasing attention. It uses rotated bounding boxes (RBBs) to represent targets more compactly by introducing an angle parameter [21]. Prior studies have shown that RBB can markedly improve detection accuracy for orientation-sensitive targets and can provide critical heading cues for downstream tasks such as bow direction estimation and trajectory prediction [22]. In particular, for nearshore SAR ship detection, RBB has been demonstrated to mitigate the difficulties caused by irregular ship layouts and mutual occlusion in crowded ports. RoI Transformer [23] improves oriented detection by learning rotated feature alignment, but its performance can be sensitive to proposal quality and dense-instance ambiguities. S2A-Net [24] enhances feature alignment and sample assignment for oriented objects with a single-stage design, offering efficiency advantages, yet it may suffer from increased false alarms when strong scatterers resemble ships in complex coastal backgrounds. Gliding vertex [25] refines orientation by regressing vertices from horizontal boxes, which reduces angle discontinuity issues, but it can be less stable under severe overlap where vertex cues are corrupted by clutter and occlusion. Nevertheless, in nearshore SAR scenes, the coupling of complex background clutter, dense target distribution, and large orientation variation still poses substantial challenges to regression stability and feature discriminability. In order to solve the problem of sea clutter and land strong scattering interference in SAR images, some studies introduce attention mechanisms to enhance the response ability of the model to the target area. By weighting the features in the channel or spatial dimension, the discriminant information related to the ship target is highlighted [26,27]. These modules can suppress part of the background, but they typically do not explicitly address the instability of large-orientation regression. Moreover, strategies such as focal loss [28], multi-scale training, and hard example mining have been widely adopted to address sample imbalance and hard detection cases and to improve generalization. However, the existing methods are mostly optimized from a single perspective, and there is still a lack of systematic joint solutions to the problems such as unstable positioning of large angle ships and difficult separation of dense targets in complex background in offshore SAR scenes. Therefore, a systematic joint strategy that simultaneously improves background suppression, dense-target separation, and large-orientation localization remains necessary for nearshore SAR ship detection.
The above analysis indicates that nearshore SAR ship detection continues to face pronounced challenges, particularly from background interference, dense occlusion, and large orientation variation. To tackle these issues, this paper develops an efficient oriented ship detection method for complex nearshore scenarios by jointly considering the selection of an appropriate baseline framework and the optimization of key modules. Specifically, we adopt Oriented R-CNN [29] as the base detector. With its two-stage architecture, Oriented R-CNN can efficiently generate high-quality rotated proposals, achieving a favorable balance between detection accuracy and computational efficiency, which is well suited to nearshore SAR image containing densely distributed and multi-oriented ships. Building upon this baseline, we introduce a lightweight attention mechanism to enhance the discriminability of feature representations, design a dynamic angle regression loss to strengthen localization optimization for large-orientation ships, and further incorporate multi-scale training and rotated bounding-box hard example mining to improve generalization and robustness in complex nearshore environments. In summary, we propose an oriented ship detection framework that integrates attention-based feature enhancement and angle-aware regression optimization, referred to as EARS-Net (Enhanced Attention Rotated Ship Network). Without a notable increase in computational cost, the proposed method improves detection performance for densely distributed, multi-oriented ship targets in nearshore SAR scenes. The main contributions are summarized as follows:
- An efficient oriented ship detection framework is developed for complex nearshore scenarios, balancing detection accuracy and computational efficiency.
- A lightweight attention mechanism is introduced to enhance feature discriminability for ships and suppress clutter from complex backgrounds such as port infrastructures.
- A dynamic angle regression loss is proposed and combined with multi-scale training and hard example mining, significantly improving localization accuracy for large-orientation ships and the overall robustness of the model.
2. Proposed Method
2.1. Overall Framework
This paper proposes a nearshore SAR ship rotation detection method built upon a two-stage rotated object detection framework. The overall architecture is illustrated in Figure 1. While preserving the efficient proposal generation mechanism of Oriented R-CNN, the proposed framework introduces targeted improvements at both the feature representation and regression optimization levels to address key challenges in complex nearshore scenarios, including strong background clutter, dense targets with severe occlusions, and unstable localization of ships with large aspect rotations.
Figure 1.
Detailed architecture of EARS-Net.
In the feature extraction stage, ResNet-50 is adopted as the backbone. A lightweight convolutional block attention module (CBAM) [30] is incorporated into the high-level semantic feature stage to adaptively reweight features through both channel and spatial attention. This enhancement strengthens discriminative ship representations and effectively suppresses interference from complex backgrounds such as port facilities and shoreline structures. The resulting feature maps are then fed into the Oriented RPN to generate high-quality rotated proposals. Subsequently, Rotated RoI Align is employed to precisely align proposal regions in a rotation-consistent manner.
In the classification and localization stage, features corresponding to rotated proposals are forwarded to a rotated detection head for refined categorization and bounding-box regression. To mitigate the localization instability that often arises during rotated box regression for large-angle ships in nearshore SAR image, we design a dynamic angle regression loss that assigns posture-dependent regression weights to ship samples, thereby strengthening the model’s ability to learn from hard angular cases.
Moreover, during training, multi-scale training and a Rotated Bounding-Box Online Hard Example Mining (ROHEM) [31] strategy are introduced. By enhancing sample diversity and difficulty distribution at both the input-scale and sample-selection levels, these strategies improve the generalization capability and robustness of the model under complex nearshore environments. Collectively, these components constitute an efficient rotated ship detection framework tailored for nearshore SAR scenarios, referred to as EARS-Net.
2.2. Oriented R-CNN Baseline Framework
2.2.1. Overview of Overall Architecture
To accurately localize ships with arbitrary orientations in nearshore SAR imagery, Oriented R-CNN is selected as the baseline framework. Built upon the classical two-stage detection pipeline, Oriented R-CNN incorporates orientation information directly in the proposal generation stage, enabling effective modeling of rotated objects and achieving a favorable trade-off between detection accuracy and computational efficiency. This property is particularly suitable for nearshore SAR scenes where targets are dense and exhibit diverse poses.
As shown in Figure 2, Oriented R-CNN consists of the following three components: feature extraction, rotated proposal generation, and second-stage classification with refined localization. Specifically, the input SAR image is first processed by a backbone network to produce multi-scale feature maps that balance semantic representation and spatial resolution. The feature maps are then fed into the Oriented Region Proposal Network (Oriented RPN), which directly predicts rotated proposals aligned with target orientations, thereby avoiding the computational overhead of enumerating a large number of rotated anchors as required by conventional designs.
Figure 2.
Oriented R-CNN network structure.
Compared with one-stage rotated detectors based on dense prediction, a two-stage framework filters and refines candidates at the proposal level, which is advantageous for reducing redundant hypotheses and false positives in cluttered nearshore scenes with densely distributed ships. Moreover, by adopting a lightweight rotated proposal mechanism, Oriented R-CNN alleviates the computational burden associated with large-scale rotated-anchor enumeration, making it more practical for high-resolution SAR image. For bounding-box parameterization, Oriented R-CNN adopts a geometric-offset-based representation. By jointly regressing the proposal center, scale information, and key geometric offsets, the framework provides a flexible formulation for rotated proposals. This design avoids the periodic discontinuity induced by directly regressing angular parameters, thereby improving regression stability. In the second stage, rotation-consistent feature alignment is performed to extract region features aligned with the proposal orientation. This operation preserves spatial structural consistency while enabling fine-grained classification and localization of ships under arbitrary orientations. Overall, Oriented R-CNN offers an efficient and stable baseline for nearshore SAR ship detection and provides a solid foundation for incorporating the proposed feature enhancement and regression optimization modules.
2.2.2. Rotating Candidate Box Generation
The generation of rotating bounding boxes constitutes the first stage of model and represents the core innovation of Oriented R-CNN. First, a ResNet50 backbone network combined with a Feature Pyramid Network extracts multi-scale features from the input image, generating feature maps rich in semantic and positional information. Subsequently, a lightweight, fully convolutional Oriented RPN architecture processes these feature maps to directly produce oriented region proposal boxes. Finally, the Rotated RoI Align operation aligns the features within the candidate boxes, providing fixed-size feature maps for the subsequent detection head.
The efficiency of Oriented RPN is mainly attributed to the midpoint offset representation proposed by the authors, and the schematic diagram of its principle is shown in Figure 3. This method innovatively uses six parameters to represent the rotated candidate boxes output by the regression branch. Here, are the center coordinates of the predicted rotated box, and respectively represent the width and height of its circumscribed rectangle, while and represent the offsets of the midpoints of two adjacent sides of the circumscribed rectangle. Using these six parameters, the coordinates of the four vertices of the rotated candidate box can be calculated according to the following formulas.
Figure 3.
Schematic diagram of midpoint offset representation.
Then, the obtained rotation candidate box is a parallelogram. For subsequent processing, it needs to be decoded into a standard rotated rectangular box of the melody, that is, converting from the parameters to , where is the rotation angle. The Rotated RoI Align operation is based on these rotated rectangular boxes to spatially align the feature maps and unify the sizes of multi-scale features.
2.2.3. Target Classification and Fine-Grained Localization
Object classification and fine-grained localization are achieved in the model’s second stage, where fixed-size feature maps extracted by Rotated RoI Align are fed into the Oriented R-CNN detection head. This detection head comprises the following two branches: classification and regression. The classification branch outputs probability distributions for objects and background, while the regression branch outputs offset values for bounding box coordinates (including orientation angles). Rotated RoI Align, achieved through bilinear interpolation, preserves the spatial symmetry of rotated features, demonstrating excellent feature aggregation performance in dense object detection.
2.3. Feature Extraction Module Based on CBAM
Object detection models based on CNNs primarily rely on backbone networks for feature extraction from images. Consequently, designing an appropriate backbone network is crucial for enhancing model performance. The original Oriented R-CNN employed ResNet50 as its backbone network, whose convolutional operations suffer from limited receptive fields. This hinders its ability to adaptively focus on the distinctive features between ship targets and their backgrounds, rendering it susceptible to interference from port facilities and sea-surface noise in complex coastal scenarios. Whilst global attention mechanisms such as Non-Local Attention can capture long-range feature dependencies, they require computing correlations between all pixels, resulting in extremely high computational complexity that significantly reduces model training and inference efficiency. The Convolutional Block Attention Mechanism (CBAM), as a lightweight and efficient attention module, enables precise feature selection through dual-perspective (channel and spatial) analysis without imposing excessive computational overhead. It enhances target feature discriminability while maintaining model operational efficiency, making it better suited to the dual demands of accuracy and speed in dense coastal vessel detection. CBAM employs a serial architecture, sequentially applying weighted enhancement to feature maps through the channel attention module (CAM) and spatial attention module (SAM). Its workflow is illustrated in Figure 4.
Figure 4.
CBAM workflow.
The channel attention module aggregates features along the channel dimension. By learning the interrelationships between channels, it automatically assigns higher weights to feature channels that are more discriminative for ship detection (such as specific textures or shapes), while simultaneously suppressing redundant channels associated with the background. The spatial attention module focuses on identifying critical regions by learning relationships between feature maps across the spatial dimension. It generates a two-dimensional spatial mask to highlight the precise location of vessel targets, effectively filtering out distractions such as docks and breakwaters.
To determine where to insert CBAM, this paper considers both the representation hierarchy of the backbone network and the interference characteristics of nearshore SAR scenes. The shallow stages of ResNet emphasize edges, textures, and local high frequency details. The higher stages have a larger receptive field and stronger semantic representation. They can better capture target structure and contextual relations. CBAM applies channel attention and spatial attention to selectively enhance and suppress features. When applied to high level semantic features, it is more likely to produce stable and generalizable saliency responses. When applied directly to low-level texture features, it may overrespond to speckle noise and local strong scattering highlights in SAR images. This can increase the risk of false alarms. In nearshore scenes, strong scatterers such as port infrastructures and shoreline structures often resemble ships in low-level texture appearance. Therefore, CBAM is inserted after the bottleneck blocks of stage 4 and stage 5 in ResNet50. This design aims to enhance discriminative ship features and suppress background interference. Ablation studies on insertion positions are reported in the experimental section.
2.4. Dynamic Angle Regression Loss Function
Another core challenge in rotating object detection lies in the accuracy of angle regression. Traditional loss functions, such as Smooth L1, apply equal optimization pressure to objects across all angles. However, under SAR imaging characteristics, bounding box representations for vessels at large angles, such as those tilted around 45°, are extremely sensitive to minor deviations and exhibit more ambiguous features. This renders them particularly challenging angle-sensitive cases during model training. Without specialized handling of such samples, models tend to favor learning easier to localize horizontal or vertical targets, resulting in significantly reduced detection accuracy for vessels at large angles. The design of the dynamic angle regression loss is motivated by the side-looking imaging geometry of nearshore SAR and the geometric sensitivity of angle regression in rotated bounding boxes.
From a geometric perspective, the angle parameter of a rotated bounding box is mapped to vertex coordinates through a nonlinear relationship. Angle errors propagate to vertex displacements and affect localization metrics such as IoU. For a rotated rectangle defined by center , width , height , and angle , a small angular perturbation causes vertex displacements. Considering the two vertices along the long side (width direction), the displacement magnitude can be approximated as follows:
where is the length of the long side (ship length) and is in radians. When the target orientation is close to , this displacement is nearly perpendicular to the ship’s longitudinal axis. Consequently, even a tiny angular error leads to a sharp drop in Intersection-over-Union (IoU) between the predicted box and the ground truth. To quantify this sensitivity, define an angular error sensitivity coefficient as the absolute derivative of IoU with respect to . Theoretical analysis shows that reaches its maximum at and its minimum at or , exhibiting a sinusoidal distribution. Thus, large-orientation ships are most sensitive to angle errors and should be assigned higher regression weights in the loss function.
SAR adopts a side-looking geometry. The echo distribution in range and azimuth depends not only on target size and shape but also on the observation aspect and target heading. When the ship is oriented nearly perpendicular to the radar direction (), the broadside becomes the dominant scattering surface. Ships are typically composed of multiple strong scatterers. The locations and energy distribution of dominant scattering centers may shift with target orientation. This behavior introduces orientation-dependent variations in image structure and saliency responses. In nearshore scenes, these variations are further coupled with strong background scatterers such as shorelines and port infrastructures. As a result, large-orientation samples are more likely to exhibit unstable regression and localization deviations.
Based on this analysis, this paper introduces dynamic angle regression loss. The proposed loss adaptively weights the angle-related regression terms according to the ground truth orientation. It increases the optimization emphasis for large-orientation samples and angle hard cases during training. This design improves the stability of rotated localization and enhances the overall robustness under complex nearshore backgrounds. To achieve optimization for vessels at extreme angles, a dynamic weighting function based on the vessel’s actual angle has been designed. The core principle is as follows: the closer the vessel’s tilt angle approaches 90°, the greater the positioning difficulty, thus assigning a higher regression weight; conversely, the closer the angle approaches 0° or 180°, the lesser the positioning difficulty, assigning a standard regression weight. The specific function expression is
where is the actual tilt angle of the ship (unit ), and is the weight adjustment coefficient. This paper takes 0.8 after experimental verification; parameter sensitivity analysis is conducted in the experimental section (see Section 3.2.3). As shown in Figure 5, the characteristics of this function are as follows: when the , the weight reaches the maximum value of 1.8, which strengthens the regression optimization for ships perpendicular to the imaging direction; when the or , the weight is the minimum value of 1, maintaining the conventional optimization for small-angle ships; and when the angle changes within the range of 0°~180°, the weight increases in a sine curve as the angle approaches 90°, realizing the adaptive weight distribution for large-angle targets.
Figure 5.
Curve of dynamic angle weight function changing with angle.
To eliminate the influence of regression loss across vessels of varying scales, the parameter differences between predicted and actual bounding boxes undergo normalization processing. Rotation boxes are represented using a five-parameter formulation , the formula is as follows:
where are the normalized center coordinate error, width-height error, and angle error respectively; predicted boxes are denoted as while actual boxes are denoted as .
To mitigate gradient explosion caused by outliers, a Smooth L1 loss is employed as the base regression loss, formulated as follows:
Here, = 1.0 is the smoothing threshold, and may be substituted into respectively.
For the five parameters of the rotating box, the basic regression loss is the weighted sum of the individual errors:
Combining the dynamic weight function with the baseline regression loss yields the dynamic angle regression loss, formulated as follows:
This design increases the contribution of large orientation samples to the regression objective and improves the stability of rotated localization in nearshore SAR scenes.
2.5. EARS-Net Loss Function
The total loss function of EARS-Net comprises the classification loss (focal loss) and the dynamic angle regression loss (DAL), as formulated below:
denotes the regression loss weighting factor (hyperparameter, set to 1.0 in this paper), whose function is to balance the overall proportion between classification loss and regression loss, thereby preventing the loss from any single task from dominating model training.
is the classification loss. To address the imbalance between positive and negative samples in offshore scenarios, which are characterized by many backgrounds and few targets, as well as the imbalance between easy and difficult samples due to dense occlusion and small targets, the loss contribution of simple background samples is reduced through , enabling the model to focus more on the classification learning of ship targets (especially hard example targets). The formula is as follows:
where represents the true label (1 indicates a ship, 0 indicates the background), represents the probability of predicting a target as a ship, with = 0.25 (to balance positive and negative samples) and = 2.0 (to suppress simple samples).
is a dynamic regression loss. Aiming at the core pain point of difficulty in positioning ships at large angles, it strengthens the positioning optimization of high-difficulty samples by combining dynamic weights with the basic regression loss and balances the training priority of classification and regression through .
2.6. Training Strategy
To improve the training stability and generalization of EARS-Net in complex nearshore scenes, this paper organizes the training strategies as a coordinated framework that targets key bottlenecks rather than a simple collection of tricks. The framework constrains model learning from four aspects. These aspects include classification imbalance, angle hard cases in regression, scale variation generalization, and proposal level hard example mining. Specifically, the classification branch adopts focal loss to alleviate the positive and negative imbalance caused by the dominance of background samples in nearshore data. It also suppresses the loss contribution of a large number of easy samples. This allows training to focus on difficult cases such as densely occluded ships and weak response targets. The regression branch adopts the dynamic angle regression loss, which is denoted as DAL. It assigns higher regression weights to large orientation samples. This strengthens the learning of angle hard cases and improves the stability of rotated localization. At the data level, multi-scale training is used to expand the distribution of input scales. This enhances the adaptation to ships of different sizes and improves cross-scene generalization. At the sample level, ROHEM is introduced to dynamically select high loss samples at the proposal level for back propagation. This concentrates optimization on difficult proposals, including densely occluded targets, small ships, and large orientation cases. It also forms a hard case reinforcement loop with DAL.
To enhance the adaptability of the model to vessels of varying scales, a multi-scale training strategy was employed. Drawing upon the size distribution characteristics of coastal vessels, input images were randomly scaled within the range [(300, 300), (1000, 1000)]. Throughout training, the aspect ratio of images was maintained constant to prevent distortion of vessel target shapes. Each training batch randomly selects a scale for image scaling, exposing the model to vessels of varying dimensions during training. This enables the model to learn multi-scale feature representations, enhancing detection robustness for both small-scale and large-scale vessels. Consequently, it effectively mitigates detection challenges arising from scale variations in coastal maritime scenarios. This strategy covers scale variation from the data distribution perspective. It provides richer scale samples for subsequent hard example mining and angle regression optimization.
To further enhance the learning capability of the model for challenging samples, the Rotated Bounding Box Line-based Hard Example Mining (ROHEM) strategy is introduced. This approach incorporates a parallel prediction branch within the RROI network, sharing weights with the main training branch but not participating in parameter updates. During training, the parallel branch calculates the classification loss and regression loss for all candidate boxes. It then ranks them based on the total loss and selects the top 128 most challenging samples (including densely occluded vessels, small-target vessels, and vessels at large angles). Only these challenging samples are used to update the model parameters of the main branch. Since DAL increases the regression loss of large orientation samples, ROHEM is more likely to include angle difficult proposals during loss-based ranking and selection. This further strengthens the learning of angle hard cases.
This strategy effectively suppresses the excessive contribution of simple samples, concentrating the training focus on challenging cases. It enhances the model’s adaptability to complex offshore scenarios, thereby further reducing both false negatives and false positives.
3. Experiments and Analysis
To comprehensively evaluate the performance of the EARS-Net model in detecting dense ship targets in offshore scenarios, this section designs a series of rigorous experiments. The experiments comprise the following two main components: first, ablation studies progressively introduce model components to validate the effectiveness of the proposed CBAM attention mechanism, dynamic angle regression loss, and various training strategies; second, comparative evaluations pit EARS-Net against state-of-the-art rotating object detection algorithms using both objective metrics and subjective visual assessments to fully demonstrate its superiority.
3.1. Experimental Preparation
3.1.1. Experimental Data
The experiment employed the SAR ship detection dataset (SSDD) [32] coastal dataset for training and performance evaluation. This dataset serves as a widely used benchmark in the field of SAR ship detection, characterized by its high scene realism and annotation accuracy. The specific configuration of the dataset is as follows:
Data composition: The SSDD is divided into training, validation, and test sets with a ratio of 7:1:2, resulting in 812 training images, 116 validation images, and 232 test images. Meanwhile the test set contains 39 offshore SAR image slices. All images are annotated using rotating bounding boxes (RBBs).
Target Scale: The training set contains 2013 annotated ship targets, while the test set contains 132 annotated ship targets. These targets encompass various scales (20~393 pixels), different tilt angles (0°~180°), and diverse sea conditions.
Data Characteristics: The imagery originates from multiple SAR satellites including RadarSat-2, TerraSAR-X, and Sentinel-1, featuring polarization modes such as HH, VV, VH, and HV, with resolutions ranging from 1 m to 15 m. This comprehensively simulates the complex environments of real coastal ports.
Dataset Analysis. To quantitatively characterize the challenges of the nearshore scenario, we statistically analyzed the orientation distribution of all ship instances in the SSDD. The results reveal a distinct multimodal pattern, with significant clusters near 45–50° and 95–105°. Specifically, 5890 ships fall within the 75–105° large-orientation range, accounting for 28.1% of all samples. Targets in this range exhibit large aspect ratios and more complex scattering characteristics, making them particularly sensitive to angular regression errors. This statistical evidence supports the necessity of designing dedicated angle-aware optimization strategies for this dataset.
3.1.2. Experimental Environment
The experiment was conducted on the Ubuntu 22.04.3 LTS operating system. The hardware configuration comprised an Intel® Core™ i9-9900K processor, equipped with 64 GB of memory and an NVIDIA GeForce RTX 3090 graphics processing unit. The algorithm implementation utilized the PyTorch 1.12.1 deep learning framework, combined with the MMRotate [33] toolbox to complete model construction and testing.
3.1.3. Training Details
This section did not utilize a pre-trained detection model during training. The evaluation metric employed average precision, with SGD as the optimizer. The learning rate was set to 0.005, momentum to 0.9, and weight decay to 0.0001. Without the multi-scale strategy, input images are resized to 608 × 608, with a batch size of 8 and a maximum training epoch of 200. When using the focal classification loss function, gamma is set to 2.0 and alpha to 0.25.
3.1.4. Evaluation Indicators
To evaluate the effectiveness of ship detection algorithms, the primary accuracy metrics employed include precision (p), recall (r), F1 score, average precision (AP), frames per second (FPSs), floating point operations per second (FLOPs) and parameters. The calculation formulas are defined as follows:
In the formula, TP represents the number of correctly detected ship targets, FN represents the number of missed ship targets, and FP represents the number of non-ship targets incorrectly detected as ship targets. F1-score is the harmonic mean of precision and recall, which comprehensively reflects the overall detection performance of the model, avoiding the one-sidedness of a single indicator. The formula is as follows:
The average precision (AP) is calculated based on precision (p) and recall (r) using the following method:
FPS represents the number of image frames that the model can process per second during inference, which directly reflects the real-time inference speed of the model. FLOPs adopted as an auxiliary evaluation indicator to test model efficiency, which measures the computational load of each forward inference of the model. Lower FLOPs indicate lower computational complexity of the model, faster running speed and less demand for hardware resources. Parameters represent the number of weights and biases in the model. Fewer parameters mean a lighter model, which occupies less storage space and requires fewer computing resources.
3.2. Ablation Experiment
To validate the effectiveness of each improvement strategy in EARS-Net, we conducted detailed ablation experiments on the SSDD offshore test dataset. Using Oriented R-CNN as the baseline model, the experiments employed a comparative approach of incrementally adding components to investigate the performance gains contributed by each module. In the experimental results, the highest-scoring metric is highlighted in bold.
3.2.1. Verification of Detection Performance for Loss Function Module
In SAR image ship target detection, data for coastal scenes are relatively scarce and pose significant detection challenges due to factors like complex backgrounds, making them difficult examples. The focal loss function effectively addresses these difficult examples and improves detection performance. This section replaces the cross-entropy loss function in the baseline model with the focal loss function and conducts ablation experiments on this module. The experimental results are shown in Table 1.
Table 1.
Detection results for different loss functions.
As shown in the table, incorporating focal loss significantly improved the model’s average precision (AP) from 0.794 to 0.866, representing a 7.2 percentage point increase. This demonstrates that the function effectively mitigates data imbalance and enhances the model’s ability to learn from difficult samples. While focal loss led to a clear improvement in AP, it also resulted in a trade-off in other metrics. Recall increased from 0.893 to 0.902, which indicates that focal loss effectively reduced the number of missed detections, as it assigns higher weights to hard examples, such as small, occluded, or densely packed ships that are often overlooked by standard cross-entropy loss. Precision decreased from 0.873 to 0.728, a drop that can be attributed to the model detecting more candidate targets which rose from 133 to 161, thus including more false positives. This is a natural consequence of the model becoming more sensitive to potential targets, especially in complex inshore scenes. The F1 score decreased from 0.883 to 0.805, and as the harmonic mean of recall and precision, it reflects this trade-off. However, the significant improvement in AP, from 0.794 to 0.866, demonstrates that focal loss delivers a superior overall detection performance, as AP accounts for precision-recall trade-offs across all confidence thresholds and is a more comprehensive metric for object detection.
3.2.2. Verification of Detection Performance for the CBAM Feature Extraction Module
To validate the effectiveness of the CBAM, we designed four schemes for comparison by embedding the CBAM at different stages of ResNet50, as shown in Table 2. Different stages in ResNet correspond to different semantic levels. Shallow features, such as those from stage 2 and stage 3, focus more on edges, textures, and local high frequency information. High level features, such as those from stage 4 and stage 5, have a larger receptive field and stronger semantic representation. They can represent target structure and contextual relations more effectively.
Table 2.
CBAM addition locations for different schemes.
Table 3 shows that the performance varies with different CBAM addition location. Scheme B, which inserts CBAM into stage 4 and stage 5, achieves the best AP of 0.882. Compared with the baseline, the parameter count of Scheme B increases by only 0.5 M, computational cost rises by 0.3 G, and inference speed remains comparable at 30.9 FPS. Compared with Scheme A, which inserts CBAM only into stage 5, Scheme B further improves the suppression of complex background clutter. This indicates that applying both channel and spatial attention at higher semantic levels helps emphasize responses that are consistent with ship structure and context. In contrast, inserting CBAM into shallower stages in Scheme C and Scheme D does not bring sustained gains, and adds more computational overhead without improving detection accuracy. A possible reason is that shallow features are more sensitive to local textures and high frequency responses. In nearshore SAR imagery, speckle noise and strong shoreline scattering highlights may be incorrectly amplified by the attention mechanism. This can introduce additional false alarms or reduce the stability of target separation. Overall, the ablation results support the design choice. Scheme B achieves the best balance between detection accuracy and computational efficiency and deploying CBAM in stage 4 and stage 5 is more suitable for dense ship detection under complex nearshore backgrounds.
Table 3.
Detection results for different scenarios.
While Scheme B does not achieve the highest precision or F1 score, its superior AP of 0.882 demonstrates a more robust overall detection performance. The elevated recall (0.938) indicates that the model effectively captures more true ship targets, especially in complex inshore scenes, at the cost of a slight increase in false positives. This trade-off is acceptable, as AP, which integrates performance across all confidence thresholds, remains the more comprehensive metric for evaluating object detection systems.
Analysis of the experimental results indicates that when implementing Plan B (simultaneously incorporating the CBAM in stages 4 and 5), the ship detection AP value reached its highest level at 0.882. This demonstrates that embedding the attention module at this position effectively suppresses interference from port shore facilities, docks, and other sources, thereby reducing false detections. Its detailed structure is shown in Figure 6.
Figure 6.
Structure diagram of feature extraction module based on CBAM.
3.2.3. Validation of Dynamic Angle Regression Loss and Training Strategies
Building upon the focal loss + CBAM_B model, we further incorporated the DAL function along with multi-scale and ROHEM training strategies. The experimental results are presented in Table 4.
Table 4.
Detection results with DAL and training strategy.
As shown in Table 4, model performance improves progressively when DAL, multi scale training, and ROHEM are introduced on top of focal loss and CBAM_B. First, independent effects of individual modules are validated. The single introduction of ROHEM increases AP from 0.882 to 0.884 and improves precision to 0.742, which suppresses false alarms by focusing on hard examples. The single use of multi-scale training raises AP to 0.886, which expands the training distribution and enhances feature representation for ships of various scales. The single addition of DAL increases AP to 0.885, which strengthens regression constraints for angle-sensitive hard samples and improves the stability of rotated ship localization. Second, synergies of all dual combinations are verified. The combination of ROHEM and multi-scale training increases AP to 0.887, where ROHEM alleviates the precision drop caused by multi-scale training and reduces false positives. The combination of DAL and multi-scale training further improves AP to 0.889, as scale perturbation and angle optimization jointly enhance feature learning. This improvement is accompanied by a precision decrease to 0.591 due to higher sensitivity to background clutter. The combination of DAL and ROHEM achieves a precision of 0.751 and an F1 score of 0.831, the best among all dual combinations, forming a reinforcement loop for angle hard samples. Finally, the integration of all three components forms the EARS-Net model, which achieves the highest AP of 0.903. With the introduction of ROHEM into the DAL and multi-scale framework, precision is restored to 0.753 and F1 score to 0.833, while high recall of 0.929 is maintained. Such improvement comes from focused optimization on hard proposals such as occluded and small ships. ROHEM refines detection quality by emphasizing hard example learning. This also matches the synergy between ROHEM and DAL. DAL increases regression loss for large-orientation proposals, and ROHEM selects such high-loss proposals more frequently in proposal ranking. Overall, focal loss stabilizes classification learning, DAL improves angle sensitive localization, multi-scale training enhances scale generalization, and ROHEM strengthens proposal level hard example learning. Together, these components constitute a systematic training strategy for complex nearshore scenarios.
To investigate the impact of the weight coefficient in DAL on detection performance, we conducted experiments with . The corresponding AP values are plotted in Figure 7. It is worth noting that the sinusoidal form of the proposed weighting function is not designed for a specific angular distribution but originates from the universal geometric sensitivity of rotated bounding boxes. As derived above, the sensitivity to angular errors is inherently maximized when the target orientation approaches 90°, regardless of the dataset. The parameter controls the overall enhancement magnitude and can be adjusted according to the characteristics of different datasets. The value of 0.8 was selected based on empirical studies of the dataset used in this paper. For other datasets, we recommend tuning within a reasonable range based on the proportion of high-angle samples and scale characteristics. This flexibility enables the proposed DAL to maintain its effectiveness across various coastal SAR scenarios.
Figure 7.
Sensitivity analysis of in Dynamic Angle Loss.
3.3. Comparative Experiment
To demonstrate the significant advantages of the proposed method EARS-Net, we compare it with several state-of-the-art rotating object detection models. We selected the following five algorithms: ROI Transformer [23] (three-stage), S2A-Net [24] (one-stage), R-Faster-RCNN [22] (two-stage), R-RetinaNet [34,35] (one-stage), and R-RepPoints [36] (anchor-free), YOLOv8s-OBB [37] (one-stage) and YOLO26s-OBB [38] (one-stage). All comparison models were retrained on the SSDD and tested on the offshore test set to ensure a fair comparison.
The performance results of various algorithms are shown in Table 5. The proposed EARS-Net achieves superior performance across all evaluation metrics on the SSDD coastal dataset. Its AP reaches 0.903, which surpasses the second-best performer, YOLO26s-OBB (0.823), by a significant margin of 8.0 percentage points. Compared with the baseline model Oriented R-CNN (0.794), EARS-Net achieves a substantial improvement of 10.9 percentage points. Beyond overall accuracy, EARS-Net shows balanced performance in both recall and precision. It achieves a recall of 0.929, which is 4.6 percentage points higher than the next-best model, R-Faster-RCNN (0.883). This indicates that our method effectively minimizes missed detections, even for small, occluded, or densely packed ships in complex coastal environments. While ROI-Transformer attains a slightly higher precision of 0.815, EARS-Net maintains a competitive precision of 0.753. When combined with its significantly higher recall, this results in an F1 score of 0.833, the highest among all models, reflecting a more robust detection system that avoids the trade-offs seen in other approaches. In terms of computational efficiency, EARS-Net also achieves a favorable balance. It has 26.6 M parameters and 39.0 G FLOPs, which are only slightly higher than those of the baseline Oriented R-CNN (25.8 M, 38.2 G), while delivering a substantial AP improvement. Its inference speed reaches 30.4 FPS, which is comparable to lightweight methods such as R-RetinaNet (31.2 FPS) and YOLOv8s-OBB (41.8 FPS), and significantly outperforms complex models like ROI Transformer (18.2 FPS) and R-Faster-RCNN (23.7 FPS). This demonstrates that the proposed method achieves an effective trade-off between detection accuracy and computational cost.
Table 5.
Detection results of different algorithms on the SSDD coastal dataset.
The performance of competing models reveals clear limitations. Three-stage models like ROI-Transformer, while achieving competitive precision of 0.815, suffer from limited recall of 0.868, indicating difficulty in capturing all ship targets in cluttered scenes. Moreover, its computational cost is substantially higher, with 42.6 M parameters and 58.3 G FLOPs, resulting in a slower inference speed of only 18.2 FPS. One-stage detectors such as S2A-Net and R-RetinaNet exhibit low precision, at 0.520 and 0.510 respectively, due to excessive false positives, reflecting their inability to effectively suppress background clutter and shoreline interference. As general-purpose detectors without specialized designs for SAR images, YOLOv8s-OBB and YOLO26s-OBB also achieve relatively low precision and are significantly outperformed by EARS-Net in overall detection accuracy. R-RetinaNet achieves competitive speed (31.2 FPS) but at the cost of severely compromised detection accuracy. The anchor-free method R-RepPoints performs the poorest, with an AP of only 0.583 and a precision of 0.148. Despite generating 638 detections, it fails to distinguish true ship targets from noise, highlighting the challenge of anchor-free design in SAR imagery. Although it has the lowest parameters (22.4 M) and fastest speed (35.6 FPS), its accuracy is unacceptable for practical applications. The superior performance of EARS-Net can be attributed to its systematic integration of focal loss, CBAM, DAL, multi-scale training, and ROHEM. These components work synergistically to stabilize classification, enhance angle-sensitive localization, improve scale generalization, and prioritize hard examples, enabling the model to maintain high recall while preserving competitive precision. This comprehensive design makes EARS-Net well-suited for the complex nearshore SAR ship detection task.
To more intuitively illustrate the comprehensive performance trade-off between detection accuracy and computational complexity of each model, we further present the results in the form of a bubble chart, as shown in Figure 8. In this chart, the horizontal axis denotes the computational complexity (FLOPs, in G), the vertical axis represents the detection performance (AP), and the size of each bubble corresponds to the model’s parameter volume (Params, in M). This visualization clearly demonstrates that the proposed EARS-Net achieves the highest AP value while maintaining a moderate level of FLOPs and parameter count, fully verifying its excellent balance between detection accuracy and computational efficiency. In contrast, other state-of-the-art models either suffer from lower detection accuracy or require significantly higher computational overhead, further highlighting the superiority of the proposed method.
Figure 8.
Bubble chart showing the relationship among detection performance (AP), computational complexity (FLOPs, G), and model parameter volume (Params, M) for different models.
To further validate the cross-dataset generalization ability of EARS Net, we conducted tests on the RSDD-SAR dataset. The pre-trained model on SSDD was directly evaluated on the RSDD-SAR test set containing 2053 ground real ship instances. The proposed method achieved an AP of 0.836 on RSDD-SAR [21], which is only 6.7 percentage points lower than its performance on SSDD (AP = 0.903). This result confirms the generalization ability of EARS Net for detecting small coastal vessels on different SAR datasets.
3.4. Visualization Result Diagram
To provide a more intuitive and comprehensive demonstration of the superiority of the proposed EARS-Net model for detecting densely distributed and multi-oriented ships in nearshore SAR scenes, several representative nearshore SAR images are visualized, and the detection results produced by different models are displayed and compared.
Figure 9 shows qualitative detection results on five typical nearshore scenarios from the SSDD rotated subset. The table is organized by scene types and by methods. For ease of description, each subfigure is indexed by the coordinate (c,r), where c denotes the c-th method result and r denotes the r-th scene type. The first row corresponds to the ground truth. Rows 2 to 6 correspond to RoI Transformer, S2A-Net, R-Faster R-CNN, R-RetinaNet, and R-RepPoints, respectively, and the seventh row corresponds to the proposed EARS-Net. False positives are marked by yellow circles, and false negatives are marked by purple circles. It can be observed that EARS-Net achieves a notable improvement in ship detection performance under complex nearshore conditions, mainly in the following aspects.
Figure 9.
Visual diagram for comparing experimental results.
- Suppressing strong-scattering background interference in nearshore scenes and reducing the false-alarm rate. In nearshore SAR images, man-made facilities such as docks and breakwaters often generate strong scattering highlights similar to ships, which can easily trigger background false alarms. In the first scene, (3,1), (5,1), and (6,1) all falsely detect shore-based interference as ships, and the yellow-circled boxes fall near strong nearshore scatterers. Although (4,1) detects the correct target, its confidence score is relatively low, indicating limited reliability. In contrast, EARS-Net (7,1), benefiting from the CBAM-enhanced feature discriminability, effectively suppresses background responses and achieves correct localization with high confidence.
- Improving instance separation in densely moored and side-by-side berthing scenarios. When multiple ships are tightly moored, echo superposition and spatial overlap often cause baseline models to merge adjacent targets into a single detection box or to miss targets. In the second scene, (2,2) and (4,2) have missed detections, while (3,2), (5,2), and (6,2) exhibit false detections. In the third dense scene, most comparative methods show multiple missed detections and false detections. For example, (2,3) and (3,3) miss targets, (5,3) produces two false detections, and (6,3) produces three false detections and one missed detection. In contrast, EARS-Net (7,2) and (7,3) detect and accurately separate all ships, with a markedly reduced overlap among bounding boxes. This indicates that the proposed method provides more stable instance separation under highly overlapped proposals.
- Enhancing localization robustness for large-angle hard targets. The fourth scene presents detection results for ships with large orientations. Such targets typically appear with blurred characteristics in SAR images and are highly sensitive to angle regression, making them representative hard cases for rotated detection. In this scene, (2,4) has one missed detection, (3,4) has one false detection, (4,4) detects all targets but with low confidence, and (6,4) produces three false detections. EARS-Net (7,4) assigns higher regression weights to large-orientation targets through the dynamic angle regression loss (DAL), thereby producing more complete and reliable detection results and demonstrating better robustness under angle-sensitive conditions.
- Improving detection completeness under multi-scale variation, with enhanced perception of small nearshore targets. The fifth scene contains ship targets with substantial scale variation, where several small nearshore targets have weak features and are prone to missed detections. Then, (2,5) and (4,5) exhibit missed detections, and (3,5), (5,5), and (6,5) produce multiple nearshore false alarms. In contrast, EARS-Net (7,5) successfully detects all targets by leveraging multi-scale training and attention enhancement, indicating stronger adaptability to small targets and scale variation.
In summary, the qualitative comparisons in Figure 9 verify the effectiveness of EARS-Net from four perspectives, including suppression of strong-scattering background interference, instance separation in dense mooring conditions, handling of angle-sensitive hard cases, and adaptability to small targets under scale variation. Compared with several representative rotated detection baselines, EARS-Net yields fewer false positives and false negatives in complex nearshore conditions, suggesting stronger generalization capability and robustness in realistic nearshore SAR imaging environments.
4. Discussion
4.1. Why EARS-Net Works: Analysis of Core Components
The strong performance achieved by EARS-Net in nearshore SAR ship detection, with an AP of 0.903 on the SSDD, fundamentally results from the targeted treatment of key challenges in nearshore scenes and the complementary interactions among core modules. From a theoretical perspective, the CBAM attention mechanism and the dynamic angle regression loss address the limitations of conventional models from two essential dimensions. These dimensions correspond to feature discriminability and angular localization accuracy. Hard example mining based on ROHEM and multi-scale training further amplify these improvements by enhancing generalization.
The CBAM performs feature selection from both channel and spatial perspectives. Channel attention assigns higher weights to discriminative feature channels related to ship texture and shape, such as intensity contrast channels between ships and sea clutter in SAR imagery. Spatial attention focuses on ship regions through a two-dimensional response map and suppresses background interference from port facilities and breakwaters. This behavior is consistent with the ablation results reported in Table 3. Embedding CBAM at stage 4 and stage 5 of ResNet50 yields an AP of 0.882, which is notably higher than other insertion schemes. This improvement arises because high-level semantic feature maps produced at these stages require accurate separation between targets and background. In contrast, embedding attention at earlier stages causes attention responses to disperse over low-level noise and texture patterns, which reduces model robustness.
Dynamic angle regression loss introduces an adaptive optimization mechanism to address the angular sensitivity of SAR ship detection. Conventional Smooth L1 loss applies equal optimization pressure to targets at all orientations. As a result, ships with large orientations, especially those close to ninety degrees, may suffer localization failure even under small bounding box deviations. This phenomenon is more pronounced in SAR imagery, where scattering characteristics become increasingly ambiguous as ship orientation increases. DAL assigns higher regression weights to large orientation targets through a sinusoidal weighting function defined in Equation (3). The weighting is controlled by a coefficient λ, which is set to 0.8 in this work. Under this setting, the maximum regression weight reaches approximately 1.8 times that of small-orientation targets. As shown in Table 4, incorporating DAL increases AP from 0.882 to 0.885. Localization error for ships with orientations between 60 degrees and 120 degrees is reduced by approximately 15 percent, which can be inferred from the change in regression loss. These results verify the effectiveness of DAL in addressing angular heterogeneity.
More importantly, the joint use of focal loss, CBAM, DAL, and ROHEM forms a closed loop of feature enhancement, loss optimization, and sample focusing. Focal loss alleviates sample imbalance caused by dominant background regions and provides a stable classification objective for features enhanced by CBAM. DAL further improves angular localization accuracy on top of reliable classification, preventing cases where features are discriminative but localization is inaccurate. ROHEM selects the 128 hardest samples, including densely occluded ships, small targets, and large orientation cases, allowing training resources to concentrate on high value samples. Through this synergy, EARS-Net achieves an AP exceeding 0.903, which represents an improvement of 8.0 percentage points over the second-best performer YOLO26s-OBB (0.823) as reported in Table 5.
4.2. Balancing Accuracy and Efficiency
Although EARS-Net demonstrates strong detection accuracy, it is a two-stage rotated detection model and therefore introduces additional computational cost. This tradeoff should be evaluated objectively from both training efficiency and inference efficiency perspectives.
During training, the introduction of multiple modules increases training time by approximately 35 to 45 percent compared with the baseline Oriented R-CNN. The CBAM increases per epoch training time by about eight percent due to additional channel pooling and spatial convolution operations at stage 4 and stage 5 of ResNet50. Multi-scale training further increases training time by approximately 15 percent because feature extraction from larger input images requires more computation. Although the parallel prediction branch used by ROHEM does not participate in parameter updates, the computation of proposal level losses introduces about 12 percent additional overhead. These costs are not strictly additive. Similar to two-stage training pipelines that increase offline cost while reducing inference overhead, the training cost of EARS-Net represents a one-time investment. During deployment, retraining is not required and inference cost does not increase significantly. As shown in Table 3, CBAM is a lightweight module that introduces only 0.5 M additional parameters and 0.3 G FLOPs compared to the baseline, which is substantially fewer than global attention modules such as Non-Local blocks. In terms of inference efficiency, we evaluate the proposed method using the following three key metrics: parameters, FLOPs, and FPS. As presented in Table 5, EARS-Net achieves 30.4 FPS on 608 × 608 images using an RTX 3090 GPU, with 26.6 M parameters and 39.0 G FLOPs. The ablation results in Table 4 further show that the gradual addition of ROHEM, multi-scale training, and DAL introduces only marginal increases in computational cost, with the full EARS-Net model maintaining a favorable efficiency profile. Although this speed is lower than that of single-stage models such as S2A-Net, it is significantly higher than that of three-stage models such as RoI Transformer. Compared with the baseline Oriented R-CNN (25.8 M, 38.2 G, and 31.5 FPS), EARS-Net achieves a substantial AP improvement of 10.9 percentage points with only a marginal increase in computational cost.
In terms of accuracy and speed balance, EARS-Net demonstrates a favorable tradeoff compared with existing models. Relative to the single-stage model R-RetinaNet, which achieves an AP of 0.649 at 31.2 FPS, EARS-Net achieves a 25.4 percentage point AP improvement while maintaining a comparable inference speed (30.4 FPS). Compared with the two-stage model R-Faster and R-CNN, which achieves an AP of 0.785 at 23.7 FPS, EARS-Net improves AP by 11.8 percentage points and achieves a higher inference speed. This balance between high accuracy and moderate speed makes EARS-Net suitable for nearshore scenarios that require precise detection of densely distributed ships together with efficient processing of large volumes of SAR imagery.
4.3. Comparison with State-of-the-Art Methods
When positioned within the field of SAR ship rotation detection, the advantages of EARS-Net can be clearly identified from the perspectives of scene adaptability and technical innovation.
In terms of scene adaptability, EARS-Net outperforms general-purpose rotated detectors that do not explicitly consider nearshore characteristics. RoI Transformer achieves strong performance in aerial image detection but does not address SAR-specific challenges such as clutter interference and angular sensitivity. As a result, its missed detection rate for densely distributed ships in nearshore scenes reaches 13.2 percent, whereas EARS-Net reduces this rate to approximately 7.1 percent, as inferred from recall values of 0.868 and 0.929, respectively. S2A-Net represents a typical single-stage rotated detector with improved speed through anchor design. However, it lacks mechanisms tailored to small-scale ships and severe occlusion in SAR imagery. Its precision is limited to 0.520, with many false alarms caused by misclassification of port facilities as ships. Similarly, YOLOv8s-OBB and YOLO26s-OBB, as representative state-of-the-art lightweight rotated detectors, achieve competitive efficiency but suffer from inferior precision and recall in complex nearshore SAR scenes. In contrast, EARS-Net employs CBAM to suppress SAR background interference and ROHEM to focus on densely occluded hard examples, making it one of the few rotated detection models specifically designed for nearshore SAR ship detection.
From the perspective of technical innovation, EARS-Net differs from conventional approaches that improve a single component in isolation. It constructs an integrated optimization framework spanning feature representation, loss design, and training strategy. Existing studies often focus on a single dimension such as angle loss optimization or attention mechanisms. Some methods improve angular accuracy through refined rotated anchors but achieve only limited AP gains. Other methods introduce global attention to suppress background clutter but increase computational cost substantially. The key innovation of EARS-Net lies in its system level design. Each module addresses a distinct nearshore challenge including background suppression, angular sensitivity, and hard example dominance. Their complementary interaction leads to a performance gain of more than ten percentage points over the baseline. This demonstrates a multidimensional collaborative optimization paradigm for SAR rotated object detection.
4.4. Limitations
Despite its strong performance, EARS-Net has several limitations that should be addressed in future research.
- Dataset generalization remains limited. Experiments are conducted only on the nearshore subset of the SSDD. Although SSDD includes imagery from multiple satellites and polarizations, ship types are dominated by small and medium sized civilian vessels, accounting for approximately 85 percent of samples. Large military ships and special purpose vessels such as oil tankers and research ships are underrepresented. In addition, most scenes correspond to calm sea conditions with relatively weak clutter. Extreme sea states such as typhoons and high waves are not included, nor are scenarios with extremely low signal-to-clutter ratios, severe speckle noise, or heavy rain clutter. Moreover, the current evaluation does not systematically assess performance under the most challenging conditions, such as ships with extreme aspect ratios (length/width > 8), near-complete occlusion by port structures, or dense clusters containing more than 20 ships per image.
- Limitations exist in the CBAM. CBAM adopts a serial channel and spatial attention structure and does not explicitly model the relationship between ship features and polarization information in SAR imagery. Different polarizations emphasize different physical characteristics of ships and background. Fixed insertion of CBAM at stage 4 and stage 5 also lacks adaptive adjustment capability. When input image resolution varies significantly, the optimal insertion stage may change and lead to unstable feature enhancement.
- DAL introduces parameter dependency. The weighting coefficient λ is selected empirically through multiple experiments. No adaptive mapping between angle distribution and λ is constructed. When the angular distribution of ships varies across datasets, a fixed λ may cause over-optimization or under-optimization for large-orientation targets and reduce adaptability.
4.5. Future Research Directions
Future work can extend EARS-Net in several directions.
- Broader datasets and cross-scene validation should be explored. Multi-source nearshore SAR data should be collected to include extreme sea states and diverse ship types. Model generalization should be evaluated in offshore and island reef scenarios to analyze module adaptability across scenes. Specifically, we plan to construct a dedicated extreme-condition test set that includes very low signal-to-clutter ratio samples, ships with extreme aspect ratios, and densely packed scenes with more than 10 ships per image, to systematically benchmark the robustness of EARS-Net.
- Polarization-aware attention mechanisms can be developed by integrating SAR polarization information. Attention mechanisms can be extended to jointly consider polarization selection, channel weighting, and spatial focusing. This approach can better exploit SAR physical characteristics and improve discrimination under complex backgrounds.
- Adaptive optimization of dynamic angle regression loss can be investigated. Lambda can be adjusted based on the statistical distribution of ship orientations. Angle confidence estimation can also be incorporated to further emphasize uncertain predictions and reduce dependence on empirical parameters.
- Lightweight and real-time optimization can be considered through channel pruning and knowledge distillation. A compact student model can be trained using EARS-Net as a teacher while preserving accuracy. The goal is to achieve inference speeds above 30 FPS for real-time applications.
5. Conclusions
This paper addresses key challenges in detecting coastal vessels from SAR imagery, including complex background interference, dense target arrangements, and difficulties in locating targets at large angles. It proposes an end-to-end rotating object detection model—EARS-Net. Rather than a simple combination of existing methods, this model employs systematic innovative design to construct an efficient and robust detection framework. Specifically, EARS-Net enhances feature discrimination in complex scenes by integrating the CBAM attention mechanism into its backbone network. It addresses the limitation of traditional methods in locating ships at large angles through a dynamically designed angle regression loss function. Complemented by integrated training strategies including focal loss, multi-scale training, and ROHEM, the model achieves comprehensive performance improvements. A series of experiments conducted on the publicly available SSDD demonstrate that EARS-Net effectively overcomes multiple detection challenges in coastal environments, achieving outstanding detection performance.
Author Contributions
Conceptualization, N.W.; methodology, N.W.; validation, N.W., W.M. and Y.A.; investigation, N.W.; writing—original draft preparation, N.W.; writing—review and editing, N.W. and T.L.; visualization, Y.A.; project administration, T.L.; All authors have read and agreed to the published version of the manuscript.
Funding
This research was supported in part by the National Natural Science Foundation of China under Project 62571542, 62171452.
Data Availability Statement
The original data presented in this study (i.e., the SSDD and RSDDSAR datasets) are openly available in their respective repositories as cited in the manuscript. The derived datasets generated and analyzed during this study are available from the corresponding author upon reasonable request.
Conflicts of Interest
The authors declare no conflicts of interest.
Abbreviations
The following abbreviations are used in this manuscript:
| CNN | Convolutional Neural Network |
| SAR | Synthetic Aperture Radar |
| RBBs | Rotated Bounding Boxes |
| FPN | Feature Pyramid Network |
| CBAM | Convolutional Block Attention Module |
| DAL | Dynamic Angle Regression Loss |
| NMS | Non-Maximum Suppression |
| ROHEM | Rotated Online Hard Example Mining |
References
- Pan, Z.; Liu, L.; Qiu, X.; Lei, B. Fast Vessel Detection in Gaofen-3 SAR Images with Ultrafine Strip-Map Mode. Sensors 2017, 17, 1578. [Google Scholar] [CrossRef] [Scilit]
- Li, J.; Xu, C.; Su, H.; Gao, L.; Wang, T. Deep Learning for SAR Ship Detection: Past, Present and Future. Remote Sens. 2022, 14, 2712. [Google Scholar] [CrossRef] [Scilit]
- Wang, Y.; Wang, C.; Zhang, H.; Dong, Y.; Wei, S. A SAR Dataset of Ship Detection for Deep Learning under Complex Backgrounds. Remote Sens. 2019, 11, 765. [Google Scholar] [CrossRef] [Scilit]
- Geng, X.; Zhao, L.; Shi, L.; Yang, J.; Sun, W. Small-Sized Ship Detection Nearshore Based on Lightweight Active Learning Model with a Small Number of Labeled Data for SAR Imagery. Remote Sens. 2021, 13, 3400. [Google Scholar] [CrossRef] [Scilit]
- Li, J.; Qu, C.; Shao, J. Ship detection in SAR images based on an improved faster R-CNN. In Proceedings of the 2017 SAR in Big Data Era: Models, Methods and Applications (BIGSARDATA), Beijing, China, 13–14 November 2017. [Google Scholar] [CrossRef] [Scilit]
- Yu, C.; Shin, Y. SAR ship detection based on improved YOLOv5 and BiFPN. ICT Express 2024, 10, 28–33. [Google Scholar] [CrossRef] [Scilit]
- He, R.; Han, D.; Shen, X.; Han, B.; Wu, Z.; Huang, X. AC-YOLO: A lightweight ship detection model for SAR images based on YOLO11. PLoS ONE 2025, 20, e0327362. [Google Scholar] [CrossRef] [Scilit]
- Zhao, S.; Luo, Y.; Zhang, T.; Guo, W.; Zhang, Z. A domain specific knowledge extraction transformer method for multisource satellite-borne SAR images ship detection. ISPRS J. Photogramm. Remote Sens. 2023, 198, 16–29. [Google Scholar] [CrossRef] [Scilit]
- Li, C.; Yue, C.; Li, H.; Wang, Z. Context-aware SAR image ship detection and recognition network. Front. Neurorobot. 2024, 18, 1293992. [Google Scholar] [CrossRef] [Scilit]
- Zhang, T.; Zhang, X.; Ke, X.; Zhan, X.; Shi, J.; Wei, S.; Pan, D.; Li, J.; Su, H.; Zhou, Y. LS-SSDD-v1.0: A Deep Learning Dataset Dedicated to Small Ship Detection from Large-Scale Sentinel-1 SAR Images. Remote Sens. 2020, 12, 2997. [Google Scholar] [CrossRef] [Scilit]
- Neubeck, A.; Gool, L.J.V. Efficient Non-Maximum Suppression. In Proceedings of the 18th International Conference on Pattern Recognition (ICPR’06), Hong Kong, China, 20–24 August 2006. [Google Scholar] [CrossRef] [Scilit]
- Wang, S.; Ren, H.; Zhang, S.; Yu, X.; Zhou, Y. An Arbitrary-Oriented SAR Ship Detector Based on Offset Distance Representation and Weighted Rotation NMS. In Proceedings of the IGARSS 2024—2024 IEEE International Geoscience and Remote Sensing Symposium, Athens, Greece, 7–12 July 2024; pp. 9574–9578. [Google Scholar] [CrossRef] [Scilit]
- Zhou, Y.; Zhang, F.; Yin, Q.; Ma, F.; Zhang, F. Inshore Dense Ship Detection in SAR Images Based on Edge Semantic Decoupling and Transformer. IEEE J. Sel. Top. Appl. Earth Obs. Remote Sens. 2023, 16, 4882–4890. [Google Scholar] [CrossRef] [Scilit]
- Zou, Z.; Shi, Z.; Guo, Y.; Ye, J. Object Detection in 20 Years: A Survey. IEEE Trans. Pattern Anal. Mach. Intell. 2019, 111, 257–276. [Google Scholar] [CrossRef] [Scilit]
- Sun, Y.; Sun, X.; Wang, Z.; Fu, K. Oriented Ship Detection Based on Strong Scattering Points Network in Large-Scale SAR Images. IEEE Trans. Geosci. Remote Sens. 2021, 60, 5218018. [Google Scholar] [CrossRef] [Scilit]
- Chen, S.; Sun, P.; Song, Y.; Luo, P. DiffusionDet: Diffusion Model for Object Detection. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), Paris, France, 1–6 October 2023; pp. 19830–19841. [Google Scholar]
- He, K.; Gkioxari, G.; Dollar, P.; Girshick, R. Mask R-CNN. In Proceedings of the 2017 IEEE International Conference on Computer Vision (ICCV), Venice, Italy, 25 December 2017. [Google Scholar]
- Zhu, X.X.; Tuia, D.; Mou, L.; Xia, G.S.; Zhang, L.; Xu, F.; Fraundorfer, F. Deep Learning in Remote Sensing: A Comprehensive Review and List of Resources. IEEE Geosci. Remote Sens. Mag. 2018, 5, 8–36. [Google Scholar] [CrossRef] [Scilit]
- Kun, J.; Yan, C. SAR Image Ship Detection Based on Deep Learning. In Proceedings of the 2020 International Conference on Computer Engineering and Intelligent Control (ICCEIC), Chongqing, China, 6–8 November 2020. [Google Scholar] [CrossRef] [Scilit]
- Zheng, H.; Xue, X.; Yue, R.; Liu, C.; Liu, Z. SAR Image Ship Target Detection Based on Receptive Field Enhancement Module and Cross-Layer Feature Fusion. Electronics 2024, 13, 167. [Google Scholar] [CrossRef] [Scilit]
- Congan, X.U.; Hang, S.U.; Jianwei, L.I.; Liu, Y.; Yao, L.; Gao, L.; Yan, W.; Wang, T. RSDD-SAR: Rotated Ship Detection Dataset in SAR Images. J. Radars 2022, 11, 581–599. [Google Scholar] [CrossRef]
- Yang, S.; Pei, Z.; Zhou, F.; Wang, G. Rotated Faster R-CNN for Oriented Object Detection in Aerial Images. In Proceedings of the 2020 3rd International Conference on Robot Systems and Applications, Chengdu, China, 14–16 June 2020. [Google Scholar]
- Ding, J.; Xue, N.; Long, Y.; Xia, G.S.; Lu, Q. Learning RoI Transformer for Oriented Object Detection in Aerial Images. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Long Beach, CA, USA, 15–20 June 2019. [Google Scholar]
- Han, J.; Ding, J.; Li, J.; Xia, G.S. Align Deep Features for Oriented Object Detection. arXiv 2021, arXiv:2008.09397. [Google Scholar] [CrossRef] [Scilit]
- Xu, Y.; Fu, M.; Wang, Q.; Wang, Y.; Bai, X. Gliding vertex on the horizontal bounding box for multi-oriented object detection. IEEE Trans. Geosci. Remote Sens. 2019, 43, 1452–1459. [Google Scholar] [CrossRef] [Scilit]
- Wang, X.; Girshick, R.; Gupta, A.; He, K. Non-local Neural Networks. In Proceedings of the IEEE/CVF International Conference on Computer Vision, Salt Lake City, UT, USA, 18–23 June 2018. [Google Scholar]
- Hu, J.; Shen, L.; Sun, G. Squeeze-and-Excitation Networks. In Proceedings of the IEEE/CVF International Conference on Computer Vision, Salt Lake City, UT, USA, 18–23 June 2018. [Google Scholar]
- Lin, T.Y.; Goyal, P.; Girshick, R.; He, K.; Dollár, P. Focal Loss for Dense Object Detection. In Proceedings of the 2017 IEEE International Conference on Computer Vision (ICCV), Venice, Italy, 25 December 2017; pp. 2999–3007. [Google Scholar]
- Xie, X.; Cheng, G.; Wang, J.; Yao, X.; Han, J. Oriented R-CNN for Object Detection. In Proceedings of the IEEE/CVF International Conference on Computer Vision, Montreal, QC, Canada, 10–17 October 2021. [Google Scholar]
- Woo, S.; Park, J.; Lee, J.Y.; Kweon, I.S. CBAM: Convolutional Block Attention Module. In Computer Vision—ECCV 2018. ECCV 2018; Springer: Cham, Switzerland, 2018. [Google Scholar] [CrossRef] [Scilit]
- Shrivastava, A.; Gupta, A.; Girshick, R. Training Region-based Object Detectors with Online Hard Example Mining. In Proceedings of the 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, NV, USA, 27–30 June 2016; pp. 761–769. [Google Scholar] [CrossRef] [Scilit]
- 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]
- Zhou, Y.; Yang, X.; Zhang, G.; Wang, J.; Liu, Y.; Hou, L.; Jiang, X.; Liu, X.; Yan, J.; Lyu, C. MMRotate: A Rotated Object Detection Benchmark using Pytorch. arXiv 2022. [Google Scholar] [CrossRef] [Scilit]
- Islam, T.; Sarker, T.T.; Ahmed, K.R.; Lakhssassi, N. Detection and Classification of Cannabis Seeds Using RetinaNet and Faster R-CNN. Seeds 2024, 3, 31. [Google Scholar] [CrossRef] [Scilit]
- Zhu, M.; Hu, G.; Zhou, H.; Wang, S.; Yue, S. Arbitrary-Oriented Ship Detection Based on RetinaNet for Remote Sensing Images. J. Sel. Top. Appl. Earth Obs. Remote Sens. 2021, 14, 6694–6706. [Google Scholar] [CrossRef] [Scilit]
- Yang, Z.; Liu, S.; Hu, H.; Wang, L.; Lin, S. RepPoints: Point Set Representation for Object Detection. In Proceedings of the IEEE/CVF International Conference on Computer Vision, Seoul, Republic of Korea, 27 October–2 November 2019. [Google Scholar]
- Wu, Y.; Shi, Y.; Chen, H.; Hu, X.; Yang, X.; Cai, Y.; Liu, Y.; Zeng, W. YOLO-RSD: Enhanced Rotated Ship Detection in SAR Images. IEEE Geosci. Remote Sens. Lett. 2026, 23, 4004205. [Google Scholar] [CrossRef] [Scilit]
- Hidayatullah, P.; Tubagus, R. YOLO26: A Comprehensive Architecture Overview and Key Improvements. arXiv 2026, arXiv:2602.14582. [Google Scholar] [CrossRef] [Scilit]
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.










