High-resolution image-oriented small and micro wetland ground feature type identification method, apparatus and device, and medium
By constructing the SwinLPA semantic segmentation network and combining local and global attention mechanisms with a refinement module, the problem of low accuracy in identifying land cover types in small wetlands was solved, achieving high-precision and stable identification results.
Patent Information
- Application Number
- CN202511794000.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-02
- Publication Date
- 2025-12-30
AI Technical Summary
Existing technologies struggle to accurately identify land cover types in small wetlands. Traditional methods are inefficient and highly subjective, while deep learning models are prone to losing details when processing small targets, and their attention mechanisms are insensitive to local conditions, making it difficult to balance positioning accuracy with map integrity.
We employ the SwinLPA semantic segmentation network, combining local and global attention mechanisms and refinement modules. By fusing high spatial resolution panchromatic images and multispectral images, we construct a pixel-annotated dataset. Furthermore, we embed a local-global parallel attention mechanism into the Swin-Transformer encoder-decoder architecture to enhance sensitivity to small targets and edge accuracy.
It achieves high-precision and robust extraction of land cover types in small wetlands under complex backgrounds, and can output high-precision segmentation results from a single sample, thus improving the accuracy and stability of identification.
Smart Images

Figure CN121236627A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of small and micro wetland species identification, and particularly relates to a small and micro wetland feature type identification method, device and equipment for high-resolution images and a medium. BACKGROUND
[0002] With the continuous progress of remote sensing technology and sensor performance, high spatial resolution remote sensing images available to society are increasingly rich.
[0003] However, the wetland ecosystem itself has high spectral heterogeneity and spatial fragmentation characteristics - wetland patches often present a discrete, small and irregular distribution pattern, especially in urban edges or agricultural landscapes. And small and micro wetlands are often only a few pixels in high-resolution images, and their spectral features are similar to those of paddy fields, ditches, under-forest water, etc., and their boundaries are blurred, so they are easily ignored, misjudged or merged in traditional remote sensing interpretation.
[0004] Further, although high-resolution images provide fine spatial details, traditional methods (such as manual interpretation, SVM, random forest) are still limited by low efficiency, strong subjectivity and weak generalization ability, and mostly use pixel-derived features, which may not be sufficient to accurately identify wetlands with high environmental heterogeneity, so it is difficult to automatically extract small and micro wetlands with high precision; and existing deep learning models (such as U-Net, DeepLab) are prone to lose details due to large receptive fields when processing small and micro targets, attention mechanisms are not sensitive to local areas, and upsampling produces edge jaggies, making it difficult to balance positioning accuracy and patch integrity. Therefore, it is urgent to propose a small and micro wetland feature type identification method for high-resolution images. SUMMARY
[0005] The present application provides a small and micro wetland feature type identification method, device, equipment and medium for high-resolution images, which solves the technical problem of low accuracy of small and micro wetland feature type identification in the prior art, and achieves the technical effect of improving the accuracy of small and micro wetland feature type identification.
[0006] In a first aspect, the present application provides a small and micro wetland feature type identification method for high-resolution images, comprising: Obtaining multispectral and panchromatic high-resolution satellite images of a target area and preprocessing to obtain a small and micro wetland remote sensing semantic segmentation dataset, wherein the small and micro wetland remote sensing semantic segmentation dataset includes a plurality of high-resolution remote sensing images, each high-resolution remote sensing image containing feature type labels; The SwinLPA semantic segmentation network is constructed, wherein the SwinLPA semantic segmentation network is based on a Swin-Transformer and introduces a local-global attention mechanism, and outputs an inference result through a refining module, wherein the local-global attention mechanism adopts a double-path design, and the double-path design includes local division and global parallel perception; The SwinLPA semantic segmentation network is constructed, wherein the SwinLPA semantic segmentation network is based on a Swin-Transformer and introduces a local-global attention mechanism, and outputs an inference result through a refining module, wherein the local-global attention mechanism adopts a double-path design, and the double-path design includes local division and global parallel perception;
[0007] Further, the multispectral and panchromatic high-resolution satellite images of the target area are obtained and preprocessed to obtain the small and micro wetland remote sensing semantic segmentation dataset, including: When the average cloud cover is less than the preset cloud cover, the multispectral image and the panchromatic image at the target area are obtained; The multispectral image and the panchromatic image are radiometrically calibrated, and the multispectral image is atmospherically corrected; The multispectral image and the panchromatic image are fused to obtain a spatial spectral image; The ground object samples in the spatial spectral image are labeled according to the ground object types; The spatial spectral image is cropped according to the preset pixels to obtain a plurality of 512x512 size high-resolution remote sensing images, and the high-resolution remote sensing images are collected to obtain the small and micro wetland remote sensing semantic segmentation dataset.
[0008] Further, the SwinLPA semantic segmentation network is constructed, including: Based on the symmetric encoder and decoder architecture, the basic framework of the SwinLPA semantic segmentation network is constructed; The encoder is based on a four-level Swin-Transformer module, which is down-sampled and embedded with a local-global parallel attention module, wherein the local-global parallel attention module is used to enhance feature expression, and the Swin-Transformer module simultaneously adopts a W-MSA window and a SW-MSA window; The decoder recovers the resolution by up-sampling, and introduces a skip connection at the second, third and fourth levels, wherein each level is weighted and enhanced through a channel attention module; After dimension splicing on the channel and dimension compression through a linear layer, the decoder performs up-sampling through a refining module and outputs an inference result, wherein the inference result includes the ground object types of each high-resolution remote sensing image.
[0009] Further, the MSA complexity and the W-MSA complexity, including:
[0010]
[0011] in, To input high-resolution remote sensing imagery, To input the width of the high-resolution remote sensing image, To input the number of channels in the high-resolution remote sensing image, This is a complexity calculation function. This is the size of the local window for the Swin-Transformer.
[0012] Furthermore, the computation rules of the Swin-Transformer module include:
[0013]
[0014]
[0015]
[0016] in, For the W-MSA module Each output feature For the MLP module One output function, For the W-MSA module Each output feature For the MLP module One output function.
[0017] Furthermore, the remote sensing semantic segmentation dataset of small wetlands is input into the SwinLPA semantic segmentation network and the SwinLPA semantic segmentation network is trained. After training is completed, the SwinLPA model is obtained, including: The remote sensing semantic segmentation dataset of small wetlands is input into the SwinLPA semantic segmentation network, and the training batch and learning rate parameters are determined according to the hardware performance and the number of model parameters. The model is trained using backpropagation based on the AdamW optimization method. When the preset number of training iterations is reached, the SwinLPA model is obtained.
[0018] Furthermore, the classification accuracy of the land cover types output by the SwinLPA model is determined, including:
[0019]
[0020]
[0021]
[0022]
[0023]
[0024] in, To improve the accuracy of land feature classification, All are preset weights. To correctly predict the number of samples that are classified as positive, This represents the number of samples that were incorrectly predicted as positive. This represents the number of positive class samples that were missed. This represents the total number of samples. The total number of categories, Let i be the value in the i-th row and i-th column of the confusion matrix. The sum of all columns in the i-th row of the confusion matrix. The sum of all rows in the i-th column of the confusion matrix. for Fraction, The coefficient is the Kappa number. For recall rate, For intersection, union, and comparison, For accuracy.
[0025] Secondly, the present invention provides a device for identifying small wetland land cover types based on high-resolution imagery, comprising: The image processing module is used to acquire multispectral and panchromatic high-resolution satellite images of the target area and perform preprocessing to obtain a remote sensing semantic segmentation dataset of small wetlands. The small wetland remote sensing semantic segmentation dataset includes several high-resolution remote sensing images, each of which contains land cover type annotations. The network building module is used to build the SwinLPA semantic segmentation network. The SwinLPA semantic segmentation network is based on Swin-Transformer and introduces a local global attention mechanism. The inference results are output by the refinement module. The local global attention mechanism adopts a dual-path design, which includes local partitioning and global parallel perception. The model training module is used to input the remote sensing semantic segmentation dataset of small wetlands into the SwinLPA semantic segmentation network and train the SwinLPA semantic segmentation network. After training is completed, the SwinLPA model is obtained, which is used to predict the land cover type of small wetlands.
[0026] Thirdly, the present invention provides an electronic device, comprising: processor; Memory used to store processor-executable instructions; The processor is configured to execute a method for identifying small wetland land cover types in high-resolution imagery, as provided in the first aspect.
[0027] Fourthly, the present invention provides a non-transitory computer-readable storage medium, wherein when the instructions in the non-transitory computer-readable storage medium are executed by a processor of an electronic device, the electronic device is able to execute a method for identifying small wetland land cover types for high-resolution imagery as provided in the first aspect.
[0028] One or more technical solutions provided in this invention have at least the following technical effects or advantages: This invention constructs a pixel-annotated dataset by fusing high spatial resolution panchromatic and multispectral images. Based on this, a SwinLPA semantic segmentation network is designed, embedding a local-global parallel attention mechanism (LPA) within the Swin-Transformer encoder-decoder architecture. This dual-path structure simultaneously models global semantic dependencies and local detail features, significantly improving sensitivity to small targets. Combined with lightweight ECA skip connections and a deterministic refinement module, edge accuracy and inference stability are further enhanced. This invention does not rely on large batches of input; a single sample can output high-precision, detailed segmentation results, effectively achieving accurate and robust extraction of small wetlands in complex backgrounds.
[0029] This invention introduces the LPA attention mechanism into the SwinLPA network and adopts a dual-path design of local partitioning + global parallel perception: the local path recursively divides the feature map into multi-level sub-regions, independently calculates channel-spatial attention weights, and adaptively enhances the local spectral-texture response of micro wetlands; the global path maintains overall semantic consistency and suppresses background interference; after the fusion of the two features, the model’s attention to sparse small targets is significantly improved, and high-precision extraction of micro wetlands is achieved in complex backgrounds.
[0030] To further optimize edge restoration and patch integrity in small wetlands, this invention introduces a channel attention mechanism in the second, third, and fourth stages of the decoder to enhance the concatenation of encoder and decoder features at the same scale. Furthermore, 1×1 convolutional dimensionality reduction is used to achieve accurate fusion of shallow details and deep semantics. In addition, a convolutional refinement module is added at the output to perform two non-linear smoothing operations on the edges, eliminating jagged edges and breaks caused by upsampling. Attached Figure Description
[0031] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0032] Figure 1 A flowchart illustrating a method for identifying small wetland land cover types based on high-resolution imagery provided by the present invention; Figure 2 A flowchart illustrating another method for identifying small wetland land cover types in high-resolution imagery provided by the present invention; Figure 3 A schematic diagram of the SwinLPA structure provided by this invention; Figure 4 This is a schematic diagram of the LPA attention module structure provided by the present invention; Figure 5 This is a schematic diagram of the Swin-Transformer module structure provided by the present invention. Detailed Implementation
[0033] This invention provides a method for identifying small wetland land cover types based on high-resolution imagery, which solves the technical problem of low accuracy in identifying small wetland land cover types in existing technologies.
[0034] The technical solution of this invention is to solve the above-mentioned technical problems, and the overall idea is as follows: A method for identifying land cover types in small wetlands based on high-resolution imagery includes: acquiring multispectral and panchromatic high-resolution satellite images of the target area and preprocessing them to obtain a remote sensing semantic segmentation dataset for small wetlands. This dataset includes several high-resolution remote sensing images, each containing land cover type annotations. A SwinLPA semantic segmentation network is constructed, based on the Swin-Transformer and incorporating a local-global attention mechanism. The network outputs inference results using a refinement module. This local-global attention mechanism employs a dual-path design, including local partitioning and global parallel perception. The small wetland remote sensing semantic segmentation dataset is input into the SwinLPA semantic segmentation network for training. After training, a SwinLPA model is obtained, which is used to predict land cover types in small wetlands.
[0035] To better understand the above technical solutions, the following will provide a detailed explanation of the technical solutions in conjunction with the accompanying drawings and specific implementation methods.
[0036] First, it should be clarified that the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.
[0037] This invention provides, for example Figure 1 The method for identifying small wetland land cover types based on high-resolution imagery, shown below, includes steps S11-S13. This method for identifying small wetland land cover types based on high-resolution imagery provided by the present invention can also be referred to... Figure 2 : Step S11: Acquire multispectral and panchromatic high-resolution satellite images of the target area and perform preprocessing to obtain a remote sensing semantic segmentation dataset of small wetlands. The dataset includes several high-resolution remote sensing images, each containing land cover type annotations.
[0038] Small wetlands refer to natural or artificial aquatic ecosystems that are small in area, scattered in distribution, and have wetland ecological characteristics, such as small ponds, marshes, seasonally waterlogged depressions, ditches, and paddy fields.
[0039] Multispectral and panchromatic high-resolution satellite images of the target area were acquired and preprocessed to obtain a remote sensing semantic segmentation dataset for small wetlands. This included: acquiring multispectral and panchromatic high-resolution satellite images of the target area when the average cloud cover was less than a preset cloud cover; performing radiometric calibration on the multispectral and panchromatic images and atmospheric correction on the multispectral images; fusing the multispectral and panchromatic images to obtain spatial spectral images; labeling the land cover samples in the spatial spectral images according to land cover type; and cropping the spatial spectral images according to a preset pixel count to obtain several high-resolution remote sensing images, which were then combined into a remote sensing semantic segmentation dataset for small wetlands.
[0040] Specifically, multispectral and panchromatic high-resolution satellite images of the target area in July and August, where the average cloud cover is less than a preset cloud cover, can be selected. The preset cloud cover can be 0.5%. In July and August, the vegetation in the target area is lush and has obvious spectral characteristics, which facilitates subsequent data annotation.
[0041] Radiometric calibration tools can be used to perform radiometric calibration on panchromatic and multispectral images, and then atmospheric correction tools can be used to perform atmospheric correction on multispectral images.
[0042] A high-precision DEM can be used to orthorectify both the atmospherically corrected multispectral image and the radiometrically calibrated panchromatic image. Finally, the gdal-pansharpen.py method is used to fuse the multispectral and panchromatic images to obtain a spatial spectral image.
[0043] Multispectral imagery contains rich spectral information (such as red, green, blue, and near-infrared bands), which is beneficial for identifying land cover categories; while panchromatic imagery has higher spatial resolution and can provide clear details and structures. By fusing, the spatial resolution of the imagery can be significantly improved while preserving multispectral information, thereby obtaining high-resolution remote sensing images that are both colorful and detailed, providing a high-quality data foundation for the accurate segmentation and classification of delicate land cover features such as small wetlands.
[0044] The target area can be sampled in the field. During the sampling, the collected GPS coordinates of the sample points are imported into ENVI and spatially located by combining them with pre-processed high-resolution remote sensing images. Then, in Geolabel annotation software, various land cover types (such as small wetlands, water bodies, vegetation, etc.) are manually selected and labeled according to the sample point locations and corresponding image content. At the same time, attention should be paid to balancing the number of samples for each land cover type to avoid class imbalance. Finally, with each labeled sample point as the center, a 512×512 pixel high-resolution remote sensing image is cropped from the pre-processed high-resolution image to form a labeled training sample set (small wetland remote sensing semantic segmentation dataset).
[0045] Step S12: Construct the SwinLPA semantic segmentation network, which is based on Swin-Transformer and introduces a local global attention mechanism. The inference results are output by a refinement module. The local global attention mechanism adopts a dual-path design, which includes local partitioning and global parallel perception.
[0046] Specifically, it includes: Based on a symmetric encoder and decoder architecture, the basic framework of the SwinLPA semantic segmentation network is constructed, in which... Figure 3 This is a schematic diagram of the SwinLPA structure. Figure 5 This is a schematic diagram of the Swin-Transformer module structure.
[0047] The SwinLPA semantic segmentation network adopts an encoder-decoder architecture, with the encoder built on Swin-Transformer blocks and a symmetrical encoder-decoder design.
[0048] When the Swin-transformer module (Swin-transformer-block) uses W-MSA windows, self-attention calculations are only performed within each window. Windows do not overlap and cannot pass information. Therefore, the Swin-transformer module adds SW-MSA to enable information exchange between windows by sliding windows.
[0049] By controlling the computational region to a window-like unit, we can not only achieve the global information extraction capability of the Transformer's self-attention mechanism, but also effectively reduce the computational complexity of the model. The formulas for calculating MSA complexity and W-MSA complexity are as follows:
[0050]
[0051] in, To input high-resolution remote sensing imagery, To input the width of the high-resolution remote sensing image, To input the number of channels in the high-resolution remote sensing image, This is a complexity calculation function. This is the size of the local window for the Swin-Transformer.
[0052] The computation rules of the Swin-Transformer module include:
[0053]
[0054]
[0055]
[0056] in, For the W-MSA module Each output feature For the MLP module One output function, For the W-MSA module Each output feature For the MLP module One output function.
[0057] The encoder is based on a four-level Swin-Transformer module, which downsamples step by step and embeds local and global parallel attention modules. The local and global parallel attention modules are used to enhance feature representation, and the Swin-Transformer module uses both W-MSA and SW-MSA windows.
[0058] The core of each stage of the encoder is the Swin-Transformer module, which combines LPA attention with downsampling fusion blocks, and consists of four stages. It can cut the input 512×512 four-channel high-resolution remote sensing data image into non-overlapping 4×4 pixel blocks in height and width, generating (512 / 4)×(512 / 4)=128×128 image blocks.
[0059] After segmentation, each small block has the four channels (B, G, R, NIR) of the original image in a 4×4 size. To feed each block into the Transformer structure, this three-dimensional data volume needs to be flattened into a one-dimensional vector. The length of the vector is 4×4×4=64. For the task of mapping 64-dimensional input to 96-dimensional output, the weight matrix has a shape of (96, 64). When a 64-dimensional flattened block vector is input, it is multiplied by this (96, 64) matrix and a 96-dimensional bias vector is added, ultimately producing a 96-dimensional embedding vector. The above process is performed independently on all 128×128 blocks in the same shared linear layer.
[0060] The linear layers employ PyTorch's default initialization strategy. The first layer processes a 128×128 resolution feature map with a feature dimension of 96. In the second layer, four spatially adjacent 2x2 feature vectors on the feature map are concatenated along the depth dimension, reducing the feature map resolution from 128x128 to 64x64, while the feature dimension quadruples to 384 (96×4). Simultaneously, a linear layer follows to process the concatenated 384-dimensional feature vectors, mapping them to a new 192-dimensional space. The feature map size then becomes 64x64 with a feature dimension of 192, achieving the goal of halving the resolution and doubling the dimension.
[0061] The feature maps are fed as input into the second layer, the Swin-Transformer-Block, which incorporates LPA attention. Subsequently, the third and fourth layers (bottleneck layers) successively reduce the resolution by half and increase the feature dimension by half to 8×8×768, generating feature information at different resolutions.
[0062] The decoder restores resolution step by step through upsampling, and introduces skip connections in the second, third and fourth levels, with each level being weighted and enhanced by the channel attention module. After dimensional stitching on the channel and compression of dimensions through linear layers, the decoder upsamples through the refinement module and outputs the inference results, which include the land cover types of each high-resolution remote sensing image.
[0063] About the decoder: The feature map resolution is restored through an upsampling structure of a symmetric encoder, comprising an upsampling dilation layer and three corresponding Swin-Transformer modules combined with upsampling dilation block layers. During decoding, a 2x upsampling is performed, and skip connections are used to concatenate the feature map of the corresponding layer of the encoder with the currently decoded feature map. This gradually restores the bottleneck layer output from 8×8×768 to 128×128×96. After four stages, the spatial resolution of the feature map returns to the same level as the embedding stage (128×128), and the number of channels returns to 96.
[0064] Regarding jump links: To maximize the input of spectral information from 4-channel high-resolution remote sensing images containing R, G, B, and NIR, encoder features of the same scale are concatenated with the current upsampling results at the second, third, and fourth levels of the decoder using channel attention. Since the computational cost of the Swing Transformer Block is relatively high, a lighter ECA (Efficient Channel Attention) channel attention method can be chosen. The core structure of ECA is to capture local cross-channel interaction information through adaptive one-dimensional convolution, thereby efficiently learning channel attention weights with almost no increase in computational cost.
[0065] After the decoder upsamples and increases the resolution of the deep feature maps, they can be concatenated with shallow feature maps (i.e., skip connections) of the same resolution from the corresponding layer of the encoder. Before concatenation, the skip connection features obtained from the encoder are first fed into the ECA module instantiated for channel attention weighting to obtain the enhanced features.
[0066] Then, the ECA-enhanced skip connection feature map is concatenated with the feature map upsampled in the previous step of the decoder along the channel dimension. The dimension of the concatenated fused feature map is doubled, so it is then passed through a linear layer to restore its dimension. This fully utilizes multispectral information while achieving the fusion of shallow details and deep semantics in multispectral high-resolution remote sensing images.
[0067] Regarding the LPA layer (Local Global Attention Layer). Figure 4 A schematic diagram of the LPA layer structure: Located within each encoder block, the LPA (Local-Global Attention) module first feeds the input feature map (B, C, H, W) into two parallel paths: one path performs global attention extraction, and the other performs pyramid-style local attention extraction. In global attention, the feature map sequentially passes through the channel attention submodule and the spatial attention submodule. The channel attention submodule enhances important channels and suppresses redundant channels. The enhanced features then continue into the spatial attention submodule, focusing on salient regions. Thus, the global attention output simultaneously contains both channel-level and spatial-level global dependencies.
[0068] In the LPA attention path, the module divides the input feature map into two equal parts along the height direction (upper and lower), and then further divides each part into two equal parts along the width direction (left and right), resulting in four sub-regions. The same channel attention and spatial attention are consistently called within each sub-region to share parameters. The computation process of channel and spatial attention is reused independently for each sub-region, without creating separate parameters for each sub-region. This allows each local region to adaptively adjust its channel and spatial weights based on its own content, thus avoiding the insensitivity of global weights to local details. After processing the four sub-regions, they are reassembled in their original spatial order to restore the resolution to match the input feature map. This parameter-sharing design means that even as the number of regions increases, the number of parameters does not grow exponentially, because regardless of the number of sub-blocks, it is simply a matter of calling the same attention module's forward propagation multiple times.
[0069] Regarding the refining module: The decoder amplifies the output by a factor of 4 to 512×512×96, then refines it through two 3×3 convolutions (containing BN and ReLU functions). Finally, a 1×1 convolution maps the channels to the number of classes, completing end-to-end segmentation prediction. During training and validation, the model is set to evaluation mode. The refinement layer uses the global mean and variance learned and saved during training for normalization, no longer calculating the mean and variance of the current input batch. This makes the edges of the validation image segmentation results smoother and increases the extraction of local details. In subsequent inference applications, since the refinement layer does not introduce batch dependency, its calculation is deterministic. For a single sample input, its output is fixed and independent of the batch size, thus resulting in more stable and accurate inference results.
[0070] Step S13: Input the remote sensing semantic segmentation dataset of small wetlands into the SwinLPA semantic segmentation network and train the SwinLPA semantic segmentation network. After training is completed, the SwinLPA model is obtained. The SwinLPA model is used to predict the land cover type of small wetlands.
[0071] Specifically, this includes: inputting the remote sensing semantic segmentation dataset of small wetlands into the SwinLPA semantic segmentation network, and determining the training batch and learning rate parameters based on the hardware performance and the number of model parameters; training based on backpropagation using the AdamW optimization method, and obtaining the SwinLPA model when the preset number of training iterations is reached.
[0072] The remote sensing semantic segmentation dataset of small wetlands was input into the constructed SwinLPA semantic segmentation network. Based on the computing performance of the graphics card and the number of model parameters, the training batch size was set to 8 and the learning rate to 0.01. The AdamW optimization method was selected for backpropagation for final training. The Dice Loss function, suitable for imbalanced samples, and the CrossEntropy Loss function, ensuring the classification accuracy of each image, were selected and weighted together to obtain the final loss function, Loss. The Loss calculation rules include:
[0073] The model's classification accuracy is optimized by using a final loss function (Loss). The number of training iterations is set until the model's accuracy reaches its maximum value on both the training and validation sets and no longer decreases. The model is then saved, resulting in the SwinLPA model.
[0074] Accuracy verification can be quantified using classification accuracy evaluation metrics such as F1 score, Kappa coefficient, recall, IoU, and precision (P). This invention provides the following method. It should be understood that F1 score, Kappa coefficient, recall, IoU, and precision are all commonly used calculation parameters in neural networks, and will not be elaborated here.
[0075] Determine the classification accuracy of land cover types output by the SwinLPA model, including:
[0076]
[0077]
[0078]
[0079]
[0080]
[0081] in, To improve the accuracy of land feature classification, All are preset weights. To correctly predict the number of samples that are classified as positive, This represents the number of samples that were incorrectly predicted as positive. This represents the number of positive class samples that were missed. This represents the total number of samples. The total number of categories, Let i be the value in the i-th row and i-th column of the confusion matrix. The sum of all columns in the i-th row of the confusion matrix. The sum of all rows in the i-th column of the confusion matrix. for Fraction, The coefficient is the Kappa number. For recall rate, For intersection, union, and comparison, For accuracy. Specific implementation examples: In the study area experiment, for 17 land cover types within the study area, SVM was trained and evaluated using 5000 pixel samples for each type. The method used in this invention has significantly higher accuracy than traditional methods in classifying and extracting small wetlands under high-resolution imagery. Table 1 compares the results of the method used in this invention with those of traditional methods.
[0083] Table 1
[0084] In summary, this invention constructs a pixel-annotated dataset by fusing high spatial resolution panchromatic and multispectral images. Based on this, a SwinLPA semantic segmentation network is designed, embedding a local-global parallel attention mechanism (LPA) within the Swin Transformer encoder-decoder architecture. This dual-path structure simultaneously models global semantic dependencies and local detail features, significantly improving sensitivity to small targets. Furthermore, lightweight ECA skip connections and a deterministic refinement module further enhance edge accuracy and inference stability. This invention does not rely on large batches of input; a single sample can output high-precision, detailed segmentation results, effectively achieving accurate and robust extraction of small wetlands against complex backgrounds.
[0085] This invention introduces the LPA attention mechanism into the SwinLPA network and adopts a dual-path design of local partitioning + global parallel perception: the local path recursively divides the feature map into multi-level sub-regions, independently calculates channel-spatial attention weights, and adaptively enhances the local spectral-texture response of micro wetlands; the global path maintains overall semantic consistency and suppresses background interference; after the fusion of the two features, the model’s attention to sparse small targets is significantly improved, and high-precision extraction of micro wetlands is achieved in complex backgrounds.
[0086] To further optimize edge restoration and patch integrity in small wetlands, this invention introduces a channel attention mechanism in the second, third, and fourth stages of the decoder to enhance the concatenation of encoder and decoder features at the same scale. Furthermore, 1×1 convolutional dimensionality reduction is used to achieve accurate fusion of shallow details and deep semantics. In addition, a convolutional refinement module is added at the output to perform two non-linear smoothing operations on the edges, eliminating jagged edges and breaks caused by upsampling.
[0087] Based on the same inventive concept, this invention provides a device for identifying small wetland land cover types in high-resolution imagery, comprising: The image processing module is used to acquire multispectral and panchromatic high-resolution satellite images of the target area and perform preprocessing to obtain a remote sensing semantic segmentation dataset of small wetlands. The small wetland remote sensing semantic segmentation dataset includes several high-resolution remote sensing images, each of which contains land cover type annotations. The network building module is used to build the SwinLPA semantic segmentation network. The SwinLPA semantic segmentation network is based on Swin-Transformer and introduces a local global attention mechanism. The inference results are output by the refinement module. The local global attention mechanism adopts a dual-path design, which includes local partitioning and global parallel perception. The model training module is used to input the remote sensing semantic segmentation dataset of small wetlands into the SwinLPA semantic segmentation network and train the SwinLPA semantic segmentation network. After training is completed, the SwinLPA model is obtained, which is used to predict the land cover type of small wetlands.
[0088] Based on the same inventive concept, the present invention also provides an electronic device, comprising: processor; Memory used to store processor-executable instructions; The processor is configured to execute a method for identifying small wetland land cover types in high-resolution imagery, as described above.
[0089] Based on the same inventive concept, the present invention also provides a non-transitory computer-readable storage medium, which, when the instructions in the storage medium are executed by the processor of an electronic device, enables the electronic device to execute a method for identifying small wetland land cover types for high-resolution images as described above.
[0090] Since the electronic device described in this embodiment is an electronic device used to implement the information processing method in the embodiments of the present invention, those skilled in the art can understand the specific implementation methods and various variations of the electronic device in this embodiment based on the information processing method described in the embodiments of the present invention. Therefore, how the electronic device implements the method in the embodiments of the present invention will not be described in detail here. Any electronic device used by those skilled in the art to implement the information processing method in the embodiments of the present invention falls within the scope of protection of the present invention.
[0091] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0092] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0093] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0094] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1The steps of the function specified in one or more boxes.
[0095] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.
[0096] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
Claims
1. A method for identifying small and micro wetland feature types from high-resolution images, characterized in that, The application comprises the following steps: Obtain multispectral and panchromatic high-resolution satellite images of a target area, and preprocess them to obtain a small and micro wetland remote sensing semantic segmentation dataset, wherein the small and micro wetland remote sensing semantic segmentation dataset comprises a plurality of high-resolution remote sensing images, and each high-resolution remote sensing image contains a ground object type label; Construct a SwinLPA semantic segmentation network, wherein the SwinLPA semantic segmentation network is based on a Swin-Transformer and introduces a local-global attention mechanism, and an inference result is output by a refining module, wherein the local-global attention mechanism adopts a double-path design, and the double-path design comprises local division and global parallel perception; Input the small and micro wetland remote sensing semantic segmentation dataset into the SwinLPA semantic segmentation network and train the SwinLPA semantic segmentation network, and obtain a SwinLPA model after the training is completed, wherein the SwinLPA model is used for ground object type prediction of a small and micro wetland.
2. The method for small and micro wetland feature type recognition for high-resolution images according to claim 1, characterized in that, Obtain multispectral and panchromatic high-resolution satellite images of a target area, and preprocess them to obtain a small and micro wetland remote sensing semantic segmentation dataset, comprising: When the average cloud cover is less than a preset cloud cover, obtain multispectral images and panchromatic images of the target area; Radiometric calibration is performed on the multispectral images and the panchromatic images, and atmospheric correction is performed on the multispectral images; Fuse the multispectral images and the panchromatic images to obtain spatial spectral images; Label ground object samples in the spatial spectral images according to ground object types; Crop the spatial spectral images according to a preset pixel to obtain a plurality of high-resolution remote sensing images, and combine them into a small and micro wetland remote sensing semantic segmentation dataset.
3. The method of claim 1, wherein the high-resolution image is a satellite image. Construct a SwinLPA semantic segmentation network, comprising: Based on a symmetric encoder and decoder architecture, construct a basic framework of the SwinLPA semantic segmentation network; The encoder is based on a four-level Swin-Transformer module, which gradually down-samples and embeds a local-global parallel attention module, wherein the local-global parallel attention module is used to enhance feature expression, and the Swin-Transformer module simultaneously adopts a W-MSA window and a SW-MSA window; The decoder gradually recovers the resolution by up-sampling, and introduces a skip connection at the second, third and fourth levels, wherein each level is weighted and enhanced by a channel attention module; After dimension splicing on the channel and dimension compression by a linear layer, the decoder performs up-sampling by a refining module and outputs an inference result, wherein the inference result comprises ground object types of each high-resolution remote sensing image.
4. The method of claim 3, wherein the high-resolution image is a satellite image. MSA complexity and W-MSA complexity, comprising: wherein, is a height of the input high-resolution remote sensing image, is a width of the input high-resolution remote sensing image, is a number of channels of the input high-resolution remote sensing image, is a complexity calculation function, is a local window size of the Swin-Transformer.
5. The method of claim 4, wherein the high-resolution image is a satellite image. The calculation rules of the Swin-Transformer module, comprising: wherein, is the i-th output feature of the W-MSA module, is the i-th output function of the MLP module, is the i-th output feature of the W-MSA module, is the i-th output function of the MLP module, is the i-th output feature of the W-MSA module, is the i-th output function of the MLP module, is the i-th output feature of the W-MSA module, is the i-th output function of the MLP module.
6. The method of claim 1, wherein the high-resolution image is a satellite image. Input the small and micro wetland remote sensing semantic segmentation dataset into the SwinLPA semantic segmentation network and train the SwinLPA semantic segmentation network, and obtain a SwinLPA model after the training is completed, comprising: The small and micro wetland remote sensing semantic segmentation dataset is input into the SwinLPA semantic segmentation network, and the training batch and the learning rate parameter are determined according to the hardware device performance and the model parameter quantity; The SwinLPA model is obtained by training based on the AdamW optimization method and back propagation, and when the preset training times are reached.
7. The method of claim 1, wherein the high-resolution image is a satellite image. The classification accuracy of the ground object type output by the SwinLPA model is determined, including: wherein, is the classification accuracy of the ground object, are both preset weights, is the number of samples correctly predicted as positive class, is the number of samples incorrectly predicted as positive class, is the number of positive class samples that are missed, is the total number of samples, is the total number of classes, is the value in the i-th row and i-th column of the confusion matrix, is the sum of all columns in the i-th row of the confusion matrix, is the sum of all rows in the i-th column of the confusion matrix, is the score, is the kappa coefficient, is the recall rate, is the intersection over union, is the accuracy rate.
8. A device for identifying small and micro wetland feature types in high-resolution images, characterized by including: The image processing module is used to obtain multispectral and panchromatic high-resolution satellite images of the target area, and to preprocess the images to obtain a small and micro wetland remote sensing semantic segmentation dataset, wherein the small and micro wetland remote sensing semantic segmentation dataset includes a plurality of high-resolution remote sensing images, and each high-resolution remote sensing image contains ground object type labels; The network construction module is used to construct a SwinLPA semantic segmentation network, wherein the SwinLPA semantic segmentation network is based on Swin-Transformer and introduces a local-global attention mechanism, and outputs inference results with a refinement module, wherein the local-global attention mechanism adopts a double-path design, and the double-path design includes local partition and global parallel perception; The model training module is used to input the small and micro wetland remote sensing semantic segmentation dataset into the SwinLPA semantic segmentation network and train the SwinLPA semantic segmentation network, and after the training is completed, a SwinLPA model is obtained, wherein the SwinLPA model is used for ground object type prediction of small and micro wetlands.
9. An electronic device, comprising: including: a processor; a memory for storing instructions executable by the processor; The processor is configured to execute to implement the small and micro wetland ground object type identification method for high-resolution images according to any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium, comprising: When the instructions in the non-transitory computer readable storage medium are executed by the processor of the electronic device, the electronic device can execute the small and micro wetland ground object type identification method for high-resolution images according to any one of claims 1 to 7.
Citation Information
Patent Citations
High-resolution remote sensing city image semantic segmentation method and system
CN116310916A
High-resolution image ground object extraction method based on deep learning network combination
CN118351440A
Remote sensing image semantic segmentation method, device and system, and storage medium
CN118470327A
Unmanned aerial vehicle image building extraction method and system fusing DINOv2 and global attention
CN119851111A
Train track defect detection method and system based on improved ViDT
CN120298987A