Forest land change detection method based on space-time attention and double-expert dynamic routing fusion

By fusing spatiotemporal attention and dual-expert dynamic routing, this method addresses the problems of insufficient spatiotemporal correlation modeling and difficulty in feature differentiation in existing forest change detection technologies, achieving high-precision forest change detection and reducing the false detection rate.

CN122049673APending Publication Date: 2026-05-15HARBIN ENG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HARBIN ENG UNIV
Filing Date
2026-02-03
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

Existing deep learning change detection methods struggle to effectively model the spatiotemporal relationships between two-phase images in forest change detection. Their multi-scale feature fusion strategies are simplistic and lack mechanisms to distinguish between change-related features and background noise features. They are also susceptible to interference from pseudo-change factors such as changes in illumination and atmospheric conditions, resulting in insufficient detection accuracy and robustness.

Method used

A forest change detection method based on spatiotemporal attention and dual-expert dynamic routing fusion is adopted. Features are extracted by a multi-scale gated bottleneck convolutional encoder, and combined with a bidirectional spatiotemporal cross-attention module and a scale-adaptive soft expert fusion unit to achieve adaptive weighted fusion of features and distinguish between real and pseudo-change information.

Benefits of technology

It improves the accuracy and robustness of forest land change detection, effectively suppresses interference from changes in light intensity and atmospheric conditions, reduces the false detection rate, and enhances detection accuracy and overall performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122049673A_ABST
    Figure CN122049673A_ABST
Patent Text Reader

Abstract

The invention discloses a forest land change detection method based on space-time attention and double-expert dynamic routing fusion, and belongs to the technical field of remote sensing image processing. The method aims at solving the problem that in the prior art, a distinguishing mechanism for change correlation features and background noise features is lacked in the feature fusion process, and interference is likely to happen. The multi-layer multi-scale gating bottleneck convolution encoder captures local detail features and context features at the same time through a double-path structure, and adaptive weighting of the features is achieved through a gating mechanism; the multi-layer bidirectional space-time cross attention module calculates a time attention matrix and a space attention matrix on each scale to establish space-time correlation, and double-time-phase features are subtracted to obtain a difference feature map. The scale adaptive soft expert fusion unit performs intra-scale normalization and gating preprocessing and then performs splicing fusion, global experts and local experts extract channel importance from the perspective of average pooling and maximum pooling, and then fusion features are obtained; and realizing classification decision of pixel-level change detection based on the fusion features.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of remote sensing image processing technology and relates to a method for detecting forest land changes. Background Technology

[0002] Forest resources are a vital component of the Earth's ecosystem, playing an irreplaceable role in maintaining global carbon cycle balance, protecting biodiversity, and regulating regional climate. With the intensification of global climate change and the continued impact of human activities, forest resources are facing unprecedented threats, including deforestation, fire damage, the spread of pests and diseases, and illegal encroachment during urbanization. Therefore, timely and accurate monitoring of forest changes is crucial for formulating scientific forest protection policies, assessing ecological environment quality, and achieving sustainable development goals. Remote sensing technology, with its advantages of large-scale, periodic, and non-contact observation, has become an important means of detecting forest changes. By comparing remote sensing images acquired at different times, changes in forest size can be effectively identified. However, while hyperspectral remote sensing images contain rich spectral information, they also present challenges such as high data dimensionality, strong inter-band correlation, and information redundancy, placing higher demands on the feature extraction capabilities of change detection algorithms. In recent years, deep learning technology has made significant progress in the field of remote sensing image change detection. Convolutional neural networks can automatically learn hierarchical feature representations of images, exhibiting stronger feature expression capabilities compared to traditional methods. However, existing deep learning-based change detection methods still suffer from the following shortcomings: traditional convolutional operations primarily focus on local spatial information, making it difficult to effectively model the complex spatiotemporal relationships between two-phase images, resulting in inaccurate localization of change regions; multi-scale feature fusion strategies are relatively simple, typically employing direct concatenation or element-wise addition, failing to fully exploit the complementary information between features at different scales; and the lack of a mechanism to distinguish between change-related features and background noise features during feature fusion makes them susceptible to interference from pseudo-change factors such as changes in illumination and atmospheric conditions, leading to a high false detection rate. Therefore, there is an urgent need for a forest change detection method that can effectively model the spatiotemporal relationships between two-phase images, intelligently fuse multi-scale features, and adaptively distinguish between real and pseudo-change information to improve detection accuracy and robustness. Summary of the Invention

[0003] In order to address the problem that existing technologies lack a mechanism for distinguishing between change-related features and background noise features during feature fusion, and are easily affected by pseudo-change factors such as changes in illumination and atmospheric conditions, this invention aims to solve the problem that existing technologies lack a mechanism for distinguishing between change-related features and background noise features during feature fusion, and are therefore susceptible to interference from pseudo-change factors such as changes in illumination and atmospheric conditions.

[0004] A forest change detection method based on spatiotemporal attention and dual-expert dynamic routing fusion includes:

[0005] Hyperspectral remote sensing images of the same region at different time phases are acquired as input data and denoted as the first time phase image. Second phase image Channel-by-channel normalization preprocessing is performed on the dual-temporal hyperspectral remote sensing images; pixel-level sample blocks are extracted from the dual-temporal images using a sliding window method; for the center pixel position... Spatial neighborhood blocks centered at the given location are extracted from the two-phase images. and The sample blocks, namely dual-temporal samples, are fed into the forest land change detection network model for forest land change detection. The forest land change detection network model includes a multi-layer, multi-scale gated bottleneck convolutional encoder, a multi-layer bidirectional spatiotemporal cross-attention module, and a single-layer scale-adaptive soft expert fusion unit.

[0006] The dual-temporal sample blocks are input into their respective multi-scale gated bottleneck convolutional encoders. The multi-scale gated bottleneck convolutional encoders first extract features through two parallel feature extraction paths. The first path captures local fine-grained texture features through two cascaded bottleneck convolutional modules, while the second path uses a bottleneck convolutional module to expand the receptive field to aggregate contextual information. The dilation rate of the bottleneck convolutional module in the second path is greater than that in the first path. The features from the two paths are then concatenated and fused to obtain the final feature. Afterwards, characteristics Multi-scale gating features are obtained through channel gating mechanism. Simultaneously, dual-phase sample blocks are sent in. Convolution, after group normalization and with a learnable coefficient Multiply to obtain the residual output Finally, the residuals and multi-scale gated features will be combined. The final output of the module is obtained by adding the two temporal sample blocks. This output is obtained by passing the i-th layer of the multi-scale gated bottleneck convolutional encoder in a multi-layer, multi-scale gated bottleneck convolutional encoder. This is denoted as... ;

[0007] Will The data is fed into the corresponding layer's bidirectional spatiotemporal cross-attention module for processing to obtain the attention weights for the opposing temporal phases. and The bidirectional spatiotemporal cross-attention modules at different layers have the same architecture but independent weights; targeting , through respectively Convolution and batch normalization are projected, and then compared with their respective... , Features are obtained by performing residual connections , Interactively enhanced differential features are obtained by feature subtraction. ;

[0008] Targeting interactive enhancement features The features are fed into a scale-adaptive soft expert fusion unit for multi-scale feature fusion. First, the feature is adaptively weighted for each scale channel by a scale gating module, and then concatenated and normalized along the channel dimension to form a joint feature. The joint features are further processed by soft expert fusion. The soft expert fusion employs heterogeneous dual-expert processing: the global expert captures the overall context through global average pooling, while the local expert extracts significant responses through global max pooling. The fusion coefficients of the global and local experts are calculated using a soft router to obtain the channel weights. ,based on and Obtain fusion features ;

[0009] Ultimately based on Achieve classification decision-making for pixel-level change detection.

[0010] Furthermore, during the channel-by-channel normalization preprocessing of the dual-temporal hyperspectral remote sensing images, each spectral channel C is subjected to an independent normalization operation.

[0011] Furthermore, the process of performing independent normalization for each spectral channel C is as follows:

[0012] ,

[0013] This represents the raw image data of the C-th channel. This represents the normalized image data of the Cth channel; , These are the minimum and maximum pixel values ​​for the C-th channel, respectively.

[0014] Furthermore, the dilation rate of the first path bottleneck convolutional module is 1, and the dilation rate of the second path bottleneck convolutional module is 2.

[0015] Furthermore, features Multi-scale gating features are obtained through channel gating mechanism. The process includes:

[0016] The input is first processed through global average pooling (GAP), convolution, and sigmoid normalization to generate channel attention weights. ; Features After convolution, normalization, and LReLU processing, and then combined with gated weights... Channel-by-channel multiplication is performed to achieve adaptive weighting and obtain multi-scale gated features. .

[0017] Furthermore, The data is fed into the corresponding layer's bidirectional spatiotemporal cross-attention module for processing to obtain the attention weights for the opposing temporal phases. and The process includes:

[0018] The bidirectional spatiotemporal cross-attention module adopts a symmetrical bidirectional structure, through batch normalization and... Convolution generates Query, Key, and Value embeddings:

[0019] , , ,

[0020] in, This indicates a batch normalization operation;

[0021] for The same method is used to obtain the embedding. , obtain and convolution Shared weights, obtain and convolution Shared weights, obtain and convolution and They are weighted independently;

[0022] Calculate the time correlation matrix spatial correlation matrix ; Calculate symmetrically and Attention weights are obtained by normalizing all correlation matrices along their respective dimensions using Softmax, and are denoted as follows: ;according to and Obtain the attention weights of the opposing phases and .

[0023] Furthermore, the scale-adaptive soft expert fusion unit obtains joint features. The process includes:

[0024] Targeting interactive enhancement features In-scale gated weights are generated using global average pooling and a fully connected network. Channel-weighted features are applied using gating weights: , This indicates a channel-based multiplication operation;

[0025] Gated weighted multi-scale difference features Joint features are obtained by splicing along the channel dimension and performing group normalization layers. .

[0026] Furthermore, the channel weights are obtained through soft expert fusion in the scale-adaptive soft expert fusion unit. The process includes:

[0027] Soft expert fusion comprises two parallel branches: global expert and local expert. The global expert extracts features based on global average pooling and linearization layers. Local experts extract features based on global max pooling and linearization layers. ;

[0028] The soft router is used to adaptively calculate the fusion coefficients of global and local experts:

[0029] ,

[0030] in, and The routing coefficients for the global expert and the local expert are respectively, satisfying... ;

[0031] Channel weights are calculated using a contrast-fusion strategy. .

[0032] Furthermore, the soft expert fusion in the scale-adaptive soft expert fusion unit is based on... and Obtain fusion features The process includes:

[0033] ,

[0034] ,

[0035] in, These are learnable residual scaling parameters.

[0036] Furthermore, ultimately based on The process of classification decision-making to achieve pixel-level change detection includes:

[0037] Fusion features The feature vector is compressed into a one-dimensional feature vector by global max pooling, and then the predicted probabilities of two categories, change and no change, are output by a fully connected classification layer to complete the classification decision for pixel-level change detection.

[0038] Beneficial effects:

[0039] This invention provides a forest change detection method based on spatiotemporal attention and dual-expert dynamic routing fusion. Compared with existing technologies, this invention employs a gated bottleneck convolution module for multi-scale feature extraction, simultaneously capturing local detail features and large-scale contextual features through a dual-path structure. The gating mechanism enables adaptive weighted fusion of features, effectively improving the network's ability to perceive change information at different scales. Furthermore, this invention designs a spatiotemporal attention module that can simultaneously model the correlation between two-phase images in the temporal and spatial dimensions. The attention mechanism enhances the feature response of change-related regions, improving the accuracy of change region localization. A scale-aware dual-expert dynamic routing fusion strategy is proposed. Through the collaborative dynamic routing of global and local experts, combined with intra-scale normalization and gating preprocessing mechanisms, it intelligently distinguishes between real change features and background noise features, effectively suppressing interference from pseudo-change factors such as illumination changes and atmospheric condition differences, thus reducing the false detection rate. Attached Figure Description

[0040] Figure 1 The flowchart illustrates a forest change detection method based on spatiotemporal attention and dual-expert dynamic routing fusion, as shown in the specific implementation.

[0041] Figure 2 This is a schematic diagram of the overall structure of a forest change detection model based on spatiotemporal attention and dual-expert dynamic routing fusion, which is a specific implementation method.

[0042] Figure 3 This is a schematic diagram of the gated bottleneck convolution module structure in a specific implementation.

[0043] Figure 4 This is a schematic diagram of the spatiotemporal attention module structure in a specific implementation.

[0044] Figure 5 This is a schematic diagram of the scale-aware dual-expert dynamic routing fusion module for a specific implementation.

[0045] Figure 6 This is a screenshot of the detection results for Region 1.

[0046] Figure 7 This is a screenshot showing the detection results for Region2.

[0047] Figure 8 This is a screenshot showing the detection results for Region 3. Detailed Implementation

[0048] To address the aforementioned problems in existing technologies, this invention proposes a forest land change detection method based on spatiotemporal attention and dual-expert dynamic routing fusion. This method extracts multi-scale features through a gated bottleneck convolution module, models the spatiotemporal correlation between two-phase images using a spatiotemporal attention mechanism, and employs a scale-aware dual-expert dynamic routing fusion strategy to intelligently distinguish change-related features from background noise features, thereby achieving high-precision forest land change detection. A detailed description of the specific implementation is provided below.

[0049] Specific implementation method one: Combining Figure 1 and Figure 2 This implementation method is described below.

[0050] This implementation method is a forest change detection method based on spatiotemporal attention and dual-expert dynamic routing fusion, including:

[0051] Step 1: Acquire hyperspectral remote sensing images of the same area at different time phases as input data, and denote them as the first time phase images. Second phase image Where C represents the number of spectral bands, H and W represent the height and width of the image, respectively, and the corresponding change detection ground truth label map is obtained.

[0052] Step 2: Perform channel-by-channel normalization preprocessing on the dual-temporal hyperspectral remote sensing images to eliminate dimensional differences between different bands. An independent normalization operation is performed for each spectral channel C, as shown in the following formula:

[0053]

[0054] This represents the raw image data of the C-th channel. This represents the image data after normalization of the Cth channel. , These are the minimum and maximum pixel values ​​for the C-th channel, respectively.

[0055] Extract the spatial coordinates of each pixel in the ground truth label image, and then divide these pixel coordinates into training sample set and test sample set according to the ratio.

[0056] Step 3: Extract pixel-level sample blocks from the dual-temporal images using a sliding window approach. Let the window size be... In this embodiment, the following settings are provided: Each sample block, with its center pixel as the reference, includes its spatial neighborhood information. For the center pixel position... Spatial neighborhood blocks centered at the given location are extracted from the two-phase images. and ,in Then, a training dataset is constructed.

[0057] Step 4: Construct a forest land change detection network model. The network model includes a multi-layer, multi-scale gated bottleneck convolutional encoder, a multi-layer bidirectional spatiotemporal cross-attention module, and a single-layer scale-adaptive soft expert fusion unit.

[0058] In this embodiment, each of the processing steps corresponding to the dual-temporal sample blocks includes a 3-layer multi-scale gated bottleneck convolutional encoder, and the bidirectional spatiotemporal cross-attention module is also set to 3 layers.

[0059] The two-phase sample blocks are input into their respective multi-scale gated bottleneck convolutional encoders, such as... Figure 3 As shown, the multi-scale gated bottleneck convolutional encoder contains two parallel feature extraction paths. One path captures local fine-grained texture features through two cascaded small dilation bottleneck convolutional modules, while the other path uses a large dilation bottleneck convolutional module to expand the receptive field to aggregate a wide range of contextual information.

[0060] The first path uses a two-layer standard expansion rate. Bottleneck convolution is used to extract local detail features. The calculation process is as follows:

[0061]

[0062] in, The original input for the entire module is GN, which represents the group normalization operation, and the number of groups is set to 1. , The number of channels in the current bottleneck convolution output is given. LeakyReLU represents the linear rectified activation function with leakage, and the negative slope is set to 0.01.

[0063] The bottleneck convolution module in the first path of the multi-scale gated bottleneck convolutional encoder adopts a three-segment structure: 1×1 convolution for dimensionality reduction, depthwise separable convolution for spatial feature extraction, and 1×1 convolution for dimensionality increase.

[0064] The first layer is a channel-compression pointwise convolution, using a 1×1 convolution kernel to reduce the number of channels from... Compress to ,in , To express the compression ratio, the compression operation can be represented as:

[0065] ,

[0066] in This represents the input to the convolution. Weight matrix during convolution ;

[0067] The second layer is a depthwise separable convolutional layer, using a 3×3 convolutional kernel to extract spatial features independently for each channel. The number of groups equals the number of channels. :

[0068] ,

[0069] in Weight matrix during convolution ;

[0070] The third layer is a channel-wise convolution, using a 1×1 convolution kernel to map the number of channels to... :

[0071] The complete computation process of bottleneck convolution can be simplified as follows:

[0072]

[0073] The bottleneck convolution module of the second path in the multi-scale gated bottleneck convolutional encoder has the same structure as the bottleneck convolution module in the first path, the difference being that it uses an increased dilation rate. Bottleneck convolutional modules extract contextual features :

[0074]

[0075] Dilated convolution expands the receptive field by inserting holes between kernel elements; the dilation rate... of The equivalent receptive field of the convolution kernel is It can capture a wider range of contextual information.

[0076] After the dual-path features are concatenated and fused, the response intensity of each channel is adaptively adjusted through a channel gating mechanism based on global statistical information, thereby achieving efficient extraction and integration of multi-scale features. The channel gating mechanism generates channel attention weights through global average pooling (GAP), convolution, and sigmoid normalization, which are used to adaptively adjust the importance of each channel. The gating weight calculation process is as follows:

[0077]

[0078] in, This represents the Sigmoid activation function.

[0079] The features of the different perceptual fields obtained from the two paths described above are concatenated along the channel dimension to obtain... After further processing with convolution, normalization, and LReLU, and then multiplying with the gate weights channel by channel to achieve adaptive weighting, multi-scale gated features are obtained. The processing procedure can be represented as follows:

[0080]

[0081]

[0082]

[0083] in, This indicates a splicing operation along the channel dimension. This indicates multiplication by channel.

[0084] For the original input First through Convolution maps the number of channels to Then, after group normalization and with a learnable coefficient Multiplication yields the residual output. .

[0085] Finally, the residuals and multi-scale gated features will be combined. The final output of the module is obtained by adding them together.

[0086] For the The dual-temporal features extracted by the multi-scale gated bottleneck convolutional encoder are The dual-temporal sample blocks are processed by a three-layer multi-scale gated bottleneck convolutional encoder to obtain the multi-scale features of the first temporal phase. Multi-scale features of the second phase ,in , These correspond to shallow, intermediate, and deep features, respectively. With increasing layer... The increase in channel dimensions Gradually expand, specifically This design allows the network to progressively transition from capturing low-level texture details using fewer channels to encoding high-level abstract semantics using richer channel representations. (Shallow features) It mainly contains local details such as edges and textures, requiring relatively low expressive power, so fewer channels are used; mid-level features Including intermediate semantic information such as target components, more channels are needed to express combination patterns; deep features It contains global semantic and category discrimination information and requires the richest channels to encode highly abstract semantic concepts.

[0087] like Figure 4 As shown, this paper instantiates three bidirectional spatiotemporal cross-attention modules with the same architecture but independent weights at different feature scales. The bidirectional spatiotemporal cross-attention modules adopt a symmetrical bidirectional structure, and utilize batch normalization and... Convolution generates Query, Key, and Value embeddings:

[0088]

[0089] in, This indicates a batch normalization operation. .

[0090] for The same method is used to obtain the embedding. , among which and convolution Shared weights, obtain and convolution Shared weights, obtain and convolution and They are weighted independently. To capture cross-temporal correlations, the features are first embedded ( , and , )from Remodeled into a two-dimensional matrix ,in This represents the number of spatial locations. Then, two complementary correlation matrices are calculated: the temporal correlation matrix. Model the channel-level style correspondence between two time phases to achieve implicit alignment of spectral characteristics:

[0091]

[0092] Spatial correlation matrix Capture pixel-level positional correspondences to handle geometric mismatches:

[0093]

[0094] in, This represents the matrix transpose operation.

[0095] Calculate symmetrically and Attention weights are obtained by normalizing all correlation matrices along their respective dimensions using Softmax, and are denoted as follows: The bidirectional spatiotemporal cross-attention module (BSCA module) then performs cross-temporal feature reconstruction through bidirectional attention exchange. For each temporal branch, attention weights from the opposing temporal branch are applied:

[0096]

[0097] in, Indicates a reshaping operation;

[0098] This bidirectional cross-interaction enables each temporal feature to self-calibrate using style features and geometric information learned from the corresponding temporal phase. To recover the original channel dimensions and preserve discriminative information, the reconstructed features are processed through... Convolution and batch normalization are used for projection, and then the input is combined with the original input via residual connections:

[0099]

[0100] Finally, the interactively enhanced differential features are obtained by feature subtraction:

[0101]

[0102] in, Convolution transfers features from Channel projection back Channel. Through a coupled channel-spatial attention mechanism, the BSCA module effectively addresses two key issues: the temporal correlation matrix mitigates spurious changes caused by illumination and seasonal variations through cross-temporal style correspondence; the spatial correlation matrix establishes explicit pixel-level correspondences to handle geometric mismatches. The resulting differential features... It exhibits an enhanced response in regions of real change while suppressing artifacts caused by spurious changes.

[0103] like Figure 5 As shown, the interaction-enhanced differential features at three scales Features are fed into a scale-adaptive soft expert fusion unit for multi-scale feature fusion. First, the feature is adaptively weighted across each scale channel by a scale-gating module, then concatenated and normalized along the channel dimension to form a joint feature. This joint feature is further processed by the soft expert fusion unit. The soft expert fusion unit employs a heterogeneous dual-expert design: the global expert captures the overall context through global average pooling, while the local expert extracts significant responses through global max pooling. A soft router dynamically balances the contributions of the two experts, amplifying mutually agreed-upon changing features and suppressing highly divergent noisy features through comparative fusion, thus achieving robust multi-scale feature fusion. More specifically...

[0104] Enhanced differential features across three scales Independent scale-gating preprocessing is performed separately. This module employs a lightweight compressed excitation structure, generating in-scale gating weights through global average pooling and a two-layer fully connected network.

[0105]

[0106] in, For global average pooling, Let Gaussian error be the activation function of the linear unit. This is the Sigmoid activation function.

[0107] Channel-weighted features are applied using gating weights:

[0108]

[0109] in, This indicates a channel-based multiplication operation.

[0110] The three scale difference features after gating and weighting are concatenated along the channel dimension and then normalized.

[0111]

[0112] in, This indicates splicing along the channel dimension. For group normalization layers, the total number of channels .

[0113] The soft expert fusion comprises two parallel branches: global expert and local expert, which extract channel importance information from different perspectives. The global expert extracts overall statistical features based on global average pooling. Its design goal is to learn the overall importance of each channel from a global perspective and identify a wide range of consistency patterns:

[0114]

[0115] in, For linearization layers in fully connected networks; For those with learnable temperature parameters Temperature scaling Sigmoid function;

[0116] Local experts extract salient features based on global max pooling. Their design goal is to learn the saliency of each channel from the perspective of local maximum response, thereby identifying prominent target changes.

[0117]

[0118] in, For global max pooling, For those with learnable temperature parameters The temperature scaling sigmoid function is used to adjust the smoothness of expert confidence; the temperature scaling sigmoid functions for global and local expert paths share parameters. The two-layer fully connected network first reduces the number of channels from... Compress to an intermediate dimension, then restore to the original dimension. .

[0119] The soft router is used to adaptively calculate the fusion coefficients of global and local experts, dynamically adjusting the contribution ratio of the two experts based on the statistical properties of the input features.

[0120]

[0121] in, and The routing coefficients for the global expert and the local expert are respectively, satisfying... .

[0122] The final channel weights are calculated using a contrastive fusion strategy, which combines the overall evaluation of global experts with the significance evaluation of local experts.

[0123]

[0124] This fusion formula has the following characteristics: when the router is biased towards global experts, that is... When the weight is large, the final weight is mainly determined by global experts; when the router favors local experts, that is... When the weights are large, the final weights are determined by the product of the two experts' scores. Only channels deemed important by both experts receive higher weights, achieving more stringent feature selection. A fusion weight is used to weight the joint features by channels, and a learnable residual scaling factor is introduced. Preserve original feature information:

[0125]

[0126] in, These are learnable residual scaling parameters. Residual connections ensure the preservation of original multi-scale feature information while incorporating enhanced information from dual-expert dynamic routing weighting. This fuses the features... The feature vector is compressed into a one-dimensional feature vector by global max pooling, and then the predicted probabilities of two categories, change and no change, are output by a fully connected classification layer to complete the classification decision for pixel-level change detection.

[0127] Step 5: Train the forest land change detection network model:

[0128] The cross-entropy loss function is used as the training objective, and the Adam optimizer is used to optimize the network parameters. A cosine annealing learning rate scheduling strategy is used to dynamically adjust the learning rate. The change detection model is trained end-to-end until the model converges. The cross-entropy loss function is used to measure the difference between the network's predicted probability distribution and the true label distribution, and its definition is as follows:

[0129]

[0130] in, This indicates the number of samples in the current batch. Indicates the first Each sample belongs to category The true label uses one-hot encoding, meaning that if the true category is... but and for , Indicates the network prediction of the first Each sample belongs to category The probability, A tiny constant to prevent overflow in logarithmic calculations.

[0131] The gradient of the cross-entropy loss can be derived as follows:

[0132]

[0133] The original predicted score before Softmax.

[0134] The network parameters are optimized using the Adam adaptive moment estimation optimizer. The Adam optimizer combines the advantages of the momentum method and RMSprop, and can adaptively adjust the learning rate for each parameter. Let... For network parameters, For the first The gradient of the step, and the parameter update rules of the Adam optimizer are as follows:

[0135]

[0136]

[0137] and These are the first-order moment estimate and the second-order moment estimate of the gradient, respectively. and This is the moment estimate after bias correction. and The exponential decay rate is estimated by moments. It is the numerical stability constant. For the first The learning rate for each step. The initial learning rate is set to... The weight decay coefficient is set to L2 regularization is used to prevent overfitting. A cosine annealing learning rate scheduling strategy is employed to dynamically adjust the learning rate, causing it to gradually decay from its initial value to its minimum according to a cosine function. This facilitates fine-tuning of parameters in the later stages of model training.

[0138]

[0139] Indicates the current training round. Indicates the maximum number of training rounds. This represents the minimum learning rate. In the early stages of training... hour, Maintaining a large learning rate accelerates convergence; in the later stages of training hour, Fine-tuning using a smaller learning rate.

[0140] Network parameter initialization employs the Kaiming initialization method, optimized for networks using ReLU and its variant activation functions. For convolutional layers, weights... From a mean of 0 and a variance of Sampling from a normal distribution:

[0141]

[0142] This represents the total number of elements in the input features. Input the number of channels. This is the kernel size. This initialization method ensures that the variance of the output of each layer remains stable, which is beneficial for gradient propagation in deep networks. The convolutional layer bias is initialized to 0. The normalization layer includes scaling parameters for batch normalization (BN) and group normalization (GN). Initialized to 1, bias parameter Initialize to 0. The weights of the fully connected layer are initialized using a normal distribution with a mean of 0 and a standard deviation of 0.01.

[0143]

[0144] The bias of the fully connected layer is initialized to 0. During training, all training samples are traversed once in each epoch, and the batch size is set to... Within each batch, A dual-temporal sample block is used to perform forward propagation on the input network to calculate the cross-entropy loss. The gradients of the parameters in each layer are then calculated using the backpropagation algorithm, and the network parameters are updated using the Adam optimizer. The training process continues... One epoch.

[0145] The performance on the validation set is monitored during model training. After training, the final model weights are saved as the optimal model weights for subsequent change detection inference. During training, at the end of each epoch, the current model is used to evaluate the validation set, and evaluation metrics such as overall accuracy (OA), Kappa coefficient, and F1 score are calculated. Overall accuracy is defined as the proportion of correctly classified pixels out of the total number of pixels.

[0146]

[0147] This represents the number of true positives, i.e., the number of correctly detected change pixels. This represents the number of true negative examples, i.e., the number of correctly detected unchanged pixels. This indicates the number of false positives, meaning that unchanged pixels were mistakenly identified as changed. This represents the number of false negatives, where changed pixels are mistakenly classified as unchanged. The Kappa coefficient measures the consistency between the classification result and a random classification.

[0148]

[0149] To ensure consistency, the calculation formula is as follows:

[0150]

[0151] The F1 score is the harmonic mean of precision and recall:

[0152]

[0153]

[0154] exist After each epoch of training is completed, save the model weight file for the final epoch, including the weight parameters of all convolutional layers, normalized layers, and fully connected layers. Model weights are stored in binary format with the file extension .pkl or .pth for easy loading and deployment later.

[0155] Step Six: Input the dual-temporal remote sensing images of the region to be detected into the trained optimal change detection model, predict whether a change has occurred at each pixel location, and output the change detection result image corresponding to the remote sensing image to be detected, thus completing the change detection task for the entire image. Load the trained optimal model weights. Set the network to inference mode.

[0156] Dual-temporal remote sensing images of the area to be detected and Perform the same channel-wise normalization preprocessing as during the training phase. For each pixel location in the test image... ,in , Extract a dual-temporal sample block centered at this location using the method in step three. and :

[0157]

[0158]

[0159] The sample block is fed into the pre-trained network model for forward inference, sequentially passing through gated bottleneck convolutional feature encoding, spatiotemporal attention feature interaction, scale-aware dual-expert dynamic routing fusion, global pooling, and classification layer processing to obtain the predicted probability of the change category for that pixel. Results of change detection:

[0160]

[0161] Traverse all After determining the position of each pixel, the prediction results of each pixel are stitched together to form a complete change detection result image. :

[0162]

[0163] Indicates pixel position The forest land has undergone changes, such as deforestation, fire damage, and pest and disease infestation. This indicates that the forest land at this location remains stable and unchanged. The change detection results are visualized, with changed areas marked in white and unchanged areas marked in black, facilitating subsequent analysis and decision-making by forestry management departments. To improve inference efficiency, a batch inference strategy is adopted, grouping sample blocks from multiple pixel locations into batches for parallel processing. Let the batch size be... Then each forward propagation process Detecting changes in pixels, the total inference time complexity is O(n). Second forward propagation.

[0164] The detection effect of the present invention is as follows Figures 6-8 As shown, Figures 6-8 The images show the results for three datasets (Region1, Region2, and Region3). Figures 6-8 (a) is the pseudo-color image of the first time phase, (b) is the pseudo-color image of the second time phase, and (c) is the corresponding output prediction image. White represents change, black represents no change, red represents false detection, and blue represents false negative detection. This invention can intelligently distinguish between real change features and background noise features, effectively suppressing interference from pseudo-change factors such as changes in illumination and atmospheric conditions, thus reducing the false detection rate. Furthermore, verification has shown that the method of this invention achieves high overall accuracy, Kappa coefficient, and F1 score in forest land change detection tasks, demonstrating good detection performance and practical value.

[0165] The above examples of the present invention are merely illustrative of the computational model and process of the present invention, and are not intended to limit the implementation of the present invention. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is impossible to exhaustively list all possible implementations here. Any obvious variations or modifications derived from the technical solutions of the present invention are still within the scope of protection of the present invention.

Claims

1. A forest land change detection method based on spatiotemporal attention and dual-expert dynamic routing fusion, characterized in that, include: Hyperspectral remote sensing images of the same region at different time phases are acquired as input data and denoted as the first time phase image. Second phase image Channel-by-channel normalization preprocessing is performed on the dual-temporal hyperspectral remote sensing images; pixel-level sample blocks are extracted from the dual-temporal images using a sliding window method; for the center pixel position... Spatial neighborhood blocks centered at the given location are extracted from the two-phase images. and The sample blocks, namely dual-temporal samples, are fed into the forest land change detection network model for forest land change detection. The forest land change detection network model includes a multi-layer, multi-scale gated bottleneck convolutional encoder, a multi-layer bidirectional spatiotemporal cross-attention module, and a single-layer scale-adaptive soft expert fusion unit. The dual-temporal sample blocks are input into their respective multi-scale gated bottleneck convolutional encoders. The multi-scale gated bottleneck convolutional encoders first extract features through two parallel feature extraction paths. The first path captures local fine-grained texture features through two cascaded bottleneck convolutional modules, while the second path uses a bottleneck convolutional module to expand the receptive field to aggregate contextual information. The dilation rate of the bottleneck convolutional module in the second path is greater than that in the first path. The features from the two paths are then concatenated and fused to obtain the final feature. Afterwards, characteristics Multi-scale gating features are obtained through channel gating mechanism. Simultaneously, dual-phase sample blocks are sent in. Convolution, after group normalization and with a learnable coefficient Multiply to obtain the residual output Finally, the residuals and multi-scale gated features will be combined. The final output of the module is obtained by adding the two temporal sample blocks. This output is obtained by passing the i-th layer of the multi-scale gated bottleneck convolutional encoder in a multi-layer, multi-scale gated bottleneck convolutional encoder. This is denoted as... ; Will The data is fed into the corresponding layer's bidirectional spatiotemporal cross-attention module for processing to obtain the attention weights for the opposing temporal phases. and The bidirectional spatiotemporal cross-attention modules at different layers have the same architecture but independent weights; targeting , through respectively Convolution and batch normalization are projected, and then compared with their respective... , Features are obtained by performing residual connections , Interactively enhanced differential features are obtained by feature subtraction. ; Targeting interactive enhancement features The features are fed into a scale-adaptive soft expert fusion unit for multi-scale feature fusion. First, the feature is adaptively weighted for each scale channel by a scale gating module, and then concatenated and normalized along the channel dimension to form a joint feature. ; The joint features are further processed by soft expert fusion; the soft expert fusion adopts heterogeneous dual-expert processing: the global expert captures the overall context through global average pooling, and the local expert extracts significant responses through global max pooling; the fusion coefficients of the global expert and the local expert are calculated by a soft router, and then the channel weights are obtained. ,based on and Obtain fusion features ; Ultimately based on Achieve classification decision-making for pixel-level change detection.

2. The forest land change detection method based on spatiotemporal attention and dual-expert dynamic routing fusion according to claim 1, characterized in that, In the process of preprocessing dual-temporal hyperspectral remote sensing images by channel-by-channel normalization, each spectral channel C is subjected to independent normalization.

3. The forest land change detection method based on spatiotemporal attention and dual-expert dynamic routing fusion according to claim 2, characterized in that, The process of performing independent normalization for each spectral channel C is as follows: , This represents the raw image data of the C-th channel. This represents the normalized image data of the Cth channel; , These are the minimum and maximum pixel values ​​for the C-th channel, respectively.

4. The forest land change detection method based on spatiotemporal attention and dual-expert dynamic routing fusion according to claim 1, characterized in that, The dilation rate of the bottleneck convolutional module in the first path is 1, and the dilation rate of the bottleneck convolutional module in the second path is 2.

5. The forest land change detection method based on spatiotemporal attention and dual-expert dynamic routing fusion according to claim 1, characterized in that, feature Multi-scale gating features are obtained through channel gating mechanism. The process includes: The input is first processed through global average pooling (GAP), convolution, and sigmoid normalization to generate channel attention weights. ; Features After convolution, normalization, and LReLU processing, and then combined with gated weights... Channel-by-channel multiplication is performed to achieve adaptive weighting and obtain multi-scale gated features. .

6. A forest land change detection method based on spatiotemporal attention and dual-expert dynamic routing fusion according to any one of claims 1 to 5, characterized in that, Will The data is fed into the corresponding layer's bidirectional spatiotemporal cross-attention module for processing to obtain the attention weights for the opposing temporal phases. and The process includes: The bidirectional spatiotemporal cross-attention module adopts a symmetrical bidirectional structure, through batch normalization and... Convolution generates Query, Key, and Value embeddings: , , , in, This indicates a batch normalization operation; for The same method is used to obtain the embedding. , obtain and convolution Shared weights, obtain and convolution Shared weights, obtain and convolution and They are weighted independently; Calculate the time correlation matrix spatial correlation matrix ; Calculate symmetrically and Attention weights are obtained by normalizing all correlation matrices along their respective dimensions using Softmax, and are denoted as follows: ;according to and Obtain the attention weights of the opposing phases and .

7. The forest land change detection method based on spatiotemporal attention and dual-expert dynamic routing fusion according to claim 6, characterized in that, The scale-adaptive soft expert fusion unit obtains joint features. The process includes: Targeting interactive enhancement features In-scale gated weights are generated using global average pooling and a fully connected network. Channel-weighted features are applied using gating weights: , This indicates a channel-based multiplication operation; Gated weighted multi-scale difference features Joint features are obtained by splicing along the channel dimension and performing group normalization layers. .

8. The forest land change detection method based on spatiotemporal attention and dual-expert dynamic routing fusion according to claim 7, characterized in that, The channel weights are obtained through soft expert fusion in the scale-adaptive soft expert fusion unit. The process includes: Soft expert fusion comprises two parallel branches: global expert and local expert. The global expert extracts features based on global average pooling and linearization layers. Local experts extract features based on global max pooling and linearization layers. ; The soft router is used to adaptively calculate the fusion coefficients of global and local experts: , in, and The routing coefficients for the global expert and the local expert are respectively, satisfying... ; Channel weights are calculated using a contrast-fusion strategy. .

9. The forest change detection method based on spatiotemporal attention and dual-expert dynamic routing fusion according to claim 8, characterized in that, The scale-adaptive soft expert fusion unit is based on soft expert fusion. and Obtain fusion features The process includes: , , in, These are learnable residual scaling parameters.

10. The forest land change detection method based on spatiotemporal attention and dual-expert dynamic routing fusion according to claim 9, characterized in that, Ultimately based on The process of classification decision-making to achieve pixel-level change detection includes: Fusion features The feature vector is compressed into a one-dimensional feature vector by global max pooling, and then the predicted probabilities of two categories, change and no change, are output by a fully connected classification layer to complete the classification decision for pixel-level change detection.