A multi-scale feature interaction network implementation method for processing dual-temporal remote sensing image changes
By designing a multi-scale feature interaction network in remote sensing image change detection and using CNN and Transformer technology, the problem of bitemporal information isolation and poor multi-scale information fusion is solved, achieving higher change detection accuracy and robustness. .
Patent Information
- Application Number
- CN202410059638.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-16
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2044-01-16
AI Technical Summary
Existing remote sensing image change detection methods based on deep learning lack interactive expression between bitemporal images in the encoding stage, resulting in bitemporal information being isolated from each other and limited recognition. In addition, the sampling multiple in the decoding stage is too large and lacks skip connections. It affects the effective fusion of multi-scale information and the communication of contextual information, resulting in false detections and missed detections of the segmented edges of the detected image.
A multi-scale feature interaction network is designed. By constructing bi-temporal homologous global guidance features, integrating rich bi-temporal deep features, a multi-scale feature interaction network model is adopted, including an encoding module and a decoding module, using a backbone network , multi-scale coding layer, bi-temporal feature interaction layer and bi-temporal feature fusion layer, combined with CNN and Transformer technology, to achieve image size recovery and feature extraction, and enhance information interaction and feature fusion.
Effectively understand different levels of multi-source information, improve the recognition of true change areas, suppress the interference of pseudo-change areas, improve the accuracy and robustness of change detection, and significantly improve the accuracy of detection results.
Smart Images

Figure CN117876782B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of remote sensing image change detection, and in particular to a multi-scale feature interaction network implementation method for processing dual-temporal remote sensing image changes. Background Art
[0002] The development of earth observation technology and geographic information technology has made remote sensing images increasingly rich and diverse. The widespread use of satellites, aircraft and other sensors enables us to capture information about the earth's surface, including the characteristics of terrain, land cover, vegetation, buildings and other geographic objects. This remote sensing technology can also obtain data in different spectral ranges, including infrared and ultraviolet spectra, which helps to understand the surface characteristics more comprehensively. However, with the continuous development of remote sensing technology, the change detection problem has become more complicated. Its main goal is to accurately identify and locate areas where semantic changes have occurred, that is, true change areas, from a pair of time series remote sensing images, and suppress the influence of pseudo-change areas. It has become an urgent challenge to quickly and accurately detect change areas from massive remote sensing image data. Therefore, how to effectively deal with this challenge has become a core issue in the study of remote sensing image change detection.
[0003] Remote sensing image change detection methods can be divided into multiple categories according to different technologies and needs. First, according to whether deep learning technology is applied, it can be divided into two categories: one is the method based on deep learning, and the other is the traditional detection algorithm. In traditional methods, according to whether prior classification is required, it can be further divided into classification-first-detection and direct change detection methods. In addition, considering whether manual labeling information is required, change detection methods are also divided into supervised detection algorithms and unsupervised detection algorithms. According to the object granularity of change detection, the methods can be divided into pixel level, feature level and object level. On the other hand, according to different task time characteristics, change detection methods can be divided into real-time change detection and non-real-time change detection.
[0004] By combing through the development history of remote sensing image change detection, the development route of remote sensing image change detection technology in the world can be divided into four different stages. In the first stage, remote sensing technology was limited by hardware, such as satellites and optical instruments, resulting in low quality and limited resolution of remote sensing data, so the accuracy requirements for change detection were relatively loose. The typical feature is the use of simple algebraic calculations or direct pixel comparison to generate change detection results. For example, principal component analysis (PCA) is widely used. Zhong et al. proposed an unsupervised change detection method using principal component analysis (PCA) and k-means clustering in the article "Unsupervised Change Detection in Satellite Images Using Principal Component Analysis and k-Means Clustering", which divided the difference image into non-overlapping blocks, projected the pixels into the feature vector space, and used k-means clustering for detection, achieving satisfactory results. Another example is Change Vector Analysis (CVA). Liu et al. proposed a new multiscale morphological compressed change vector analysis method in "Multiscale Morphological Compressed Change Vector Analysis for Unsupervised MultipleChange Detection" to solve the problem of multiple change detection. This method extends the spectral-based compressed change vector analysis (C2VA) method by jointly analyzing the spectral-spatial change information and using morphological analysis to construct reconstructed spectral change vector features to retain more geometric details. At the same time, two multiscale fusion strategies are designed to integrate the change information represented by features at different scales or merge the change detection results of detectors at different scales. These methods represent early remote sensing change detection techniques, and their applications mainly focus on simple algebraic operations and pixel-level comparisons, which makes this type of method unable to handle complex backgrounds and scenes and has poor generalization. In the second stage, machine learning methods such as support vector machines and decision trees were introduced, as well as various information-assisted detection methods such as post-classification comparison and raster GIS (geographic information system) vector integration. For example, Volpi et al.
[0005] In the paper "Supervised change detection in VHR images using contextual information and support vector machines", the histogram statistics are used as the basic detection features, and then the support vector machine is used for land use change detection. In "A change detection model based on neighborhood correlation image analysis and decision tree classification", Im et al. combined the image neighborhood correlation analysis and the change detection method based on decision tree classification. The change detection method based on machine learning algorithm can automatically extract features from large-scale remote sensing data and has excellent sensitivity to complex and subtle changes. However, such methods require a large amount of labeled training data and face computational overhead problems for large-scale high-resolution images. In the third stage, with the advancement of remote sensing imaging technology, object-level change detection gradually emerged. Unlike pixel-level change detection, it not only focuses on the changes of individual pixels in the image, but also focuses on detecting changes at the target object or object level. For example, Wang et al. proposed an object-based change detection scheme in "Object-based change detection in urban areas from high spatial resolution images based on multiple features and ensemble learning", combining spectral, shape, texture features and multiple supervised classifiers, and improving the accuracy of change detection in urban areas through an integrated strategy of weighted voting. Tan et al. proposed an object-based multi-feature change detection method (OB-MMUA) in "Object-based change detection using multiple classifiers and multi-scale uncertainty analysis". This method uses multiple features, including texture features and spectral features, and uses random forests to select features and determine the best feature vectors, as well as change vector analysis. Object-level change detection methods usually include target extraction, feature representation, matching, and context modeling to obtain more accurate change information. However, this type of method can only extract low-level features in images, and is significantly affected by factors such as radiation differences, with many pseudo-changes and false detections. In the fourth stage, the latest progress in deep learning in computer vision technology in recent years has provided many potential solutions to the change detection problem.Traditional remote sensing image change detection methods usually rely on manually designed features and rules, and their performance is gradually limited in the face of the growing amount of high-resolution remote sensing data. The application of deep learning technology, especially convolutional neural networks (CNN) and Transformer models, has brought new vitality to change detection. The reason why deep learning methods have attracted much attention in the field of change detection is that they can learn features from data without the need for manual feature extraction, thereby improving the ability to adapt to changing patterns. Through deep learning, the model can automatically capture contextual information, texture features, and semantic information in the image, which are challenges that traditional methods find difficult to handle. In addition, deep learning also supports end-to-end training and can learn directly from raw data without tedious preprocessing steps. Deep learning can also be easily extended to multi-temporal and multi-source data, thereby better adapting to different application scenarios.
[0006] However, the existing change detection methods based on deep learning lack the interactive expression between the two-temporal images in the encoding stage, resulting in the isolation of the two-temporal information and limited recognition of the target change area. Secondly, in the decoding stage, the sampling multiple is too large, and the lack of jump connections between the encoding modules leads to the inability to effectively integrate multi-scale information and poor communication of context information, which in turn affects the layer-by-layer recovery of image features, ultimately resulting in more false detections and missed detections in the segmentation edges of the detected images. Summary of the invention
[0007] Purpose of the invention: The purpose of the present invention is to provide a multi-scale feature interaction network implementation method for processing dual-temporal remote sensing image changes, which can make full use of the local perception of CNN and the global receptive field of transformer, and effectively understand multi-source information at different levels.
[0008] Technical solution: The multi-scale feature interaction network implementation method of the present invention is characterized by constructing a global guiding feature of dual temporal homology and integrating rich dual temporal deep features before image size restoration, comprising the following steps:
[0009] S1, constructing a multi-scale feature interaction network model, wherein the multi-scale feature interaction network model includes an encoding module and a decoding module, wherein the encoding module is responsible for feature extraction, and the decoding module is responsible for feature size recovery;
[0010] S2, converts the change detection data into a tensor with an image shape, inputs it into a multi-scale feature interaction network model for training, and saves the model that meets the training conditions;
[0011] S3, inputting the dual-temporal remote sensing image into the model saved in step S2 to obtain a high-precision dual classification result map at a certain time and place.
[0012] Furthermore, the encoding module includes a backbone network, a multi-scale encoding layer module, a dual-temporal feature interaction layer module and a dual-temporal feature fusion layer module; a dual-temporal feature interaction layer module is inserted between backbone networks at the same level to realize information interaction of multi-temporal images, guide attention to focus on the difference area and suppress the influence of environmental interference, and at the same time, a dual-temporal feature fusion layer module is used at the end of the multi-scale encoding layer module to extract fine difference features;
[0013] The backbone network ResNet18 extracts features from the input image through layer-by-layer convolution and pooling operations;
[0014] The bi-temporal feature interaction layer module consists of a pair of symmetrical self-attention-based transformer blocks, and the interaction mode is the exchange of the weight value of the self-attention sequence; in the case of an imbalance between true change samples and pseudo-change samples, the interference of information irrelevant to the task is suppressed, and similar regions in different time periods are associated;
[0015] Set input monotemporal features From the temporal state n, the single temporal feature will first be mapped to three identical linear transformer layers; in the linear transformer layer, the original pixel matrix will first compress the channel to fuse the multi-channel features, and then expand it into a self-attention vector, and generate three sequences according to the functions that will be assigned in the future: Query vector Key Vector and Value vector The process of generating a sequence is expressed by the following formula:
[0016] Q n ,K n ,V n =Reshape(Linear(f n ))
[0017] Among them, C represents the number of channels of the feature map, H represents the height of the feature map, W represents the width of the feature map, L = H × W represents the generated vector sequence, Linear() represents the linear layer used to change the channel, and Reshape() represents the operation of changing the matrix into a vector sequence;
[0018] After obtaining the three vector sequences, the Key vector will be transposed and matrix multiplied with the Query vector to calculate the similarity score between each Query vector and all Key vectors, and the similarity score is converted into weight A through the softmax activation function. n , used to calculate the Value vector in weighted form, expressed by the following dot product formula:
[0019] A n=softmax(K n T Q n )
[0020] f n ′=V n A n
[0021] Among them, represents the degree of attention of each position in the input sequence to other positions;
[0022] Taking n = 1 and n = 2 tenses, the expression of the information interaction and transmission process between the two tenses is as follows:
[0023] A1=softmax(K1 T Q2)
[0024] A2=softmax(K2 T Q1)
[0025] f1′=V2A1
[0026] f2′=V1A2
[0027] Among them, f1′ and f2′ represent the outputs integrating multi-temporal information;
[0028] The bi-temporal feature fusion layer module can extract global attention weights to summarize the bi-temporal features. The global attention matrix A g The generation of is represented as:
[0029] A g =σ(Conv 1×1 (GELU(AvgPool(Concat[F1,F2]))))
[0030] Among them, F1 and F2 represent the features of bi-temporal input, Concat[] represents channel cascade, AvgPool() represents average pooling, GELU() represents GELU() activation function, Conv1×1 represents 1×1 convolution operation, and σ() represents Sigmoid activation function;
[0031] The bi-temporal feature fusion layer module fuses the obtained bi-temporal features through channel cascading. The formula of the feature fusion operation is expressed as:
[0032] F out =Concat[|Conv 1×1 (A g F1)-F2|,|Conv 1×1 (A g F2)-F1|]
[0033] Among them, || means the result of subtracting the pixel values at the corresponding positions of the feature map and then taking the absolute value operation;
[0034] The multi-scale decoding layer module can make full use of the decoder with a global receptive field to restore high-level abstract features to the original input space.
[0035] Furthermore, the decoding module includes a transformer decoding layer and a classifier before output. The decoding module uses a continuous Swin Transformer Block divided by a moving attention window as a decoding module, and the mathematical expression is:
[0036]
[0037]
[0038]
[0039]
[0040] in, and l They represent the output features of the W-MSA module, SW-MSA and multi-layer perceptron respectively; W-MSA and SW-MSA represent multi-head self-attention based on conventional window partitioning and multi-head self-attention based on moving window partitioning respectively, LN represents linear layer, and MLP represents multi-layer perceptron.
[0041] Furthermore, bilinear interpolation is used between the encoding modules to restore features layer by layer, and the information of the interactive layer in the encoding stage is jump-connected to the decoding block.
[0042] Furthermore, in step S2, the change detection data set is processed as follows:
[0043] S21, perform data analysis and comparison on the change detection dataset to clean the data and improve the data quality;
[0044] S22, performing enhancement processing on the change detection data, converting the numerical data into a tensor with an image shape.
[0045] Compared with the prior art, the present invention has the following significant effects:
[0046] 1. The overall structure of the present invention adopts a combination of CNN (Convolutional Neural Network) encoder and transformer decoder, making full use of the local perception of CNN and the global receptive field of transformer to effectively understand multi-source information at different levels;
[0047] 2. The present invention designs a bi-temporal feature interaction layer (BFIL) to act as a medium for multi-level feature interaction, improves the exchange of semantic information between features at the same level of the twin network, and enhances the multi-temporal information communication at different time nodes, which is conducive to the model to discover true change areas and suppress the interference of pseudo-change areas;
[0048] 3. In order to enhance the model's perception of the fine-grained differences between bi-temporal deep processing features, the present invention proposes a bi-temporal feature fusion layer (BFFL), which integrates rich bi-temporal deep features before image size restoration by constructing a global guiding feature of bi-temporal homology; and conducts a large number of quantitative and qualitative experiments on two public high-resolution remote sensing image change detection datasets. The experimental results show that compared with some other popular deep learning-based change detection algorithms, the multi-scale feature interaction network of the present invention is robust and has higher accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 is an operational structure diagram of the present invention;
[0050] Figure 2 It is a schematic diagram of the overall structure of the multi-scale feature interaction network model;
[0051] Figure 3 It is a schematic diagram of the structure of the bi-temporal feature interaction layer;
[0052] Figure 4 Schematic diagram of the structure of the bi-temporal feature fusion layer. DETAILED DESCRIPTION
[0053] The present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0054] like Figure 1 , 2 As shown, the multi-scale feature interaction network implementation method of this embodiment includes the following steps:
[0055] Step 1: Build a multi-scale feature interaction network model
[0056] (1) Encoding module
[0057] The encoding module is mainly responsible for feature extraction, including the backbone network ResNet18, the multi-scale encoding layer module, the dual-temporal feature interaction layer module and the dual-temporal feature fusion layer module.
[0058] The role of the lightweight ResNet18 backbone network is to extract features from the input image through layer-by-layer convolution and pooling operations. Since ResNet18 is relatively shallow and has a residual structure, it can better transfer gradients and is not as prone to gradient vanishing or gradient explosion problems as deeper networks. This enables it to effectively capture low-level and mid-level features in the image, such as texture, edge, and shape information, in the early stages of feature extraction. In the multi-scale feature interaction network model, a bitemporal feature interaction layer module (BFIL, Bitemporal Feature Interaction Layer) is inserted between backbone networks at the same level to efficiently realize information interaction between multi-temporal images, guide attention to focus on different areas, and suppress the influence of interference such as illumination and vegetation. At the end of the multi-scale coding layer module, a bitemporal feature fusion layer module (BFFL, Bitemporal Feature Fusion Layer) is used to extract small difference features. The complete framework of the multi-scale feature interaction network model (change detection model) is shown below. Figure 1 , 2 shown.
[0059] like Figure 3 As shown in the figure, the core task of the dual-temporal feature interaction layer module is to allow the deep learning network to effectively communicate the features of images at different times, especially when there is an imbalance between true change samples and pseudo-change samples, to suppress the interference of information irrelevant to the task, and to associate similar regions in different time periods, thereby improving the encoding accuracy of each scale in the encoding stage of the multi-scale feature interaction network model. The dual-temporal feature interaction layer module consists of a pair of symmetrical self-attention-based transformer blocks, and the interaction method is the exchange of the weights of the self-attention sequence.
[0060] Specifically, if we assume that the input single temporal feature From the temporal state n, the single temporal feature will first be mapped to three identical linear transformer layers. In the linear transformer layer, the original pixel matrix will first compress the channel to fuse the multi-channel features, and then expand it into a self-attention vector. According to the functions that will be assigned in the future, the three sequences generated are called query vectors. Key Vector and Value vector The process of generating a sequence can be expressed by the following formula:
[0061] Q n ,K n ,V n =Reshape(Linear(f n )) (1)
[0062] Among them, C represents the number of channels of the feature map (consistent with the number of channels of the three vectors), H represents the height of the feature map, W represents the width of the feature map, L=H×W represents the generated vector sequence, Linear() represents the linear layer used to change the channel, and Reshape() represents the operation of changing the matrix into a vector sequence.
[0063] After obtaining the three vector sequences, the Key vector will be transposed and matrix multiplied with the Query vector, so that the similarity score between each Query vector and all Key vectors can be calculated, and the score is converted into weight An through the softmax activation function for weighted calculation of the Value vector. These weights An represent the importance of each feature vector to the Query, and higher weights represent greater relevance; this way of assigning attention weights to oneself can be expressed by the following dot product formula:
[0064] A n =softmax(K n T Q n ) (2)
[0065] f n ′=V n A n (3)
[0066] Among them, f n ′ represents the degree of attention of each position in the input sequence to other positions, or the importance of each position to the entire sequence. Each position can gather global information to form a new representation.
[0067] The above is the self-attention optimization of monotemporal features, while change detection is a bitemporal problem. Therefore, taking n=1 and n=2 as examples, the structure of the bitemporal feature interaction layer module is introduced below. In the bitemporal feature interaction layer module, information is allowed to interact and transfer between the two temporal states to better understand image changes.
[0068] First, separate Query vectors are generated for the n=1 and n=2 tenses respectively. These Query vectors represent specific information at different points in time. Then, the Query vectors are exchanged, and the Query vector of the n=1 tense is used for the n=2 tense, and vice versa. In this way, information interaction between the two tenses can be achieved. Next, the exchanged Query vector is used together with the Key vector of the corresponding tense to calculate the similarity score with the elements between different tenses. These similarity scores are used to determine the correlation between different elements between the two tenses for information transfer. Finally, these similarity scores are used as weights for the self-attention mechanism and exchanged again to weightedly combine the Value vectors of each other's tenses. As a result, two outputs f1′ and f2′ that fuse multi-temporal information are generated. The above interaction process can be expressed by two sets of dot product formulas:
[0069] A1=softmax(K1 T Q2) (4)
[0070] A2=softmax(K2 T Q1) (5)
[0071] f1′=V2A1 (6)
[0072] f2′=V1A2 (7)
[0073] In summary, the dual-temporal feature interaction layer module can bridge the feature information of another branch while retaining the single-temporal features by exchanging and interacting information between the two temporal states. The guidance of self-correlation and parallel branches enhances the global attention of the multi-scale feature interaction network model across the temporal domain to a certain extent and suppresses the interference of pseudo-changes.
[0074] like Figure 4 As shown, the bi-temporal feature fusion layer module (BFFL) can learn how features at different time points are related to each other, so as to better identify potential changes in change detection tasks, and can also ensure that features at different time points are balanced and integrated. In the field of change detection, common bi-temporal feature fusion methods include difference maps and transformation vectors, which are designed to capture the change information between two moments. However, they mainly use simple parameter-free operations such as pixel subtraction, addition, channel cascading, or bilinear pooling, which results in low matching of bi-temporal multi-channel information and easy confusion of feature information. To solve this problem, considering the low resolution and high channel properties of deep features, a bi-temporal feature fusion layer module (BFFL) is proposed in this embodiment. The bi-temporal feature fusion layer module can extract global attention weights to summarize bi-temporal features. The global attention matrix A g The generation of can be expressed as:
[0075] Ag =σ(Conv 1×1 (GELU(AvgPool(Concat[F1,F2])))) (8)
[0076] Among them, F1 and F2 represent the features of bi-temporal input, Concat[] represents channel cascade, AvgPool (AveragePooling) represents average pooling, GELU (Gaussian Error Linear Unit) represents GELU (Gaussian Error Linear Unit) activation function, Conv1×1 represents 1×1 convolution operation, and σ() represents Sigmoid activation function.
[0077] These global attention weights Ag are used to adjust the existing dual-branch raw features. By performing pixel subtraction between the attention matrix corresponding to the dual temporal state and the original features after the compressed channel, it is helpful to deeply mine the potential difference features. Finally, the obtained dual-temporal features are fused through channel cascade to improve the information richness of the dual-temporal features. Dual-temporal feature fusion operation F out The formula is:
[0078] F out =Concat[|Conv 1×1 (A g F1)-F2|,|Conv 1×1 (A g F2)-F1|] (9)
[0079] Among them, || means that the result of subtracting the pixel values at corresponding positions in the feature map is followed by taking the absolute value operation.
[0080] The dual-temporal feature fusion layer module combines global attention and simple difference operations, so that the fusion layer can capture the subtle differences of transformations more carefully and comprehensively, thereby improving the accuracy of change detection. Compared with traditional methods, this design is more flexible and can better adapt to transformations in complex scenarios. Through targeted operations on deep features, the method of the present invention shows stronger discrimination when processing high-channel deep features, thereby providing a more powerful feature expression for change detection tasks.
[0081] (II) Decoding module
[0082] The decoding module is mainly responsible for the restoration of feature size, including the transformer decoding layer module and the classifier before output. In order to combine shallow detail information and deep semantic information, the difference feature map of the dual-temporal feature interaction layer and the dual-temporal feature fusion layer is jump-connected to the corresponding decoding part. In addition, the classifier is used at the end of the decoding layer as a post-processing module to obtain a high-precision dual classification result map.
[0083] In this embodiment, the multi-scale decoding module can make full use of the decoder with a global receptive field to restore high-level abstract features to the original input space. Compared with the traditional CNN (Convolutional Neural Network), the use of the Swin Transformer Block based on the self-attention mechanism as a decoding module has its unique advantages. The Swin Transformer Block introduces the concept of a mobile attention window, so that the multi-scale feature interaction network model can capture long-distance dependencies globally at a lower computational cost. This solves the problem that the computational complexity of ViT increases with the square of the image size, which is conducive to better processing of large-size images. Compared with CNN, Swin Transformer provides better scalability and global modeling capabilities while maintaining efficient performance. This feature is particularly important for change detection tasks because the impact of changes usually involves a wide area of the image. The mathematical expression of the continuous Swin transformer block using the mobile attention window partitioning method is:
[0084]
[0085]
[0086]
[0087]
[0088] in, y l They represent the output features of the W-MSA module, SW-MSA module and multi-layer perceptron respectively; W-MSA (Window-Multihead Self Attention) and SW-MSA (Shifted Window-Multihead SelfAttention) represent multi-head self-attention based on conventional window partitioning and multi-head self-attention based on shifted window partitioning respectively, LN (Layer Norm) represents the linear layer, and MLP (Multilayer Perceptron) represents the multi-layer perceptron.
[0089] In addition, bilinear interpolation is used between the encoding modules to restore features layer by layer, and the information jumps of the interaction layer in the encoding stage are connected to the decoding module. Specifically, the output of each layer of the decoding module will be restored to a feature matrix and pixel-wise added with the difference output of the dual-temporal feature interaction layer module, thereby achieving the weighting of local difference features on global features and further reducing the loss of difference information during upsampling. Finally, the refinement layer in the classifier effectively improves the recovery effect of the feature size, allowing the network to more accurately capture the details and contour information of the building in the output stage.
[0090] Step 2: Network training
[0091] Data analysis and comparison are performed on the change detection dataset to clean the data and improve the data quality. Next, data enhancement is performed to convert these numerical data into tensors with image shapes, which are then input into the multi-scale feature interaction network model for training. During network training, the ploy method is used to dynamically change the learning rate. The initial learning rate is set to 0.001, the maximum training iteration is 200 rounds, and the batch size is set to 16 (the training parameters can be modified according to actual needs).
[0092] Step 3: Generate a change prediction graph
[0093] Use the trained multi-scale feature interaction network model for prediction, input dual-phase remote sensing images, use the optimal weights for encoding and decoding operations, and finally obtain a high-precision dual classification result map for a certain time and place.
[0094] The above shows and describes the basic principles, main features and advantages of the present invention. It should be understood by those skilled in the art that the present invention is not limited by the above embodiments, and the above embodiments and descriptions are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, and these changes and improvements all fall within the scope of the present invention to be protected.
Claims
1. A multi-scale feature interaction network implementation method for processing dual-temporal remote sensing image changes, characterized in that: By constructing a global guidance feature of bi-temporal homology, rich bi-temporal deep features are integrated before image size restoration, including the following steps: S1, constructing a multi-scale feature interaction network model, wherein the multi-scale feature interaction network model includes an encoding module and a decoding module, wherein the encoding module is responsible for feature extraction, and the decoding module is responsible for feature size recovery; S2, converts the change detection data into a tensor with an image shape, inputs it into a multi-scale feature interaction network model for training, and saves the model that meets the training conditions; S3, inputting the dual-temporal remote sensing image into the model saved in step S2 to obtain a high-precision dual classification result map of a certain time and place; The encoding module includes a backbone network, a multi-scale encoding layer module, a dual-temporal feature interaction layer module and a dual-temporal feature fusion layer module; a dual-temporal feature interaction layer module is inserted between backbone networks at the same level to realize information interaction of multi-temporal images, guide attention to focus on the difference area and suppress the influence of environmental interference, and at the same time, a dual-temporal feature fusion layer module is used at the end of the multi-scale encoding layer module to extract fine difference features; The backbone network ResNet18 extracts features from the input image through layer-by-layer convolution and pooling operations; The bi-temporal feature interaction layer module consists of a pair of symmetrical self-attention-based transformer blocks, and the interaction mode is the exchange of the weight value of the self-attention sequence; in the case of an imbalance between true change samples and pseudo-change samples, the interference of information irrelevant to the task is suppressed, and similar regions in different time periods are associated; Set input monotemporal features From the temporal state n, the single temporal feature will first be mapped to three identical linear transformer layers; in the linear transformer layer, the original pixel matrix will first compress the channel to fuse the multi-channel features, and then expand it into a self-attention vector, and generate three sequences according to the functions that will be assigned in the future: Query vector Key Vector and Value vector The process of generating a sequence is expressed by the following formula: Q n ,K n ,V n =Reshape(Linear(f n )) Among them, C represents the number of channels of the feature map, H represents the height of the feature map, W represents the width of the feature map, L = H × W represents the generated vector sequence, Linear() represents the linear layer used to change the channel, and Reshape() represents the operation of changing the matrix into a vector sequence; After obtaining the three vector sequences, the Key vector will be transposed and matrix multiplied with the Query vector to calculate the similarity score between each Query vector and all Key vectors, and the similarity score is converted into weight A through the softmax activation function. n , used to calculate the Value vector in weighted form, expressed by the following dot product formula: A n =softmax(K n T Q n ) f n ′=V n A n Among them, represents the degree of attention of each position in the input sequence to other positions; Taking n = 1 and n = 2 tenses, the expression of the information interaction and transmission process between the two tenses is as follows: A1=softmax(K1 T Q2) <h2 style=";text-align:left;direction:ltr">A2 = softmax(K2<h2 style=";text-align:left;direction:ltr"> T <h2 style=";text-align:left;direction:ltr"> Q1) f1′=V2A1 f2′=V1A2 Among them, f1′ and f2′ represent the outputs integrating multi-temporal information; The bi-temporal feature fusion layer module can extract global attention weights to summarize bi-temporal features. The generation of the global attention matrix Ag is expressed as: A g =σ(Conv 1×1 (GELU(AvgPool(Concat[F1,F2])))) Among them, F1 and F2 represent the features of bi-temporal input, Concat[] represents channel cascade, AvgPool() represents average pooling, GELU() represents GELU() activation function, Conv1×1 represents 1×1 convolution operation, and σ() represents Sigmoid activation function; The bi-temporal feature fusion layer module fuses the obtained bi-temporal features through channel cascading. The formula of the feature fusion operation is expressed as: F out =Concat[Conv 1×1 (A g F1)-F2,Conv 1×1 (A g F2)-F1] Among them, | | indicates that the result of subtracting the pixel values at the corresponding position of the feature map is followed by taking the absolute value operation; The multi-scale decoding layer module can fully utilize the decoder with global receptive field to restore high-level abstract features to the original input space; The decoding module includes a transformer decoding layer and a classifier before output. The decoding module uses a continuous Swin Transformer Block divided by a moving attention window as a decoding module. The mathematical expression is: in, and l They represent the output features of the W-MSA module, SW-MSA and multi-layer perceptron respectively; W-MSA and SW-MSA represent multi-head self-attention based on conventional window partitioning and multi-head self-attention based on moving window partitioning respectively, LN represents linear layer, and MLP represents multi-layer perceptron.
2. The method for implementing a multi-scale feature interaction network for processing dual-temporal remote sensing image changes according to claim 1, characterized in that: The encoding modules use bilinear interpolation to restore features layer by layer, and jump the information of the interactive layer in the encoding stage to the decoding block.
3. The method for implementing a multi-scale feature interaction network for processing dual-temporal remote sensing image changes according to claim 1, characterized in that: In step S2, the processing steps for the change detection data set are as follows: S21, perform data analysis and comparison on the change detection dataset to clean the data and improve the data quality; S22, performing enhancement processing on the change detection data, converting the numerical data into a tensor with an image shape.
