Remote sensing image forest mapping method and related device

CN122715013BActive Publication Date: 2026-10-27CENTRAL SOUTH UNIVERSITY OF FORESTRY AND TECHNOLOGY +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202611225487.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-08-13
Publication Date
2026-10-27
Estimated Expiration
2046-08-13

AI Technical Summary

Technical Problem

(1)对于CNN方法,其卷积操作的感受野有限,尽管通过堆叠网络层可以扩大理论感受野,但对全局形状和长距离空间依赖关系的建模能力依然不足;对于横跨大范围、具有方向性的森林结构,CNN容易产生不连续的预测,难以保持结构完整性

Benefits of technology

[0016]本发明实施例还公开了一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器可以从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行前文所描述的方法。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122715013B_ABST
    Figure CN122715013B_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of remote sensing image processing and pattern recognition, and provides a remote sensing image forest mapping method and related equipment, which comprises: acquiring a forest cover remote sensing image, obtaining a multispectral remote sensing image block through normalization. Obtain each level of multiscale feature through step-by-step feature extraction; according to the spatial resolution and the semantic abstraction, select the feature to execute local enhancement and directional context modeling, and generate an enhanced feature map; adopt a pyramid pooling branch to extract multiscale context information, and obtain multiscale context enhanced features; use a feature pyramid network to aggregate shallow spatial details, fuse the intermediate features and the enhanced feature map, and obtain a strong semantic feature map; the strong semantic feature map is mapped to the number of categories through a convolution layer, is restored to the original input resolution through bilinear interpolation upsampling, and outputs the classification result of whether each pixel of the forest cover remote sensing image is a forest, so that the present application improves the forest boundary and small patch segmentation precision through the above scheme.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of remote sensing image processing and pattern recognition technology, and in particular to a method and related equipment for forest mapping of remote sensing images. Background Technology

[0002] Currently, the mainstream deep learning solutions used for forest cover mapping in remote sensing imagery include: (1) Methods based on convolutional neural networks (CNN): such as U-Net, DeepLab series, FCN, etc. These methods use local convolutional kernels to extract features and restore spatial resolution through an encoder-decoder structure, focusing on modeling local texture and spatial details.

[0003] (2) Transformer-based methods: especially Vision Transformer and its improved version Swin Transformer. Swin Transformer uses a shift window self-attention mechanism to calculate attention within a local window and gradually expands the receptive field through interaction between windows, aiming to balance local modeling and global context capture.

[0004] The drawbacks of the CNN methods in the prior art mentioned above include: (1) For CNN methods, the receptive field of their convolution operation is limited. Although the theoretical receptive field can be expanded by stacking network layers, the ability to model global shape and long-distance spatial dependencies is still insufficient. For forest structures that span a large range and are directional, CNN is prone to producing discontinuous predictions and it is difficult to maintain structural integrity.

[0005] (2) For the Transformer method, its local modeling is still based on the conventional self-attention of fixed windows, which has the following limitations: weak geometric adaptability, the standard rectangular window cannot flexibly adapt to the complex geometric deformation of forest boundaries, and the characterization of irregular forest edges is not refined enough; insufficient capture of directional context, the self-attention mechanism lacks explicit modeling of specific directions, which makes it easy to break or misclassify the identification of linearly extending forest corridors or ridge forest belts. Summary of the Invention

[0006] In order to at least solve one of the technical problems existing in the prior art, the present invention provides a method and related equipment for forest mapping of remote sensing images.

[0007] One aspect of the present invention provides a method for forest mapping from remote sensing imagery, comprising: Forest cover remote sensing images were acquired and normalized to obtain multispectral remote sensing image patches. The multispectral remote sensing image patch is subjected to stepwise feature extraction to obtain multi-scale features at each level; Based on spatial resolution and semantic abstraction, multi-scale features at each level are selected to perform local enhancement and directional context modeling, resulting in enhanced feature maps; For each level of multi-scale features, pyramid pooling is used to extract multi-scale contextual information to obtain multi-scale contextual enhancement features; for each level of multi-scale features, a feature pyramid network is used to aggregate shallow spatial details, and the obtained intermediate features are fused with the enhancement feature map to obtain a strong semantic feature map. The strong semantic feature map is mapped to the number of categories through a convolutional layer, and then restored to the original input resolution through bilinear interpolation upsampling to obtain the classification result of whether each pixel of the forest cover remote sensing image is a forest.

[0008] According to the remote sensing image forest mapping method, the multispectral remote sensing image blocks are subjected to a sliding window self-attention mechanism for step-by-step feature extraction to obtain multi-scale features at each level, including: The Swin Transformer backbone network is used to extract multispectral remote sensing image blocks in four stages using a sliding window self-attention mechanism. The resulting multiscale features at each level include first-level, second-level, third-level, and fourth-level features. The second-level, third-level, and fourth-level features have corresponding channel dimensions, spatial resolution, and semantic abstraction according to the corresponding downsampling factor.

[0009] According to the remote sensing image forest mapping method, local enhancement and directional context modeling are performed on multi-scale features at each level based on spatial resolution and semantic abstraction to obtain enhanced feature maps, including: Transform the word sequence of high spatial resolution second-level multi-scale features into a two-dimensional feature map, including word sequence... Normalization is performed, and then flattened features are obtained through linear projection. for: ; in, This is the weight matrix. For bias terms, Representation layer normalization, Indicates the number of sample images. Indicates the number of lexical elements. , Indicates the image height and width. This indicates the number of spectral bands selected based on the forest cover remote sensing image; flat features The rearrangement operation restores the feature map to a two-dimensional feature map. ; The 2D feature map is processed using a channel compression and offset prediction network to obtain an intermediate feature map and spatial offset. A modulotable mask is generated using the Sigmoid function. A deformable convolution is then performed using the spatial offset and modulotable mask. The output of the deformable convolution is then group-normalized and processed with the GELU activation function before spatial attention gating is applied to obtain a spatial weight map. This spatial weight map is then concatenated with the 2D feature map residuals using learnable scalar gating parameters to obtain a local spatial attention weight map. for: ; in, For learnable scalar gating parameters, For spatial weighting, For group normalization function, This represents a deformable convolution operation. Where is the spatial offset, and mask is a moduloable mask. Represents a 1×1 convolution. This is an intermediate feature map; Local spatial attention weight map Adaptive average pooling is performed along the height and width directions to obtain vertical strip features. and horizontal band features The vertical and horizontal stripe features are expanded to the original spatial dimensions and then added element by element to generate a spatial attention map. for: ; ; in, The aggregated strip features For the Sigmoid function, For extended functions; Spatial attention map With local spatial attention weight map Element-wise multiplication is performed, local smoothing is achieved through depthwise separable convolution, and learnable gating parameters are used with two-dimensional feature maps. Perform residual connections and layer normalization to obtain enhanced feature maps. for: ; in, This indicates a depthwise separable convolution operation. This indicates element-wise multiplication. express convolution, For learnable gating parameters; Enhance feature maps After flattening into a sequence, feature adjustment is performed using linear projection and learnable gating parameters. With lexical sequence Establish residual connections to obtain enhanced feature word sequences. for: ; ; in, Indicates linear projection. To enhance feature maps The flattened sequence, The weight matrix is ​​a learnable matrix. This is a bias term.

[0010] According to the aforementioned remote sensing image forest mapping method, the method further includes: The obtained enhanced feature word sequence Global average pooling is performed along the sequence dimension to obtain mixed weights of multiple learnable one-dimensional convolutional kernels; The dynamic convolution output is obtained by performing independent convolutions with multiple preset expert convolution kernels and mixed weights, followed by weighted summation. The dynamic convolution output is passed through a linear layer to generate scaling factors and biases, and then modulated using an affine transformation. This modulated output is then combined with an enhanced feature word sequence. Add the residuals together.

[0011] The forest mapping method based on the remote sensing imagery further includes: An iterative mechanism and global gating are employed to fuse the enhancement information of the enhanced feature word sequence. This includes sharing weights in each iteration, dynamically generating modulation parameters based on the current features using a small adapter, and using a total learnable gating to fuse the output of each iteration with the word sequence. Perform residual connections to obtain the final enhanced feature word sequence. for: ; in, For learnable gating, The total number is The output of the next iteration.

[0012] According to the remote sensing image forest mapping method, pyramid pooling branch is used to extract multi-scale contextual information for each level of multi-scale features, resulting in multi-scale context-enhanced features, including: The pyramid pooling branch performs adaptive average pooling on the third-level multi-scale features at multiple scales. Each pooled feature is then upsampled to the input feature map size after being compressed through a 1×1 convolution. It is then concatenated with the third-level multi-scale features in the channel dimension and fused through a 3×3 convolution to obtain multi-scale context-enhanced features.

[0013] According to the remote sensing image forest mapping method, a feature pyramid network is used to aggregate shallow spatial details for each level of multi-scale features. The obtained intermediate features are then fused with the enhanced feature map to obtain a strong semantic feature map, including: After adjusting the number of channels of the fourth-level multi-scale feature through 1×1 convolution by the feature pyramid branch, it is upsampled to the spatial size of the third-level multi-scale feature, and then the feature is added element by element with the third-level multi-scale feature adjusted by 1×1 convolution. Finally, it is fused by 3×3 convolution to obtain the intermediate feature. The intermediate features are upsampled to the same spatial size as the features, added to the enhanced feature map adjusted by 1×1 convolution, and then fused by 3×3 convolution to obtain the basic features; The multi-scale contextual enhancement features are upsampled to the same resolution as the enhancement feature map, concatenated with the enhancement feature map in the channel dimension, and finally fused through 3×3 convolution, batch normalization and ReLU activation to generate a strong semantic feature map.

[0014] Another aspect of the present invention provides a remote sensing image forest mapping device, comprising: The first module is used to acquire forest cover remote sensing images, which are then normalized to obtain multispectral remote sensing image blocks. The second module is used to extract features from the multispectral remote sensing image blocks step by step to obtain multi-scale features at each level. The third module is used to select multi-scale features at each level based on spatial resolution and semantic abstraction, perform local enhancement and directional context modeling, and obtain enhanced feature maps. The fourth module is used to extract multi-scale contextual information from each level of multi-scale features using pyramid pooling branches to obtain multi-scale contextual enhancement features; shallow spatial details are aggregated using a feature pyramid network for each level of multi-scale features, and the obtained intermediate features are fused with the enhancement feature map to obtain a strong semantic feature map. The fifth module is used to map the strong semantic feature map to the number of categories through a convolutional layer, and restore it to the original input resolution through bilinear interpolation upsampling to obtain the classification result of whether each pixel of the forest cover remote sensing image is a forest.

[0015] Another aspect of the present invention provides an electronic device, including a processor and a memory; The memory is used to store programs; The processor executes the program to implement the method as described above.

[0016] This invention also discloses a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium and execute the computer instructions, causing the computer device to perform the methods described above.

[0017] The beneficial effects of this invention are as follows: By introducing a module with local deformable refinement capabilities, the network can adaptively adjust the receptive field shape according to the image content, improving the ability to finely segment forest edges, small forest patches, and fragmented forest land, thus solving the problems of boundary blurring and loss of small targets caused by weak local geometric adaptability; by designing a strip-guided global semantic module, the network explicitly models spatial dependencies in multiple directions such as horizontal and vertical, ensuring the predictive continuity of strip-shaped and directional forest structures, thus solving the problem of prediction discontinuity caused by insufficient modeling of long-distance directional structures; by introducing a learnable residual scaling factor, the network automatically learns the optimal fusion weights during training, achieving adaptive collaboration between global context and local details, improving the overall consistency and edge accuracy of classification, and solving the problem of difficulty in effectively collaborating local details and global semantic features. Attached Figure Description

[0018] Figure 1 This is a schematic diagram of the remote sensing image forest mapping process according to an embodiment of the present invention; Figure 2 This is an embodiment of the present invention of a dual-gated enhanced SwinTransformer network architecture for forest cover remote sensing mapping that integrates deformable convolution and strip pooling; Figure 3 This is a structural diagram of the DGLCM module according to an embodiment of the present invention; Figure 4 This is the forest cover mapping result for region A in this embodiment of the invention; Figure 5 This is the forest cover mapping result for region B in this embodiment of the invention; Figure 6 This is a schematic diagram of a remote sensing image forest mapping device according to an embodiment of the present invention. Detailed Implementation

[0019] The embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings. Throughout the description, the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions. In the following description, suffixes such as "module," "part," or "unit" used to denote elements are used only for the purpose of illustrative purposes and have no specific meaning in themselves. Therefore, "module," "part," or "unit" can be used interchangeably. Terms such as "first," "second," etc., are used only to distinguish technical features and should not be construed as indicating or implying relative importance, or implicitly indicating the number of indicated technical features, or implicitly indicating the sequential relationship of the indicated technical features. In the following description, the consecutive reference numerals for method steps are for ease of review and understanding. Adjusting the implementation order of steps, in conjunction with the overall technical solution of the present invention and the logical relationship between the various steps, will not affect the technical effect achieved by the technical solution of the present invention. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.

[0020] refer to Figure 1 , Figure 1 This is a schematic diagram of the remote sensing image forest mapping process according to an embodiment of the present invention, which includes, but is not limited to, steps S100~S500: S100 acquires remote sensing images of forest cover, which are then normalized to obtain multispectral remote sensing image blocks.

[0021] In some embodiments, such as Figure 2 As shown, the input layer receives a multispectral remote sensing image patch that has undergone radiometric normalization, with a size of [size missing]. , The number of spectral bands selected is based on the actual data source. For image height and width, the band selection in this embodiment is not limited to a specific combination and can be flexibly adapted to multispectral input.

[0022] S200 performs step-by-step feature extraction on multispectral remote sensing image patches to obtain multi-scale features at each level.

[0023] In some embodiments, the Swing Transformer backbone network is used to extract multispectral remote sensing image blocks in four stages using a sliding window self-attention mechanism. The resulting multiscale features at each level include first-level multiscale features, second-level multiscale features, third-level multiscale features, and fourth-level multiscale features. The second-level multiscale features, third-level multiscale features, and fourth-level multiscale features have corresponding channel dimensions, spatial resolution, and semantic abstraction according to the corresponding downsampling factor.

[0024] like Figure 2As shown, the Swin Transformer backbone network in this embodiment adopts the Swin-Tiny architecture, which includes four stages (stages 1 to 4, respectively obtaining first-level multi-scale features, second-level multi-scale features, third-level multi-scale features, and fourth-level multi-scale features (C1~C4 correspond one-to-one). Multi-scale features are extracted step by step through hierarchical design and shift window self-attention mechanism. This invention uses the output feature maps of stages 2 to 4, denoted as C2, C3, and C4 respectively; the feature dimensions of the three are 192, 384, and 768, respectively, and the corresponding spatial downsampling ratios are 4, 8, and 16, respectively; C2 has the highest spatial resolution, preserving a large amount of local geometric details and edge information; C3 and C4 include richer semantic information.

[0025] S300 selects multi-scale features at each level based on spatial resolution and semantic abstraction, performs local enhancement and directional context modeling, and obtains enhanced feature maps.

[0026] In some embodiments, converting the word sequence of high spatial resolution second-level multi-scale features into a two-dimensional feature map includes processing the word sequence. Normalization is performed, and then flattened features are obtained through linear projection. for: ; in, This is the weight matrix. For bias terms, Representation layer normalization, Indicates the number of sample images. Indicates the number of lexical elements. , Indicates the image height and width. This indicates the number of spectral bands selected based on forest cover remote sensing imagery; flattening features... The rearrangement operation restores the feature map to a two-dimensional feature map. .

[0027] For example, such as Figure 3 The Token word → Map projection submodule shown in this embodiment, the DGLCM module, is inserted after the output of stage 2 and directly affects the C2 features. This is based on the fact that the C2 layer retains relatively complete spatial details and possesses a certain degree of semantic abstraction. Performing local enhancement and directional context modeling at this location can maximize the improvement of boundary accuracy and the recognition of small targets. Furthermore, the enhanced features can be further passed and utilized through subsequent stages 3 and 4, as well as the feature fusion path, which includes: (1) Token word → Map projection submodule: This submodule is responsible for converting the token sequence output from stage 2 into a two-dimensional feature map, providing a structural basis for subsequent spatial domain operations.

[0028] Given an input token sequence , dimension , 192. First, perform layer normalization on it, and then obtain the flattened feature through linear projection. The output dimension remains consistent with the input dimension; then, a rearrangement operation is performed to... Restore to two-dimensional feature map This explicitly maps each lexical unit to its original spatial location.

[0029] In some embodiments, the two-dimensional feature map is processed using a channel compression and offset prediction network to obtain an intermediate feature map and a spatial offset. Simultaneously, a modulotable mask is generated using the Sigmoid function. A deformable convolution is performed using the spatial offset and the modulotable mask. The output of the deformable convolution is then group-normalized and processed with the GELU activation function before spatial attention gating is applied to obtain a spatial weight map. This spatial weight map is then concatenated with the residual of the two-dimensional feature map using learnable scalar gating parameters to obtain a local spatial attention weight map. for: ; in, For learnable scalar gating parameters, For spatial weighting, For group normalization function, This represents a deformable convolution operation. Where is the spatial offset, and mask is a moduloable mask. Represents a 1×1 convolution. This is an intermediate feature map. It is a two-dimensional feature map The intermediate feature map obtained by channel compression through 1×1 convolution is used as the input feature map for deformable convolution to reduce the computational cost of subsequent deformable convolution.

[0030] For example, such as Figure 3 The locally deformable refinement shown includes: (2) This submodule introduces deformable convolution, which enables the network to adaptively adjust the shape of the receptive field according to the image content, thereby enhancing the modeling ability of irregular geometric deformations such as forest edge boundaries.

[0031] First, use a 1×1 convolution to... The number of channels is compressed to C / r, resulting in To reduce computational overhead, the offset prediction network consists of two 3×3 convolutions, outputting the spatial offset of each convolution sampling point. Simultaneously, a modulation mask is generated through another 3×3 convolution and the Sigmoid function to control the contribution weight of each sampling point; utilizing... and mask It performs deformable convolution, where the sampling position of the convolution kernel can deviate from the regular grid, flexibly adapting to curved forest edges and small patches.

[0032] The output of the deformable convolution is processed sequentially by group normalization and the GELU activation function, and then restored to the original number of channels by the 1×1 convolution. Spatial attention gating (1×1 convolution + sigmoid) is then applied to generate a spatial weight map. This suppresses noise and highlights effective edge information; ultimately, it utilizes learnable scalar gating parameters. (Initial value 0.1) Connect the output residual of this branch to .

[0033] In some embodiments, to maintain training stability, the offset is adjusted. Apply L2 regularization constraints, with a regularization coefficient of 5 × 10⁻⁶. -4 .

[0034] In some embodiments, the local spatial attention weight map Adaptive average pooling is performed along the height and width directions to obtain vertical strip features. and horizontal band features The vertical and horizontal stripe features are expanded to the original spatial dimensions and then added element by element to generate a spatial attention map. for: ; ; in, The aggregated strip features For the Sigmoid function, This is an extension function.

[0035] ; in, This indicates a depthwise separable convolution operation. This indicates element-wise multiplication. express convolution, These are learnable gating parameters.

[0036] For example, such as Figure 3 The strip-guided directional context and gating fusion shown includes: (3) Strip-guided directional context and gating fusion: This submodule explicitly captures global dependencies along the long axis of the image through horizontal and vertical strip pooling mechanisms, enhancing the modeling of directional extension structures such as ridge forest belts and valley forest corridors. Firstly, for... Adaptive average pooling is performed along both the height and width directions to obtain vertical strip features. and horizontal band features The strip pooling in this embodiment is based on... The extremely low computational cost allows each spatial location to perceive the context of its entire row or column. After expanding the two strip features to the original spatial size, they are added element-wise, and a spatial attention map is generated through 1×1 convolution and sigmoid. .

[0037] Furthermore, and Element-wise multiplication is used to recalibrate features of directional context, followed by local smoothing using 3×3 depthwise separable convolutions to eliminate discontinuous noise; finally, learnable gating parameters are applied. (Initial value 0.1) and the original feature map Perform residual connections and supplement with layer normalization.

[0038] In some embodiments, spatial attention map With local spatial attention weight map Element-wise multiplication is performed, local smoothing is achieved through depthwise separable convolution, and learnable gating parameters are used with two-dimensional feature maps. Perform residual connections and layer normalization to obtain enhanced feature maps. for: Enhance feature maps After flattening into a sequence, feature adjustment is performed using linear projection and learnable gating parameters. With lexical sequence Establish residual connections to obtain enhanced feature word sequences. for: ; ; in, Indicates linear projection. To enhance feature maps The flattened sequence, The weight matrix is ​​a learnable matrix. This is a bias term.

[0039] For example, such as Figure 3 The Map→Token projection shown includes: (4) Map→Token Projection: This submodule reconstructs the spatially enhanced feature map into a lexical sequence to connect with subsequent stages 3 and 4, while also providing an identity mapping shortcut; Flatten into a sequence Then, through linear projection Feature adjustment is performed; the learnable gating parameter β (initial value 0.1) is used in conjunction with the original input of the DGLCM module. Establish residual connections to obtain This identity path ensures smooth gradient flow and stability in the early stages of training.

[0040] In some embodiments, the process also includes the obtained enhanced feature lexical sequence. Global average pooling is performed along the sequence dimension to obtain mixed weights from multiple learnable one-dimensional convolutional kernels. After independent convolution with multiple pre-defined expert convolutional kernels and the mixed weights, a weighted sum is obtained to yield a dynamic convolutional output. The dynamic convolutional output is then passed through a linear layer to generate scaling factors and biases, and modulated using an affine transformation. This modulated output is then combined with an enhanced feature word sequence. Add the residuals together.

[0041] For example, such as Figure 3 The dynamic convolutional feature inference shown includes: (5) To further enhance the local interaction capabilities within the token sequence, content-adaptive dynamic convolution is introduced; Global average pooling is performed along the sequence dimension, and the lightweight hypernetwork predicts the mixed weights of multiple learnable 1D convolutional kernels (kernel_size=3, grouped convolutions). Multiple expert convolutional kernels are independently convolved, and then weighted and summed to obtain the dynamic convolutional output. Scaling factors and biases are then generated through two linear layers, and the dynamic convolutional output is modulated using an affine transformation. By summing the residuals, flexible enhancement of local patterns can be achieved with low computational overhead.

[0042] In some embodiments, the method further includes fusing the enhancement information of the enhanced feature lexical sequence using an iterative mechanism and global gating. This includes sharing weights in each iteration, dynamically generating modulation parameters based on the current features using a small adapter, and using a total learnable gating to fuse the output of each iteration with the lexical sequence. Perform residual connections to obtain the final enhanced feature word sequence. for: ; in, For learnable gating, The total number is The output of the next iteration.

[0043] For example, refer to Figure 3 It also includes a gated residual back-connection and iteration submodule: (6) Gated residual back-connection and iterative submodule: This submodule integrates the above-mentioned enhanced information in an orderly manner through an iterative mechanism and global gating, achieving adaptive coordination between local and global features. Set the number of iterations K (which can be 1, 2, or 3) and perform the above submodules 1-5... This involves a series of sequential iterations. Each iteration shares weights and uses a small adapter to dynamically generate modulation parameters based on the current features, gradually refining the features through repeated enhancement. The initial features are set to the output of the dynamic convolutional inference. ,through The next iteration yields Ultimately, through learnable gating... (Initial value 0.1) will With the module's original input Residual connections are performed, and the output is obtained after layer normalization. .

[0044] In a preferred embodiment, all learnable gating parameters ( , , , All of them are initialized to 0.1. The design principle is as follows: if initialized to zero, the gradient of the augmentation branch is zero in the early stage of training and cannot be effectively learned; if initialized to a large value, it may seriously disturb the feature distribution of the pre-trained backbone network, resulting in unstable training; the initial value of 0.1 makes each augmentation branch have a weak contribution and effective gradient at the beginning of training, and the network can gradually and stably learn the optimal fusion weights during the training process, thereby adaptively balancing local details and global semantics.

[0045] S400 uses pyramid pooling branches to extract multi-scale contextual information for each level of multi-scale features, resulting in multi-scale contextual enhancement features; it also uses a feature pyramid network to aggregate shallow spatial details for each level of multi-scale features, and fuses the obtained intermediate features with the enhancement feature map to obtain a strong semantic feature map.

[0046] In some embodiments, adaptive average pooling of multiple scales is performed on the third-level multi-scale features through the pyramid pooling branch. Each pooled feature is compressed through a 1×1 convolution and then upsampled to restore the input feature map size. It is then concatenated with the third-level multi-scale features in the channel dimension and fused through a 3×3 convolution to obtain multi-scale context-enhanced features.

[0047] For example, in combination Figure 2In this embodiment, the multi-scale feature fusion module consists of two parallel branches: pyramid pooling and a feature pyramid network. These branches extract multi-scale contextual information and aggregate shallow spatial details, respectively, and finally fuse the outputs of the two branches. The pyramid pooling branch performs adaptive average pooling at multiple scales on the feature map output from stage 3, with pooling window sizes set to 1×1, 2×2, 3×3, and 6×6, aggregating contextual information from different receptive fields. Each pooled feature is compressed through a 1×1 convolution and then upsampled to restore the input feature map size. This is then concatenated with the stage 3 features along the channel dimension and fused through a 3×3 convolution to output multi-scale context-enhanced features. .

[0048] For example, in combination Figure 2 In this embodiment, the feature pyramid branch of the multi-scale feature fusion module starts from the C4 feature output in stage 4. After adjusting the number of channels through a 1×1 convolution, it is upsampled to the spatial size of C3, and then added element-wise with the C3 feature that has also been adjusted through a 1×1 convolution. This is then fused through a 3×3 convolution to obtain the intermediate feature P3. P3 is upsampled to the same spatial size as the C2 feature after DGLCM enhancement, added to the enhanced C2 feature that has been adjusted through a 1×1 convolution, and then fused through a 3×3 convolution to obtain the basic feature P2. Finally, the... Upsampled to the same resolution as P2, concatenated with P2 in the channel dimension, and finally fused through 3×3 convolution, batch normalization and ReLU activation to generate a strong semantic feature map.

[0049] The S500 maps strong semantic feature maps to the number of categories through a convolutional layer, and restores them to the original input resolution through bilinear interpolation upsampling, thus obtaining the classification result of whether each pixel of the forest cover remote sensing image is a forest.

[0050] For example, refer to Figure 2 In this embodiment, the segmentation head is used to map the fused feature map to the number of categories through two convolutional layers and a 1×1 convolution, and then upsampled by bilinear interpolation to restore it to the original input resolution, outputting the forest / non-forest classification result for each pixel.

[0051] Based on the following experiments, the dual-gated enhanced SwinTransformer forest cover remote sensing mapping method that combines deformable convolution and strip pooling, used in this embodiment, has the following technical advantages compared to the standard SwinTransformer: (1) The accuracy of forest cover mapping has been comprehensively improved. On Landsat remote sensing image datasets of two typical complex terrain areas, the technical solution (Swin-DGLCM) in this embodiment achieves significant improvements in all accuracy indicators compared to the standard Swin Transformer, as specifically quantified below: ① Region A dataset: The forest F1 score improved from 0.9482 to 0.9596, an increase of 1.14 percentage points; the overall precision improved from 0.9497 to 0.9608, an increase of 1.11 percentage points; the mean intersection-union ratio improved from 0.9082 to 0.9300, an increase of 2.18 percentage points; and the forest intersection-union ratio improved from 0.9011 to 0.9245, an increase of 2.34 percentage points.

[0052] ② Region B dataset: The forest F1 score improved from 0.9169 to 0.9305, an increase of 1.36 percentage points; the overall accuracy (OA) improved from 0.9174 to 0.9331, an increase of 1.57 percentage points; the mean intersection-over-union ratio (mIoU) improved from 0.8516 to 0.8792, an increase of 2.76 percentage points; and the forest intersection-over-union ratio (IoU) improved from 0.8339 to 0.8721, an increase of 3.82 percentage points. These results demonstrate that, with only a small increase in parameters, the technical solution in this embodiment achieves consistent and stable improvements in key indicators such as overall classification accuracy, forest category intersection-over-union ratio, and F1 score. The improvement is particularly significant in the forest IoU indicator, directly reflecting the enhanced completeness and boundary accuracy of forest-covered area identification.

[0053] (2) Targeted solutions to structural defects: ① Enhanced local geometric adaptability: By refining the branches locally, the model can adaptively adjust the shape of the receptive field to fit irregular boundaries such as forest edges and small patches. Qualitative visualization results confirm that the forest edge boundary segmentation is more accurate and the omission and missegmentation of small forest patches are significantly reduced.

[0054] ② Improved directional structure modeling capability: By using strip-guided global context branches, long-distance dependencies in the horizontal and vertical directions are explicitly captured, effectively avoiding prediction breaks and voids in linear extension structures such as ridge forest belts and valley forest corridors. The directional continuity and completeness of the output results are significantly better than the standard Swin Transformer.

[0055] ③ Improved feature fusion synergy: Through a multi-level learnable gating residual mechanism, the fusion of local detail enhancement, directional context and original backbone features is adaptive, avoiding information interference and redundancy caused by direct fusion, resulting in a stable training process and better consistency of the final classification results.

[0056] In summary, the technical solution of this embodiment, while maintaining the lightweight nature of the model, comprehensively improves the accuracy of forest cover fine mapping, especially showing significant advantages in the identification of irregular boundaries and directional extension structures, effectively making up for the shortcomings of the standard Swin Transformer in local geometric adaptability and directional long-distance modeling.

[0057] The technical solution of this embodiment has been rigorously experimentally verified on Landsat 8 OLI remote sensing images of two typical complex terrain areas, A and B. Through quantitative comparison with the standard Swin Transformer model, the feasibility and effectiveness of the proposed method have been fully demonstrated. The following are specific reproducible embodiments.

[0058] Experiment 1: Detailed Mapping of Forest Cover in Region A (1) Data sources and preparation Remote sensing image: Landsat 8 OLI surface reflectance image of area A in 2015, with a spatial resolution of 30m.

[0059] Input bands: Green band, red band, near-infrared band, and short-wave infrared band 2 are selected, corresponding to zero-based indices [2,3,4,6], for a total of 4 spectral bands. The band combination is the optimal scheme obtained through experimental screening.

[0060] Radiometric normalization: For each image, if the maximum pixel value is greater than 100, then divide all pixel values ​​by 10000 and map them to the [0,1] interval; otherwise, keep the original values.

[0061] Labeling: Forests and non-forests are labeled using a combination of manual visual interpretation and high spatial resolution imagery.

[0062] Sample Construction: The study area was cropped into 256×256 pixel non-overlapping image blocks. Spatial grouping was performed using the center geographic coordinates of each block: first, the inter-block step size was calculated, and grid rows and columns were divided accordingly. Then, 8×8 block groups were used as merging units, and 20% of the merged groups were randomly selected as the validation set, with the remainder used as the training set (random seed 42). The independent test set was taken from image files that were spatially completely isolated from the training and validation sets. Simultaneously, the effectiveness of class distribution and spatial separation between the training and validation sets was ensured through category pixel statistics and spatial center distance diagnostics.

[0063] (2) Hardware and software environment Hardware: 2×NVIDIA Tesla T4 GPUs or equivalent computing power devices.

[0064] Software: PyTorch 1.12+, timm library, rasterio, torchvision, scikit-learn; CUDA 11.3; Ubuntu 20.04 or Windows 10.

[0065] (3) Model structure and key parameters Backbone network: Swin-Tiny, configured features_only=True, out_indices=[1,2,3], output_fmt='NCHW', input size 256×256, input channels 4. Output feature maps are denoted as C2 (192 channels, 64×64), C3 (384 channels, 32×32), and C4 (768 channels, 16×16).

[0066] The DGLCM module is inserted after C2 in the output of stage 2. Key parameters: Token-Map projection dimension 192; in the locally deformable refinement branch, the channel compression ratio reduce_ratio=4, the deformable convolution kernel is 3×3, and the number of group normalization groups is 1; in the strip-guided branch, adaptive average pooling is used along the height and width directions, the depthwise separable convolution kernel is 3×3, and the number of groups equals the number of channels; the number of dynamic convolution experts is 4, and the 1D convolution kernel size is 3; all learnable gating parameters are initialized to 0.1; the number of iterations is 2, 3, and 4. The DGLCM module has 0.31M parameters.

[0067] The multi-scale fusion decoder includes a pyramid pooling module (PSPModule); lateral connections lateral4 (768→512), lateral3 (384→512), and lateral2 (192→512); feature pyramid fusion convolutions fpn_fuse3 and fpn_fuse2; and a final fusion layer final_fuse. The segmentation head consists of two convolutional layers, and finally, bilinear upsampling is applied to the input size.

[0068] Total number of parameters: 42.83M for the complete Swin-DGLCM model. The baseline Swin Transformer model for comparison has 42.52M parameters; the DGLCM in this embodiment only adds 0.31M parameters.

[0069] (4) Training strategy and hyperparameters The training hyperparameters were set strictly according to the code configuration file, and are summarized in Table 1.

[0070] Table 1 Training strategy and parameter settings

[0071] (5) Evaluation methods On the independent test set, load the model weights with the minimum validation loss for inference. Ignore background pixels with label 0, and construct a confusion matrix for both forest and non-forest classes (using sklearn.metrics.confusion_matrix, with a label list of [1,2]). Calculate the following based on this matrix: Overall accuracy (OA) = sum of diagonal elements / sum of confusion matrix; Forest IoU = TP1 / (TP1+FP1+FN1); Non-forest IoU = TP² / (TP² + FP² + FN²); Average crossover ratio (mIoU) = (Forest IoU + Non-forest IoU) / 2; The forest F1 score is calculated on the foreground pixels using `precision_recall_fscore_support`, taking the F1 value of the forest class.

[0072] (6) Experimental results Forest extraction results on the test set of region A are as follows Figure 4 As shown in Table 2, the quantitative evaluation results are as follows. This method, by adding only 0.31M parameters, improved the forest F1 score by 1.14 percentage points, the overall accuracy by 1.11 percentage points, the mIoU score by 2.18 percentage points, and the forest IoU score by 2.34 percentage points.

[0073] Table 2 Comparison of Forest Cover Mapping Accuracy in Region A

[0074] Experiment 2: Detailed Mapping of Forest Cover in Region B (1) Data sources and preparation Remote sensing imagery: Landsat 8 OLI surface reflectance imagery of a typical complex terrain area in region B, with a spatial resolution of 30m; Input bands: After experimental screening, six bands were selected: blue, green, red, near-infrared, shortwave infrared 1, and shortwave infrared 2, with radiometric normalization methods the same as in Experiment 1; Labeling and sample division adopted the same standards as in Experiment 1, labeling forest / non-forest; Training, validation, and independent test sets were divided by spatial grouping and random seed 42, and class balance and spatial isolation were diagnosed.

[0075] (2) Experimental configuration, hardware environment, software framework, model structure (the number of input channels of the backbone network is adjusted to 6), DGLCM module configuration, decoder structure and all training hyperparameters are strictly consistent with Example 1; the number of parameters of the backbone network and the complete model is basically the same as that of Experiment 1 (Swin-DGLCM is still on the order of 42.83M, with only slight changes in the input layer parameters).

[0076] (3) Experimental results: Forest extraction results on the test set of region B are as follows Figure 5As shown in Table 3, the quantitative evaluation results demonstrate that the proposed method significantly improves upon the pure Swin Transformer under complex mountainous conditions: the forest F1 score is improved by 1.36 percentage points, the overall accuracy by 1.57 percentage points, the mIoU by 2.76 percentage points, and the forest IoU by 3.82 percentage points. This verifies the enhanced modeling capabilities of the proposed DGLCM module for directional structures and local boundaries in scenarios with dramatic terrain undulations and fragmented forest distribution.

[0077] Table 3 Comparison of Forest Cover Mapping Accuracy in Region B

[0078] The two embodiments described above cover different band combinations and geographical regions. All experimental parameters are consistent with the code implementation, and the model training and evaluation process can be completely reproduced. The results show that the technical solution of this embodiment significantly improves the accuracy of forest cover mapping of medium-resolution remote sensing imagery by introducing only 0.31M additional parameters. It is particularly advantageous in challenging scenarios such as forest edges, small patch forests, and directional extending forests, fully verifying the feasibility and advancement of the technical solution.

[0079] Figure 6 This is a schematic diagram of a remote sensing image forest mapping device according to an embodiment of the present invention. The device includes a first module 610, a second module 620, a third module 630, a fourth module 640, and a fifth module 650.

[0080] The system comprises five modules: First, acquiring forest cover remote sensing images and normalizing them to obtain multispectral image patches; second, extracting features from the multispectral image patches at each level to obtain multi-scale features at each level; third, selecting multi-scale features at each level based on spatial resolution and semantic abstraction, performing local enhancement and directional context modeling to obtain enhanced feature maps; fourth, extracting multi-scale contextual information from each level's multi-scale features using pyramid pooling branches to obtain multi-scale context-enhanced features; a feature pyramid network aggregating shallow spatial details from each level's multi-scale features, fusing the obtained intermediate features with the enhanced feature maps to obtain strong semantic feature maps; and fifth, mapping the strong semantic feature maps to the number of categories through convolutional layers, restoring them to the original input resolution through bilinear interpolation upsampling, and obtaining the classification result of whether each pixel in the forest cover remote sensing image represents a forest.

[0081] Exemplarily, with the cooperation of the first, second, third, fourth, and fifth modules in the device, the embodiment device can implement any of the aforementioned remote sensing image forest mapping methods, namely: acquiring forest cover remote sensing images, normalizing them to obtain multispectral remote sensing image blocks; performing stepwise feature extraction on the multispectral remote sensing image blocks to obtain multi-scale features at each level; selecting each level of multi-scale features based on spatial resolution and semantic abstraction to perform local enhancement and directional context modeling to obtain enhanced feature maps; using pyramid pooling branches to extract multi-scale context information for each level of multi-scale features to obtain multi-scale context enhanced features; using a feature pyramid network to aggregate shallow spatial details for each level of multi-scale features, fusing the obtained intermediate features with the enhanced feature maps to obtain strong semantic feature maps; mapping the strong semantic feature maps to the number of categories through convolutional layers, and restoring them to the original input resolution through bilinear interpolation upsampling to obtain the classification result of whether each pixel of the forest cover remote sensing image is a forest. The beneficial effects of this invention are as follows: By introducing a module with local deformable refinement capabilities, the network can adaptively adjust the receptive field shape according to the image content, improving the ability to finely segment forest edges, small forest patches, and fragmented forest land, thus solving the problems of boundary blurring and loss of small targets caused by weak local geometric adaptability; by designing a strip-guided global semantic module, the network explicitly models spatial dependencies in multiple directions such as horizontal and vertical, ensuring the predictive continuity of strip-shaped and directional forest structures, thus solving the problem of prediction discontinuity caused by insufficient modeling of long-distance directional structures; by introducing a learnable residual scaling factor, the network automatically learns the optimal fusion weights during training, achieving adaptive collaboration between global context and local details, improving the overall consistency and edge accuracy of classification, and solving the problem of difficulty in effectively collaborating local details and global semantic features.

[0082] This invention also provides an electronic device, which includes a processor and a memory; The memory stores the program; The processor executes a program to perform the aforementioned remote sensing image forest mapping method; the electronic device has the function of carrying and running the software system for remote sensing image forest mapping provided in the embodiments of the present invention, such as a personal computer, minicomputer, mainframe, workstation, network or distributed computing environment, standalone or integrated computer platform, or communicating with charged particle tools or other imaging devices, etc.

[0083] This invention also provides a computer-readable storage medium storing a program that is executed by a processor to implement the remote sensing image forest mapping method described above.

[0084] In some alternative embodiments, the functions / operations mentioned in the block diagrams may not occur in the order shown in the operation diagrams. For example, depending on the functions / operations involved, two consecutively shown blocks may actually be executed substantially simultaneously, or the blocks may sometimes be executed in reverse order. Furthermore, the embodiments presented and described in the flowcharts of this invention are provided by way of example to provide a more comprehensive understanding of the technology. The disclosed methods are not limited to the operations and logic flows presented in the embodiments of this invention. Alternative embodiments are contemplated, in which the order of various operations is changed and sub-operations described as part of a larger operation are executed independently.

[0085] This invention also discloses a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium and execute the computer instructions, causing the computer device to perform the aforementioned remote sensing image forest mapping method.

[0086] Furthermore, although the invention has been described in the context of functional modules, it should be understood that, unless otherwise stated, one or more of the described functions and / or features may be integrated into a single physical device and / or software module, or one or more functions and / or features may be implemented in a separate physical device or software module. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the invention. Rather, considering the properties, functions, and internal relationships of the various functional modules in the apparatus disclosed in the embodiments of the invention, the actual implementation of the module will be understood within the scope of conventional skill of an engineer. Therefore, those skilled in the art can implement the invention as set forth in the claims using ordinary techniques without excessive experimentation. It is also understood that the specific concepts disclosed are merely illustrative and are not intended to limit the scope of the invention, which is determined by the full scope of the appended claims and their equivalents.

[0087] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0088] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can include, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.

[0089] More specific examples of computer-readable media (a non-exhaustive list) include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.

[0090] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0091] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0092] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.

[0093] The above is a detailed description of the preferred embodiments of the present invention, but the present invention is not limited to the embodiments described. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention, and these equivalent modifications or substitutions are all included within the scope defined by the claims of this application.

Claims

1. A method for forest mapping from remote sensing imagery, characterized in that, include: Forest cover remote sensing images were acquired and normalized to obtain multispectral remote sensing image patches. The multispectral remote sensing image patch is subjected to stepwise feature extraction to obtain multi-scale features at each level; Based on spatial resolution and semantic abstraction, multi-scale features at each level are selected to perform local enhancement and directional context modeling, resulting in enhanced feature maps; Pyramid pooling branch is used to extract multi-scale contextual information for each level of multi-scale features to obtain multi-scale contextual enhancement features; For each level of multi-scale features, a feature pyramid network is used to aggregate shallow spatial details. The obtained intermediate features are then fused with the enhanced feature map to obtain a strong semantic feature map. The strong semantic feature map is mapped to the number of categories through a convolutional layer, and then restored to the original input resolution through bilinear interpolation upsampling to obtain the classification result of whether each pixel of the forest cover remote sensing image is a forest. The multispectral remote sensing image patch is subjected to stepwise feature extraction using a sliding window self-attention mechanism to obtain multi-scale features at each level, including: The Swin Transformer backbone network is used to extract multispectral remote sensing image patches in four stages using a sliding window self-attention mechanism. The resulting multiscale features at each level include first-level, second-level, third-level, and fourth-level multiscale features. The second-level, third-level, and fourth-level multiscale features have corresponding channel dimensions, spatial resolution, and semantic abstraction according to the corresponding downsampling factor. The process involves selecting multi-scale features at each level based on spatial resolution and semantic abstraction, performing local enhancement and directional context modeling to obtain an enhanced feature map, including: Transform the word sequence of high spatial resolution second-level multi-scale features into a two-dimensional feature map, including word sequence... Normalization is performed, and then flattened features are obtained through linear projection. for: in, This is the weight matrix. For bias terms, Representation layer normalization, Indicates the number of sample images. Indicates the number of lexical elements. , Indicates the image height and width. This indicates the number of spectral bands selected based on the forest cover remote sensing image; Flat features The rearrangement operation restores the feature map to a two-dimensional feature map. ; The 2D feature map is processed using a channel compression and offset prediction network to obtain an intermediate feature map and spatial offset. A modulotable mask is generated using the Sigmoid function. A deformable convolution is then performed using the spatial offset and modulotable mask. The output of the deformable convolution is then group-normalized and processed with the GELU activation function before spatial attention gating is applied to obtain a spatial weight map. This spatial weight map is then concatenated with the 2D feature map residuals using learnable scalar gating parameters to obtain a local spatial attention weight map. for: in, For learnable scalar gating parameters, For spatial weighting, For group normalization function, This represents a deformable convolution operation. Where is the spatial offset, and mask is a moduloable mask. Represents a 1×1 convolution. This is an intermediate feature map; Local spatial attention weight map Adaptive average pooling is performed along the height and width directions to obtain vertical strip features. and horizontal band features The vertical and horizontal stripe features are expanded to the original spatial dimensions and then added element by element to generate a spatial attention map. for: in, The aggregated strip features For the Sigmoid function, For extended functions; Spatial attention map With local spatial attention weight map Element-wise multiplication is performed, local smoothing is achieved through depthwise separable convolution, and learnable gating parameters are used with two-dimensional feature maps. Perform residual connections and layer normalization to obtain enhanced feature maps. for: in, This indicates a depthwise separable convolution operation. This indicates element-wise multiplication. express convolution, For learnable gating parameters; Enhance feature maps After flattening into a sequence, feature adjustment is performed using linear projection and learnable gating parameters. With lexical sequence Establish residual connections to obtain enhanced feature word sequences. for: in, Indicates linear projection. To enhance feature maps The flattened sequence, The weight matrix is ​​a learnable matrix. This is a bias term.

2. The remote sensing image forest mapping method according to claim 1, characterized in that, The method further includes: The obtained enhanced feature word sequence Global average pooling is performed along the sequence dimension to obtain mixed weights of multiple learnable one-dimensional convolutional kernels; The dynamic convolution output is obtained by performing independent convolutions with multiple preset expert convolution kernels and mixed weights, followed by weighted summation. The dynamic convolution output is passed through a linear layer to generate scaling factors and biases, and then modulated using an affine transformation. This modulated output is then combined with an enhanced feature word sequence. Add the residuals together.

3. The forest mapping method based on remote sensing imagery according to claim 2, characterized in that, The method further includes: An iterative mechanism and global gating are employed to fuse the enhancement information of the enhanced feature word sequence. This includes sharing weights in each iteration, dynamically generating modulation parameters based on the current features through a small adapter, and using a total learnable gating to fuse the output of each iteration with the word sequence. Perform residual connections to obtain the final enhanced feature word sequence. for in, To enable learnable gating, The total number is The output of the next iteration.

4. The forest mapping method based on remote sensing imagery according to claim 1, characterized in that, The process of extracting multi-scale contextual information from each level of multi-scale features using pyramid pooling branches yields multi-scale context-enhanced features, including: The pyramid pooling branch performs adaptive average pooling on the third-level multi-scale features at multiple scales. Each pooled feature is then upsampled to the input feature map size after being compressed through a 1×1 convolution. It is then concatenated with the third-level multi-scale features in the channel dimension and fused through a 3×3 convolution to obtain multi-scale context-enhanced features.

5. The forest mapping method based on remote sensing imagery according to claim 4, characterized in that, The process involves aggregating shallow spatial details using a feature pyramid network for each level of multi-scale features, fusing the obtained intermediate features with the enhanced feature map to obtain a strong semantic feature map, including: After adjusting the number of channels of the fourth-level multi-scale feature through 1×1 convolution by the feature pyramid branch, it is upsampled to the spatial size of the third-level multi-scale feature, and then the feature is added element by element with the third-level multi-scale feature adjusted by 1×1 convolution. Finally, it is fused by 3×3 convolution to obtain the intermediate feature. The intermediate features are upsampled to the same spatial size as the features, added to the enhanced feature map adjusted by 1×1 convolution, and then fused by 3×3 convolution to obtain the basic features; The multi-scale contextual enhancement features are upsampled to the same resolution as the enhancement feature map, concatenated with the enhancement feature map in the channel dimension, and finally fused through 3×3 convolution, batch normalization and ReLU activation to generate a strong semantic feature map.

6. A remote sensing image forest mapping device, characterized in that, include: The first module is used to acquire forest cover remote sensing images, which are then normalized to obtain multispectral remote sensing image blocks. The second module is used to extract features from the multispectral remote sensing image blocks step by step to obtain multi-scale features at each level. The third module is used to select multi-scale features at each level based on spatial resolution and semantic abstraction, perform local enhancement and directional context modeling, and obtain enhanced feature maps. The fourth module is used to extract multi-scale contextual information from each level of multi-scale features using pyramid pooling branches, thus obtaining multi-scale context-enhanced features. For each level of multi-scale features, a feature pyramid network is used to aggregate shallow spatial details. The obtained intermediate features are then fused with the enhanced feature map to obtain a strong semantic feature map. The fifth module is used to map the strong semantic feature map to the number of categories through a convolutional layer, and restore it to the original input resolution through bilinear interpolation upsampling to obtain the classification result of whether each pixel of the forest cover remote sensing image is a forest. The multispectral remote sensing image patch is subjected to stepwise feature extraction using a sliding window self-attention mechanism to obtain multi-scale features at each level, including: The Swin Transformer backbone network is used to extract multispectral remote sensing image patches in four stages using a sliding window self-attention mechanism. The resulting multiscale features at each level include first-level, second-level, third-level, and fourth-level multiscale features. The second-level, third-level, and fourth-level multiscale features have corresponding channel dimensions, spatial resolution, and semantic abstraction according to the corresponding downsampling factor. The process involves selecting multi-scale features at each level based on spatial resolution and semantic abstraction, performing local enhancement and directional context modeling to obtain an enhanced feature map, including: Transform the word sequence of high spatial resolution second-level multi-scale features into a two-dimensional feature map, including word sequence... Normalization is performed, and then flattened features are obtained through linear projection. for: in, This is the weight matrix. For bias terms, Representation layer normalization, Indicates the number of sample images. Indicates the number of lexical elements. , Indicates the image height and width. This indicates the number of spectral bands selected based on the forest cover remote sensing image; flat features The rearrangement operation restores the feature map to a two-dimensional feature map. ; The 2D feature map is processed using a channel compression and offset prediction network to obtain an intermediate feature map and spatial offset. A modulotable mask is generated using the Sigmoid function. A deformable convolution is then performed using the spatial offset and modulotable mask. The output of the deformable convolution is then group-normalized and processed with the GELU activation function before spatial attention gating is applied to obtain a spatial weight map. This spatial weight map is then concatenated with the 2D feature map residuals using learnable scalar gating parameters to obtain a local spatial attention weight map. for: in, For learnable scalar gating parameters, For spatial weighting, For group normalization function, This represents a deformable convolution operation. Where is the spatial offset, and mask is a moduloable mask. Represents a 1×1 convolution. This is an intermediate feature map; Local spatial attention weight map Adaptive average pooling is performed along the height and width directions to obtain vertical strip features. and horizontal band features The vertical and horizontal stripe features are expanded to the original spatial dimensions and then added element by element to generate a spatial attention map. for: in, The aggregated strip features For the Sigmoid function, For extended functions; Spatial attention map With local spatial attention weight map Element-wise multiplication is performed, local smoothing is achieved through depthwise separable convolution, and learnable gating parameters are used with two-dimensional feature maps. Perform residual connections and layer normalization to obtain enhanced feature maps. for: in, This indicates a depthwise separable convolution operation. This indicates element-wise multiplication. express convolution, For learnable gating parameters; Enhance feature maps After flattening into a sequence, feature adjustment is performed using linear projection and learnable gating parameters. With lexical sequence Establish residual connections to obtain enhanced feature word sequences. for: in, Indicates linear projection. To enhance feature maps The flattened sequence, The weight matrix is ​​a learnable matrix. This is a bias term.

7. An electronic device, characterized in that, Including the processor and memory; The memory is used to store programs; The processor executes the program to implement the remote sensing image forest mapping method as described in any one of claims 1-5.

8. A computer-readable storage medium, characterized in that, The storage medium stores a program, which is executed by a processor to implement the remote sensing image forest mapping method as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Diabetic eye lesion intelligent diagnosis system based on multi-model cluster and causal enhanced LLM cooperation

    CN122117343A

  • Intelligent plant health inspection method and system based on mobile robot

    CN122392018A