Remote sensing image local-global change detection method and device based on attention mechanism

By employing an attention-based method for detecting local and global changes in remote sensing images, this method enhances high-frequency detail features and performs global fusion, thus solving the problems of inaccurate edge recognition and poor multi-scale target coverage in remote sensing image change detection. This enables efficient and accurate identification of change regions in complex scenes.

CN122493319APending Publication Date: 2026-07-31SUZHOU UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SUZHOU UNIV
Filing Date
2026-07-06
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Existing remote sensing image change detection methods suffer from inaccurate edge recognition, poor multi-scale target coverage, and low detection efficiency when dealing with complex scenes, especially due to insufficient enhancement of high-frequency detail features and excessive computational overhead for global modeling.

Method used

A remote sensing image local and global change detection method based on attention mechanism is adopted. By introducing a high-frequency component enhancement module to enhance the ability to capture edges and small ground features, and using frequency separation technology to remove low-frequency components, a long-distance context modeling is performed by combining the cross-shaped window attention mechanism of the global fusion module, so as to achieve adaptive coordination between local details and global semantics.

Benefits of technology

It significantly improves the accuracy and robustness of changing region identification in complex remote sensing scenarios, effectively balances the detection accuracy of targets at different scales, ensures fine local localization and global semantic consistency, and improves detection efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122493319A_ABST
    Figure CN122493319A_ABST
Patent Text Reader

Abstract

This invention relates to the field of image processing technology and discloses a method and apparatus for detecting local and global changes in remote sensing images based on an attention mechanism. The method involves acquiring a pair of two-temporal images of the region to be detected, which are used as a first and a second original image, respectively. These images are input into a pre-trained change detection model, passing through two parallel, weight-shared encoding branches to obtain multiple initial feature maps at different scales. Feature enhancement is performed on each initial feature map to obtain corresponding enhanced feature maps. A pair of enhanced feature maps of the same scale corresponding to the first and second original images are input into a feature difference extraction module, which outputs a corresponding difference feature map. Multiple difference feature maps are sampled to a uniform spatial size, stitched along the channel dimension, and then input into a global fusion module for global modeling, outputting a fused feature map. Finally, the fused feature map is input into a classification predictor to obtain a predicted map of the changed region.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and in particular to a method and apparatus for detecting local and global changes in remote sensing images based on an attention mechanism. Background Technology

[0002] Remote sensing image change detection is a crucial step in geospatial analysis. By comparing and analyzing image data of the same geographical area at different times, it identifies the evolutionary characteristics of land cover and has wide applications in areas such as urban planning expansion monitoring, natural disaster assessment, and dynamic ecological environment surveys. With the surge in high-resolution remote sensing satellite data, the detailed information of ground objects is becoming increasingly rich. This not only makes accurate detection possible but also poses a significant challenge to the robustness of algorithms in handling complex textures, suppressing background pseudo-changes, and recognizing targets across scales.

[0003] In existing deep learning change detection architectures, convolutional neural network (CNN)-based methods dominate. CNNs, with their local perception capabilities, can effectively extract spatial texture features from bi-temporal images, especially excelling in locating fine edges in changed regions. However, standard convolutional operations have significant limitations when processing remote sensing images: because they primarily focus on information within the local receptive field, they struggle to capture long-range global contextual dependencies. This lack of global perspective leads to insufficient semantic constraints when models encounter large-area changes in terrain features or "pseudo-change" scenarios caused by interference from lighting, seasons, etc., resulting in gaps in recognition or false alarms.

[0004] To compensate for the shortcomings of CNNs in global perception, attention mechanisms have been introduced into change detection tasks. Spatial attention and channel attention can enhance feature response to some extent and improve attention to key areas of change. However, in practical applications, existing attention schemes still face a dual dilemma. On the one hand, existing feature extraction processes often ignore high-frequency information in remote sensing images that is crucial for edge and detail recognition, resulting in insufficient edge localization accuracy when dealing with minor changes such as building boundaries and road intersections. On the other hand, although introducing global self-attention mechanisms can enhance global modeling capabilities, their high computational complexity and memory consumption limit their efficiency in processing large-scale high-resolution remote sensing images, and it is often difficult to achieve a perfect balance between preserving local fine details and capturing global semantics.

[0005] Furthermore, multi-scale feature fusion is a core challenge in change detection. Existing methods rely on a single approach when fusing feature maps at different levels, failing to fully realize the deep information interaction between features with different scales. This results in a weak ability of the model to handle large-scale changes in different regions (such as large areas of farmland and scattered buildings). Therefore, how to enhance local details through effective high-frequency component enhancement mechanisms during feature extraction, and how to design a computationally efficient global fusion scheme to balance long-distance dependency modeling and computational overhead, achieving a high degree of synergy between local refinement and global semanticization, have become key technical bottlenecks that urgently need to be overcome to improve the performance of remote sensing change detection. Summary of the Invention

[0006] Therefore, the technical problem to be solved by the present invention is to overcome the problems of insufficient enhancement of high-frequency detail features and excessive global modeling computation in the prior art, which leads to inaccurate edge recognition, poor ability to cover multi-scale targets and low detection efficiency in complex scenes.

[0007] To address the aforementioned technical problems, this invention provides a method for detecting local and global changes in remote sensing images based on an attention mechanism, comprising: Obtain a pair of two-temporal images of the region to be detected, and use them as the first original image and the second original image, respectively. The first and second original images are input into a pre-trained change detection model. They are processed through two parallel and weight-shared encoding branches to obtain multiple initial feature maps of different scales. Each initial feature map is input into the feature enhancement module for frequency separation, low-frequency components are removed, high-frequency components are obtained, and after passing through the attention mechanism, the enhanced feature map corresponding to each initial feature map is output. Input a pair of enhanced feature maps of the same scale corresponding to the first original image and the second original image into the feature difference extraction module, and output the corresponding difference feature map; Multiple differential feature maps are sampled to a uniform spatial size, stitched together along the channel dimension, and then input into the global fusion module for global modeling, outputting a fused feature map; The fused feature map is input into the classification predictor to obtain the prediction map of the changed region.

[0008] Compared with the prior art, the above-described technical solution of the present invention has the following advantages: The attention-based remote sensing image local-to-global change detection method described in this invention, by introducing a high-frequency component enhancement module, not only preserves the spatial texture of local perception using convolutional branches but also eliminates low-frequency components using frequency separation technology, enhances the ability to capture edges and small features, and solves the problems of detail loss and huge computational overhead in global modeling in existing remote sensing image feature extraction techniques. Simultaneously, through the cross-shaped window attention mechanism of the global fusion module, efficient long-distance context modeling is achieved with low computational cost. This invention, through adaptive synergy between local detail enhancement and global semantic modeling, ensures that the model effectively balances the detection accuracy of targets at different scales under the premise of deep interaction of multi-scale differential features, and can balance fine local localization and global semantic consistency, significantly improving the recognition accuracy and robustness of changed regions in complex remote sensing scenarios. Attached Figure Description

[0009] To make the content of this invention easier to understand, the invention will be further described in detail below with reference to specific embodiments and accompanying drawings, wherein: Figure 1 This is a flowchart of the steps of the remote sensing image local and global change detection method based on the attention mechanism of the present invention; Figure 2 This is a schematic diagram of the change detection model of the present invention; Figure 3 This is a schematic diagram of the feature enhancement module; Figure 4 This is a schematic diagram of the global fusion module; Figure 5 This is a schematic diagram showing the visualization results of the method of the present invention; Figure 5 (a) is the first original image. Figure 5 (b) is the second original image. Figure 5 (c) is the true label image. Figure 5 (d) is the model prediction result graph;

[0010] Figure 6 This is a comparison chart of the visualization results of the present invention and the prior art on five images to be detected; Figure 6 (a) is the first original image. Figure 6 (b) is the second original image. Figure 6 (c) is the true label image. Figure 6 (d) is the model prediction result graph of ChangeFormer; Figure 6 (e) is the model prediction result graph for HANet. Figure 6 (f) is the model prediction result diagram of the present invention. Detailed Implementation

[0011] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, so that those skilled in the art can better understand and implement the present invention. However, the embodiments described are not intended to limit the present invention.

[0012] Reference Figure 1 The flowchart shown is a step-by-step diagram of the attention mechanism-based remote sensing image local and global change detection method of the present invention; refer to... Figure 2 The diagram shown is a schematic representation of the change detection model of this invention; based on Figure 1 and Figure 2 As can be seen, the specific steps for change detection in this application are shown in S101 to S106.

[0013] S101: Obtain a pair of two-phase images of the region to be detected, and use them as the first original image and the second original image, respectively.

[0014] Among them, a dual-temporal image pair consists of two images of the same area taken at different time points.

[0015] S102: Input the first original image and the second original image into the pre-trained change detection model. They are processed through two parallel and weight-shared encoding branches to obtain multiple initial feature maps of different scales.

[0016] Specifically, the image to be detected is paired with... Inputting a dual-branch encoder yields a multi-scale initial feature map, represented as follows: ;in, This represents a dual-branch encoder, through which multi-level dual-temporal features are obtained from the two-phase image pairs to be detected. , The hierarchical number represents the multi-scale features. In this embodiment, four different receptive fields are set.

[0017] S103: Input each initial feature map into the feature enhancement module for frequency separation, remove low-frequency components, obtain high-frequency components, and then pass through an attention mechanism to output the enhanced feature map corresponding to each initial feature map. (Refer to...) Figure 3 The diagram shows the structure of the feature enhancement module. The specific steps of feature enhancement are shown in S103-1 to S103-6.

[0018] S103-1: Initial feature map The input feature enhancement module sequentially performs average pooling and bilinear interpolation to obtain the low-frequency components, represented as: ; in, This is average pooling, used to extract low-frequency components; This is a bilinear interpolation used to restore low-frequency components to the same size as the original features.

[0019] S103-2: Obtain the high-frequency components by subtracting the low-frequency components from the initial feature map. , is represented as: .

[0020] S103-3: Perform spatial attention operation on high-frequency components to obtain spatial attention feature maps. Connect the spatial attention feature maps to the initial feature maps in a skip connection to obtain intermediate spatial feature maps. Convolve the intermediate spatial feature maps to obtain convolutional intermediate feature maps, including: For high frequency components Perform average pooling separately With max pooling Obtain high-frequency feature maps using average pooling. High-frequency feature map of max pooling ; The average pooling high-frequency feature map and the max pooling high-frequency feature map are concatenated along the channel dimension. Then, they passed through in sequence. Convolution and Activation function to obtain fused high-frequency feature maps; The spatial attention feature map is obtained by element-wise multiplying the fused high-frequency feature map with the high-frequency components. , is represented as: ; The spatial attention feature map is skip-connected to the initial feature map to obtain the intermediate spatial feature map. , is represented as: ; Convolve the intermediate spatial feature map to obtain the convolutional intermediate feature map. , is represented as: .

[0021] S103-4: Perform channel attention operations on the intermediate feature maps of the convolution to obtain channel attention feature maps, including: Convolutional intermediate feature maps Perform average pooling separately With max pooling Obtain the intermediate feature map of average pooling. Intermediate feature map with max pooling ; Average pooling intermediate feature maps Intermediate feature map with max pooling After addition, the samples are processed through a multilayer perceptron to output a perceptron feature map. Let the perceived feature map pass through After the activation function, it is multiplied element-wise with the intermediate feature maps of the convolution to obtain the channel attention feature maps, represented as: .

[0022] S103-5: After passing the channel attention feature map through a 1×1 convolution, a skip connection is made with the intermediate spatial feature map to obtain the intermediate spatiotemporal feature map. , is represented as: .

[0023] S103-6: After passing the intermediate spatiotemporal feature map through a depthwise separable convolution, it is then skip-connected to the intermediate spatiotemporal feature map to obtain the enhanced feature map. , is represented as: .

[0024] In this embodiment, four different receptive fields, i.e., different scales of initial feature maps, are enhanced to obtain enhanced feature maps, the set of which is represented as follows: , This represents the set of feature enhancement modules corresponding to each level of features, resulting in the enhanced multi-level dual-temporal features. .

[0025] S104: Input a pair of enhanced feature maps of the same scale corresponding to the first original image and the second original image into the feature difference extraction module, and output the corresponding difference feature map.

[0026] In this embodiment, for the first original image and the second original image, the corresponding enhanced feature maps of the same scale are concatenated according to the channel dimension, and then the difference features are obtained through convolutional blocks to obtain four difference feature maps of different scales.

[0027] Specifically, the differential feature acquisition module consists of two convolutional layers, each including cascaded 3×3 convolutional units, ReLU activation, and batch normalization (BN). The resulting differential feature map is represented as follows: ; in, This indicates concatenation along the channel dimension, resulting in a feature channel count of [number missing]. The first convolutional layer will reduce the number of channels back to The design of two convolutional layers is simple and efficient, and the network can effectively model the differences between features in two temporal phases at the local level.

[0028] Furthermore, the differential features at different levels have different characteristics: shallow features have high resolution and contain rich low-level information, making them suitable for detecting changes in small targets; deep features have strong semantic meaning and a large receptive field, making them suitable for detecting region-level changes. To fully utilize these feature information, this embodiment constructs a differential feature pyramid, represented as follows: ; ; ; ; Bilinear() represents bilinear interpolation upsampling.

[0029] S105: Sample multiple differential feature maps to a uniform spatial size, stitch them together along the channel dimension, input them into the global fusion module for global modeling, and output the fused feature map. (Refer to...) Figure 4 The diagram shows the structure of the global fusion module. The specific fusion process is shown in steps S105-1 to S105-4.

[0030] S105-1: After sampling multiple differential feature maps to a uniform spatial size, they are stitched together along the channel dimension to obtain multi-scale stitched features, represented as follows: .

[0031] S105-2: Channel compression is performed on the multi-scale stitching features using linear projection to obtain the projected features, represented as follows: .

[0032] S105-3: Divide the projected features into non-overlapping image patches and flatten them into a sequence feature map, represented as: ; S105-4: Input the sequence feature map into the global fusion module to perform global context modeling and obtain the fused feature map, represented as follows: ; in, This indicates the number of image patches in the sequence feature map. , This represents the side length of an image patch in the sequence feature map. and This represents the height and width of the original image; This indicates the global fusion module.

[0033] Specifically, the global fusion module is composed of multi-head cross-shaped window attention, feedforward network and layer normalization, and uses residual connection to realize global context modeling.

[0034] The specific implementation of the multi-head cross-shaped window attention mechanism is represented as follows: The input feature map is split into multiple heads, represented as follows: , ; For the The number is calculated both horizontally and vertically to obtain the first [unit / item]. Horizontal attention feature map of height With vertical attention feature map , is represented as: ; ; The first The horizontal and vertical attention feature maps of the head are concatenated to obtain the first... Attention feature map of size , is represented as: ; A multi-head attention feature map is constructed based on the attention feature maps corresponding to all heads. in, This indicates the number of heads that receive attention in the multi-head cross-shaped window. ; This indicates the number of image patches in the sequence feature map. , This represents the side length of an image patch in the sequence feature map. and This represents the height and width of the original image; , and These represent horizontal queries, key-value pairs, and key-value pairs, respectively. , and These represent vertical queries and key-value pairs, respectively.

[0035] In this example, the sequence feature map is input into the global fusion module, passes through two cascaded fusion units, and the output feature map of the second fusion unit is used as the fused feature map.

[0036] Specifically, each fusion unit includes: Let the input feature map Multi-head attention feature maps are obtained by sequentially passing through layer normalization and multi-head cross-shaped window attention. ; The multi-head attention feature map is skip-connected to the input feature map to obtain the multi-head concatenated feature map. , is represented as: ; The multi-head splicing feature map is passed sequentially through layer normalization and a feedforward network, and then skip-connected with the multi-head splicing feature map to serve as the output feature map of the fusion unit. , is represented as: ; in, Indicates attention to the cross-shaped window. It is a two-layer multilayer perceptron, with GELU activation in the middle.

[0037] S106: Input the fused feature map into the classification predictor to obtain the change region prediction map.

[0038] Specifically, the fused feature map output by the global fusion module Dimensionality reduction is performed at the channel level, and the original resolution is restored through upsampling to obtain the target fused image. The target fusion map is input into the prediction head, and the change detection prediction result is obtained through the pixel-level prediction head. The specific implementation is as follows: Use a contain Convolutional layers with convolution, batch normalization, and ReLU activation functions perform spatial feature integration and preliminary channel transformation on the target fusion map to obtain intermediate feature maps. , is represented as: ; Use one The convolutional layer compresses the number of channels in the intermediate feature map to 1, resulting in a classification feature map. , is represented as: ; Perform a 2x upsampling operation on the classification feature map using the bilinear interpolation algorithm. The feature map is mapped back to the original image size, and the final prediction map is output. , is represented as: .

[0039] Based on the above embodiments, the training process of the pre-trained change detection model in this invention includes: constructing a loss function based on the cross-entropy loss between the change region prediction map of each training sample in the training set and its corresponding ground truth value, training the change detection model, and backpropagating to update the network parameters of the change detection model until the loss function converges, thereby obtaining the pre-trained change detection model.

[0040] Specifically, the change detection model, consisting of a dual-branch encoder, an attention-based feature enhancement module, a feature fusion module, and a pixel-level prediction head, is optimized using the cross-entropy loss function. The cross-entropy loss function is expressed as: ; in, It is the number of dual-phase image pairs in each batch. For real labels, This represents the probability of change predicted by the model.

[0041] This embodiment trains the model based on cross-entropy loss and updates the network parameters using the backpropagation algorithm. It then performs multiple iterations on the training set using a preset optimization algorithm, evaluating the model performance using the validation set after each iteration. Finally, it records and saves the set of model parameters with the highest detection accuracy and lowest loss value on the validation set as the optimal weights to be used. The optimal weights are then loaded into the model to obtain the pre-trained change detection model.

[0042] In the actual detection phase, the network is first initialized by loading the saved optimal model weights; the dual-temporal remote sensing image pairs to be analyzed are input into the model, and after feature extraction, high-frequency enhancement and global fusion, the prediction head directly outputs the classification result of each pixel; finally, a binary change prediction map that can intuitively reflect the evolution of the area to be detected is generated.

[0043] Based on the above embodiments, this invention provides a remote sensing image local and global change detection device based on an attention mechanism. The specific device may include: The image acquisition module is used to acquire a pair of two-phase images of the region to be detected, which are used as the first original image and the second original image, respectively. The encoding module is used to input the first original image and the second original image into the pre-trained change detection model. The images are processed through two parallel encoding branches with shared weights, and multiple initial feature maps of different scales are obtained from each branch. The enhancement module is used to input each initial feature map into the feature enhancement module, perform frequency separation, remove low-frequency components, obtain high-frequency components, and then output the enhanced feature map corresponding to each initial feature map after passing through the attention mechanism. The difference feature map construction module is used to input a pair of enhanced feature maps of the same scale corresponding to the first original image and the second original image into the feature difference extraction module, and output the corresponding difference feature map; The fusion module is used to sample multiple differential feature maps to a uniform spatial size, stitch them together along the channel dimension, and then input them into the global fusion module for global modeling and output a fused feature map. The prediction module is used to input the fused feature map into the classification predictor to obtain the prediction map of the changed region.

[0044] The attention-based remote sensing image local and global change detection device of this embodiment is used to implement the aforementioned attention-based remote sensing image local and global change detection method. Therefore, the specific implementation of the attention-based remote sensing image local and global change detection device can be found in the embodiment section of the attention-based remote sensing image local and global change detection method above. For example, the image acquisition module, encoding module, enhancement module, difference feature map construction module, fusion module, and prediction module are respectively used to implement steps S101, S102, S103, S104, S105, and S106 in the aforementioned attention-based remote sensing image local and global change detection method. Therefore, its specific implementation can be referred to the description of the corresponding embodiments, and will not be repeated here.

[0045] Based on the above embodiments, in the embodiments of the present invention, change detection simulation experiments are conducted using the method described in this application and two existing change detection methods: ChangeFormer (a pure Transformer method specifically designed for change detection tasks, including a hierarchical Transformer encoder and a simple MLP decoder in a Siamese architecture) and HANet (a hierarchical attention network based on Transformer for change detection of dual-temporal ultra-high resolution remote sensing images), and the experimental results are compared.

[0046] All experiments were performed on an NVIDIA RTX 4090 GPU, and all image pairs used in the experiments were from the LEVIR-CD remote sensing dataset. The evaluation metrics used were F1-score and IoU, which quantitatively compare the change detection accuracy of different methods. The F1-score is defined as follows: The definition of IoU , where TP, TN, FP, and FN represent the number of true positive, true negative, false positive, and false negative pixels, respectively. The values ​​of F1-score and IoU range from (0,1), with larger values ​​indicating higher model detection accuracy.

[0047] Select an image to be detected from the LEVIR-CD and perform detection using the method described in this application, referring to... Figure 5 The image shown is a schematic diagram illustrating the visualization results of the method of the present invention. Figure 5 (a) is the first original image. Figure 5 (b) is the second original image. Figure 5 (c) is the true label image. Figure 5 (d) is the model prediction result image; in which, true positive (TP), true negative (TN), false positive (FP) and false negative (FN) are represented by different colors; in the model prediction result image, the color used to represent false positive and false negative occupies fewer pixels, indicating better prediction results.

[0048] Five images to be detected were selected from the LEVIR-CD and detected using the method described in this application, with ChangeFormer and HANet as referenced. Figure 6 The image shown is a comparison of the visualization results of the present invention and the prior art on five images to be detected. Figure 6 (a) is the first original image. Figure 6 (b) is the second original image. Figure 6 (c) is the true label image. Figure 6 (d) is the model prediction result graph of ChangeFormer; Figure 6 (e) is the model prediction result graph for HANet. Figure 6 (f) is the model prediction result diagram of this invention. Based on Figure 6 It can be observed that the method proposed in this invention significantly improves the prediction of building change areas in remote sensing images. For example, in the second row, for the detection of small change areas, the method described in this application has significantly fewer false negative pixels than the comparison method. Similarly, in the second row, for the detection of large building change areas, the method described in this application has significantly fewer false positive pixels than the comparison method. The quantitative results of the method described in this application and the other two comparison methods on the entire LEVIR-CD test set are shown in Table 1.

[0049] Table 1. Comparison of evaluation indicators between the present invention and the comparative method ChangeFormer 90.40 82.48 HANet 90.28 82.27 This invention 91.45 84.22

[0050] As shown in Table 1, the proposed method outperforms existing mainstream algorithms such as ChangeFormer and HANet in both of its core change detection evaluation metrics, F1-score and IoU. Quantitative data combined with visualized detection results demonstrate that the present invention effectively reduces missed pixels in small change areas and falsely detected pixels in large building change areas, significantly improving the recognition accuracy and segmentation overlap for change areas of various scales. Overall, its change detection performance surpasses existing technologies.

[0051] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0052] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0053] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0054] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0055] Obviously, the above embodiments are merely illustrative examples for clear explanation and are not intended to limit the implementation. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively list all possible implementations here. However, obvious variations or modifications derived therefrom are still within the scope of protection of this invention.

Claims

1. A method for detecting local-global changes in remote sensing images based on attention mechanism, characterized in that, include: Obtain a pair of two-temporal images of the region to be detected, and use them as the first original image and the second original image, respectively. The first and second original images are input into a pre-trained change detection model. They are processed through two parallel and weight-shared encoding branches to obtain multiple initial feature maps of different scales. Each initial feature map is input into the feature enhancement module for frequency separation, low-frequency components are removed, high-frequency components are obtained, and after passing through the attention mechanism, the enhanced feature map corresponding to each initial feature map is output. Input a pair of enhanced feature maps of the same scale corresponding to the first original image and the second original image into the feature difference extraction module, and output the corresponding difference feature map; Multiple differential feature maps are sampled to a uniform spatial size, stitched together along the channel dimension, and then input into the global fusion module for global modeling, outputting a fused feature map; The fused feature map is input into the classification predictor to obtain the prediction map of the changed region.

2. The attention mechanism based remote sensing image local-global change detection method according to claim 1, characterized in that, Each initial feature map is input into the feature enhancement module for frequency separation. Low-frequency components are removed, and high-frequency components are obtained. After passing through an attention mechanism, the enhanced feature maps corresponding to each initial feature map are output, including: The initial feature map is input into the feature enhancement module, and then passes through average pooling and bilinear interpolation to obtain the low-frequency components. The high-frequency components are obtained by subtracting the low-frequency components from the initial feature map; Perform spatial attention operation on high-frequency components to obtain spatial attention feature maps. Make the spatial attention feature maps skip connections with the initial feature maps to obtain intermediate spatial feature maps. Convolve the intermediate spatial feature maps to obtain convolutional intermediate feature maps. Perform channel attention operation on the intermediate feature maps of the convolution to obtain channel attention feature maps; After passing the channel attention feature map through a 1×1 convolution, it is skipped to the intermediate spatial feature map to obtain the intermediate spatiotemporal feature map. The intermediate spatiotemporal feature map is subjected to a depthwise separable convolution, and then a skip connection is made with the intermediate spatiotemporal feature map to obtain the enhanced feature map.

3. The attention mechanism based remote sensing image local-global change detection method according to claim 2, characterized in that, Perform spatial attention operations on high-frequency components to obtain spatial attention feature maps, including: for high frequency components average pooling is performed respectively with maximum pooling average pooling high frequency feature map is obtained maximum pooling high frequency feature map ; The average-pooled high-frequency feature map and the maximum-pooled high-frequency feature map are spliced along a channel dimension After that, the feature maps sequentially pass through convolution and an activation function to obtain a fused high-frequency feature map The high-frequency feature map and the high-frequency component are multiplied element by element to obtain a spatial attention feature map is expressed as: 。 4. The attention mechanism based remote sensing image local-global change detection method according to claim 2, characterized in that, Perform channel attention operations on the intermediate feature maps of the convolution to obtain channel attention feature maps, including: Convolutional intermediate feature map Average pooling is performed respectively Max pooling Average pooling intermediate feature map is obtained Max pooling intermediate feature map ; The average-pooling intermediate feature map is added to the max-pooling intermediate feature map and then output through a multi-layer perceptron to output a perception feature map. Let the perception feature map pass through the activation function, and multiply it element by element with the convolution intermediate feature map to obtain the channel attention feature map, denoted as: 。 5. The attention mechanism based remote sensing image local-global change detection method according to claim 1, characterized in that, A pair of enhanced feature maps of the same scale corresponding to the first original image and the second original image are input into the feature difference extraction module, and the corresponding difference feature maps are output, including: After concatenating a pair of augmented feature maps of the same size along the channel dimension, the result is passed through two cascaded convolutional layers to obtain the difference feature map corresponding to that size. The convolutional layer comprises convolutional units, activation functions, and batch normalization layers connected in series along the forward propagation direction.

6. The attention mechanism based remote sensing image local-global change detection method according to claim 1, characterized in that, Multiple differential feature maps are sampled to a uniform spatial size, stitched together along the channel dimension, and then input into the global fusion module for global modeling. The output fused feature map includes: After sampling multiple differential feature maps to a uniform spatial size, they are stitched together along the channel dimension to obtain multi-scale stitched features. Linear projection is used to compress the channels of multi-scale stitching features to obtain projection features; The projected features are divided into non-overlapping image patches and flattened into a sequence feature map; The sequence feature map is input into the global fusion module to perform global context modeling and obtain the fused feature map.

7. The method for detecting local and global changes in remote sensing images based on an attention mechanism according to claim 6, characterized in that, The sequence feature map is input into the global fusion module to perform global context modeling and obtain the fused feature map, including: The sequence feature map is input into the global fusion module, passes through two cascaded fusion units, and the output feature map of the second fusion unit is used as the fused feature map. Each fusion unit includes: The input feature map is passed sequentially through layer normalization and multi-head cross-shaped window attention to obtain a multi-head attention feature map. The multi-head attention feature map is skipped to the input feature map to obtain the multi-head concatenated feature map; The multi-head splicing feature map is passed through layer normalization and feedforward network in sequence, and then skipped and connected with the multi-head splicing feature map to serve as the output feature map of the fusion unit.

8. The method for detecting local and global changes in remote sensing images based on an attention mechanism according to claim 7, characterized in that, The implementation of multi-head cross-shaped window attention includes: The input feature map is split into multiple heads, represented as follows: , ; For the The number is calculated both horizontally and vertically to obtain the first [unit / item]. Horizontal attention feature map of height With vertical attention feature map , is represented as: ; ; The first The horizontal and vertical attention feature maps of the head are concatenated to obtain the first... Attention feature map of size , is represented as: ; A multi-head attention feature map is constructed based on the attention feature maps corresponding to all heads. in, This indicates the number of heads that receive attention in the multi-head cross-shaped window. ; This indicates the number of image patches in the sequence feature map. , This represents the side length of an image patch in the sequence feature map. and Indicates the height and width of the original image; , and These represent horizontal queries, key-value pairs, and key-value pairs, respectively. , and These represent vertical queries and key-value pairs, respectively.

9. The method for detecting local and global changes in remote sensing images based on an attention mechanism according to claim 1, characterized in that, The training process of the pre-trained change detection model includes: constructing a loss function based on the cross-entropy loss between the predicted change region map of each training sample in the training set and its corresponding ground truth value; training the change detection model; and backpropagating to update the network parameters of the change detection model until the loss function converges, thus obtaining the pre-trained change detection model.

10. An apparatus based on the attention-based remote sensing image local and global change detection method as described in any one of claims 1 to 9, characterized in that, include: The image acquisition module is used to acquire a pair of two-phase images of the region to be detected, which are used as the first original image and the second original image, respectively. The encoding module is used to input the first original image and the second original image into the pre-trained change detection model. The images are processed through two parallel encoding branches with shared weights, and multiple initial feature maps of different scales are obtained from each branch. The enhancement module is used to input each initial feature map into the feature enhancement module, perform frequency separation, remove low-frequency components, obtain high-frequency components, and then output the enhanced feature map corresponding to each initial feature map after passing through the attention mechanism. The difference feature map construction module is used to input a pair of enhanced feature maps of the same scale corresponding to the first original image and the second original image into the feature difference extraction module, and output the corresponding difference feature map; The fusion module is used to sample multiple differential feature maps to a uniform spatial size, stitch them together along the channel dimension, and then input them into the global fusion module for global modeling and output a fused feature map. The prediction module is used to input the fused feature map into the classification predictor to obtain the prediction map of the changed region.