Next Article in Journal
Advances in Harmful Algal Blooms (HABs) Monitoring: A Review of Sensor and Platform Technologies
Previous Article in Journal
A Data-Driven Framework for Detecting Unsafe Ship–Bridge Passages Based on AIS Trajectories
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

MPFT-UNet: A Boundary-Refined and Multi-Scale Dynamic Fusion Network for UAV-Based Port Ship Segmentation

1
School of Automation, Jiangsu University of Science and Technology, Zhenjiang 212100, China
2
School of Computer Science and Engineering, Nanjing University of Science and Technology, Nanjing 210094, China
*
Author to whom correspondence should be addressed.
J. Mar. Sci. Eng. 2026, 14(10), 945; https://doi.org/10.3390/jmse14100945
Submission received: 28 April 2026 / Revised: 14 May 2026 / Accepted: 17 May 2026 / Published: 19 May 2026

Abstract

Ship semantic segmentation based on unmanned aerial vehicle (UAV) imagery has important application value in maritime scenarios such as marine surveillance, port management, and maritime safety. However, UAV images often contain large scale variations of ships, a high proportion of small targets, and complex background interference, including sea surface reflections, waves, and clouds. These factors make accurate segmentation and boundary localization difficult. To address these issues, this paper proposes a UAV-based ship semantic segmentation network, termed MPFT-UNet. The network introduces a Multi-scale Dynamic Sparse Cross-gating (MDSC) module to improve the representation of small targets. A Boundary Supervision Refinement (BSR) module is used to enhance boundary delineation. In addition, a Transformer-based Feature Fusion (FFT) module is applied at the bottleneck layer to strengthen global semantic representation. Experimental results show that MPFT-UNet achieves better performance than existing methods across multiple evaluation metrics. The model obtains an IoU of 0.8365, Dice coefficient of 0.9028, Recall of 0.8881, and AP of 0.95731. These results indicate stable segmentation performance under complex maritime conditions. Compared with the baseline U-Net model, the IoU is improved by approximately 5.1%.

1. Introduction

With the rapid development of the marine economy and the increasing demand for maritime governance, unmanned aerial vehicles (UAVs) have been widely applied in maritime surveillance, port management, and search and rescue operations, gradually becoming an important tool for marine target perception and situational awareness [1,2]. Their flexibility and high-resolution imaging capabilities provide effective support for large-scale maritime data acquisition [3].
Traditional UAV-based ship detection methods are mainly built on object detection frameworks, in which targets are localized using bounding boxes [4,5]. This type of representation is coarse and cannot accurately describe the true shape of ships. In addition, performance is easily affected by complex background conditions. In scenarios with small-scale or densely distributed targets, detection-based methods are prone to missed detections and target confusion [6]. These problems become more obvious when targets are closely spaced or partially occluded. In contrast, semantic segmentation performs pixel-level classification and separates ship regions from the background [7]. This representation allows more accurate delineation of object contours and structural details. It also provides more reliable information for downstream tasks, including ship identification, behavior analysis, and maritime traffic statistics [8].
Although semantic segmentation has achieved remarkable progress in fields such as medical imaging and urban scene analysis [9], its performance in UAV-based maritime scenarios remains limited. First, the boundary between ships and seawater often has low contrast and irregular shapes. It is also affected by illumination changes and wave disturbances, which can cause blurred or fragmented boundary predictions [8]. Second, ships show large scale variation across different scenes. Small targets may be lost during feature downsampling, which leads to incomplete segmentation and confusion between adjacent targets [5,10]. In addition, complex sea surface backgrounds, including reflections, waves, and shadows, often have visual patterns similar to ships. This makes it difficult for convolutional networks to capture global semantic relationships and increases the risk of misclassification [11].
To address these challenges, existing approaches for UAV-based ship perception can be divided into two categories: detection-based methods and segmentation-based methods. Detection-based methods, such as Faster R-CNN [12], SSD [13], and YOLO [14], are effective in target localization. However, they use bounding box representations, which cannot meet the requirements of fine-grained segmentation. In contrast, segmentation networks, including FCN [15], SegNet [16], and U-Net and its variants [17,18], show better performance in ship segmentation tasks. This is because they combine low-level spatial details with high-level semantic information [19]. However, these methods have a limited ability to capture long-range dependencies. As a result, they still have limitations in boundary delineation, small-target preservation, and global contextual modeling [20,21,22].
This paper proposes a boundary-aware multi-scale fusion network, termed MPFT-UNet, for UAV-based ship segmentation tasks. The model is built on the U-Net architecture and is designed to address several challenges in UAV maritime scenarios. These include blurred boundaries, a high proportion of small targets, and complex background interference. The network is improved from three aspects: boundary modeling, multi-scale feature selection, and global semantic modeling. These components work together to enhance feature extraction, cross-scale fusion, and boundary refinement. The main contributions are summarized as follows:
  • A Boundary Supervision Refinement (BSR) module is introduced to address the low contrast and irregular characteristics of ship boundaries under complex maritime conditions. This module enhances boundary-aware feature representation and improves the continuity of object contours.
  • A Multi-scale Dynamic Sparse Cross-gating (MDSC) module is designed to cope with significant scale variation and the predominance of small-scale targets in UAV imagery. By incorporating a dynamic sparse attention mechanism, the module enables effective selection of informative cross-scale features while reducing the influence of background noise.
  • A Transformer-based Feature Fusion (FFT) module is embedded at the bottleneck layer to mitigate the limitations of conventional convolutional networks in capturing long-range dependencies. This design contributes to improved global semantic consistency in complex maritime scenes.
  • Extensive experiments conducted on the LSRS-Ship dataset demonstrate that the proposed MPFT-UNet achieves superior performance compared with existing state-of-the-art methods. The results indicate notable improvements in segmentation accuracy and robustness under complex UAV-based maritime conditions.
The remainder of this paper is organized as follows. Section 2 reviews the related work. Section 3 presents the overall architecture and key modules of MPFT-UNet. Section 4 describes the experimental setup and reports the results of comparative and ablation studies. Finally, Section 5 concludes the paper and discusses future research directions.

2. Related Work

This section reviews techniques related to this study. The content is organized into three aspects: boundary-aware learning and contour refinement, multi-scale feature fusion, and Transformer-based attention mechanisms.

2.1. Boundary-Aware Segmentation and Contour Refinement

In semantic segmentation, object boundaries and contour information are important for modeling fine structures. In UAV-based ship images, the boundary between ships and seawater often has low contrast and is affected by waves, reflections, and shadows. This leads to blurred boundaries and fragmented contours in the segmentation results [20]. Poor boundary quality weakens the geometric representation of ships and reduces the reliability of subsequent analysis tasks [23].
Early studies mainly used traditional edge detection operators and methods based on geometric constraints to model object contours. Typical examples include the Sobel operator, Canny edge operator, and Laplacian operator [24], as well as geometric approaches such as active contour models and level set methods for boundary extraction [25]. These methods obtain boundary information by modeling image gradient changes. However, under complex maritime conditions, wave textures and specular reflections introduce strong interference. This often produces a large number of pseudo edges and reduces the stability of boundary extraction.
With the development of deep learning, boundary-aware mechanisms have been progressively introduced into semantic segmentation networks. One category of methods explicitly supervises contours by constructing dedicated boundary branches and integrating them with backbone features to improve boundary localization accuracy [26]. Another category focuses on enhancing the ability of the model to discriminate boundary regions by jointly optimizing segmentation objectives and boundary constraints. In addition, optimization strategies based on distance-based constraints, such as Boundary Loss [27] and Hausdorff Distance Loss [28], have also been employed to improve contour accuracy. Furthermore, attention-based methods combined with fine-grained supervision, such as channel–spatial attention fusion and point-level supervision, further enhance boundary modeling capability [29,30].
However, existing methods mainly rely on implicit boundary constraints or loosely coupled auxiliary branches, which still suffer from boundary instability under complex maritime conditions. In contrast, the proposed BSR module integrates handcrafted edge priors with deep feature representations in a more direct manner. Gradient-consistent edge cues are embedded into intermediate feature maps, and residual enhancement is applied. This process preserves semantic consistency and strengthens structural continuity. This design effectively suppresses pseudo edges caused by ocean dynamics and improves the clarity and integrity of ship contours in challenging UAV scenarios.

2.2. Multi-Scale Feature Fusion and Small-Target Modeling

In UAV-based maritime scenarios, ship targets exhibit significant scale variations. A single image typically contains large ships at close range and small vessels at long distances, where small targets occupy only a limited number of pixels [5]. In addition, in areas such as ports and busy waterways, ship targets are densely distributed, and the spatial distances between targets are small, which further increases the difficulty of segmenting small targets [31].
To improve the adaptability of the model to scale variations, multi-scale feature fusion has been widely adopted in computer vision tasks. For example, the Feature Pyramid Network (FPN) enhances multi-scale representation through multi-level feature fusion [32]. PSPNet aggregates contextual information using a pyramid pooling structure [33]. The DeepLab series expands the receptive field via atrous convolution to enhance multi-scale modeling capability [34]. In addition, some studies further improve the utilization of multi-scale information through adaptive fusion mechanisms. For instance, MANet enhances feature representation via multi-scale context extraction and dynamic fusion [35], while other studies improve segmentation performance in complex backgrounds by integrating features of different resolutions [36]. These studies demonstrate that multi-scale fusion helps alleviate the loss of small-target information and improves segmentation performance.
However, direct aggregation or concatenation of multi-scale features tends to introduce information redundancy and scale interference, thereby reducing the ability of the model to discriminate small targets and fine-grained structures [37]. Therefore, the key to effective multi-scale modeling lies in achieving efficient information selection and noise suppression. To this end, a MDSC module is proposed, which employs a dynamic sparse attention mechanism to enable adaptive interaction and selection of cross-scale features, improving segmentation performance in small-target and densely distributed scenarios.

2.3. Transformer-Based Global Context Modeling

In UAV-based ship semantic segmentation, sea surface backgrounds often contain similar textures over large areas. Relying solely on the local receptive field of convolutional networks can easily lead to semantic confusion between ships and the background [38]. Therefore, introducing global context modeling plays an important role in improving the consistency and robustness of segmentation results.
Transformer models capture feature dependencies globally through a self-attention mechanism [39] and have been gradually introduced into the field of computer vision. Vision Transformer (ViT) represents images as sequences and demonstrates strong global modeling capability across various visual tasks [40]. Subsequently, a series of hybrid models combining Transformer and convolutional networks have been proposed to balance local detail extraction and global semantic modeling [41,42]. In semantic segmentation tasks, methods such as the SETR and Segmenter have improved context modeling capability by incorporating Transformers and have achieved promising results in urban scene and remote sensing segmentation tasks [43]. Furthermore, recent studies indicate that incorporating Transformer into remote sensing and UAV image segmentation can alleviate semantic confusion among multi-scale targets by modeling cross-region semantic relationships [11].
However, pure Transformer architectures struggle to effectively capture small-scale targets and complex contour structures in local detail representation and boundary modeling [44]. Meanwhile, existing hybrid approaches typically introduce Transformer modules in a loosely coupled manner, which limits the interaction between global context and multi-scale features, resulting in suboptimal performance under complex sea conditions. To address these issues, this paper proposes an FFT module embedded at the bottleneck of the U-Net architecture. By jointly modeling long-range dependencies and enhancing cross-scale feature interaction, FFT reduces semantic ambiguity between ships and background, thereby improving global semantic consistency and structural integrity in complex maritime environments.

3. Proposed Methodology

In this section, three core modules of MPFT-UNet are mainly introduced: (1) the BSR module is designed to improve the contour representation accuracy of ship images; (2) the MDSC module aims to address significant scale variations and the high proportion of small targets in UAV-based ship imagery; and (3) the FFT module is used to fuse low-level detailed features with high-level semantic features, thereby improving the overall consistency of segmentation results.

3.1. Overall Framework

The U-Net architecture consists of an encoder, a bottleneck, a decoder, and skip connections. Both the encoder and decoder adopt Double Convolution Blocks (DCB), and multi-scale feature modeling is achieved through downsampling and upsampling operations. To address challenges such as blurred boundaries, small targets, and complex background interference in UAV-based ship segmentation, three key modules are incorporated into this architecture to construct MPFT-UNet, as illustrated in Figure 1.
Given an input UAV ship image X R H × W × C , where H, W, and C denote the height, width, and number of channels of the input image, respectively ( C = 3 in this study). The encoder extracts multi-scale features layer by layer through downsampling and DCB. At the n-th layer, the output feature of the DCB is defined as
F n DCB R H 2 n 1 × W 2 n 1 × 2 n 1 C ,
where F n DCB denotes the output feature of the DCB at the n-th layer of the encoder, and n { 2 , 3 , 4 , 5 } represents the layer index of the network. As the network deepens, the spatial resolution of features decreases progressively, while the number of channels increases accordingly.
To enhance feature representation, the MDSC module is introduced into the skip connections at layers n = 2 , 3 , 4 to enable adaptive interaction and selection of cross-scale features. Meanwhile, the BSR module is applied after the DCB at layers n = 2 , 3 , 4 , 5 to strengthen boundary feature representation, producing boundary-enhanced features denoted as F n BSR . During the skip connection process, the MDSC module utilizes the deepest encoder feature as global semantic guidance to perform adaptive interaction and selection on shallow multi-scale features, enhancing semantic representation while preserving detailed information. At the bottleneck layer n = 5 , the deepest feature F 5 BSR is processed by the FFT module, which models global contextual relationships via self-attention.
Through the collaborative operation of these modules, MPFT-UNet effectively integrates multi-scale feature modeling, boundary refinement, and global semantic representation.

3.2. Boundary Supervision Refinement Module (BSR)

To address blurred boundaries, fragmented contours, and inconsistent scale structures of ship targets in UAV-based maritime imagery under complex sea conditions, a BSR module is proposed. The module extracts boundary cues from shallow and intermediate features and suppresses background interference via explicit boundary supervision, thereby enhancing the structural representation capability of the model. The position of the proposed BSR module in the network is illustrated in Figure 1, and its detailed structure is shown in Figure 2.
For the input feature at the n-th layer, the input of the BSR module is the encoder output feature F n DCB (as defined in Equation (1)), where n { 2 , 3 , 4 , 5 } . First, a convolution operation is applied to enhance the local edge response of the feature, which is formulated as:
E conv = ReLU BN Conv 3 × 3 F n DCB .
Relying solely on convolutional features is still susceptible to high-frequency noise such as wave textures and strong reflections. Therefore, edge prior information is introduced, and gradient features are extracted using the Sobel operator
G x = F n DCB * S x marine , G y = F n DCB * S y marine ,
where S x marine and S y marine denote the horizontal and vertical Sobel operators optimized for maritime ship imagery, respectively. G x and G y represent the gradient responses of the feature map F n DCB along the horizontal and vertical directions. The operator ∗ denotes the convolution operation. These are further combined with an adaptive Canny edge detector to obtain the boundary map:
E canny = AdaptiveCanny ( G x , G y , θ ship ) ,
where θ ship denotes the adaptive threshold. This process improves the continuity and stability of the extracted boundaries.
To avoid noise amplification caused by directly aggregating edge features, a residual module is introduced before feature fusion to perform smooth modeling of edge information
E res = ResBlock 3 E conv + E canny ,
thereby improving the continuity of edge features. On this basis, an Edge-guided Supervision Attention (ESA) mechanism is constructed to perform weighted modeling of boundary regions
P = σ Conv 3 × 3 E canny E esa = P E res .
The boundary-enhanced features are injected into the original semantic features via a residual connection to obtain the output of the BSR module
F n BSR = F n DCB + α E esa ,
where α is a learnable scalar parameter used to balance the contribution between boundary information and semantic information. This design enhances the model’s ability to represent ship contour regions.
Finally, F n BSR is propagated to the encoder downsampling layers and the MDSC module, enabling effective supplementation of multi-scale features with boundary information and enhancing fine-grained details.

3.3. Multi-Scale Dynamic Sparse Cross-Gating Module (MDSC)

In UAV-based maritime scenarios, ship targets typically exhibit significant scale variations and are affected by complex background interference. Multi-level feature fusion may introduce redundant information, thereby reducing the discriminative capability of the model. To address this issue, an MDSC module is proposed to achieve selective enhancement of cross-scale features. The position of the MDSC module within the overall network is illustrated in Figure 1, and its internal structure is shown in Figure 3.

3.3.1. Cross-Scale Multi-Level Fusion

To ensure that cross-scale feature interaction is performed at a unified spatial scale, the BSR-enhanced features at each level are first upsampled to obtain scale-aligned features:
F n = Upsample ( F n B S R ) , n { 2 , 3 , 4 , 5 } .
During cross-scale interaction, the deepest feature is selected as the semantic guidance branch F 5 , while the shallow features are defined as the detail complementary branch F 5 .
To enhance the multi-scale representation capability of shallow features, multi-scale pooling is performed on the shallow features to obtain context at different scales
Y 1 = P o o l k 1 ( Y ) , Y 2 = P o o l k 2 ( Y ) , Y 3 = P o o l k 3 ( Y ) , k 1 < k 2 < k 3 ,
where P o o l k ( · ) denotes an average pooling operation with a window size of k × k , and appropriate padding is applied to maintain the output size consistent with the input.
Features obtained at different scales are fused to obtain an enhanced shallow multi-scale representation
Y ^ = Y 1 + Y 2 + Y 3 ,
where Y ^ integrates structural information from different scales and is used for subsequent attention computation.

3.3.2. Dynamic Sparse Cross-Scale Fusion

To fully utilize the detailed structural information in shallow features while avoiding interference from wave reflections, wave textures, and shadow noise on the deep-shallow fusion process, a dynamic sparse cross-scale fusion mechanism is proposed. This mechanism uses deep features X as semantic guidance and shallow multi-scale features Y ^ as complementary information. Cross-scale attention is employed to model feature correlations, while a sparsity strategy is introduced to suppress low-relevance responses.
First, the input features X and Y ^ are projected into a unified feature space to construct the Query, Key, and Value representations
Q = Flatten ( X ) W Q , K , V = Split LN ( Flatten ( Y ^ ) ) W K V .
Subsequently, scaled dot-product attention is used to compute the correlation matrix between spatial positions:
M = Softmax Q K c ,
the matrix M represents the similarity relationships between deep semantic features and shallow multi-scale features across different spatial positions.
A Dynamic Dual-TopK sparsification mechanism is proposed to address irrelevant information introduced by background noise. When the maritime conditions are stable, high-level semantics are highly consistent with shallow structures, and a lower sparsity rate is preferred to retain more information. In contrast, under complex or noisy conditions, a higher sparsity rate is adopted for stricter filtering. Two learnable parameters s i g m a ( θ 1 ) and s i g m a ( θ 2 ) are used to generate sparsity ratios:
r 1 = σ ( θ 1 ) , r 2 = σ ( θ 2 ) ,
where σ ( · ) denotes the Sigmoid function, and r 1 and r 2 correspond to sparsity strategies with different selection intensities. Based on these ratios, TopK selection is performed row-wise on the attention matrix M:
M 1 = Softmax TopK ( M , r 1 N ) M 2 = Softmax TopK ( M , r 2 N ) ,
where TopK ( · ) denotes the operation of selecting the Top-k largest elements for sparsification.
To further enhance fusion stability and flexibility, learnable weights α and β are introduced to combine the two sparse attention maps, yielding the dynamic sparse attention map M
M = α M 1 + β M 2 ,
where α , β [ 0 , 1 ] are learnable coefficients. Finally, the fused attention matrix is applied to the Value features to obtain the output feature A:
A = M V ,
this process selects key structural information from shallow features and suppressing noise.
The MDSC module injects shallow detailed information into deep semantic features. This improves the model’s ability to distinguish small targets, dense targets, and complex backgrounds.

3.4. Transformer-Based Feature Fusion Module (FFT)

In UAV-based maritime scenarios, convolution operations alone cannot capture local structural details and long-range dependencies at the same time. To address this limitation, an FFT module is introduced at the bottleneck layer of the U-Net architecture. The module uses a parallel dual-branch structure. One branch models local details, and the other captures global semantic information. This design improves tthe ability of the network to represent fine structures and long-range relationships. The position of the FFT module within the overall network is illustrated in Figure 1, and its internal structure is shown in Figure 4.
After processing by the encoder and the BSR module, the deepest feature is denoted as F 5 BSR R H 5 × W 5 × C 5 . First, the feature is evenly split along the channel dimension into two parts. These are used as the inputs of the local branch F local R N × C 2 and the global branch F global R N × C 2 , where N = H 5 × W 5 .

3.4.1. Local and Global Path Modeling

Considering the significant shape variations of ship targets in UAV imagery, deformable convolution is introduced in the local path to enhance local feature modeling capability. Meanwhile, to reduce the computational cost of standard self-attention, a window-based attention mechanism is adopted to perform feature interaction within local windows. The output of the local path is formulated as:
F local = WindowAttn ( F l o c a l ) + DeformConv ( F l o c a l ) ,
where WindowAttn ( · ) denotes the window attention operation, and DeformConv ( · ) represents the deformable convolution operation.
The global path is designed to model long-range dependencies among ships and capture large-scale contextual semantic information, thereby enhancing the perception of overall ship distribution and sea surface background relationships. To reduce computational complexity, a lightweight self-attention mechanism is adopted in this paper. And key–value pairs are generated via soft pooling, enabling global dependency modeling in a low-dimensional space. This approach focuses on low-frequency semantic components, enabling the model to obtain a more stable global semantic representation and reducing the interference of local noise on the overall semantic understanding.

3.4.2. Feature Fusion and Enhancement

After modeling the local and global paths, the two feature branches are concatenated along the channel dimension to obtain the fused representation
F fusion = Concat ( F local , F global ) .
An External Attention mechanism is introduced to replace the multi-layer perceptron (MLP) in the standard Transformer. This mechanism reconstructs features using external memory units and reduces parameter complexity and computational cost to a certain extent.
Through the above design, the FFT module effectively integrates local detailed information with global semantic features, thereby improving the consistency and robustness of segmentation results.

4. Experiments and Results

4.1. Dataset

4.1.1. LSRS-Ship Dataset

To evaluate the performance of the proposed method in UAV low-altitude remote sensing ship segmentation tasks, a self-built UAV ship semantic segmentation dataset is constructed, named LSRS-Ship (Low-altitude Remote Sensing Ship Dataset). Representative samples are shown in the first row of Figure 5. Under UAV perspectives, ship targets exhibit significant multi-scale characteristics, while port and waterway scenes present complex backgrounds.
A DJI Mavic 3 Pro UAV was used to collect 1283 ship images in port areas at altitudes ranging from 50 to 200 m. The acquisition process includes both vertical overhead and oblique views, enabling the images to retain standard remote sensing geometric characteristics while preserving perspective variations encountered in real-world scenarios.
The original dataset is divided into training, validation, and test sets with a ratio of 7:2:1. Due to the high resolution of the original UAV images (5280 × 2970), a split-before-cropping strategy is adopted to prevent data leakage. Subsequently, a sliding-window strategy is applied within each subset to crop the images into multiple local regions, which preserves fine details while reducing computational complexity and increasing the number of small-scale samples. After preprocessing, the dataset consists of 14,997 images.
Based on the ratio between target area and image area, objects are categorized into three scales: small-scale (<0.5%), medium-scale (0.5–2%), and large-scale (>2%). The distribution is illustrated in the left panel of Figure 6. Statistical results show that small-scale targets account for 75.78%, while medium-scale and large-scale targets account for 18.55% and 5.67%.

4.1.2. iSAID-Ship Dataset

To evaluate the generalization ability of the model under different imaging conditions and scene distributions, ship category samples are introduced from the publicly available remote sensing dataset iSAID, and an iSAID-Ship dataset consisting of 549 images is constructed. Representative samples are presented in the second row of Figure 5. This dataset is derived from high-altitude remote sensing imagery, where the imaging perspective, target scale distribution, and background structure differ significantly from those of low-altitude UAV data. Ship targets in high-altitude remote sensing images are typically smaller and more densely distributed, which poses greater challenges for accurate segmentation.
During preprocessing, ship categories in iSAID are uniformly converted into binary semantic segmentation labels (ship and background) to ensure consistency with the LSRS-Ship dataset in terms of task formulation. In addition, a statistical analysis of the target scale distribution in the iSAID-Ship dataset is conducted, as shown in the right panel of Figure 6. Specifically, small-scale targets account for 90.24% of the dataset, while medium-scale and large-scale targets account for 7.23% and 2.53%.
The iSAID-Ship dataset is not involved in the training process but is solely used for generalization evaluation to evaluate the performance of the model under cross-dataset conditions.

4.2. Experimental Environment and Settings

All comparative methods are trained and evaluated under a unified experimental environment, with key configuration parameters listed in Table 1.
The experiments are implemented based on the PyTorch framework and conducted on an NVIDIA GeForce RTX 5090 platform with 32 GB of memory. During the data preprocessing stage, a split-before-cropping strategy is adopted to crop all input images into 512 × 512 patches as network inputs. In the training phase, the Adam optimizer is employed to update model parameters, with an initial learning rate of 5 × 10 5 and a cosine annealing learning rate schedule for dynamic adjustment. The batch size is set to 8, and the model is trained for 80 epochs. The loss function is defined as a combination of Binary Cross-Entropy (BCE) loss and Dice loss to jointly constrain pixel-level classification accuracy and region overlap. The detailed definitions are provided in Section 4.3. During the testing phase, the model outputs are converted into probability maps using a sigmoid function and binarized using multiple thresholds. The final performance is determined by selecting the threshold that yields the optimal IoU through threshold searching.

4.3. Loss Function

This study adopts a composite loss function, including BCE loss, Dice loss, and a boundary constraint term.
The BCE loss is used to constrain pixel-wise classification errors, which is defined as
L BCE = 1 N i = 1 N y i log ( p i ) + ( 1 y i ) log ( 1 p i ) ,
where p i [ 0 , 1 ] denotes the predicted probability of the i-th pixel, y i { 0 , 1 } represents the ground-truth label, and N is the total number of pixels.
To measure the overlap between the predicted region and the ground-truth region, the Dice loss is introduced, defined as
L Dice = 1 2 i = 1 N p i y i + ϵ i = 1 N p i + i = 1 N y i + ϵ ,
where ϵ is a smoothing term to avoid numerical instability.
To enhance the ability of the model to represent ship boundaries, a boundary constraint term is introduced. Boundary regions are extracted by performing local difference analysis on ground truth annotations and assigning higher supervision weights to the boundary locations. The formulation is given as follows:
L edge = 1 N i = 1 N p i y i · w i ,
where w i denotes the boundary weight.
Finally, the overall loss function is defined as:
L = L BCE + L Dice + λ L edge ,
where λ is a weighting coefficient, which is set to 0.5 in this paper. This composite loss balances the optimization between boundary regions and overall regions, thereby improving the stability of segmentation results.

4.4. Comparative Experiments

To evaluate the performance of the proposed method in low-altitude remote sensing ship segmentation tasks, several representative samples are selected from the LSRS-Ship test set for comparative analysis. The comparison includes several mainstream models, such as U-Net [17], U-Net++ [45], DeepLabV3+ [46], Attention U-Net [47], TransUNet [48], and Mamba U-Net [49]. The selected samples cover complex scenarios such as small-scale targets, dense distribution, and strong reflections and haze interference. The model performance is evaluated from both qualitative and quantitative perspectives. And Intersection over Union (IoU), Dice coefficient, Precision, Recall, and Average Precision (AP) are adopted as evaluation metrics. In addition, True Positive (TP), True Negative (TN), False Positive (FP), and False Negative (FN) visualizations are introduced for qualitative error analysis. TP and TN regions denote correctly classified ship and background pixels, while FP and FN regions represent falsely detected ship areas and missed ship regions, respectively.

4.4.1. Qualitative Evaluation

The segmentation results of different models are shown in Figure 7. Under complex background conditions, all comparative methods suffer from issues such as blurred boundaries, missed detection of small targets, and background misclassification. In contrast, MPFT-UNet performs better in terms of ship outline integrity, detail representation, and adaptability to complex backgrounds.
In terms of boundary details, models such as U-Net and DeepLabV3+ often produce broken or blurred contours along ship boundaries. This issue is more evident in regions with strong reflections and wave interference, as highlighted by the yellow circles in Figure 8. In comparison, MPFT-UNet produces more continuous and complete ship contours. This improvement comes from the BSR module. The module introduces explicit edge information and boundary-guided attention, which improves boundary localization accuracy.
For small-target segmentation, models such as U-Net++ and Attention U-Net often miss distant or small objects, or produce incomplete segmentation results, as highlighted by the yellow circles in Figure 9. In comparison, MPFT-UNet recovers the structure of small targets more completely. This improvement is related to the MDSC module. The module uses cross-scale feature fusion and dynamic sparse selection to strengthen the representation of small targets.
Under complex background conditions, such as wave textures, cloud shadows, and strong reflections, some methods are more prone to missed detections. But MPFT-UNet effectively maintains responses to target regions in such scenarios, significantly preserving the structural integrity of ships. This improvement is mainly attributed to the Transformer-based FFT module, which enhances long-range dependency modeling through global context modeling.

4.4.2. Quantitative Evaluation

The experimental results are presented in Table 2. To provide an intuitive comparison of performance across multiple metrics, radar charts are used for visualization, as shown in Figure 10. MPFT-UNet achieves the best performance across all evaluation metrics.
In terms of IoU, MPFT-UNet achieves 0.8365, representing an improvement of approximately 5.1% over U-Net and 4.7% over DeepLabV3+. And compared with the Transformer-based TransUNet, MPFT-UNet achieves an improvement of over 10%. Methods relying solely on traditional convolution or global modeling have limitations in their feature representation capabilities for complex sea surface scenes. The proposed method improves segmentation accuracy through the synergistic integration of boundary modeling, multi-scale feature fusion, and global contextual modeling.
In terms of region overlap, MPFT-UNet achieves a Dice coefficient of 0.9028. For Precision and Recall, MPFT-UNet achieves 0.9346 and 0.8881, respectively. Notably, the improvement in Recall is particularly significant, indicating that the model maintains more stable responses in small-scale targets and low-contrast regions. Furthermore, MPFT-UNet achieves an AP of 0.9573, demonstrating stable performance across different thresholds. And it requires 8.52 ms per image, indicating a moderate inference speed. Although additional modules increase computational cost, the model still achieves good segmentation performance.

4.5. Ablation Experiments

To evaluate the contribution of each module to the overall model performance, ablation experiments are conducted on the LSRS-Ship dataset for the BSR, MDSC, and FFT modules. The results are presented in Table 3.
Without introducing any modules, U-Net achieves an IoU of 0.7854. After incorporating the BSR module, the IoU increases to 0.8181, and the Dice coefficient improves to 0.8874, demonstrating that the boundary supervision mechanism effectively enhances the response of the model to structural variations, resulting in more continuous and accurate boundaries. With the introduction of the MDSC module, the IoU improves to 0.8032 and Recall reaches 0.8664, indicating that this module enhances the representation of small-scale targets and mitigates the omission of small targets. After introducing the FFT module, the IoU reaches 0.8247, achieving the best performance among single-module configurations, which indicates that global contextual modeling helps improve semantic consistency.
In terms of module combinations, additional dual-module ablation experiments are conducted. When the BSR and MDSC modules are jointly introduced, the IoU reaches 0.8095 and the Dice coefficient reaches 0.8776. Although slightly lower than using the BSR module alone, this configuration still outperforms the baseline U-Net, indicating that local feature enhancement without sufficient global constraints may introduce feature redundancy. When the BSR and FFT modules are jointly applied, the IoU improves to 0.8261 and the Recall reaches 0.8816, indicating that combining boundary refinement with global contextual modeling helps maintain structural continuity and semantic consistency. In addition, the combination of MDSC and FFT achieves an IoU of 0.8296 and a Recall of 0.8818, indicating the complementarity between multi-scale feature fusion and global contextual modeling.
When all three modules are used, the model achieves the best performance across all metrics. The IoU reaches 0.8365, the Dice is 0.9028, the Precision is 0.9346, the Recall is 0.8881, and the AP is 0.9573. Compared with the baseline U-Net, the IoU improves by about 5.1%. This result indicates that the three modules work together in boundary modeling, multi-scale feature representation, and global semantic modeling.

4.6. Parameter Sensitivity Analysis

To evaluate the influence of the boundary loss weight λ Edge , sensitivity experiments were conducted on the LSRS-Ship dataset with λ Edge set to 0.3, 0.5, and 0.7, respectively. The experimental results are presented in Table 4.
As shown in Table 4, the proposed model achieved the best performance when λ Edge = 0.5 , obtaining the highest IoU and Dice values among all settings. When λ Edge was set to 0.3 or 0.7, the segmentation performance decreased slightly.

4.7. Cross-Dataset Generalization Experiments

This paper designs cross-dataset experiments to evaluate the robustness and generalization ability of the model under different data distributions. All models are trained exclusively on the LSRS-Ship dataset and directly tested on the iSAID-Ship dataset to evaluate their adaptability under cross-domain conditions. Table 5 presents the quantitative evaluation results of all models on the iSAID-Ship dataset, while Figure 11 shows the corresponding qualitative comparisons. Due to the distribution discrepancy between training and testing data, all models exhibit performance degradation on the iSAID-Ship dataset.
U-Net and its variants show significant performance degradation on iSAID-Ship, with frequent missed detections in densely distributed and small-scale target regions. DeepLabV3+ demonstrates certain advantages in preserving overall structure but still suffers from missing targets in complex background regions. TransUNet exhibits unstable performance under cross-dataset conditions, with discontinuous structures, indicating that such methods are sensitive to distribution shifts. In contrast, MPFT-UNet achieves the best performance on iSAID-Ship, with IoU, Dice, Precision, Recall, and AP of 0.6927, 0.7793, 0.8414, 0.7552, and 0.8679, respectively, outperforming all comparative methods. Notably, the Recall performance is particularly strong, indicating that the model effectively reduces missed detections of small-scale targets under cross-domain conditions. As shown in Figure 11, MPFT-UNet maintains stable responses in dense and small-scale scenarios. It produces fewer missed detections and more complete structures. Meanwhile, the inference time remains unchanged under cross-dataset evaluation, indicating stable inference efficiency.
Overall, the cross-dataset experiments show that MPFT-UNet remains robust and generalizes well under different data distributions.

5. Conclusions

In this paper, a multi-module collaborative semantic segmentation network, MPFT-UNet, was proposed to address the challenges of large-scale variation, blurred boundaries, and complex background interference in UAV-based remote sensing ship segmentation. Built upon the U-Net framework, the proposed model incorporated a BSR module to enhance contour representation, an MDSC module to improve small-target modeling, and an FFT module to strengthen global semantic consistency, thereby achieving fine-grained ship segmentation. In addition, a UAV-based ship segmentation dataset, LSRS-Ship, was constructed to provide effective data support for ship segmentation research in complex maritime scenarios. Experimental results on the LSRS-Ship dataset show that MPFT-UNet achieves the best performance across multiple metrics, with an IoU of 0.8365. The model also performs well on the iSAID-Ship dataset. This indicates good generalization under different imaging conditions. However, the multi-module design increases computational cost. Future work will focus on lightweight model design, improved small-target representation, and cross-domain adaptation. These directions aim to improve efficiency and generalization in real-world maritime monitoring tasks.

Author Contributions

Conceptualization, M.S. and X.Q.; methodology, M.S.; software, M.S. and A.L.; validation, M.S., Y.C. and A.L.; formal analysis, M.S. and X.Q.; investigation, M.S. and Y.K.; resources, X.Q.; data curation, M.S. and Y.Y; writing—original draft preparation, M.S.; writing—review and editing, X.Q., Y.C., Y.K. and Y.Y.; visualization, M.S. and A.L.; supervision, X.Q.; project administration, X.Q.; funding acquisition, X.Q. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported by the Jiangsu Province Industry-University-Research Coopera-tion Project (No. BY20240019); and the National Defense Technology Foundation Research Project (No. JCKY2023XXXX007).

Informed Consent Statement

Not applicable.

Data Availability Statement

The datasets presented in this article are not readily available because the data are part of an ongoing study. Requests to access the datasets should be directed to the corresponding author.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Duan, G.J.; Zhang, P.F. Research on application of UAV for maritime supervision. J. Shipp. Ocean Eng. 2014, 4, 322–326. [Google Scholar]
  2. Koritarov, T.; Dimitrakiev, D. Unmanned Aerial Vehicles in Port Operations–Use Cases and Benefits. In Proceedings of the International Scientific Conference Innovative Education for Emerging Maritime Issues, Varna, Bulgaria, 25 February 2021; Volume 25, pp. 70–78. [Google Scholar]
  3. Song, A. Deep Learning-Based Semantic Segmentation of Urban Areas Using Heterogeneous Unmanned Aerial Vehicle Datasets. Aerospace 2023, 10, 880. [Google Scholar] [CrossRef] [Scilit]
  4. Luo, X.; Wu, Y.; Chen, J. Research progress on deep learning methods for object detection and semantic segmentation in UAV aerial images. Acta Aeronaut. Astronaut. Sin. 2024, 45, 028822. [Google Scholar]
  5. Han, Y.; Guo, J.; Yang, H.; Guan, R.; Zhang, T. SSMA-YOLO: A lightweight YOLO model with enhanced feature extraction and Fusion capabilities for drone-aerial ship image detection. Drones 2024, 8, 145. [Google Scholar] [CrossRef] [Scilit]
  6. Zhao, T.; Wang, Y.; Li, Z.; Gao, Y.; Chen, C.; Feng, H.; Zhao, Z. Ship detection with deep learning in optical remote-sensing images: A survey of challenges and advances. Remote Sens. 2024, 16, 1145. [Google Scholar] [CrossRef] [Scilit]
  7. Huang, L.; Jiang, B.; Lv, S.; Liu, Y.; Fu, Y. Deep-learning-based semantic segmentation of remote sensing images: A survey. IEEE J. Sel. Top. Appl. Earth Obs. Remote Sens. 2023, 17, 8370–8396. [Google Scholar]
  8. Cheng, J.; Deng, C.; Su, Y.; An, Z.; Wang, Q. Methods and datasets on semantic segmentation for Unmanned Aerial Vehicle remote sensing images: A review. ISPRS J. Photogramm. Remote Sens. 2024, 211, 1–34. [Google Scholar]
  9. Liu, X.; Deng, Z.; Yang, Y. Recent progress in semantic image segmentation. Artif. Intell. Rev. 2019, 52, 1089–1106. [Google Scholar]
  10. Majidizadeh, A.; Hasani, H.; Jafari, M. Semantic segmentation of UAV images based on U-NET in urban area. ISPRS Ann. Photogramm. Remote Sens. Spat. Inf. Sci. 2023, 10, 451–457. [Google Scholar]
  11. Kumar, S.; Kumar, A.; Lee, D.G. Semantic segmentation of UAV images based on transformer framework with context information. Mathematics 2022, 10, 4735. [Google Scholar] [CrossRef] [Scilit]
  12. Ren, S.; He, K.; Girshick, R.; Sun, J. Faster r-cnn: Towards real-time object detection with region proposal networks. Adv. Neural Inf. Process. Syst. 2015, 28, 91. [Google Scholar] [CrossRef] [Scilit]
  13. Liu, W.; Anguelov, D.; Erhan, D.; Szegedy, C.; Reed, S.; Fu, C.Y.; Berg, A.C. Ssd: Single shot multibox detector. In Proceedings of the European Conference on Computer Vision; Springer: Cham, Switzerland, 2016; pp. 21–37. [Google Scholar]
  14. Redmon, J.; Divvala, S.; Girshick, R.; Farhadi, A. You only look once: Unified, real-time object detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Las Vegas, NV, USA, 27–30 June 2016; IEEE: New York, NY, USA, 2016; pp. 779–788. [Google Scholar]
  15. Long, J.; Shelhamer, E.; Darrell, T. Fully convolutional networks for semantic segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Boston, MA, USA, 7–12 June 2015; IEEE: New York, NY, USA, 2015; pp. 3431–3440. [Google Scholar]
  16. Badrinarayanan, V.; Kendall, A.; Cipolla, R. Segnet: A deep convolutional encoder-decoder architecture for image segmentation. IEEE Trans. Pattern Anal. Mach. Intell. 2017, 39, 2481–2495. [Google Scholar] [CrossRef] [Scilit]
  17. Ronneberger, O.; Fischer, P.; Brox, T. U-net: Convolutional networks for biomedical image segmentation. In Proceedings of the International Conference on Medical Image Computing and Computer-Assisted Intervention; Springer: Cham, Switzerland, 2015; pp. 234–241. [Google Scholar]
  18. Shamsolmoali, P.; Zareapoor, M.; Wang, R.; Zhou, H.; Yang, J. A novel deep structure U-Net for sea-land segmentation in remote sensing images. IEEE J. Sel. Top. Appl. Earth Obs. Remote Sens. 2019, 12, 3219–3232. [Google Scholar] [CrossRef] [Scilit]
  19. Hordiiuk, D.; Oliinyk, I.; Hnatushenko, V.; Maksymov, K. Semantic segmentation for ships detection from satellite imagery. In Proceedings of the 2019 IEEE 39th International Conference on Electronics and Nanotechnology (ELNANO), Kyiv, Ukraine, 16–18 April 2019; IEEE: New York, NY, USA, 2019; pp. 454–457. [Google Scholar]
  20. Wu, K.; Zhao, S.; Li, W.; Jiang, R. Spatial global context information network for semantic segmentation of remote sensing image. J. Zhejiang Univ. Eng. Sci. 2022, 56, 795–802. [Google Scholar]
  21. Li, G.; Wang, R.; Zhang, Y.; Xu, C.; Fan, X.; Zhou, Z.; Lv, P.; Ruan, Z. LR-Net: Lossless Feature Fusion and Revised SIoU for Small Object Detection. Comput. Mater. Contin. 2025, 85, 3267. [Google Scholar] [CrossRef] [Scilit]
  22. Spasev, V.; Dimitrovski, I.; Chorbev, I.; Kitanovski, I. Semantic segmentation of unmanned aerial vehicle remote sensing images using SegFormer. In Proceedings of the International Conference on Intelligent Systems and Pattern Recognition; Springer: Cham, Switzerland, 2024; pp. 108–122. [Google Scholar]
  23. Bokhovkin, A.; Burnaev, E. Boundary loss for remote sensing imagery semantic segmentation. In Proceedings of the International Symposium on Neural Networks; Springer: Cham, Switzerland, 2019; pp. 388–401. [Google Scholar]
  24. Dharampal, V.M. Methods of image edge detection: A review. J. Electr. Electron. Syst. 2015, 4, 150. [Google Scholar]
  25. Chen, Y.; Ge, P.; Wang, G.; Weng, G.; Chen, H. An overview of intelligent image segmentation using active contour models. Intell. Robot. 2023, 3, 23–55. [Google Scholar] [CrossRef] [Scilit]
  26. Takikawa, T.; Acuna, D.; Jampani, V.; Fidler, S. Gated-scnn: Gated shape cnns for semantic segmentation. In Proceedings of the IEEE/CVF International Conference on Computer Vision, Seoul, Republic of Korea, 27 October–2 November 2019; IEEE: New York, NY, USA, 2019; pp. 5229–5238. [Google Scholar]
  27. Kervadec, H.; Bouchtiba, J.; Desrosiers, C.; Granger, E.; Dolz, J.; Ayed, I.B. Boundary loss for highly unbalanced segmentation. In Proceedings of the International Conference on Medical Imaging with Deep Learning, London, UK, 8–10 July 2019; PMLR: Cambridge, MA, USA, 2019; pp. 285–296. [Google Scholar]
  28. Karimi, D.; Salcudean, S.E. Reducing the hausdorff distance in medical image segmentation with convolutional neural networks. IEEE Trans. Med. Imaging 2019, 39, 499–513. [Google Scholar] [CrossRef] [Scilit]
  29. Fu, J.; Liu, J.; Tian, H.; Li, Y.; Bao, Y.; Fang, Z.; Lu, H. Dual attention network for scene segmentation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Long Beach, CA, USA, 15–20 June 2019; IEEE: New York, NY, USA, 2019; pp. 3146–3154. [Google Scholar]
  30. McEver, R.A.; Manjunath, B. Pcams: Weakly supervised semantic segmentation using point supervision. arXiv 2020, arXiv:2007.05615. [Google Scholar] [CrossRef] [Scilit]
  31. Dolgopolov, A.V.; Kazantsev, P.A.; Bezuhliy, N.; Dolgopolov, A.; Kazantsev, P.; Bezuhliy, N. Ship detection in images obtained from the unmanned aerial vehicle (UAV). Indian J. Sci. Technol. 2017, 9, 1–7. [Google Scholar]
  32. Lin, T.Y.; Dollár, P.; Girshick, R.; He, K.; Hariharan, B.; Belongie, S. Feature pyramid networks for object detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Honolulu, HI, USA, 21–26 July 2017; IEEE: New York, NY, USA, 2017; pp. 2117–2125. [Google Scholar]
  33. Zhao, H.; Shi, J.; Qi, X.; Wang, X.; Jia, J. Pyramid scene parsing network. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Honolulu, HI, USA, 21–26 July 2017; IEEE: New York, NY, USA, 2017; pp. 2881–2890. [Google Scholar]
  34. Chen, L.C.; Papandreou, G.; Schroff, F.; Adam, H. Rethinking atrous convolution for semantic image segmentation. arXiv 2017, arXiv:1706.05587. [Google Scholar] [CrossRef] [Scilit]
  35. Shang, R.; Zhang, J.; Jiao, L.; Li, Y.; Marturi, N.; Stolkin, R. Multi-scale adaptive feature fusion network for semantic segmentation in remote sensing images. Remote Sens. 2020, 12, 872. [Google Scholar] [CrossRef] [Scilit]
  36. Zhang, G.; Jiang, W. Remote Sensing Image Semantic Segmentation Method Based on a Deep Convolutional Neural Network and Multiscale Feature Fusion. Int. J. Semant. Web Inf. Syst. 2023, 19, 16. [Google Scholar]
  37. Meng, T.; Ghiasi, G.; Mahjourian, R.; Le, Q.V.; Tan, M. Revisiting multi-scale feature fusion for semantic segmentation. arXiv 2022, arXiv:2203.12683. [Google Scholar] [CrossRef] [Scilit]
  38. Chan, Y.T. Maritime filtering for images and videos. Signal Process. Image Commun. 2021, 99, 116477. [Google Scholar] [CrossRef] [Scilit]
  39. Vaswani, A.; Shazeer, N.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A.N.; Kaiser, Ł.; Polosukhin, I. Attention is all you need. Adv. Neural Inf. Process. Syst. 2017, 30, 5999–6009. [Google Scholar]
  40. Dosovitskiy, A.; Beyer, L.; Kolesnikov, A.; Weissenborn, D.; Zhai, X.; Unterthiner, T.; Dehghani, M.; Minderer, M.; Heigold, G.; Gelly, S.; et al. An image is worth 16 × 16 words: Transformers for image recognition at scale. arXiv 2020, arXiv:2010.11929. [Google Scholar]
  41. Liu, Z.; Lin, Y.; Cao, Y.; Hu, H.; Wei, Y.; Zhang, Z.; Lin, S.; Guo, B. Swin transformer: Hierarchical vision transformer using shifted windows. In Proceedings of the IEEE/CVF International Conference on Computer Vision, Montreal, QC, Canada, 10–17 October 2021; IEEE: New York, NY, USA, 2021; pp. 10012–10022. [Google Scholar]
  42. Wang, W.; Xie, E.; Li, X.; Fan, D.P.; Song, K.; Liang, D.; Lu, T.; Luo, P.; Shao, L. Pyramid vision transformer: A versatile backbone for dense prediction without convolutions. In Proceedings of the IEEE/CVF International Conference on Computer Vision, Montreal, QC, Canada, 10–17 October 2021; IEEE: New York, NY, USA, 2021; pp. 568–578. [Google Scholar]
  43. Strudel, R.; Garcia, R.; Laptev, I.; Schmid, C. Segmenter: Transformer for semantic segmentation. In Proceedings of the IEEE/CVF International Conference on Computer Vision, Montreal, QC, Canada, 10–17 October 2021; IEEE: New York, NY, USA, 2021; pp. 7262–7272. [Google Scholar]
  44. Yuan, L.; Chen, Y.; Wang, T.; Yu, W.; Shi, Y.; Jiang, Z.H.; Tay, F.E.; Feng, J.; Yan, S. Tokens-to-token vit: Training vision transformers from scratch on imagenet. In Proceedings of the IEEE/CVF International Conference on Computer Vision, Montreal, QC, Canada, 10–17 October 2021; IEEE: New York, NY, USA, 2021; pp. 558–567. [Google Scholar]
  45. Zhou, Z.; Rahman Siddiquee, M.M.; Tajbakhsh, N.; Liang, J. Unet++: A nested u-net architecture for medical image segmentation. In Proceedings of the International Workshop on Deep Learning in Medical Image Analysis; Springer: Cham, Switzerland, 2018; pp. 3–11. [Google Scholar]
  46. Chen, L.C.; Zhu, Y.; Papandreou, G.; Schroff, F.; Adam, H. Encoder-decoder with atrous separable convolution for semantic image segmentation. In Proceedings of the European Conference on Computer Vision (ECCV), Munich, Germany, 8–14 September 2018; Springer: Berlin/Heidelberg, Germany, 2018; pp. 801–818. [Google Scholar]
  47. Oktay, O.; Schlemper, J.; Folgoc, L.L.; Lee, M.; Heinrich, M.; Misawa, K.; Mori, K.; McDonagh, S.; Hammerla, N.Y.; Kainz, B.; et al. Attention u-net: Learning where to look for the pancreas. arXiv 2018, arXiv:1804.03999. [Google Scholar] [CrossRef] [Scilit]
  48. Chen, J.; Lu, Y.; Yu, Q.; Luo, X.; Adeli, E.; Wang, Y.; Lu, L.; Yuille, A.L.; Zhou, Y. Transunet: Transformers make strong encoders for medical image segmentation. arXiv 2021, arXiv:2102.04306. [Google Scholar] [CrossRef] [Scilit]
  49. Liu, Y.; Tian, Y.; Zhao, Y.; Yu, H.; Xie, L.; Wang, Y.; Ye, Q.; Jiao, J.; Liu, Y. Vmamba: Visual state space model. Adv. Neural Inf. Process. Syst. 2024, 37, 103031–103063. [Google Scholar]
Figure 1. MPFT-UNet overall framework.
Figure 1. MPFT-UNet overall framework.
Jmse 14 00945 g001
Figure 2. Architecture of the BSR module. The module integrates ESA with feature refinement to enhance boundary representation.
Figure 2. Architecture of the BSR module. The module integrates ESA with feature refinement to enhance boundary representation.
Jmse 14 00945 g002
Figure 3. Architecture of the MDSC module. The module performs cross-scale feature interaction via a query–key–value mechanism and employs a dynamic dual Top-K sparsification strategy to selectively retain informative features while suppressing redundant responses.
Figure 3. Architecture of the MDSC module. The module performs cross-scale feature interaction via a query–key–value mechanism and employs a dynamic dual Top-K sparsification strategy to selectively retain informative features while suppressing redundant responses.
Jmse 14 00945 g003
Figure 4. Architecture of the FFT module. The local branch integrates deformable convolution (Deform Conv) and window-based attention (Window Attn) to enhance boundary and texture feature representation. The global branch employs soft pooling and scaled dot-product attention to model long-range semantic dependencies.
Figure 4. Architecture of the FFT module. The local branch integrates deformable convolution (Deform Conv) and window-based attention (Window Attn) to enhance boundary and texture feature representation. The global branch employs soft pooling and scaled dot-product attention to model long-range semantic dependencies.
Jmse 14 00945 g004
Figure 5. LSRS-Ship dataset and iSAID-Ship dataset.
Figure 5. LSRS-Ship dataset and iSAID-Ship dataset.
Jmse 14 00945 g005
Figure 6. Comparison of object scale distributions between LSRS-Ship and iSAID-Ship datasets.
Figure 6. Comparison of object scale distributions between LSRS-Ship and iSAID-Ship datasets.
Jmse 14 00945 g006
Figure 7. Qualitative comparison of the proposed method and several SoTA models on challenging samples from the LSRS-Ship dataset. From left to right: (a) input image, (b) ground-truth segmentation mask (marked with a green bounding box), (c) U-Net, (d) U-Net++, (e) DeepLabV3+, (f) Attention U-Net, (g) TransUNet, (h) Mamba U-Net, and (i) the proposed MPFT-UNet (marked with a red bounding box). White and black denote TP and TN, while magenta and green indicate FP and FN. Figure 8 and Figure 9 provide enlarged local views of representative regions from this figure for clearer comparison of boundary details and structural differences.
Figure 7. Qualitative comparison of the proposed method and several SoTA models on challenging samples from the LSRS-Ship dataset. From left to right: (a) input image, (b) ground-truth segmentation mask (marked with a green bounding box), (c) U-Net, (d) U-Net++, (e) DeepLabV3+, (f) Attention U-Net, (g) TransUNet, (h) Mamba U-Net, and (i) the proposed MPFT-UNet (marked with a red bounding box). White and black denote TP and TN, while magenta and green indicate FP and FN. Figure 8 and Figure 9 provide enlarged local views of representative regions from this figure for clearer comparison of boundary details and structural differences.
Jmse 14 00945 g007
Figure 8. Enlarged local comparison of boundary regions between U-Net, DeepLabV3+, and the proposed MPFT-UNet on challenging LSRS-Ship samples.
Figure 8. Enlarged local comparison of boundary regions between U-Net, DeepLabV3+, and the proposed MPFT-UNet on challenging LSRS-Ship samples.
Jmse 14 00945 g008
Figure 9. Enlarged local comparison of small-target regions between U-Net++, Attention U-Net, and the proposed MPFT-UNet on challenging LSRS-Ship samples.
Figure 9. Enlarged local comparison of small-target regions between U-Net++, Attention U-Net, and the proposed MPFT-UNet on challenging LSRS-Ship samples.
Jmse 14 00945 g009
Figure 10. Radar chart comparison of different methods on the LSRS-Ship dataset across five evaluation metrics, including IoU, Dice, Precision, Recall, and AP.
Figure 10. Radar chart comparison of different methods on the LSRS-Ship dataset across five evaluation metrics, including IoU, Dice, Precision, Recall, and AP.
Jmse 14 00945 g010
Figure 11. Qualitative comparison of the proposed method and SoTA models in the cross-dataset generalization experiment. From left to right: (a) input image, (b) ground-truth segmentation mask (marked with a green bounding box), (c) U-Net, (d) U-Net++, (e) DeepLabV3+, (f) Attention U-Net, (g) TransUNet, (h) Mamba U-Net, and (i) the proposed MPFT-UNet (marked with a red bounding box). White and black denote TP and TN, while magenta and green indicate FP and FN.
Figure 11. Qualitative comparison of the proposed method and SoTA models in the cross-dataset generalization experiment. From left to right: (a) input image, (b) ground-truth segmentation mask (marked with a green bounding box), (c) U-Net, (d) U-Net++, (e) DeepLabV3+, (f) Attention U-Net, (g) TransUNet, (h) Mamba U-Net, and (i) the proposed MPFT-UNet (marked with a red bounding box). White and black denote TP and TN, while magenta and green indicate FP and FN.
Jmse 14 00945 g011
Table 1. Experimental settings of the proposed MPFT-UNet.
Table 1. Experimental settings of the proposed MPFT-UNet.
CategorySetting
FrameworkPyTorch 2.8.0
GPUNVIDIA RTX 5090 (32 GB)
Input Size 512 × 512
OptimizerAdam
Learning Rate 5 × 10 5 (Cosine Annealing)
Batch Size8
Epochs80
Loss Function BCE + Dice + λ Edge ( λ = 0.5 )
Table 2. Quantitative comparison of different segmentation models on the LSRS-Ship dataset. The best performances are illustrated in bold.
Table 2. Quantitative comparison of different segmentation models on the LSRS-Ship dataset. The best performances are illustrated in bold.
ModelIoUDicePrecisionRecallAPInference Time (ms)
UNet0.78540.85910.90300.83840.93717.00
UNet++0.68570.76630.85250.73360.871222.51
DeepLabV3+0.78910.86480.90760.84880.94064.07
Attention UNet0.62630.71490.82450.67820.853110.40
TransUNet0.73470.81680.88100.79220.902813.28
Mamba UNet0.69120.77310.85330.74080.88784.01
MPFT-UNet0.83650.90280.93460.88810.95738.52
Table 3. Ablation study of different modules in MPFT-UNet on the LSRS-Ship dataset. The best performances are illustrated in bold.
Table 3. Ablation study of different modules in MPFT-UNet on the LSRS-Ship dataset. The best performances are illustrated in bold.
BSRMDSCFFTIoUDicePrecisionRecallAP
×××0.78540.85910.90300.83840.9371
××0.81810.88740.91840.87620.9441
××0.80320.87270.90090.86640.9403
××0.82470.89090.92300.87570.9471
×0.80950.87760.91600.86300.9445
×0.82610.89260.92070.88160.9448
×0.82960.89520.92540.88180.9504
0.83650.90280.93460.88810.9573
Table 4. Sensitivity analysis of the boundary loss weight λ Edge . The best performances are illustrated in bold.
Table 4. Sensitivity analysis of the boundary loss weight λ Edge . The best performances are illustrated in bold.
λ Edge IoUDice
0.30.83170.8991
0.50.83650.9028
0.70.82280.8943
Table 5. Generalization performance of different models on the cross-dataset evaluation. The best performances are illustrated in bold.
Table 5. Generalization performance of different models on the cross-dataset evaluation. The best performances are illustrated in bold.
ModelIoUDicePrecisionRecallAPInference Time (ms)
UNet0.61120.72450.80120.67240.84107.00
UNet++0.58870.70840.77960.65130.829522.51
DeepLabV3+0.63200.75500.81570.68320.85784.06
Attention UNet0.59020.72260.78230.64810.826310.40
TransUNet0.58430.71280.77140.63720.820913.28
Mamba UNet0.60950.72960.79640.64800.83154.01
MPFT-UNet0.69270.77930.84140.75520.86798.52
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.

Share and Cite

MDPI and ACS Style

Shi, M.; Qiu, X.; Li, A.; Yang, Y.; Ke, Y.; Chen, Y. MPFT-UNet: A Boundary-Refined and Multi-Scale Dynamic Fusion Network for UAV-Based Port Ship Segmentation. J. Mar. Sci. Eng. 2026, 14, 945. https://doi.org/10.3390/jmse14100945

AMA Style

Shi M, Qiu X, Li A, Yang Y, Ke Y, Chen Y. MPFT-UNet: A Boundary-Refined and Multi-Scale Dynamic Fusion Network for UAV-Based Port Ship Segmentation. Journal of Marine Science and Engineering. 2026; 14(10):945. https://doi.org/10.3390/jmse14100945

Chicago/Turabian Style

Shi, Mengna, Xiulin Qiu, Ang Li, Yuwang Yang, Yaqi Ke, and Yilan Chen. 2026. "MPFT-UNet: A Boundary-Refined and Multi-Scale Dynamic Fusion Network for UAV-Based Port Ship Segmentation" Journal of Marine Science and Engineering 14, no. 10: 945. https://doi.org/10.3390/jmse14100945

APA Style

Shi, M., Qiu, X., Li, A., Yang, Y., Ke, Y., & Chen, Y. (2026). MPFT-UNet: A Boundary-Refined and Multi-Scale Dynamic Fusion Network for UAV-Based Port Ship Segmentation. Journal of Marine Science and Engineering, 14(10), 945. https://doi.org/10.3390/jmse14100945

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop