Seagrass bed map fine extraction method based on unmanned aerial vehicle hyperspectral and deep learning
Patent Information
- Application Number
- CN202611381846.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-08
- Publication Date
- 2026-10-13
AI Technical Summary
[0004]为了解决上述技术问题,本发明提出了一种基于无人机高光谱与深度学习的海草床图斑精细提取方法,解决现有海草床遥感识别方法边界精度不足、数据源单一、输出成果难以直接用于GIS空间分析的问题,实现海草床图斑的精细提取、边界规整及面向修复选址的标准化矢量图斑自动输出
本发明通过引入LiDAR水深数据构建水深-光谱衰减补偿模型,有效消除了水体衰减对光谱信号的非线性干扰,结合多源特征图中水深梯度、光谱异质性及空间邻域上下文三类衍生特征的构建,显著提升了模型在不同水深条件下的识别稳定性和边界感知能力;通过第一分支中嵌入多尺度通道-空间串行注意力模块的U-Net++和第二分支中引入跨尺度特征交互机制的轻量化Transformer,实现了局部细节与全局语义的动态平衡融合,显著提升了分割结果的边界清晰度和整体一致性,结合自监督对比学习与注意力蒸馏双重机制,有效克服了标注样本不足的局限,提升了模型泛化能力和推理效率。
Smart Images

Figure CN122906384A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of marine ecological remote sensing monitoring technology, and more specifically, to a method for fine extraction of seagrass bed patches based on UAV hyperspectral and deep learning. Background Technology
[0002] Seagrass beds are important blue carbon ecosystems in nearshore waters, possessing significant functions in carbon sequestration and storage, water purification, and biodiversity maintenance. Their resource surveys and spatial distribution monitoring are fundamental to marine ecological restoration and blue carbon assessment. Currently, remote sensing identification of seagrass beds mainly relies on satellite remote sensing imagery (such as Landsat, Sentinel-2, and the Gaofen series satellites), combined with unsupervised classification methods such as maximum likelihood estimation and ISO clustering (iterative self-organizing clustering) to extract seagrass distribution areas. In recent years, with the development of deep learning technology, some studies have begun to use semantic segmentation models such as SegNet (semantic segmentation network) to replace traditional classifiers to improve recognition accuracy.
[0003] However, existing technologies still have the following shortcomings: First, the spatial resolution of satellite remote sensing images is typically on the order of meters to tens of meters, making it difficult to accurately depict the boundary details of seagrass bed patches, especially for small-scale patches, which is insufficient to meet the needs of ecological restoration site selection at a fine scale. Second, traditional unsupervised methods such as maximum likelihood and ISO clustering rely on manually set classification parameters, resulting in poor adaptability to different sea areas and different time phases of images, and insufficient generalization ability. While methods based on deep learning models such as SegNet have improved recognition accuracy, they still have the following limitations: the data source often depends on a single satellite image, which is significantly affected by cloud cover, tidal levels, and atmospheric correction errors; the segmentation results output by the model are in raster form with jagged boundaries, which cannot be directly converted into vector patches with smooth boundaries and correct topology, making it difficult to seamlessly integrate into the GIS (Geographic Information System) spatial analysis process; the model lacks robustness to underwater spectral variations (including changes in water turbidity, water depth differences, and fluctuations in bottom reflectance), resulting in poor consistency between shallow and deep water identification results. Third, existing research largely focuses on identifying the presence or type of seagrass beds, without establishing a standardized process to transform the identification results into spatial patch products that can directly serve ecological restoration site selection. A significant gap exists between remote sensing monitoring results and engineering applications. Therefore, there is an urgent need for a refined seagrass bed patch extraction method that integrates high-resolution remote sensing data sources with deep learning technology, possesses fine boundary extraction capabilities, and whose output can be directly used for GIS spatial analysis. Summary of the Invention
[0004] To address the aforementioned technical problems, this invention proposes a method for fine extraction of seagrass bed patches based on UAV hyperspectral and deep learning. This method solves the problems of insufficient boundary accuracy, single data source, and difficulty in directly using the output results for GIS spatial analysis in existing seagrass bed remote sensing identification methods. It enables fine extraction of seagrass bed patches, boundary regularization, and automatic output of standardized vector patches for remediation site selection.
[0005] This invention discloses a method for fine extraction of seagrass bed patches based on UAV hyperspectral and deep learning, comprising the following steps: Acquire UAV hyperspectral imagery and LiDAR (Light Detection and Ranging) water depth data, construct a water depth-spectral attenuation compensation model to perform water depth normalization correction on the hyperspectral imagery, and fuse it with the LiDAR water depth data to construct a multi-source feature map; A dual-branch semantic segmentation network is constructed. The first branch uses U-Net++ (nested U-Net) with embedded multi-scale channel-space serial attention modules to extract local detail features of the multi-source feature map. The second branch uses a lightweight Transformer with a cross-scale feature interaction mechanism to extract global semantic features of the multi-source feature map. The local detail features and the global semantic features are fused by adaptive gating to output the segmentation result. The dual-branch semantic segmentation network is used as the teacher network. Through self-supervised contrastive learning and attention distillation, the attention distribution is transferred to the student network with the same structure to obtain a lightweight segmentation model. The lightweight segmentation model outputs both classification results and attention weight map. A boundary probability constraint field is constructed based on the attention weight map. The boundary probability constraint field guides the conditional random field to refine the segmentation result. The raster segmentation result is obtained after morphological processing. The raster segmentation results are converted into vector surface layers, the vector boundaries are regularized, and a vector pattern of seagrass bed is generated, labeled with attributes, and then output.
[0006] In this scheme, the construction of multi-source feature maps specifically includes: The hyperspectral images acquired by the UAV are preprocessed with radiometric calibration, atmospheric correction, geometric correction and flare removal to obtain hyperspectral reflectance data. Simultaneously, airborne LiDAR water depth data is acquired. The LiDAR water depth data is spatially registered with the hyperspectral images and interpolated to a water depth raster layer. Based on the field measured sample plot data, a quantitative relationship between water depth and attenuation coefficient of each band is established, a water depth-spectral attenuation compensation function is constructed, and the hyperspectral reflectance data is normalized by water depth to obtain standard spectral reflectance data. The standard spectral reflectance data is superimposed with the water depth raster layer to form a joint feature tensor. The characteristic spectral bands of seagrass beds and vegetation indices are extracted as spectral feature channels. Water depth gradient feature map, spectral heterogeneity feature map and spatial neighborhood context feature map are constructed as derived feature channels. The spectral feature channels and the derived feature channels are spliced together to generate a multi-source feature map.
[0007] In this scheme, the first branch uses U-Net++ with an embedded multi-scale channel-spatial serial attention module to extract local detail features from the multi-source feature map, specifically including: A U-Net++ encoder-decoder backbone network is constructed. The encoder extracts encoder features at different scales from the multi-source feature map through multi-level downsampling. The decoder gradually restores the feature map resolution through multi-level upsampling and embeds a multi-scale channel-space serial attention module in each skip connection path. The channel attention submodule performs multi-scale pooling on the input feature map to extract channel responses under different receptive fields, fuses them to generate multi-scale channel attention weights, and multiplies them with the input feature map channel by channel to complete channel recalibration; The spatial attention submodule extracts a spatial response description map from the channel-recalibrated feature map, and generates a multi-scale spatial attention weight through multi-scale dilated convolution. The weight is then multiplied pixel-by-pixel with the channel-recalibrated feature map to complete the spatial recalibration, and outputs a doubly enhanced local detail feature map. After being processed by the attention module, each skip connection outputs enhanced feature maps of different scales to the corresponding level decoder. After the output feature maps of each level decoder are upsampled step by step to restore the input resolution, the output feature maps of all levels decoders are stitched and fused in the channel dimension to generate the local detail enhancement feature map of the first branch.
[0008] In this scheme, the second branch uses a lightweight Transformer that introduces a cross-scale feature interaction mechanism to extract the global semantic features of the multi-source feature map, specifically including: Using MobileNetV3 as the backbone network, hierarchical feature extraction is performed on the multi-source feature map to output a multi-level feature map. The multi-level feature maps are input to the corresponding cross-scale self-attention Transformer modules. After each scale Transformer module performs multi-head self-attention calculation in its own window, it performs cross-attention fusion between the current scale self-attention output and the self-attention output of the adjacent scale through the cross-scale interaction unit, so that shallow features absorb deep semantic information and deep features absorb shallow detail information. After cross-scale interaction, each scale outputs a cross-scale enhanced feature map. After restoring the cross-scale enhanced feature maps of all levels to a uniform spatial resolution, they are spliced and fused along the channel dimension to generate the global semantic enhanced feature map of the second branch.
[0009] In this scheme, the local detail features and the global semantic features are adaptively gated and fused to output the segmentation result, specifically including: The local detail enhancement feature map and the global semantic enhancement feature map are concatenated along the channel dimension to obtain a concatenated feature map. The spliced feature map is processed by global average pooling and convolutional layers respectively to extract the overall semantic context to guide the global tendency of the gating weights and the spatial distribution pattern to guide the local adjustment of the gating weights. The two are then merged to activate and generate the gating weight map. The local detail enhancement feature map and the global semantic enhancement feature map are adaptively weighted and fused using the gated weight map to obtain a multi-scale fused feature map. After the multi-scale fused feature map is upsampled to restore the original input resolution, it is then passed through a classification convolutional layer to output pixel-level segmentation results.
[0010] In this solution, a lightweight segmentation network is constructed, specifically as follows: Construct a lightweight student network with the same structure as the teacher network but a reduced number of channels; Positive and negative sample pairs are constructed based on water depth and spectral information in multi-source feature maps. The student network is pre-trained for self-supervised contrastive learning with triple constraints of spectral contrast loss, spatial contrast loss and cross-water depth contrast loss. Using the attention weight graphs output by each level of the teacher network as the distillation target, multi-level collaborative attention distillation is performed on the student network. The difference graphs of attention weight graphs of adjacent levels of the teacher network are calculated as the transfer of attention flow knowledge between levels. The correlation matrix between the attention weight graphs of each level of the teacher network is calculated as cross-scale consistent knowledge for transfer. Selective distillation is performed by constructing an uncertainty mask based on the confidence scores output by the teacher network. During the distillation training process, the decoder parameters of the teacher network and the student network are partially exchanged every preset round to achieve collaborative optimization between the two. After pre-training with self-supervised contrastive learning, multi-level attention co-distillation, and parameter exchange optimization, a lightweight segmentation model is obtained, which outputs pixel-level classification results and attention weight maps.
[0011] In this scheme, positive and negative sample pairs are constructed based on the water depth and spectral information in the multi-source feature maps, specifically as follows: The water depth is divided into several depth zones, and positive sample pairs are constructed by clustering based on spectral features within the same depth zone. Based on the water depth gradient feature map and the spectral heterogeneity feature map, the edge transition zone pixels of the patch are identified. The edge transition zone pixels and the core pixels inside the patch are formed into negative sample pairs, and the pixel pairs with water depth differences exceeding a preset threshold are marked as negative sample pairs.
[0012] In this scheme, the boundary probability constraint field guides the conditional random field to refine the segmentation result, and the raster segmentation result is obtained after morphological processing. Specifically: The attention weight maps output by each level of the lightweight segmentation model are unified to the original resolution, then weighted, fused, and normalized to obtain the fused attention weight map. Calculate the spatial gradient magnitude map of the fused attention weight map, perform double threshold processing on the gradient magnitude map to mark high-confidence boundary points, non-boundary points and undetermined boundary points, expand the high-confidence boundary points to form boundary seed regions, and use the undetermined boundary points as expansion candidate regions to form a boundary probability constraint field through region growth. Using the pixel category probability distribution of the segmentation result as a univariate potential function and the boundary probability constraint field as a modulation factor embedded in a binary potential function, a conditional random field model is constructed to refine the boundary of the segmentation result. The refined segmentation results are then subjected to morphological closing operations to fill holes, small noise patches to remove, and opening operations to smooth the contours, resulting in raster segmentation results.
[0013] In this solution, the raster segmentation result is converted into a vector surface layer, the vector boundaries are regularized, and a seagrass bed vector pattern is generated, specifically as follows: Extract the initial vector contour of each seagrass bed connected region from the grid segmentation results; Identify shared boundary segments between adjacent polygons. For non-shared boundary segments, use the Douglas-Puk algorithm to simplify them independently. For the shared boundary segments, merge the shared boundary coordinate point sequences of adjacent polygons into a common sequence and then perform Douglas-Puk simplification. The simplified common sequence is synchronously assigned to adjacent polygons so that the simplified boundaries of adjacent polygons remain completely coincident. Self-intersection detection is performed on the simplified vector contour. If self-intersection is detected, the vector contour is divided into multiple sub-loops and the sub-loop with the largest area is retained to obtain a seagrass bed vector pattern with smooth boundaries and correct topology.
[0014] In this solution, the seagrass bed vector image is generated, its attributes are labeled, and then output, specifically as follows: The seagrass bed vector plots are spatially overlaid with the LiDAR water depth raster layer to extract water depth information within the coverage area of each plot and label the average water depth and maximum water depth. Map the boundary of the patch to the boundary probability constraint field, and extract the boundary probability value of the boundary location to label the boundary confidence. The suitability score for restoration is calculated by weighting the area of the patch, average water depth, shape regularity and boundary confidence, and is divided into three levels: priority restoration area, candidate restoration area and alternative concern area. After writing all attribute information into the vector patch attribute table, output the results.
[0015] Compared with the prior art, the beneficial effects of the present invention are as follows: This invention constructs a water depth-spectral attenuation compensation model by introducing LiDAR water depth data, effectively eliminating the nonlinear interference of water attenuation on spectral signals. Combined with the construction of three types of derived features from multi-source feature maps—water depth gradient, spectral heterogeneity, and spatial neighborhood context—it significantly improves the model's recognition stability and boundary awareness under different water depth conditions. Through U-Net++ embedding a multi-scale channel-spatial serial attention module in the first branch and a lightweight Transformer introducing a cross-scale feature interaction mechanism in the second branch, it achieves a dynamic balance between local details and global semantics, significantly improving the boundary clarity and overall consistency of the segmentation results. Combined with self-supervised contrastive learning and attention distillation mechanisms, it effectively overcomes the limitation of insufficient labeled samples, improving the model's generalization ability and inference efficiency.
[0016] This invention refines the boundaries by transforming the attention weight map into a boundary probability constraint field to guide the conditional random field, achieving deep coupling between the segmentation boundary and the model's attention distribution, significantly improving the smoothness and positioning accuracy of the patch boundaries. Furthermore, it regularizes the vector boundaries using the topology-preserving Douglas-Puk algorithm, ensuring the topological consistency of adjacent patch boundaries, and the output vector patches can be directly used for GIS spatial analysis. Finally, it labels each patch with multi-dimensional attributes such as water depth, area, boundary confidence, and remediation suitability level, achieving seamless integration from remote sensing identification to remediation site selection. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments or examples of the present invention, the accompanying drawings used in the embodiments or examples will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained according to these drawings without creative effort.
[0018] Figure 1 A flowchart of a method for fine extraction of seagrass bed patches based on UAV hyperspectral and deep learning is shown. Figure 2 A flowchart is shown to extract local detail features from multi-source feature maps using U-Net++ with embedded multi-scale channel-space serial attention modules; Figure 3A flowchart is shown to extract global semantic features from multi-source feature maps using a lightweight Transformer that introduces a cross-scale feature interaction mechanism. Detailed Implementation
[0019] To better understand the above-mentioned objectives, features, and advantages of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other.
[0020] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and therefore the scope of protection of the invention is not limited to the specific embodiments disclosed below.
[0021] like Figure 1 As shown, this embodiment provides a method for fine extraction of seagrass bed patches based on UAV hyperspectral and deep learning, including: Acquire UAV hyperspectral imagery and LiDAR water depth data, construct a water depth-spectral attenuation compensation model to perform water depth normalization correction on the hyperspectral imagery, and fuse it with the LiDAR water depth data to construct a multi-source feature map.
[0022] It should be noted that a UAV equipped with a hyperspectral imager was used to vertically acquire hyperspectral remote sensing images of the target sea area during a meteorological window of low tide, cloudlessness, and calm sea surface. The acquired hyperspectral images cover the visible to near-infrared band (400~1000nm), with a spatial resolution better than 0.1m and a spectral resolution better than 5nm. The acquired raw hyperspectral images were preprocessed sequentially with radiometric calibration, atmospheric correction, geometric correction, and solar flare removal to obtain preprocessed hyperspectral reflectance data. , Indicates the band number. Water depth measurement data for the target sea area is acquired using an airborne LiDAR (Light Detection and Ranging) bathymetry system. The LiDAR water depth measurement data is spatially registered with the hyperspectral imagery. Nearest neighbor interpolation is then used to interpolate the discrete LiDAR water depth point cloud into a water depth raster layer with the same spatial resolution as the hyperspectral imagery. , Represents the spatial coordinates of a pixel.
[0023] Based on field-measured sample data, spectral reflectance curves of the same substrate type under different water depth conditions were extracted to establish a water depth... Attenuation coefficients for each band Quantitative relationship between And construct a water depth-spectral attenuation compensation function. ,in These are the spectral band weighting coefficients, set based on the penetration ability of each band in water. The water depth-spectral attenuation compensation function is used to apply the hyperspectral reflectance data. The spectral reflectance of each pixel in each band was normalized to water depth to obtain standard spectral reflectance data. The correction process eliminates the nonlinear interference of water body attenuation on the spectral signal, making the spectral response of the same substrate type under different water depth conditions more consistent.
[0024] Standard spectral reflectance data With water depth grid layer Band superposition is performed to form a joint depth-spectral characteristic tensor. The characteristic spectral bands of seagrass beds (including blue light band 450-490nm, green light band 520-560nm, red light band 650-690nm, and near-infrared band 800-900nm) and vegetation indices (normalized difference vegetation index NDVI and ratio vegetation index RVI) were extracted from the joint feature tensor and superimposed onto the joint feature tensor as spectral feature channels. Simultaneously, based on the water depth grid layer... Calculate the gradient magnitude of each pixel in the water depth direction. This characterizes the degree of seabed topographic variation and constructs a water depth gradient feature map. Based on standard spectral reflectance... The weighted average of the local coefficients of variation in each band within the neighborhood window is used as the spectral heterogeneity index. Construct a spectral heterogeneity feature map; calculate the mean of each feature value within a neighborhood window centered on each pixel. Standard deviation and the difference between the center pixel and the neighborhood mean A spatial neighborhood context feature map is constructed. The aforementioned spectral feature channels are then concatenated with the three types of derived feature channels along the channel dimension to form a multi-source feature map. The water depth gradient and spectral heterogeneity index in the edge region of the seagrass bed patch are significantly higher than those in the patch interior. These derived features provide important geometric constraints and edge enhancement information for subsequent boundary identification.
[0025] Multi-source feature maps The image is segmented using sliding windows at multiple scales (including 64×64 pixels, 128×128 pixels, and 256×256 pixels) to generate image patches with the same spatial resolution and containing complete feature channels. These patches serve as input samples for the subsequent dual-branch semantic segmentation network. This multi-scale segmentation strategy enables the model to simultaneously perceive the local details of small-scale patches and the spatial distribution patterns of large-scale patches.
[0026] A dual-branch semantic segmentation network is constructed. The first branch uses U-Net++ with embedded multi-scale channel-space serial attention modules to extract local detail features of the multi-source feature map. The second branch uses a lightweight Transformer with a cross-scale feature interaction mechanism to extract global semantic features of the multi-source feature map. The local detail features and the global semantic features are then fused by adaptive gating to output the segmentation result.
[0027] It should be noted that a dual-branch semantic segmentation network is constructed. For example... Figure 2 As shown, the first branch is a local detail feature extraction branch based on the improved U-Net++. A U-Net++ encoder-decoder backbone network is constructed. The encoder extracts encoder features at different scales from multi-source feature maps through multi-level downsampling, denoted as E1, E2, E3, and E4, with the spatial resolution halved and the number of channels doubling at each level. The decoder gradually restores the feature map resolution through multi-level upsampling, denoted as D1, D2, D3, and D4. A multi-scale channel-spatial serial attention module is embedded in each skip connection path. The multi-scale channel-spatial serial attention module adaptively recalibrates the channel and spatial dimensions of the multi-scale feature maps passed through the skip connections, enabling the network to automatically focus on the discriminative spectral features and key spatial locations of the seagrass bed, suppressing non-seagrass background and noise interference.
[0028] The processing flow of the multi-scale channel-spatial serial attention module is as follows: The input feature map first enters the channel attention submodule. The channel attention submodule performs global average pooling and two different scales of adaptive average pooling on the input feature map simultaneously to extract the channel responses under different receptive fields. The channel description vectors of the three scales are fed into a parameter-shared one-dimensional convolutional layer to learn the channel attention weights at each scale. Then, the channel attention weights learned at the three scales are adaptively weighted and fused to generate a multi-scale channel attention weight vector. The multi-scale channel attention weight vector is multiplied with the input feature map channel by channel in the channel dimension to complete the channel recalibration. The spatial attention submodule calculates the maximum and average values of the channel-recalibrated feature maps along the channel dimension, resulting in two spatial description maps. The difference between the maximum and average values is calculated to obtain a spatial response difference map. The average and difference description maps are concatenated along the channel dimension and processed through convolutional layers and activation functions to generate a preliminary spatial attention weight map. Multiple dilated convolutions with different dilation rates are then processed in parallel to extract the spatial weight distribution under different receptive fields. The outputs of the multi-scale dilated convolutions are fused to generate a multi-scale spatial attention weight map, which is then multiplied pixel-by-pixel with the channel-recalibrated feature maps to complete spatial recalibration, outputting a local detail feature map with dual channel-spatial enhancement. Each skip connection, after processing by the multi-scale channel-spatial serial attention module, outputs enhanced feature maps at different scales to the corresponding decoder level. These enhanced feature maps are denoted as A1, A2, A3, and A4. The output feature maps of each decoder level are upsampled stepwise to restore the input resolution. Finally, the output feature maps of all decoder levels are concatenated and fused along the channel dimension, and after fusion through convolutional layers, the local detail enhancement feature map of the first branch is generated. .
[0029] like Figure 3As shown, the second branch is a global semantic feature extraction branch based on a lightweight Transformer. Using MobileNetV3 as the backbone network, hierarchical feature extraction is performed on multi-source feature maps, outputting multi-level feature maps, denoted as M1, M2, M3, and M4, with spatial resolution decreasing and channel number increasing progressively. Each level of feature map is input into its corresponding cross-scale self-attention Transformer module. Each scale Transformer module performs multi-head self-attention computation within its respective window to obtain the self-attention output features at the current scale. The cross-scale interaction unit adjusts the self-attention output features of adjacent scales (including the previous and next layers) to the same spatial resolution as the current scale through upsampling or downsampling operations, and projects them onto a unified feature space through linear mapping. Cross-attention computation is performed using the self-attention output of the current scale as the query and the self-attention outputs of adjacent scales as the key and value, enabling each pixel at the current scale to aggregate information from the feature maps of adjacent scales. The cross-attention output is then residually connected and fused with the original self-attention output of the current scale to form an enhanced feature that integrates cross-scale information. The cross-scale interactions are performed sequentially from shallowest to deepest layers, with each scale outputting a cross-scale enhanced feature map after the cross-scale interaction. All cross-scale enhanced feature maps from all levels are upsampled to a uniform spatial resolution, then concatenated along the channel dimension and fused through a convolutional layer to generate the global semantic enhanced feature map for the second branch. .
[0030] Enhance local detail feature maps With global semantic enhancement feature map The input is fed into the adaptive gating feature fusion module. First, the input is... and The concatenated feature maps are obtained by concatenating them along the channel dimension. These concatenated feature maps are then passed sequentially through global average pooling and fully connected layers to extract the overall semantic context, guiding the global tendency of the gating weights. Simultaneously, the concatenated feature maps are directly passed through convolutional layers to extract spatial distribution patterns, guiding the local adjustment of the gating weights. The outputs of the two paths are added and fused, and then processed through an activation function to generate the gating weight map. Gating weight graph The value at each spatial location ranges from 0 to 1, representing the degree of dependence of that location on local detail features. This is achieved using a gated weight map. right and Perform adaptive weighted fusion, the fusion method is as follows , This indicates pixel-wise multiplication. In the edge region of seagrass bed patches, the gating weights are automatically biased towards local detail features. Increasing the value makes the boundary more refined; in homogeneous regions within the patch, the gating weights automatically bias towards global semantic features ( Decreasing the value makes the internal filling more consistent. This will fuse the feature maps. After upsampling to restore the original input resolution, the features are mapped to the category space by a classification convolutional layer, and pixel-level segmentation results are output. Each pixel is assigned a category label of seagrass bed or background, and the corresponding confidence score is also output.
[0031] The dual-branch semantic segmentation network is used as the teacher network. Through self-supervised contrastive learning and attention distillation, the attention distribution is transferred to the student network with the same structure to obtain a lightweight segmentation model. The lightweight segmentation model outputs both classification results and attention weight map.
[0032] It should be noted that the trained dual-branch semantic segmentation network described above is used as the teacher network. A student network with the same structure as the teacher network but with a reduced number of channels is constructed. The number of convolutional channels in each layer of U-Net++ is reduced to half that of the teacher network, the number of window self-attention heads in the Transformer is reduced to half that of the teacher network, and the scale level of cross-scale interaction is reduced by one level. After modification, the number of parameters in the student network is approximately one-third to one-quarter of that in the teacher network.
[0033] First, positive and negative sample pairs are constructed based on water depth and spectral information from multi-source feature maps, and the student network is pre-trained using self-supervised contrastive learning. The strategy for constructing positive sample pairs is as follows: the network is divided into several water depth zones, and clustering is performed within the same water depth zone based on distance in the hyperspectral feature space. The pixel closest to the center in the clustering result is used as the anchor point, and other pixels within the same cluster are considered positive samples. This strategy utilizes water depth information as a priori constraint to address the semantic confusion caused by blindly searching for positive samples in traditional contrastive learning. The strategy for constructing negative sample pairs is as follows: pixels in the edge transition zone of the patch are identified based on the water depth gradient feature map and the spectral heterogeneity feature map. These edge transition zone pixels are paired with the core pixels within the patch to form negative sample pairs, and pixel pairs with water depth differences exceeding a preset threshold are marked as negative sample pairs. This strategy utilizes the physical constraints provided by water depth information to ensure that the model does not misclassify non-seagrass substrates under different water depth conditions as seagrass beds. Self-supervised contrastive learning pre-training of the student network was performed using triple constraints: spectral contrast loss, spatial contrast loss, and cross-depth contrast loss. For anchor point samples... Its positive samples are The negative sample set is In the spectral feature space, the similarity between the anchor point and the positive sample, as well as the similarity between the anchor point and each negative sample, are calculated. The spectral contrast loss function is: , in , These are the normalized feature vectors extracted from anchor samples and positive samples by the student network encoder and projected onto the contrastive learning feature space, respectively. For temperature coefficient, For the first Each negative and positive sample is extracted by the student network encoder and projected onto a normalized feature vector in the contrastive learning feature space. This is the set of negative samples.
[0034] Using pixel pairs at different locations within the same image patch as positive sample pairs and pixel pairs from different image patches as negative sample pairs, the spatial contrast loss function is: , in anchor point The set of all positive and negative samples.
[0035] Pixels labeled with the same substrate category in different depth zones are used as positive sample pairs, and pixels with different substrate categories in different depth zones are used as negative sample pairs. The cross-depth contrast loss function is: , in This is a negative sample set spanning water depth.
[0036] Then, using the attention weight maps output by each level of the teacher network as distillation targets, multi-level collaborative attention distillation is performed on the student network. The multi-scale spatial attention weight maps output by the spatial attention modules in the skip connections of each level of the decoder and the gating weight maps of the adaptive gating fusion module are used as the main distillation targets. The difference graphs between adjacent levels of the teacher network's attention weight maps are calculated. As a way to transfer knowledge of attention flow between levels, , They represent the first Layer, First The hierarchical attention weight map and difference map reflect the direction of change in attention information as it is transmitted between levels, including where the attention response strengthens or weakens with increasing hierarchy. The student network needs to approximate the attention flow direction between adjacent levels of the teacher network, and the loss function is... ,in , These are difference graphs of attention weights at adjacent levels in the teacher network and student network, respectively. The correlation matrix between the attention weight graphs at each level of the teacher network is calculated. As a form of cross-scale consistent knowledge transfer, in which , The first Each level, the first Single-channel spatial attention weight map at each level, This is the matrix transpose. The teacher network's attention response to the same patch at different scales should maintain spatial consistency, and the student network's cross-scale correlation matrix needs to be aligned accordingly. The loss function is... ,in , The correlation matrix between the attention weight maps of each level in the teacher network and student network is provided to avoid missing small-scale patches due to reduced feature representation ability after lightweighting. An uncertainty mask is constructed based on the confidence score output by the teacher network. Regions with confidence levels higher than a preset high threshold are considered high-confidence regions. Distillation weights are relatively high; regions with confidence levels below a preset low threshold are considered uncertain regions. The distillation weights are relatively low, avoiding the forced transfer of noisy attention distributions from the teacher network in uncertain regions to the student network. The loss function is... ,in , These are the attention weight maps output by the teacher network and the student network, respectively. The total loss function is... ,in In order to ensure the proper division of losses, These are the weighting coefficients for each type of loss.
[0037] During the distillation training process, at preset rounds, the decoder parameters of the teacher network and the student network are partially exchanged. The decoder parameters of the student network are then averaged to the teacher network with a small weighting, and vice versa, achieving collaborative optimization between the two. This breaks the traditional distillation model of one-way output from the teacher network and one-way reception from the student network, enabling the teacher network to continuously provide more valuable attentional knowledge in the later stages of distillation through bidirectional information flow. After the above self-supervised contrastive learning pre-training, multi-level attentional collaborative distillation, and parameter exchange optimization, a lightweight segmentation model is obtained. The lightweight segmentation model outputs pixel-level classification results and corresponding attention weight maps during the inference phase.
[0038] A boundary probability constraint field is constructed based on the attention weight map, and a conditional random field is used to guide the segmentation result to refine the boundary. The raster segmentation result is obtained after morphological processing.
[0039] It should be noted that the attention weight maps output by each level of the lightweight segmentation model are upsampled to the original input resolution. The maximum response value in the channel dimension is taken for each level's attention weight map to obtain the single-channel spatial attention map for each level. Then, the single-channel spatial attention maps from multiple levels are weighted and fused. Shallow attention weights are assigned higher coefficients to highlight edge responses, while deeper attention weights are assigned lower coefficients to provide overall structural constraints, resulting in the fused attention weight map. Each value at a given position ranges from 0 to 1, with higher values indicating greater model attention to that position. (This is related to the fusion attention weight map.) Spatial normalization is performed to obtain the normalized fusion attention weight map. .
[0040] Calculate the normalized fusion attention weight map Spatial gradient magnitude map Because the attention weight map has a uniform response within the seagrass bed patch and exhibits a sharp change in response at the edges, the gradient magnitude map shows a high response at the edges and a low response within the interior and background. It is itself a boundary probability indicator map. (Regarding the gradient magnitude map) A dual-threshold processing method is applied, setting a high threshold and a low threshold. Pixels with gradient magnitudes higher than the high threshold are marked as high-confidence boundary points, pixels with gradient magnitudes lower than the low threshold are marked as non-boundary points, and pixels between the high and low thresholds are marked as undetermined boundary points. Morphological dilation is performed on the high-confidence boundary points to form boundary seed regions. Using the undetermined boundary points as expansion candidate regions, a region growing algorithm is used to extend the boundary seed regions along the direction of the undetermined boundary points, forming a complete boundary response band, thus obtaining the boundary probability constraint field. Each pixel takes a value between 0 and 1. A higher value indicates a greater probability that the pixel is located at the boundary of the seagrass bed patch.
[0041] The class probability distribution of each pixel in the pixel-level classification result output by the lightweight segmentation model is used as a univariate potential function. A boundary probability constraint field is used. A conditional random field (CRF) model is constructed by embedding a binary potential function as a modulation factor. The energy function of the constructed CRF is: ,in The set of labels for all pixels. To indicate the first Category labels are assigned to each pixel, with 0 for background and 1 for seaweed beds. It is a univariate potential function. Let be a bivariate potential function. A univariate potential function is defined as: , The output of the lightweight segmentation model Each pixel belongs to the category The probability of the binary potential function is determined by the following: for any pair of adjacent pixels... The spectral differences and spatial distances in the multi-source feature space are calculated to obtain a conventional similarity measure. At the same time, the boundary probability values at these two pixel locations are queried in the boundary probability constraint field. and . ,in For tag compatibility functions, when The value is 1 if it is true, and 0 otherwise. The spatial distance kernel function, The kernel function is a spectral similarity function, calculated based on the spatial distance and feature differences between adjacent pixels. For boundary constraint kernel functions, based on boundary probability constraint fields The calculation is expressed as: ,in and pixels Boundary probability values in a boundary probability constrained field These are the weighting coefficients.
[0042] When the boundary probability value of any pixel in an adjacent pixel pair is higher than a preset threshold, the binary potential function reduces the penalty for label consistency, allowing pixels on both sides of the boundary to be assigned different class labels, thus preserving sharp boundaries. When the boundary probability values of both pixels in an adjacent pixel pair are lower than the preset threshold, the binary potential function strengthens the penalty for label consistency, encouraging adjacent pixels to have the same class label, thus ensuring the smoothness of the patch interior and background region. For adjacent pixel pairs located within the high-confidence boundary band in the boundary probability constraint field, the binary potential function further reduces the consistency penalty. The conditional random field is solved iteratively using a mean-field approximation inference algorithm, and after a preset number of iterations and convergence, the refined pixel-level classification result is output.
[0043] The refined segmentation results are then subjected to morphological closing operations to fill the internal holes of the patches. The closing operation is a combination of dilation and erosion. Dilation expands the patch boundary outwards to fill internal holes and small cracks, while erosion shrinks the expanded boundary back to its original size while maintaining the filled holes. Connectivity analysis is then performed to identify all independent connected regions, and regions with an area smaller than a preset threshold are identified as noise patches and deleted. Finally, opening operations are performed to smooth the patch contours and cut off small connecting necks. Opening is a combination of erosion and dilation. Erosion removes small protrusions and connecting necks at the patch edges, while dilation restores the patches to their original size while smoothing the contours. These processes result in a raster segmentation result with smooth boundaries, intact interiors, and no noise interference. The seagrass bed area is marked as 1, and the background area is marked as 0.
[0044] The raster segmentation results are converted into vector surface layers, the vector boundaries are regularized, and a vector pattern of seagrass bed is generated, labeled with attributes, and then output.
[0045] It should be noted that a contour tracing algorithm is used to traverse the boundary line between the seagrass bed region marked as 1 and the background region marked as 0 in the raster segmentation result. The algorithm tracks the boundary line pixel by pixel, recording the sequence of pixel coordinates along the boundary line to form a closed vector loop. Each closed loop corresponds to the initial contour of an independent seagrass bed vector patch. For raster segmentation results containing multiple independent patches, contour tracing is performed on each connected region to obtain the initial vector contour of each patch.
[0046] In identifying the vector contours of two independent features, the portions where the coordinate point sequences overlap or are close within a certain distance tolerance are considered shared boundary segments between adjacent features. For non-shared independent boundary segments, a conventional Douglas-Puk algorithm is used for simplification. While maintaining the overall shape of the boundary, points that contribute the least to the overall shape are iteratively removed to reduce the number of boundary points and eliminate jagged edges. For shared boundary segments, the shared boundary coordinate point sequences of adjacent features are merged into a common sequence. Douglas-Puk simplification is then performed on the common sequence, and the simplified common sequence is simultaneously assigned to the shared boundary of the two adjacent features. Due to the synchronous simplification of shared boundary segments, the boundaries of adjacent features remain completely overlapping after simplification, without any overlap or gaps, thus maintaining topological consistency. Self-intersection detection is performed on the simplified vector contours: each feature's vector contour is checked one by one to detect whether there are self-intersection points. If a self-intersection is detected, the self-intersection contour is divided into multiple sub-loops using the self-intersection point as the dividing point. The sub-loop with the largest area is retained as a valid feature, while smaller self-intersection anomalous sub-loops are deleted. The above processing yields a seagrass bed vector pattern with smooth boundaries and correct topology. , This represents the number of image patches.
[0047] Vector image With LiDAR water depth grid layer Perform spatial overlay analysis for each vector patch. Extract all water depth pixel values within the covered area, calculate the average and maximum water depth, and annotate them to the attribute fields of the vector patch. Map the vector patch boundaries back to the boundary probability constraint field. The boundary probability values of each pixel on the boundary are extracted, and the mean and minimum of the boundary probabilities of all boundary pixels are calculated as the boundary confidence index of the patch. The higher the boundary confidence, the higher the reliability of the patch boundary location. A restoration suitability score is calculated based on a weighted average of four factors: patch area, average water depth, shape regularity, and boundary confidence. The specific calculation method for the restoration suitability score is as follows: For each seagrass bed vector patch, its four attributes—area, average water depth, shape regularity, and boundary confidence—are obtained, and scoring functions are constructed to map each factor to a unified scoring range of 0 to 1. The area suitability score uses a trapezoidal membership function, with the highest score when the area of the patch falls within the preset target restoration area range, and the score decreasing linearly when the area is too small or too large. The water depth suitability score also uses a trapezoidal membership function, with the highest score when the average water depth of the patch falls within the suitable water depth range for seagrass bed growth, and the score decreasing linearly when the water depth is too shallow or too deep. The shape regularity score directly uses the compactness index, which is the ratio of the patch area to the area of its smallest bounding rectangle; the closer the ratio is to 1, the more regular the shape. The boundary confidence score directly uses the mean boundary probability of the patch boundary in the boundary probability constraint field; the higher the value, the higher the confidence of the boundary location. The comprehensive restoration suitability score is a weighted sum of the above four scores, with the sum of the four weight coefficients being 1. The weights of each factor are adjusted according to the actual needs of restoration site selection. Based on the scores, the patches are divided into three levels: priority restoration areas, candidate restoration areas, and alternative areas of concern. All attribute information (including unique patch number, spatial geometric attributes, water depth attributes, boundary confidence level, and remediation suitability level) is written into the attribute table of the vector patch layer. Each vector patch corresponds to one attribute record. The output is in standard GIS format and can be directly imported into mainstream GIS platforms for spatial analysis, mapping and display, and remediation site selection design.
[0048] In another preferred embodiment of the present invention, a multi-substrate fuzzy boundary determination module is constructed for complex substrate environments in which seagrass beds are adjacent to or interspersed with coral reefs, sandy bottoms, etc.
[0049] During the boundary refinement process of the conditional random field (CRF), a buffer zone of a preset width is extended to both sides along the boundary of the patch. Pixels located on both sides of the boundary within the buffer zone are marked as the inner pixel set and the outer pixel set, respectively. The probability distribution of various substrate types in the two sets is calculated. The difference between the probability distributions on both sides of the boundary is calculated. When the difference is lower than a preset threshold, the boundary segment is determined to be a fuzzy boundary segment. For regions determined to be fuzzy boundary segments, samples are taken pixel by pixel along the boundary normal direction. The difference between the probability distributions of substrate types on both sides at each sampling position is statistically analyzed. The distance between the sampling position and the boundary when the difference first exceeds the preset threshold is determined as the transition zone width. The confidence index of the patch boundary is adjusted according to the transition zone width. When the transition zone is less than a first width threshold, it is marked as a high-confidence boundary; when it is between the first and second width thresholds, it is marked as a medium-confidence boundary; and when it is greater than the second width threshold, it is marked as a low-confidence boundary. The low-confidence boundary segment is marked as a boundary to be verified on-site. The boundary confidence and adjacent substrate type information are written into the vector patch attribute table.
[0050] Vector plots of seagrass beds were acquired at multiple time points and unified to the same spatial coordinate system. Spatial overlay analysis was performed on vector plots from adjacent time phases. The type of change was determined based on the spatial overlap between plots. If a plot from a previous time phase has a corresponding plot in a subsequent time phase with a spatial overlap greater than a preset threshold, it is considered a stable plot; otherwise, it is considered a disappeared plot. Conversely, if a plot in a subsequent time phase has a corresponding plot from a previous time phase, it is considered a stable plot; otherwise, it is considered a newly added plot.
[0051] For stable patches, the area change rate and boundary displacement distance are calculated. The seagrass bed change trend is determined based on the area change rate and boundary displacement distance: area growth with outward boundary expansion is considered an expansion trend; area shrinkage with inward boundary contraction is considered a retreat trend; and relatively stable area and boundary are considered a stable trend. The change type, area change rate, boundary displacement distance, and change trend are labeled in the attribute fields of each patch. Multi-temporal patch change information is aggregated by spatial location to generate a seagrass bed temporal change map, outputting a dynamic monitoring report containing the total seagrass bed area temporal change curve and statistical distribution data of each trending patch.
[0052] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for fine extraction of seagrass bed patches based on UAV hyperspectral and deep learning, characterized in that, Includes the following steps: Acquire UAV hyperspectral imagery and LiDAR water depth data, construct a water depth-spectral attenuation compensation model to perform water depth normalization correction on the hyperspectral imagery, and fuse it with the LiDAR water depth data to construct a multi-source feature map. A dual-branch semantic segmentation network is constructed. The first branch uses U-Net++ with embedded multi-scale channel-space serial attention module to extract local detail features of the multi-source feature map. The second branch uses a lightweight Transformer with cross-scale feature interaction mechanism to extract global semantic features of the multi-source feature map. The local detail features and the global semantic features are fused by adaptive gating to output the segmentation result. The dual-branch semantic segmentation network is used as the teacher network. Through self-supervised contrastive learning and attention distillation, the attention distribution is transferred to the student network with the same structure to obtain a lightweight segmentation model. The lightweight segmentation model outputs both classification results and attention weight map. A boundary probability constraint field is constructed based on the attention weight map. The boundary probability constraint field guides the conditional random field to refine the segmentation result. The raster segmentation result is obtained after morphological processing. The raster segmentation results are converted into vector surface layers, the vector boundaries are regularized, and a vector pattern of seagrass bed is generated, labeled with attributes, and then output.
2. The method for fine extraction of seagrass bed patches based on UAV hyperspectral and deep learning according to claim 1, characterized in that, Constructing multi-source feature maps specifically includes: The hyperspectral images acquired by the UAV are preprocessed with radiometric calibration, atmospheric correction, geometric correction and flare removal to obtain hyperspectral reflectance data. Simultaneously, airborne LiDAR water depth data is acquired. The LiDAR water depth data is spatially registered with the hyperspectral images and interpolated to a water depth raster layer. Based on the field measured sample plot data, a quantitative relationship between water depth and attenuation coefficient of each band is established, a water depth-spectral attenuation compensation function is constructed, and the hyperspectral reflectance data is normalized by water depth to obtain standard spectral reflectance data. The standard spectral reflectance data is superimposed with the water depth raster layer to form a joint feature tensor. The characteristic spectral bands of seagrass beds and vegetation indices are extracted as spectral feature channels. Water depth gradient feature map, spectral heterogeneity feature map and spatial neighborhood context feature map are constructed as derived feature channels. The spectral feature channels and the derived feature channels are spliced together to generate a multi-source feature map.
3. The method for fine extraction of seagrass bed patches based on UAV hyperspectral and deep learning according to claim 1, characterized in that, The first branch extracts local detail features from the multi-source feature map using U-Net++ with embedded multi-scale channel-spatial serial attention modules, specifically including: A U-Net++ encoder-decoder backbone network is constructed. The encoder extracts encoder features at different scales from the multi-source feature map through multi-level downsampling. The decoder gradually restores the feature map resolution through multi-level upsampling and embeds a multi-scale channel-space serial attention module in each skip connection path. The channel attention submodule performs multi-scale pooling on the input feature map to extract channel responses under different receptive fields, fuses them to generate multi-scale channel attention weights, and multiplies them with the input feature map channel by channel to complete channel recalibration; The spatial attention submodule extracts a spatial response description map from the channel-recalibrated feature map, and generates a multi-scale spatial attention weight through multi-scale dilated convolution. The weight is then multiplied pixel-by-pixel with the channel-recalibrated feature map to complete the spatial recalibration, and outputs a doubly enhanced local detail feature map. After being processed by the attention module, each skip connection outputs enhanced feature maps of different scales to the corresponding level decoder. After the output feature maps of each level decoder are upsampled step by step to restore the input resolution, the output feature maps of all levels decoders are stitched and fused in the channel dimension to generate the local detail enhancement feature map of the first branch.
4. The method for fine extraction of seagrass bed patches based on UAV hyperspectral and deep learning according to claim 1, characterized in that, The second branch uses a lightweight Transformer that introduces a cross-scale feature interaction mechanism to extract global semantic features from the multi-source feature map, specifically including: Using MobileNetV3 as the backbone network, hierarchical feature extraction is performed on the multi-source feature map to output a multi-level feature map. The multi-level feature maps are input to the corresponding cross-scale self-attention Transformer modules. After each scale Transformer module performs multi-head self-attention calculation in its own window, it performs cross-attention fusion between the current scale self-attention output and the self-attention output of the adjacent scale through the cross-scale interaction unit, so that shallow features absorb deep semantic information and deep features absorb shallow detail information. After cross-scale interaction, each scale outputs a cross-scale enhanced feature map. After restoring the cross-scale enhanced feature maps of all levels to a uniform spatial resolution, they are spliced and fused along the channel dimension to generate the global semantic enhanced feature map of the second branch.
5. The method for fine extraction of seagrass bed patches based on UAV hyperspectral and deep learning according to claim 1, characterized in that, The local detail features and the global semantic features are fused using adaptive gating to output the segmentation result, specifically including: The local detail enhancement feature map and the global semantic enhancement feature map are concatenated along the channel dimension to obtain the concatenated feature map. The spliced feature map is processed by global average pooling and convolutional layers respectively to extract the overall semantic context to guide the global tendency of the gating weights and the spatial distribution pattern to guide the local adjustment of the gating weights. The two are then merged to activate and generate the gating weight map. The local detail enhancement feature map and the global semantic enhancement feature map are adaptively weighted and fused using the gated weight map to obtain a multi-scale fused feature map. After the multi-scale fused feature map is upsampled to restore the original input resolution, it is then passed through a classification convolutional layer to output pixel-level segmentation results.
6. The method for fine extraction of seagrass bed patches based on UAV hyperspectral and deep learning according to claim 1, characterized in that, Construct a lightweight segmentation network, specifically as follows: Construct a lightweight student network with the same structure as the teacher network but a reduced number of channels; Positive and negative sample pairs are constructed based on water depth and spectral information in multi-source feature maps. The student network is pre-trained for self-supervised contrastive learning with triple constraints of spectral contrast loss, spatial contrast loss and cross-water depth contrast loss. Using the attention weight graphs output by each level of the teacher network as the distillation target, multi-level collaborative attention distillation is performed on the student network. The difference graphs of attention weight graphs of adjacent levels of the teacher network are calculated as the transfer of attention flow knowledge between levels. The correlation matrix between the attention weight graphs of each level of the teacher network is calculated as cross-scale consistent knowledge for transfer. Selective distillation is performed by constructing an uncertainty mask based on the confidence scores output by the teacher network. During the distillation training process, the decoder parameters of the teacher network and the student network are partially exchanged every preset round to achieve collaborative optimization between the two. After pre-training with self-supervised contrastive learning, multi-level attention co-distillation, and parameter exchange optimization, a lightweight segmentation model is obtained, which outputs pixel-level classification results and attention weight maps.
7. The method for fine extraction of seagrass bed patches based on UAV hyperspectral and deep learning according to claim 6, characterized in that, Positive and negative sample pairs are constructed based on the water depth and spectral information in the multi-source feature maps, specifically as follows: The water depth is divided into several depth zones, and positive sample pairs are constructed by clustering based on spectral features within the same depth zone. Based on the water depth gradient feature map and the spectral heterogeneity feature map, the edge transition zone pixels of the patch are identified. The edge transition zone pixels and the core pixels inside the patch are formed into negative sample pairs, and the pixel pairs with water depth differences exceeding a preset threshold are marked as negative sample pairs.
8. The method for fine extraction of seagrass bed patches based on UAV hyperspectral and deep learning according to claim 1, characterized in that, The boundary refinement of the segmentation result is performed using a conditional random field guided by the boundary probability constraint field, followed by morphological processing to obtain the raster segmentation result, specifically: The attention weight maps output by each level of the lightweight segmentation model are unified to the original resolution, then weighted, fused, and normalized to obtain the fused attention weight map. Calculate the spatial gradient magnitude map of the fused attention weight map, perform double threshold processing on the gradient magnitude map to mark high-confidence boundary points, non-boundary points and undetermined boundary points, expand the high-confidence boundary points to form boundary seed regions, and use the undetermined boundary points as expansion candidate regions to form a boundary probability constraint field through region growth. Using the pixel category probability distribution of the segmentation result as a univariate potential function and the boundary probability constraint field as a modulation factor embedded in a binary potential function, a conditional random field model is constructed to refine the boundary of the segmentation result. The refined segmentation results are then subjected to morphological closing operations to fill holes, small noise patches to remove, and opening operations to smooth the contours, resulting in raster segmentation results.
9. The method for fine extraction of seagrass bed patches based on UAV hyperspectral and deep learning according to claim 1, characterized in that, The raster segmentation result is converted into a vector surface layer, and the vector boundaries are regularized to generate a seagrass bed vector pattern, specifically: Extract the initial vector contour of each seagrass bed connected region from the grid segmentation results; Identify shared boundary segments between adjacent polygons. For non-shared boundary segments, use the Douglas-Puk algorithm to simplify them independently. For the shared boundary segments, merge the shared boundary coordinate point sequences of adjacent polygons into a common sequence and then perform Douglas-Puk simplification. The simplified common sequence is synchronously assigned to adjacent polygons so that the simplified boundaries of adjacent polygons remain completely coincident. Self-intersection detection is performed on the simplified vector contour. If self-intersection is detected, the vector contour is divided into multiple sub-loops and the sub-loop with the largest area is retained to obtain a seagrass bed vector pattern with smooth boundaries and correct topology.
10. The method for fine extraction of seagrass bed patches based on UAV hyperspectral and deep learning according to claim 9, characterized in that, After generating and annotating the attributes of the seagrass bed vector plots, the output is as follows: The seagrass bed vector plots are spatially overlaid with the LiDAR water depth raster layer to extract water depth information within the coverage area of each plot and label the average water depth and maximum water depth. Map the boundary of the patch to the boundary probability constraint field, and extract the boundary probability value of the boundary location to label the boundary confidence. The suitability score for restoration is calculated by weighting the area of the patch, average water depth, shape regularity and boundary confidence, and is divided into three levels: priority restoration area, candidate restoration area and alternative concern area. After writing all attribute information into the vector patch attribute table, output the results.