## 2 Materials and Methods
### Method
#### 2.4.4 Semantic Decoder  
Mangrove remote sensing images are characterized by complex backgrounds and variable scales, posing severe challenges for semantic segmentation. Features at different levels contain complementary information: low-level features preserve detailed textures, aiding precise localization, while high-level features contain rich semantics crucial for category recognition. To fully utilize this multi-level information, this paper designed the Cascade Pyramid Fusion Module (CPFM) based on UperNet network and Feature Pyramid  
Figure 7: Overall Structure Diagram of MFA-UperNet Semantic Decoder. Network (FPN) [39]. Its core concept is to achieve the effective fusion of multi-scale features through FPN and enhance it by introducing the Pyramid Pooling Module (PPM) [23] and Multi-Scale Selective Kernel Attention Module (MSKAM). The CPFM module workflow is as follows. First, it constructs a feature pyramid, using bilinear interpolation for upsampling and \(1\times 1\) convolution to fuse top-down and bottom-up features, followed by element-wise addition, achieving simple and efficient segmentation without any complex refinement modules. Second, it introduces a Pyramid Pooling Module (PPM) at the top layer to aggregate global context information, better performing multi-scale context aggregation and global information collection to assist in remote sensing image scene parsing. Finally, it applies MSKAM (detailed in Section Multi-scale Selective Kernel Attention Module (MSKAM)) for the adaptive enhancement of features at various levels. Specifically, after the multi-scale features (\(\beta_{0}\), \(\beta_{1}\), \(\beta_{2}\), \(\beta_{3}\)) generated by the feature encoder are processed through CPF, four different-sized feature maps (\(\beta_{0}^{\prime}\), \(\beta_{1}^{\prime}\), \(\beta_{2}^{\prime}\), \(\beta_{3}^{\prime}\)) are obtained, as shown in Formula (2):  
\[\left\{ \begin{array}{l}\beta_{3}^{\prime}=LSK(PPM(\beta_{3}))\\ \beta_{2}^{\prime}=ECA3(\beta_{2})+f_{1}(f_{2}(\beta_{3}^{\prime}))\\ \beta_{1}^{\prime}=ECA2(\beta_{1})+f_{1}(f_{2}(\beta_{2}^{\prime})+f_{2}( \beta_{3}^{\prime}))\\ \beta_{0}^{\prime}=ECA1(\beta_{0})+f_{1}\big{(}f_{2}\big{(}\beta_{1}^{\prime} \big{)}+f_{2}(\beta_{2}^{\prime})+f_{2}(\beta_{3}^{\prime})\big{)}\end{array} \right. \tag{2}\]  
where \(f_{1}(\cdot)\) represents a series of standard feature extraction and transformation operations performed in the order of \(1\times 1\) convolution, batch normalization, and ReLU activation function. \(f_{2}(\cdot)\) represents upsampling operations using bilinear interpolation, aimed at adjusting the size of high-level features so that the processed features can be aligned and fused with the target feature layer. \(ECAi(\cdot)\) and \(LSK(\cdot)\) represent feature maps after ECA and LSK in MSKAM (detailed in Section Multi-scale Selective Kernel Attention Module (MSKAM)), and \(PPM(\cdot)\) represents feature maps after the Pyramid Pooling Module, which obtains hierarchical information from global to local through different scale pooling. The final output is a composite feature map that fuses multiple scales, thereby achieving the purpose of considering both global mangrove semantic information and local mangrove detail information. Multi-Scale Selective Kernel Attention Module (MSKAM)  
The complex and variable nature of mangrove backgrounds makes structural and semantic information in remote sensing images less distinct. To enhance the representation capability for multi-shaped targets and effectively process scale variations and shape differences of targets in remote sensing images, after using the aforementioned CPFM, it is necessary to consider the localization of key channels [40] during pyramid fusion. For this purpose, MSKAM was designed, consisting of 3 sets of Efficient Channel Attention (ECA) modules and 1 set of Large Selective Kernel (LSK) modules, which can adaptively assess channel value and adjust the spatial receptive field of deep targets to more comprehensively capture channel and spatial information of mangroves.