## 2 Materials and Methods
### Evaluation Metrics  
This paper uses Pixel Accuracy (PA), mean Pixel Accuracy (mPA), mean Intersection over Union (mIoU), number of parameters, and Floating-Point Operations (FLOPs) to evaluate the segmentation performance of different models. Pixel Accuracy (PA) represents the proportion of correctly segmented pixels. It can be calculated by dividing the number of correctly segmented pixels by the total number of pixels, and the result is used to evaluate the overall accuracy of the model. For \(k+1\) classes, including k foreground classes and 1 background class, PA is defined as shown in Formula (23):  
\[PA=\frac{\sum\limits_{i=0}^{k}p_{ii}}{\sum\limits_{i=0}^{k}\sum\limits_{j=0}^{k}p _{ij}},PA\in(0,1), \tag{23}\]  
where \(p_{ii}\) denotes the number of correctly classified pixels and \(p_{ij}\) is the number of pixels in Class \(i\) that are predicted to be in Class \(j\). PA is often used to evaluate the overall segmentation effect, and the closer PA is to 1, the better the model performance is.  
In mangrove segmentation, the PA metric particularly focuses on the model's ability to capture the overall outline of mangrove areas. A higher PA value indicates that the model can accurately identify the main areas of mangroves, which is significant for mangrove resource surveys and area statistics. However, considering the uneven distribution and boundary complexity of mangroves, relying solely on the PA metric might overlook the segmentation quality of small-area mangroves or edge regions. Therefore, mean Pixel Accuracy (mPA) is introduced to represent the average of all PAs, with the mPA calculation formula defined as shown in Formula (24):  
\[mPA=\frac{1}{k+1}\sum\limits_{i=0}^{k}\frac{p_{ii}}{\sum\limits_{j=0}^{k}p_{ij}} \tag{24}\]  
mPA better reflects the model's performance in handling mangroves with different densities and distribution characteristics by averaging the accuracy rates of various categories. This is particularly important for evaluating the model's segmentation performance in complex environments (such as areas where mangroves are mixed with other vegetation, and areas with varying degrees of density).  
To more rigorously evaluate segmentation accuracy, especially performance in mangrove boundary regions, this paper also introduces mean Intersection over Union (mIoU) as an evaluation metric for the model, with mIoU defined as shown in Formula (25):  
\[mIoU=\frac{\sum\limits_{i=0}^{K}\frac{\left|A_{i}\cap B_{i}\right|}{\left|A_{i }\cup B_{i}\right|}}{K+1}, \tag{25}\]  
where \(A\) and \(B\) denote labeling and prediction results, respectively. The mIoU metric is more sensitive to the accuracy of segmentation boundaries and can better evaluate the model's segmentation precision at interfaces between mangroves and other features (such as water bodies and other vegetation). This has significant practical implications for the dynamic monitoring and boundary change analysis of mangrove ecosystems.  
Parameters and Floating-Point Operations (FLOPs) are two core metrics for evaluating the complexity of deep learning models. FLOPs quantifies the number of floating-point calculations required for a single forward inference of the model, typically measured in GFLOPs (billion Floating-Point Operations). The FLOP value directly reflects the computational cost of the model, with higher FLOPs indicating greater computational load and longer inference time. The number of parameters characterizes the storage scale of the model. In mangrove species recognition tasks, the comprehensive evaluation of these two metrics--Parameters and FLOPs--provides important guidance for actual model deployment. In mangrove semantic segmentation tasks, balancing these metrics helps achieve an equilibrium between model performance and resource consumption, ensuring both recognition accuracy and efficient model operation under limited resources. This quantitative evaluation method provides a reliable basis for the engineering implementation of mangrove species recognition systems.