A remote sensing change detection method based on dual-granularity feature alignment
By adopting two-particle feature alignment technology in remote sensing change detection, the problems of appearance heterogeneity and geometric differences in bi-time phase images are solved, and more accurate and high-quality change detection results are achieved.
Patent Information
- Application Number
- CN202411488347.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-23
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2044-10-23
AI Technical Summary
The existing remote sensing change detection method based on Transformer model failed to effectively deal with appearance heterogeneity and affine geometric differences in bi-time phase images, resulting in the generation of pseudo-change results.
Using a method based on two-grained feature alignment, the dual-time phase features are extracted and aligned by building a twin network, a semantic alignment module and a spatial alignment module, and the appearance and geometric differences are eliminated, and the aligned features are input into the time-based change detection head to generate a high-quality change map.
It effectively reduces the generation of pseudo-change results, improves the accuracy and quality of change detection, ensures that the characteristics of similar objects are similar, and eliminates interference caused by appearance and geometric differences.
Smart Images

Figure CN119445392B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a remote sensing change detection method based on dual-granularity feature alignment. Background Art
[0002] With the rapid development of technology, it is becoming increasingly feasible to obtain high-quality and large amounts of remote sensing images. These data provide humans with the opportunity to indirectly observe surface objects, which is especially important in the field of change detection. Change detection aims to use dual-temporal images to identify the changes of objects in the same remote sensing scene at different time points. The detection result maps generated can be widely used in many fields such as disaster monitoring, urbanization analysis, and resource investigation.
[0003] At present, deep learning methods, especially convolutional neural networks (CNNs), have been successful in many remote sensing fields. However, the receptive field of convolutional neural networks is limited and it is difficult to capture the long-distance dependencies in images. For this reason, the Transformer model has gradually emerged in remote sensing change detection due to its superior ability to capture long-distance dependencies.
[0004] Despite this, remote sensing change detection still faces two major challenges. First, due to the high spatial resolution of dual-temporal images, the appearance heterogeneity and confusion of objects in the scene are more obvious. Second, although the dual-temporal images are collected by the same satellite, there are still affine geometric differences between them. Existing change detection methods based on Transformer models usually directly use the concatenation or difference results of dual-temporal images or features for detection reasoning, which fails to effectively address the above challenges and leads to the generation of pseudo-change results, that is, non-changing areas are mistakenly detected as changing areas.
[0005] Therefore, a remote sensing change detection method based on dual-granularity feature alignment is proposed. Summary of the invention
[0006] The purpose of the present invention is to provide a remote sensing change detection method based on dual-granularity feature alignment to solve the problems raised in the above background technology.
[0007] In order to solve the above technical problems, the present invention provides the following technical solutions: a remote sensing change detection method based on dual-granularity feature alignment, comprising the following steps:
[0008] Step S1, constructing a twin network, inputting the dual-phase image into the twin network to extract the dual-phase features;
[0009] Step S2, constructing a semantic alignment module, using the extracted bi-temporal features through the semantic alignment module to reduce the appearance difference between the bi-temporal images and achieve appearance granularity alignment;
[0010] Step S3, constructing a spatial alignment module, using the extracted dual-phase features through the spatial alignment module to eliminate geometric differences between dual-phase images and achieve geometric granularity alignment;
[0011] Step S4: input the dual-phase features and difference maps that have undergone dual-granularity alignment into a change detection head based on time comparison, and transform the dual-phase features into a change map by constraining them and improving the quality of the change map.
[0012] The aforementioned remote sensing change detection method based on dual-granularity feature alignment, step S1, constructing a twin network, inputting the dual-phase image into the twin network to extract the dual-phase features, the specific steps are as follows,
[0013] Dual-phase image and Input into the twin network containing four Transformer modules to obtain dual-phase features
[0014] Among them, H×W is the spatial size of the image, H i ×W i is the space size, B i is the number of channels; H 1 =W 1 =64,H 2 =W 2 =32, H 3 =W 3 =16,H 4 =W 4 =8.
[0015] The aforementioned remote sensing change detection method based on dual-granularity feature alignment, step S2, constructing a semantic alignment module, using the extracted dual-phase features through the semantic alignment module to reduce the appearance difference between the dual-phase images, and realize appearance granularity alignment, the specific steps are as follows,
[0016] Step S2.1: Extract the bi-temporal features of the i-th scale Use a 1×1 convolutional layer to change the number of channels to 256, and obtain a new dual-phase feature, denoted as
[0017] Step S2.2: Reduce the appearance differences through multi-head attention mechanism;
[0018] Step S2.2: Reduce the appearance differences through the multi-head attention mechanism. The specific steps are as follows:
[0019] Step S2.21: By key-value pair Query descriptor Mapping to a new form to reduce the appearance difference;
[0020] Set Query Key C i , value C i and multi-head attention As shown in formula (1):
[0021]
[0022] in, is the parameter matrix, represents a concatenation operation, C i is a category label sequence containing K feature representations of changing objects and background, h l represents the lth attention head;
[0023] Step S2.22, calculate the lth attention head, as shown in formula (2):
[0024]
[0025] in, All are parameter matrices;
[0026] Step S2.23: Semantically align bi-temporal features through residual connections As shown in formula (3):
[0027]
[0028] in, ReLU represents the linear rectification function. and All represent parameter matrices;
[0029] Step S2.24: Generated mask As shown in formula (4):
[0030]
[0031] Step S2.3: Use spatial pyramid pooling to extract category representations and update the category tag sequence through a gating mechanism. The specific steps are as follows:
[0032] Step S2.31: Use spatial pyramid pooling to extract category representation. The specific steps are as follows:
[0033] Setting spatial pyramid pooling Use 1×1, 2×2, 4×4, and 8×8 maximum pooling kernels to generate multiple sub-region representations and superimpose them to obtain the intermediate label sequence Complete the extraction of category representation, as shown in formula (5):
[0034]
[0035] in, is the parameter matrix;
[0036] Step S2.33: Update the category tag sequence through the gating mechanism. The specific steps are as follows:
[0037] Set intermediate marker sequence The category tag sequence C of the current level i With the help of the gating mechanism, it is updated to the shallow category label sequence C i-1 ;
[0038] Among them, the gating mechanism includes a reset gate and update gate As shown in formulas (6) and (7):
[0039]
[0040] in, and is a parameter matrix; the reset gate and the update gate are used to adjust the amount of information used from the current category label to form candidate and updated category labels, respectively;
[0041] Updated Category Tag C i-1 As shown in formulas (8) and (9):
[0042]
[0043] in, is the parameter matrix, Label the candidate categories and label the deepest categories C 4 Set the matrix to zero.
[0044] The aforementioned remote sensing change detection method based on dual-granularity feature alignment, step S3, constructing a spatial alignment module, using the extracted dual-phase features through the spatial alignment module to eliminate the geometric differences between the dual-phase images, and realize geometric granularity alignment, the specific steps are as follows:
[0045] Step S3.1: Build a network based on UNet structure Network Take the stack of X1 and X2 as input and calculate the change field of the i-th scale As shown in formula (10):
[0046]
[0047] in, represents the downsampling operation, Φ iThe vector offset of each pixel constitute;
[0048] Step S3.2: by using a differentiable registration operation based on bilinear interpolation, Perform coordinate mapping to eliminate geometric differences. The specific steps are as follows:
[0049] Compute registration features The value of each pixel p in is as shown in formula (11),
[0050]
[0051] where p'=p+Φ i (p) is The subscripts x and y represent the coordinates of the pixel points, and δ(p') is the set of neighboring pixels of the pixel point p'.
[0052] In the aforementioned remote sensing change detection method based on dual-granularity feature alignment, step S4, after inputting the dual-phase features and the difference map after dual-granularity alignment into the change detection head based on time comparison, constraints are imposed on the dual-phase features to transform them into a change map and improve the quality of the change map. The specific steps are as follows:
[0053] Step S4.1: Obtain the absolute difference D i , obtain the difference map, as shown in formula (12):
[0054]
[0055] Step S4.2: Generate a change map from the multi-scale difference map resolution by resolution through four convolutional layers and upsampling operations At the same time, bi-phase features are generated by resolution Enhance the distinction between features of changed and unchanged objects;
[0056] Step S4.3, the difference map is passed through a 3×3 convolution layer and a sigmoid function to generate an attention map, and the attention map is used to help the bi-temporal features focus on the changing objects;
[0057] Step S4.4: Apply constraints to the bi-phase features. The specific steps are as follows:
[0058] Step S4.41, through the true value Find the areas that have changed and the areas that have not changed;
[0059] Computing contrast loss As shown in formulas (13) and (14):
[0060]
[0061] Among them, cos(.,.) is used to measure the cosine similarity of two vectors;
[0062] Step S4.42: The cross entropy loss between the predicted value P and the true value Y With contrast loss The loss function is formed as shown in formulas (15) and (16):
[0063]
[0064] The aforementioned remote sensing change detection method based on dual-granularity feature alignment, in the change area, P 1 and P 2 Encode different semantic information. In the unchanged area, P 1 and P 2 The high-level features in are similar.
[0065] Compared with the prior art, the present invention has the following beneficial effects:
[0066] The present invention solves the problem of heterogeneous appearance of similar objects in remote sensing scenes by using a semantic alignment module, ensures that the features extracted from similar objects are similar, and eliminates the interference caused by the appearance.
[0067] The spatial alignment module is used to resolve the affine geometric differences between dual-phase remote sensing images, thus avoiding the generation of false change detection results due to position offset of similar objects.
[0068] By using a change detection head based on time contrast, the feature differences between changing objects in the dual-phase images are amplified, and the feature differences between non-changing objects are reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0069] Figure 1 It is the overall flow chart of the present invention;
[0070] Figure 2 It is a schematic diagram of the overall principle of the present invention;
[0071] Figure 3 It is a structural schematic diagram of the semantic alignment module of the present invention;
[0072] Figure 4 It is a structural schematic diagram of the spatial alignment module of the present invention;
[0073] Figure 5 A schematic diagram of a change detection head based on time comparison of the present invention;
[0074] Figure 6 It is a schematic diagram of the detection results of the test samples of the LEVIR-CD dataset using different methods according to the embodiments of the present invention;
[0075] Figure 7 It is a schematic diagram of the detection results of the test samples of the CDD data set using different methods according to the embodiments of the present invention;
[0076] Figure 8 Schematic diagram of detection results of test samples in the SYSU-CD dataset using different methods according to embodiments of the present invention. DETAILED DESCRIPTION
[0077] The present invention will be further described below in conjunction with the accompanying drawings.
[0078] See also Figure 1-8 The present invention provides a remote sensing change detection method based on dual-granularity feature alignment, a remote sensing change detection method based on dual-granularity feature alignment, comprising the following steps:
[0079] Step S1, constructing a twin network, inputting the dual-phase image into the twin network to extract the dual-phase features;
[0080] Step S2, constructing a semantic alignment module, using the extracted bi-temporal features through the semantic alignment module to reduce the appearance difference between the bi-temporal images and achieve appearance granularity alignment;
[0081] Step S3, constructing a spatial alignment module, using the extracted dual-phase features through the spatial alignment module to eliminate geometric differences between dual-phase images and achieve geometric granularity alignment;
[0082] Step S4: input the dual-phase features and difference maps that have undergone dual-granularity alignment into a change detection head based on time comparison, and transform the dual-phase features into a change map by constraining them and improving the quality of the change map.
[0083] The aforementioned remote sensing change detection method based on dual-granularity feature alignment, step S1, constructing a twin network, inputting the dual-phase image into the twin network to extract the dual-phase features, the specific steps are as follows,
[0084] Dual-phase image and Input into the twin network containing four Transformer modules to obtain dual-phase features
[0085] Among them, H×W is the spatial size of the image, H i ×W i is the space size, B i is the number of channels; H 1 =W 1 =64,H 2 =W 2 =32, H 3 =W 3 =16,H4 =W 4 =8.
[0086] The aforementioned remote sensing change detection method based on dual-granularity feature alignment, step S2, constructing a semantic alignment module, using the extracted dual-phase features through the semantic alignment module to reduce the appearance difference between the dual-phase images, and realize appearance granularity alignment, the specific steps are as follows,
[0087] Step S2.1: Extract the bi-temporal features of the i-th scale Use a 1×1 convolutional layer to change the number of channels to 256, and obtain a new dual-phase feature, denoted as
[0088] Step S2.2: Reduce the appearance differences through multi-head attention mechanism;
[0089] Step S2.2: Reduce the appearance differences through the multi-head attention mechanism. The specific steps are as follows:
[0090] Step S2.21: By key-value pair Query descriptor Mapping to a new form to reduce the appearance difference;
[0091] Set Query Key C i , value C i and multi-head attention As shown in formula (1):
[0092]
[0093] in, is the parameter matrix, represents a concatenation operation, C i is a category label sequence containing K feature representations of changing objects and background, h l represents the lth attention head;
[0094] Step S2.22, calculate the lth attention head, as shown in formula (2):
[0095]
[0096] in, All are parameter matrices;
[0097] Step S2.23: Semantically align bi-temporal features through residual connections As shown in formula (3):
[0098]
[0099] in, ReLU represents the linear rectification function. and All represent parameter matrices;
[0100] Step S2.24: Generated mask As shown in formula (4):
[0101]
[0102] Step S2.3: Use spatial pyramid pooling to extract category representations and update the category tag sequence through a gating mechanism. The specific steps are as follows:
[0103] Step S2.31: Use spatial pyramid pooling to extract category representation. The specific steps are as follows:
[0104] Setting spatial pyramid pooling Use 1×1, 2×2, 4×4, and 8×8 maximum pooling kernels to generate multiple sub-region representations and superimpose them to obtain the intermediate label sequence Complete the extraction of category representation, as shown in formula (5):
[0105]
[0106] in, is the parameter matrix;
[0107] Step S2.33: Update the category tag sequence through the gating mechanism. The specific steps are as follows:
[0108] Set intermediate marker sequence The category tag sequence C of the current level i With the help of the gating mechanism, it is updated to the shallow category label sequence C i-1 ;
[0109] Among them, the gating mechanism includes a reset gate and update gate As shown in formulas (6) and (7):
[0110]
[0111] in, and is a parameter matrix; the reset gate and the update gate are used to adjust the amount of information used from the current category label to form candidate and updated category labels, respectively;
[0112] Updated Category Tag C i-1 As shown in formulas (8) and (9):
[0113]
[0114] in, is the parameter matrix, Label the candidate categories and label the deepest categories C 4 Set the matrix to zero.
[0115] The aforementioned remote sensing change detection method based on dual-granularity feature alignment, step S3, constructing a spatial alignment module, using the extracted dual-phase features through the spatial alignment module to eliminate the geometric differences between the dual-phase images, and realize geometric granularity alignment, the specific steps are as follows:
[0116] Step S3.1: Build a network based on UNet structure Network Take the stack of X1 and X2 as input and calculate the change field of the i-th scale As shown in formula (10):
[0117]
[0118] in, represents the downsampling operation, Φ i The vector offset of each pixel constitute;
[0119] Step S3.2: by using a differentiable registration operation based on bilinear interpolation, Perform coordinate mapping to eliminate geometric differences. The specific steps are as follows:
[0120] Compute registration features The value of each pixel p in is as shown in formula (11),
[0121]
[0122] where p'=p+Φ i (p) is The subscripts x and y represent the coordinates of the pixel points, and δ(p') is the set of neighboring pixels of the pixel point p'.
[0123] In the aforementioned remote sensing change detection method based on dual-granularity feature alignment, step S4, after inputting the dual-phase features and the difference map after dual-granularity alignment into the change detection head based on time comparison, constraints are imposed on the dual-phase features to transform them into a change map and improve the quality of the change map. The specific steps are as follows:
[0124] Step S4.1: Obtain the absolute difference D i , obtain the difference map, as shown in formula (12):
[0125]
[0126] Step S4.2: Generate a change map from the multi-scale difference map resolution by resolution through four convolutional layers and upsampling operations At the same time, bi-phase features are generated by resolution Enhance the distinction between features of changed and unchanged objects;
[0127] Step S4.3, the difference map is passed through a 3×3 convolution layer and a sigmoid function to generate an attention map, and the attention map is used to help the bi-temporal features focus on the changing objects;
[0128] Step S4.4: Apply constraints to the bi-phase features. The specific steps are as follows:
[0129] Step S4.41, through the true value Find the areas that have changed and the areas that have not changed;
[0130] Computing contrast loss As shown in formulas (13) and (14):
[0131]
[0132]
[0133] Among them, cos(.,.) is used to measure the cosine similarity of two vectors;
[0134] Step S4.42: The cross entropy loss between the predicted value P and the true value Y With contrast loss The loss function is formed as shown in formulas (15) and (16):
[0135]
[0136] The aforementioned remote sensing change detection method based on dual-granularity feature alignment, in the change area, P 1 and P 2 Encode different semantic information. In the unchanged area, P 1 and P 2 The high-level features in are similar.
[0137] In order to better illustrate the use effect of the present invention, a specific embodiment of the present invention is introduced below.
[0138] (1) Dataset.
[0139] LEVIR-CD: This dataset consists of 637 image pairs of size 1024×1024. These images were collected by Google Earth in Texas, USA. The spatial resolution of the images is 0.5 meters. For experimental convenience, we cropped the original images into 256×256 image blocks. The number of training / validation / test samples is set to 7120 / 1024 / 2048 respectively. This dataset mainly contains two types of changes: destroyed buildings and newly built buildings.
[0140] CDD: This dataset contains 15998 pairs of dual-phase images of size 256×256. Their spatial resolution is 0.03-1 meter. These images are also collected by Google Earth. For this dataset, we select 10000 / 2998 / 3000 image pairs as training / validation / testing. The objects involved in the data include cars, land, reservoirs, buildings and roads.
[0141] SYSU-CD: This dataset was collected by sensors in Hong Kong, China in 2007 and 2014. The dataset contains 20,000 pairs of dual-temporal images with a size of 256×256 and a resolution of 0.5 meters. For this dataset, we use 12,000 / 4,000 / 4,000 pairs of samples for training / validation / testing respectively. The change categories of this dataset include new urban construction, suburban expansion, pre-construction foundation work, vegetation change, road expansion, and offshore construction.
[0142] (2) Implementation details
[0143] All experiments are implemented by PyTorch on a workstation with an Intel i7-10700 CPU and an NVIDIA GeForceRTX3090 GPU. This embodiment uses the AdamW optimization algorithm for training. The initial learning rate of the optimization algorithm is set to 0.0001. The other parameters of the AdamW optimization algorithm are set to default values. The training cycle of the LEVIR-CD, CDD, and SYSU-CD datasets is set to 200. For these three datasets, the length K of the category label sequence in the semantic alignment module is set to 2, 6, and 7, respectively. In order to evaluate the performance of the change detection method, we use five indicators: precision, recall, overall accuracy (OA), F1 score, and intersection of union (IoU).
[0144] (3) Comparison with advanced methods
[0145] In order to verify the effectiveness of the present invention, we compared it with 11 advanced classification methods. These methods include FC-EF, FC-Siam-conc, FC-Siam-diff, SNUNet, DSAMNet, BIT, ChangeFormer, VcT, EATder, CF-GCN and SEIFNet. Among them, FC-EF is an image-level fusion method based on convolutional neural network. FC-Siam-conc, FC-Siam-diff, SNUNet, DSAMNet, EATder, CF-GCN and SEIFNet are feature-level fusion methods based on convolutional neural network. BIT, ChangeFormer and VcT are methods based on Transformer model. The results of the comparison method are obtained by reproducing the publicly available code, and the experimental results are shown in Tables 1-3.
[0146] Table 1 Experimental results on the LEVIR-CD dataset
[0147]
[0148]
[0149] Table 2 Experimental results of CDD dataset
[0150] method precision recall F1 OA IoU FC-EF 81.81 41.08 54.70 91.97 37.64 FC-Siam-conc 84.15 54.88 66.44 93.46 49.74 FC-Siam-diff 85.69 44.87 58.90 92.61 41.74 SNUNet 95.19 92.51 93.83 98.56 88.38 DSAMNet 90.24 97.43 93.70 98.45 88.14 BIT 94.57 88.18 91.26 98.01 83.93 ChangeFormer 96.84 97.08 96.96 99.28 94.11 Vtx 95.32 95.36 95.34 98.90 91.10 EATDer 95.42 98.33 96.85 99.25 93.90 CF-GCN 96.97 96.89 96.93 99.28 94.04 SEIFNet 96.68 95.88 96.27 99.12 92.82 The present invention 97.40 97.60 97.50 99.41 95.12
[0151] Table 3 Experimental results of SYSU-CD dataset
[0152]
[0153]
[0154] Table 1 lists the results of five indicators of all the comparison methods on the test set of the LEVIR-CD dataset. It can be seen from the table that the present invention has achieved the best results in the three indicators of F1 score, OA and IoU. Specifically, compared with the method ranked second in performance, the present invention can improve the F1 score, OA and IoU by 0.42%, 0.03% and 0.71% respectively. Compared with the method ranked third in performance, the present invention can improve the F1 score, OA and IoU by 0.43%, 0.04% and 0.73% respectively. We believe that there are three main reasons for this phenomenon. First, the semantic alignment module in the present invention adjusts the various appearances of similar objects to ensure the cohesion of the style to alleviate the problem of pseudo-changes. Secondly, the spatial alignment module eliminates the geometric differences between the two-phase images to further reduce pseudo-changes. Finally, the present invention implements contrast loss on the two-phase features to refine the final change map. Therefore, the present invention can also obtain F1 scores, OA and IoU that are better than other comparison methods on the other two datasets, as shown in Tables 2 and 3. On the CDD dataset, compared with the second-ranked method, the present invention can improve the F1 score, OA and IoU by 0.54%, 0.13% and 1.01% respectively. On the SYSU-CD dataset, compared with the second-ranked method, the present invention can improve the F1 score, OA and IoU by 0.96%, 0.50% and 1.40% respectively.
[0155] The change graphs of several test samples of all comparison methods on LEVIR-CD, CDD and SYSU-CD datasets are shown in the figure below. Figure 6-8 As shown in the figure, it can be seen that the proportion of dark gray areas in the change map results is much smaller than that of other comparison methods. This phenomenon shows that the present invention can significantly alleviate the pseudo-change problem and generate fewer false positive results. At the same time, since the present invention can capture slight changes between objects, the generated gray area (false negative) is smaller. These visualization results verify the effectiveness of the present invention proposed by us.
[0156] While the invention has been shown and described, it will be appreciated by those skilled in the art that many changes, modifications, substitutions and variations may be made thereto without departing from the principles and spirit of the invention, the scope of the invention being defined by the appended claims and their equivalents.
Claims
1. A remote sensing change detection method based on dual-granularity feature alignment, characterized in that: The following steps are involved: Step S1, constructing a twin network, inputting the dual-phase image into the twin network to extract the dual-phase features; Step S2, constructing a semantic alignment module, using the extracted bi-temporal features through the semantic alignment module to reduce the appearance difference between the bi-temporal images and achieve appearance granularity alignment; Step S2.1: Extract the bi-temporal features of the i-th scale Use a 1×1 convolutional layer to change the number of channels to 256, and obtain a new dual-phase feature, denoted as Step S2.2: Reduce the appearance differences through multi-head attention mechanism; Step S2.21: By key-value pair Query descriptor Mapping to a new form to reduce the appearance difference; Set Query Key C i , value C i and multi-head attention As shown in formula (1): in, is the parameter matrix, represents a concatenation operation, C i is a category label sequence containing K feature representations of changing objects and background, h l represents the lth attention head; Step S2.22, calculate the lth attention head, as shown in formula (2): in, All are parameter matrices; Step S2.23: Semantically align bi-temporal features through residual connections As shown in formula (3): in, ReLU represents the linear rectification function. and All represent parameter matrices; Step S2.24: Generated mask As shown in formula (4): Step S2.3, extract category representation using spatial pyramid pooling, and update the category tag sequence through the gating mechanism; Step S2.31, extract category representation using spatial pyramid pooling, the specific steps are as follows, Setting spatial pyramid pooling Use 1×1, 2×2, 4×4, and 8×8 maximum pooling kernels to generate multiple sub-region representations and superimpose them to obtain the intermediate label sequence Complete the extraction of category representation, as shown in formula (5): in, is the parameter matrix; Step S2.32: Update the category tag sequence through the gating mechanism. The specific steps are as follows: Set intermediate marker sequence The category tag sequence C of the current level i With the help of the gating mechanism, it is updated to the shallow category label sequence C i-1 ; Among them, the gating mechanism includes a reset gate and update gate As shown in formulas (6) and (7): in, and is a parameter matrix; the reset gate and the update gate are used to adjust the amount of information used from the current category label to form candidate and updated category labels, respectively; Updated Category Tag C i-1 As shown in formulas (8) and (9): in, is the parameter matrix, Label the candidate categories and label the deepest category C 4 Set to zero matrix; Step S3, constructing a spatial alignment module, using the extracted dual-phase features through the spatial alignment module to eliminate geometric differences between dual-phase images and achieve geometric granularity alignment; Step S3.1: Build a network based on UNet structure Network Take the stack of X1 and X2 as input and calculate the change field of the i-th scale As shown in formula (10): in, represents the downsampling operation, Φ i The vector offset of each pixel constitute; Step S3.2: by using a differentiable registration operation based on bilinear interpolation, Perform coordinate mapping to eliminate geometric differences. The specific steps are as follows: Compute registration features The value of each pixel p in is as shown in formula (11), where p′=p+Φ i (p) is The corresponding pixel point in , the subscripts x and y represent the coordinates of the pixel point, and δ(p′) is the set of neighboring pixel points of pixel point p′; Step S4, inputting the dual-phase features and the difference map after dual-granularity alignment into the change detection head based on time comparison, converting the dual-phase features into a change map by constraining them and improving the quality of the change map; Step S4.1: Obtain the absolute difference D i , obtain the difference map, as shown in formula (12): Step S4.2: Generate a change map from the multi-scale difference map resolution by resolution through four convolutional layers and upsampling operations At the same time, bi-phase features are generated by resolution Enhance the distinction between features of changed and unchanged objects; Step S4.3, the difference map is passed through a 3×3 convolution layer and a sigmoid function to generate an attention map, and the attention map is used to help the bi-temporal features focus on the changing objects; Step S4.4: Apply constraints to the bi-phase features. The specific steps are as follows: Step S4.41, through the true value Find the areas that have changed and the areas that have not changed; Computing contrast loss As shown in formulas (13) and (14): Among them, cos(.,.) is used to measure the cosine similarity of two vectors; Step S4.42: The cross entropy loss between the predicted value P and the true value Y With contrast loss The loss function is constructed as shown in formulas (15) and (16):
2. The remote sensing change detection method based on dual-granularity feature alignment according to claim 1, characterized in that: Step S1: Input the dual-phase image into the twin network to extract the dual-phase features. The specific steps are as follows: Dual-phase image and Input into the twin network containing four Transformer modules to obtain dual-phase features Among them, H×W is the spatial size of the image, H i ×W i is the space size, B i is the number of channels; H 1 =W 1 =64,H 2 =W 2 =32, H 3 =W 3 =16,H 4 =W 4 =8.
3. The remote sensing change detection method based on dual-granularity feature alignment according to claim 1, characterized in that: In the changing area, P 1 and P 2 Encode different semantic information. In the unchanged area, P 1 and P 2 The high-level features in are similar.
Citation Information
Patent Citations
Image Semantic Segmentation Method Based on Deep Full Convolutional Network and Conditional Random Field
AU2020103901A4
Remote sensing image change detection method and system fusing regional semantics and pixel features
CN115331087A