A building change detection method for urban dynamic monitoring

By building a dual-channel twin network with weight sharing and a twin cross attention module to extract multi-scale features, combined with multi-scale feature fusion and differential context discrimination module, the problems of pseudo-change and feature information loss in remote sensing image change detection are solved, and high-precision building change detection is achieved.

CN115601661BActive Publication Date: 2025-08-19HUBEI UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211344397.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-31
Publication Date
2025-08-19
Estimated Expiration
2042-10-31

AI Technical Summary

Technical Problem

When the existing remote sensing image change detection methods deal with changes in high-resolution buildings, there are problems such as serious pseudo-change detection, loss of feature information, and insufficient differential processing of context information, resulting in poor detection results.

Method used

A dual-channel twin network with weight sharing and a twin cross attention module extracts multi-scale features, combines multi-scale feature fusion and differential context discrimination module to build an automated building detection model, and improve detection accuracy through the twin cross attention mechanism and differential context discrimination module.

Benefits of technology

It effectively improves the accuracy of building change detection, reduces missed and missed detection, and the detection results are closer to the real changing image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115601661B_ABST
    Figure CN115601661B_ABST
Patent Text Reader

Abstract

The present invention discloses a building change detection method for dynamic urban monitoring. The method receives dual-phase images of urban surfaces detected by remote sensing satellites through satellite technology, crops the original images, and then inputs them into an automated urban building detection model to output change detection results of buildings in the dual-phase images. The automated urban building detection model includes an encoding stage and a decoding stage. In the encoding stage, a weight-sharing twin network is used to downsample the input dual-phase images to extract rich multi-scale feature information, while using a twin cross-attention mechanism to enhance the representation of feature information. In the decoding stage, a multi-scale feature fusion module is used to progressively fuse the extracted multi-scale features. A differential context discrimination module is used to push the detection results closer to the actual changes. The method of the present invention can efficiently perform multi-feature discrimination and fusion, thereby improving the accuracy of urban building change detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of urban dynamic monitoring, and more specifically, relates to a building change detection method for urban dynamic monitoring. Background Art

[0002] Currently, most automated urban building monitoring systems require the deployment of large-scale monitoring equipment and cables throughout the city. Powering and maintaining this equipment is costly, and the system is susceptible to signal interference, camera angle variations, and lighting effects, leading to false detections and missed detections. Remote sensing technology can acquire information about the Earth's surface at fixed intervals and analyze dynamic changes over multiple time periods. Automated urban building detection models are based on remote sensing change detection technology. Their task is to observe the differential changes of the same target over time and assign a label to each image pixel, either 0 (unchanged) or 1 (changed). To date, researchers have conducted extensive research on the theory and application of remote sensing change detection. These contributions are of great significance to land resource management, urban construction and planning, and illegal construction management.

[0003] Over the past few decades, numerous algorithms have been proposed for change detection in remote sensing imagery. These algorithms can be broadly categorized into two categories: traditional methods and deep learning-based methods. Initially limited by the resolution of remote sensing imagery, traditional methods often employed pixel-based change detection, employing change vector analysis (CVA) and principal component analysis (PCA) to analyze the spectral characteristics of each pixel for change detection. With the rapid development of aerospace and remote sensing technology, the ability to acquire high-resolution remote sensing imagery has been enhanced. Scholars have introduced the concept of objects in the field of change detection, primarily using object-level spectral, texture, and spatial context information for change detection. While these methods achieved good results at the time, they required manual feature design and thresholding to ensure final detection results. Furthermore, these methods only extracted superficial features and were unable to fully characterize changes in buildings in high-resolution remote sensing imagery, making them difficult to meet the precision requirements of reality.

[0004] On the other hand, with the development of computing power and the accumulation of massive amounts of data, change detection algorithms based on deep learning have become mainstream due to their powerful performance. Currently, most change detection methods based on deep learning are developed from networks that have shown good results in contrastive learning and segmentation tasks. Some scholars use focused contrast loss for change detection, which reduces intra-class variance and increases inter-class variance, ultimately achieving binary detection results through thresholding. Segmentation networks use the concept of image segmentation for change detection. Representative examples include U-shaped networks (UNet), fully convolutional neural networks (FCN), and the DeepLab series of networks.

[0005] Although these methods achieve high performance, they still face the following issues: First, when a large number of pseudo-changes exist in the sequential images, the current attention mechanism cannot efficiently and specifically focus on unchanged and changed areas, which can lead to serious misdetection. Second, the large number of downsampling and upsampling operations in existing networks leads to the loss of feature information in the sequential images. Rough fusion strategies exacerbate this problem, making it difficult for the network to properly restore the original features of the images during the final change detection. The final detection results may suffer from missed detections and uneven change edges. Finally, the current algorithm cannot effectively perform differential processing on contextual information, and therefore does not perform well in detecting urban building images with many pseudo-changes. Summary of the Invention

[0006] In response to the shortcomings of existing technologies and the need for improvement, the present invention provides a building change detection method for urban dynamic detection, which can accurately realize the automatic detection of urban buildings. It includes the following steps:

[0007] S1, using urban building images collected by remote sensing satellites as a dataset, obtain the actual change images corresponding to each building in the dataset, and divide the actual change images and the corresponding dual-temporal images into a training set and a test set;

[0008] S2, building an automated building detection model consisting of an encoder and a decoder, wherein the encoder includes a weight-shared dual-channel Siamese network and a Siamese cross-attention module, and the decoder includes a multi-scale feature fusion and differential context discrimination module;

[0009] The weight-shared dual-channel Siamese network includes a batch normalization layer and multiple upsampling blocks, and inputs dual-temporal images to obtain feature maps of different scales;

[0010] The twin cross attention module first embeds feature maps of different scales, and then uses a multi-head cross attention mechanism to extract deeper semantic information of changing features, thereby improving the global attention to feature information.

[0011] The multi-scale feature fusion module adopts a dual progressive fusion strategy of reconstruction and upsampling blocks to fuse the extracted features containing rich multi-scale semantic information;

[0012] The input of the differential context discrimination module is the output image of the multi-scale fusion module and the before and after time sequence difference images. The purpose is to combine the context information in the image to improve the discrimination ability of the network, so that the detection result image is closer to the real change image, thereby improving the detection accuracy.

[0013] S3 uses the training set in S1 to train the building automatic detection model in S2, and uses the trained model to realize building change detection.

[0014] In some optional embodiments, step S1 includes:

[0015] Artificially produced urban building change images are used as a dataset, and actual change images are produced based on the previous and next time series images in the dataset. The actual change images are the changed areas in the previous and next time series images, and each pixel in the previous and next time series images represents a category (unchanged or changed).

[0016] The preceding and following time series images and their corresponding actual change images are combined into an urban building automatic detection image dataset, in which the training set and the test set are divided into 8:2 ratios.

[0017] In some optional embodiments, the encoder includes a weight-shared dual-channel twin network and a twin cross-attention module, and the decoder includes a multi-scale feature fusion and a differential context discrimination module.

[0018] In this embodiment, the weight-shared dual-channel twin network in the encoder is implemented using a multi-scale densely connected UNet, which contains jump connections and can fully extract low-level features and high-level features. The twin cross-attention module in the encoder is combined with the Transformer multi-head attention mechanism. The twin cross-attention module first independently embeds the dual-phase image to obtain the corresponding multi-stage embedded token. The feature information is further divided into query queues, query vectors, and query values through the multi-head attention mechanism. The Sigmoid function further activates the focused feature information. The multi-layer perceptron block effectively reduces the time complexity of the network, and ultimately makes the attention channel focus on the changed areas and unchanged areas in the image respectively. At the same time, the image information is divided into sliding windows for self-attention calculation, thereby improving the network's modeling ability for global information.

[0019] The multi-scale fusion module in the decoder uses multi-scale feature fusion technology to fuse the multi-stage embedded tokens extracted from the encoder with the channel attention output rich in contextual information, and then uses upsampling operation to fuse features, which enables the network to restore the original image information to the greatest extent and reduce the network's missed detection rate. Secondly, the embedded tokens are fused with the rich context output of the channel transformer using multi-scale feature fusion technology. Then, the extracted multi-scale information content is upsampled and fused to restore the original image information to the greatest extent possible; the differential context discrimination module in the decoder inputs the output image of the multi-scale fusion module in the decoder and the before and after time series difference images, with the aim of combining the contextual information in the image to improve the network's discrimination ability, so that the detection result image is closer to the real change image, thereby improving the detection accuracy.

[0020] In some optional implementations, the weight-shared dual-channel Siamese network in step S2 performs batch normalization on the input dual-temporal image, including convolution kernel 3, two-dimensional convolution with a stride of 1, two-dimensional BatchNorm, and ReLU activation function with an output channel number of 64, and then extracts feature information through three downsampling blocks to define x i,j is the output node of the downsampling block, and the objective function of the downsampling block is:

[0021]

[0022] Among them, N(·) represents the nested convolution function, D(·) represents the downsampling layer, U(·) represents the upsampling layer, [] represents the feature connection function, x i,j Represents the output feature map, i represents the number of layers, j represents the j-th convolutional layer of the layer, and k represents the k-th connection layer; finally, the twin network channel outputs four types of multi-scale feature information.

[0023] In some optional implementation schemes, the twin cross attention module in step S2 performs an embedding operation on the four outputs of the dual-channel twin network. First, a 2D convolution is performed to extract features. Then, the features are expanded into a two-dimensional sequence T1, T2, T3, and T4, whose patch sizes are 32, 16, 8, and 4 respectively. T1-T4 are merged to obtain T ∑ , and then use the multi-head cross attention mechanism for processing. The objective function of the first stage is:

[0024]

[0025] in, W K and W V is the weight coefficient of different inputs, T l represents the feature information token, l represents the feature information of the lth scale, T ∑ Represents the feature union of the four tokens, and obtains the query vector Q u , query key K, query value V, l = 1, 2, 3, 4, u = 1, 2, 3, 4;

[0026] The objective function of the second stage is:

[0027]

[0028] Among them, σ(·) and Represent the softmax function and instance normalization function respectively, C ∑ Indicates the sum of the number of channels;

[0029] The objective function of the third stage of multi-head cross attention is:

[0030]

[0031] Among them, CA h represents the output of the second stage of multi-head cross attention, h represents the output of the h-th attention head, and N is the number of attention heads;

[0032] The objective function of the final stage of multi-head cross attention is:

[0033] O r =MCA p +MLP(Q u +MCA p )

[0034] Determine the final output of multi-head cross attention, where MCA p represents the output of the third stage of multi-head cross attention, p represents the p-th output, MLP(·) is the multi-layer perceptron function, Q urepresents the query vector, and u represents the u-th query vector.

[0035] In some optional implementation schemes, in step S2, the objective function of the multi-scale feature fusion module is:

[0036] M i =W1·V(T l )+W2·V(O r )

[0037] Among them, W1 and W2 are the weight parameters of the two linear layers, T l represents the feature information token, l represents the feature information of the lth scale, O r represents the output of the multi-head cross attention module, and r represents the output of the r-th attention head.

[0038] In some optional implementation schemes, in step S2, the differential context discrimination module includes a generator and a discriminator. The generator receives two inputs, the detection image obtained by the last layer of the multi-scale feature fusion module and the generated image obtained by differential operation of the first and second phases. The losses of the two are calculated to push the results closer to the actual change image. The weighted sum of the SCAD and least squares LSGAN loss functions is used as the loss function in the generator to reduce the false detection rate of the model; the least squares LSGAN loss function is used in the discriminator to improve the detection accuracy, and the loss functions of the generator and the discriminator are accumulated to obtain the final probability loss.

[0039] In some optional implementation schemes, in step S2, the objective function of the differential context discrimination module is:

[0040] L(P)=L(D)+L(G)

[0041] L(D)=L LSGAN (D)

[0042] L(G)=L LSGAN (D)+αL SCAD

[0043] Among them, L(P) represents the probability loss, L(D) represents the discriminator loss, L(G) represents the generator loss, and L LSGAN (D) represents the least squares LSGAN loss of the discriminator, L LSGAN (G) represents the least squares LSGAN loss of the generator, L SCAD Indicates SCAD loss.

[0044] In some optional embodiments, the SCAD loss is defined as:

[0045]

[0046] Where C represents the detection type, v(c) represents the pixel error value of the detection type, and J C is the loss term, ρ is the parameter for continuous optimization, and v(c) is defined as follows:

[0047]

[0048] Among them, y i is the actual change image, s g (c) is the detection score, and g represents the g-th pixel.

[0049] In some optional implementations, the least squares LSGAN loss is:

[0050]

[0051] Among them, D(x1,y) and D(x1,G(x1)) represent the output of the discriminator for the first phase image, G(x1) represents the output of the generator for the first phase image, D(x2,y) and D(x2,G(x2)) represent the output of the discriminator for the second phase image, and G(x2) represents the output of the generator for the second phase image. and represents the detection expectation of the first phase image, and represents the detection expectation of the second phase image, x 1, x2 represents the first and second phase images input to the discriminator, and y represents the actual change image.

[0052] In some optional implementations, the least squares LSGAN loss is:

[0053]

[0054] in, represents the detection expectation of the first phase image, represents the detection expectation of the second phase image, D(x1, G(x1)) represents the output of the discriminator for the first phase image, G(x1) represents the output of the generator for the first phase image, D(x2, G(x2)) represents the output of the discriminator for the second phase image, G(x2) represents the output of the generator for the second phase image, x 1, x2 represents the first and second phase images input to the discriminator respectively.

[0055] Overall, the technical solution conceived by this invention achieves the following advantages compared to existing technologies: Based on a deep convolutional neural network, an automated building detection model consisting of an encoder and a decoder is constructed, which effectively discriminates and integrates multi-scale feature information in dual-temporal imagery, significantly improving the accuracy of building change detection. Ultimately, simply inputting dual-temporal imagery into the trained model can automatically detect changes in urban buildings. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] Figure 1 This is a flow chart of an automated urban building detection system and method provided by an embodiment of the present invention;

[0057] Figure 2 This is a schematic diagram of a building automation detection model provided by an embodiment of the present invention;

[0058] Figure 3 This is a network structure diagram of a multi-head cross attention mechanism provided by an embodiment of the present invention;

[0059] Figure 4 This is a comparison chart of detection using different methods provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0060] The present invention will be further described in detail below with reference to the accompanying drawings and examples.

[0061] A multi-scale densely connected UNet network is used to extract rich feature information from dual-phase images; the twin attention mechanism focuses on the changed areas and unchanged areas in the dual-phase images respectively, strengthens the representation of feature information, and improves the global attention of information; a multi-scale feature fusion module is used to progressively fuse feature information of each scale; at the same time, the weighted sum of the generator and the discriminator is calculated as the probability loss through the differential context discrimination module, thereby pushing the detection results close to the real change image. And 8 evaluation indicators are used to evaluate the performance of the present invention, including precision (Precision), recall rate (Recall), comprehensive evaluation index (F1-score), intersection (IOU), unchanged intersection (IOU_0), changed intersection (IOU_1), overall accuracy (OA), Kappa coefficient (Kappa) as evaluation indicators. The present invention is further described in detail below with reference to the accompanying drawings and examples.

[0062] Figure 1 FIG. 1 is a flow chart of a system and method for automated detection of urban buildings according to an embodiment of the present invention, which specifically includes the following steps:

[0063] S1: Dataset construction: The dataset is constructed using urban building images collected by remote sensing satellites. The actual change images corresponding to each building in the dataset are obtained, and the actual change images and the corresponding dual-temporal images are used as the dataset;

[0064] Constructing a reasonable building change detection dataset can effectively improve the detection accuracy of the model. In the experiment of the embodiment of the present invention, the LEVIR-CD dataset was used, which contains a variety of building images from 20 regions. The original size of each image is 1024×1024 pixels, and the spatial resolution is 0.5m. Taking into account the limitations of GPU memory capacity, an image segmentation algorithm is used to cut each image into 16 regional images of 256×256 pixels in size, and finally 4450 pairs of before and after time series images are obtained. The present invention uses professional computer vision annotation software to annotate urban building images. For each pair of before and after time series images, the corresponding actual change image ground truth is obtained, and each pixel in the actual change image represents a category, wherein the class label in the actual change image is represented by 0 and 1, 0 represents the unchanged area (which can be displayed as black), and 1 represents the changed area (which can be displayed as white).

[0065] After the above processing, the before and after time series images and their corresponding actual change images are obtained. The before and after time series images and their corresponding actual change images are combined into an urban building automatic detection image dataset. In this dataset, the training set (a total of 3560 images) and the test set (a total of 890 images) are divided according to the ratio of 8:2.

[0066] S2: Building Automated Detection Model Construction: Construct a twin cross-attention discriminant network consisting of an encoder and a decoder as the building automated detection model;

[0067] like Figure 2 As shown in the figure, the automated building detection model of the embodiment of the present invention includes two main modules: an encoder and a decoder. The encoder includes a weight-shared dual-channel Siamese network and a Siamese cross-attention module, while the decoder includes a multi-scale feature fusion and differential context discrimination module.

[0068] The encoder extracts multi-scale features and high-level semantic information from the input image. The decoder progressively fuses these multi-scale features and calculates a probability loss based on contextual differential information, continuously improving the resulting image closer to the ground truth.

[0069] like Figure 2As shown in (a), a weight-sharing dual-channel Siamese network is first used to perform batch normalization on the input dual-phase image, including convolution kernel 3, two-dimensional convolution with a stride of 1, two-dimensional BatchNorm, and ReLU activation function with an output channel number of 64. Then, feature information is extracted through the downsampling block, and x is defined as i,j is the output node of the downsampling block, and the objective function of the downsampling block is:

[0070]

[0071] Among them, N(·) represents the nested convolution function, D(·) represents the downsampling layer, U(·) represents the upsampling layer, [] represents the feature connection function, x i,j represents the output feature map, i represents the layer number, j represents the jth convolutional layer, and k represents the kth convolutional layer. To better describe the network parameters, the output channels of the three downsampling blocks are defined as 128, 256, and 512, respectively. Ultimately, the Siamese network channel outputs four types of multi-scale feature information.

[0072] like Figure 2 As shown in (b), the twin cross attention module embeds the four outputs of the weight-sharing dual-channel twin network. It first performs a 2D convolution to extract features, and then expands the features into two-dimensional sequences T1, T2, T3 and T4, whose patch sizes are 32, 16, 8 and 4 respectively. T1-T4 are merged to obtain T ∑ .

[0073] like Figure 3 As shown in the figure, the twin cross attention module uses a multi-head cross attention mechanism to extract deeper semantic information of changing features and improve the global attention to feature information. The objective function of the first stage of multi-head cross attention is:

[0074]

[0075] in, W K and W V is the weight coefficient of different inputs, T l represents the feature information token, l represents the feature information of the lth scale, T ∑ Represents the feature union of the four tokens. Get the query vector Q u (u=1,2,3,4), query key K, query value V. The number of channels of the four query vectors are [64,128,256,512] respectively.

[0076] Since the global attention mechanism will lead to a large time complexity of the network, the transposed attention mechanism is used to reduce the computational complexity of the network. and VT They are query vectors Q u and the transpose of the query value V. Therefore, the objective function of the second stage of multi-head cross attention is:

[0077]

[0078] Determine the output of the second stage of multi-head cross attention, where σ(·) and represent the softmax function and instance normalization function respectively, W K and are weight coefficients for different inputs, represents the feature information token, l represents the feature information of the lth scale, T ∑ Represents the feature union of four tokens. C ∑ Indicates the total number of channels.

[0079] The objective function of the third stage of multi-head cross attention is:

[0080]

[0081] Among them, CA h represents the output of the second stage of multi-head cross attention (h=1,2,3,4), h represents the output of the hth attention head, and N is the number of attention heads. Experiments have shown that the network has the best detection effect when N is set to 4.

[0082] The objective function of the final stage of multi-head cross attention is:

[0083] O r =MCA p +MLP(Q u +MCA p )

[0084] Determine the final output of multi-head cross attention, where MCA p represents the output of the third stage of multi-head cross attention, p represents the p-th output, MLP(·) is the multi-layer perceptron function, Q u represents the query vector, u represents the u-th query vector (u=1,2,3,4). Finally, four outputs O1, O2, O3 and O4 are obtained.

[0085] like Figure 2 As shown in (c) of the figure, the multi-scale feature fusion module adopts a dual progressive fusion strategy of reconstruction and upsampling blocks to fuse the extracted features containing rich multi-scale semantic information. The reconstruction strategy first fuses the four embedded tokens T1, T2, T3, and T4 in the twin crisscross attention module and the four outputs O1, O2, O3, and O4 in the multi-head crisscross attention mechanism.

[0086] The objective function in the reconstruction strategy is:

[0087] M i =W1·V(T l )+W2·V(O r )

[0088] Among them, W1 and W2 are the weight parameters of the two linear layers, T l represents the feature information token, l represents the feature information of the lth scale, O r represents the output of the multi-head cross attention module, r represents the output of the r-th attention head (r=1,2,3,4). Four outputs M1, M2, M3 and M4 are obtained.

[0089] To better integrate multi-scale feature information, the four outputs above are upsampled, with the output channels of the four upsampling blocks being 256, 128, 64, and 64, respectively. The upsampling blocks consist of a two-dimensional convolution with a kernel size of 2, an average pooling layer, and a Reluctant Lu activation function. Finally, a one-dimensional convolution with a kernel size of 1 and a stride of 1 is performed on the output of the fourth upsampling block to produce the detected image.

[0090] like Figure 2 As shown in (d), the differential context discrimination module includes a generator and a discriminator. The generator receives two inputs, the detection image obtained by the last layer of the multi-scale feature fusion module and the generated image obtained by differential operation of the first and second phases. The losses of the two are calculated to push the results closer to the actual change image. The weighted sum of the SCAD and least squares LSGAN loss functions is used as the loss function in the generator to reduce the false detection rate of the model. The least squares LSGAN loss function is used in the discriminator to improve the detection accuracy. The loss functions of the generator and the discriminator are accumulated to obtain the final probability loss. The objective function of the differential context discrimination module is:

[0091] L(P)=L(D)+L(G)

[0092] L(D)=L LSGAN (D)

[0093] L(G)=L LSGAN (D)+αL SCAD

[0094] The SCAD loss is defined as:

[0095]

[0096] Determine the SCAD loss, where C represents the detection category, v(c) represents the pixel error value of the detection category, and J Cis the loss term, and ρ is the parameter to be continuously optimized. v(c) is defined as follows:

[0097]

[0098] Among them, y i is the actual change image, s g (c) is the detection score, and g represents the g-th pixel.

[0099] The discriminator least squares LSGAN loss in the present invention is:

[0100]

[0101] Determine the least squares LSGAN loss of the discriminator, where D(x1,y) and D(x1,G(x1)) represent the output of the discriminator for the first phase image, G(x1) represents the output of the generator for the first phase image, D(x2,y) and D(x2,G(x2)) represent the output of the discriminator for the second phase image, and G(x2) represents the output of the generator for the second phase image. and represents the detection expectation of the first phase image, and represents the detection expectation of the second phase image, x 1, x2 represents the first and second phase images input to the discriminator, and y represents the actual change image.

[0102] The generator least squares LSGAN loss in the present invention is:

[0103]

[0104] Determine the least squares LSGAN loss of the generator, where represents the detection expectation of the first phase image, represents the detection expectation of the second phase image, D(x1, G(x1)) represents the output of the discriminator for the first phase image, G(x1) represents the output of the generator for the first phase image, D(x2, G(x2)) represents the output of the discriminator for the second phase image, G(x2) represents the output of the generator for the second phase image, x 1, x2 represents the first and second phase images input to the discriminator respectively.

[0105] Therefore, the objective function of the differential context discrimination module is:

[0106] L(P)=L(D)+L(G)

[0107] L(D)=L LSGAN (D)

[0108] L(G)=L LSGAN (D)+αL SCAD

[0109] Among them, L(P) represents the probability loss, L(D) represents the discriminator loss, L(G) represents the generator loss, and L LSGAN (D) represents the least squares LSGAN loss of the discriminator, L LSGAN (G) represents the least squares LSGAN loss of the generator, L SCAD Denotes the SCAD loss. ɑ is a weight parameter that controls the relative importance of the two losses. With the help of this objective function, the generator and discriminator iteratively generate probability losses until the probability loss falls below a set threshold and then output the detection result.

[0110] S3: Use the training set in S1 to train the building automatic detection model in S2, use the trained model to detect building changes, and finally evaluate the detection results using the building automatic detection model evaluation indicators;

[0111] The network structure proposed in the present invention is used to train on the LEVIR-CD dataset constructed in the S1 step to obtain model weights for model evaluation. The training process is based on the PyTorch deep learning framework, the software environment is Ubuntu20.04, and the hardware environment is a 3090 graphics card with 24GB of video memory. The batch size is set to 8, and the total number of training times is 100 epochs. Each input contains three images: the first phase image, the second phase image, and the actual change image. A test is performed after one training. During the network training process, the change information of urban buildings in the dual-phase image and the real change image is continuously learned. The loop is iterated until the epoch reaches 100, and the training is completed.

[0112] The precision rate (Precision), recall rate (Recall), comprehensive evaluation index (F1-score) intersection (IOU), unchanged intersection (IOU_0), overall accuracy (OA) change intersection (IOU_1), Kappa coefficient (Kappa) are selected as evaluation indicators, and the calculation formula of the evaluation indicators is as follows:

[0113]

[0114] In order to verify the performance of the building automation detection model proposed in this invention, the present invention provides the final experimental results. Figure 4 is a visual comparison chart of various methods, and Table 1 is the quantitative indicators of various methods.

[0115] in, Figure 4Figure 2 shows the building detection results obtained by various methods. (a) is the pre-processed image, (b) is the post-processed image, (c) is the ground truth (GT) image, and (d)-(g) are the detection results of different methods. By comparing the ground truth images, black represents unchanged areas, white represents changed areas, red represents misdetected areas, and green represents missed areas.

[0116] Table 1: Building detection accuracy of various methods on the LEVIR-CD dataset

[0117]

[0118] Please note that all indicators are expressed in percentages, and the larger the value, the better the effect. For easier viewing, the best results are highlighted in bold.

[0119] It should be pointed out that, according to the needs of implementation, the various steps / components described in this application can be split into more steps / components, or two or more steps / components or partial operations of steps / components can be combined into new steps / components to achieve the purpose of the present invention.

[0120] It will be easily understood by those skilled in the art that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention are included in the scope of protection of the present invention.

Claims

1. A building change detection method for urban dynamic monitoring, characterized in that: The following steps are involved: S1, using urban building images collected by remote sensing satellites as a dataset, obtain the actual change images corresponding to each building in the dataset, and divide the actual change images and the corresponding dual-temporal images into a training set and a test set; S2, constructing an automated building detection model consisting of an encoder and a decoder, wherein the encoder includes a weight-shared dual-channel Siamese network and a Siamese cross attention module, and the decoder includes a multi-scale feature fusion module and a differential context discrimination module; The weight-shared dual-channel Siamese network includes a batch normalization layer and multiple upsampling blocks, and inputs dual-temporal images to obtain feature maps of different scales; The twin cross attention module first embeds feature maps of different scales, and then uses a multi-head cross attention mechanism to extract deeper semantic information of changing features, thereby improving the global attention to feature information. The multi-scale feature fusion module adopts a dual progressive fusion strategy of reconstruction and upsampling blocks to fuse the extracted features containing rich multi-scale semantic information; The input of the differential context discrimination module is the output image of the multi-scale fusion module and the before and after time sequence difference images. The purpose is to combine the context information in the image to improve the discrimination ability of the network, so that the detection result image is closer to the real change image, thereby improving the detection accuracy. The twin cross attention module in step S2 embeds the four outputs of the dual-channel twin network. First, a 2D convolution is performed to extract features. Then, the features are expanded into two-dimensional sequences T1, T2, T3, and T4, with patch sizes of 32, 16, 8, and 4, respectively. T1-T4 are merged to obtain T ∑ , and then use the multi-head cross attention mechanism for processing. The objective function of the first stage is: in, W K and W V is the weight coefficient of different inputs, T l represents the feature information token, l represents the feature information of the lth scale, T ∑ Represents the feature union of the four tokens, and obtains the query vector Q u , query key K, query value V, l = 1, 2, 3, 4, u = 1, 2, 3, 4; The objective function of the second stage is: Among them, σ(·) and Represent the softmax function and instance normalization function respectively, C ∑ Indicates the sum of the number of channels; The objective function of the third stage of multi-head cross attention is: Among them, CA h represents the output of the second stage of multi-head cross attention, h represents the output of the h-th attention head, and N is the number of attention heads; The objective function of the final stage of multi-head cross attention is: O r =MCA p +MLP(Q u +MCA p ) Determine the final output of multi-head cross attention, where MCA p represents the output of the third stage of multi-head cross attention, p represents the p-th output, MLP(·) is the multi-layer perceptron function, Q u represents the query vector, u represents the u-th query vector; In step S2, the differential context discrimination module includes a generator and a discriminator. The generator receives two inputs: the detection image obtained by the last layer of the multi-scale feature fusion module and the generated image obtained by performing differential operations on the first and second phases. The loss of the two is calculated to make the result closer to the actual change image. The weighted sum of the SCAD and least squares LSGAN loss functions is used as the loss function in the generator to reduce the false detection rate of the model; the least squares LSGAN loss function is used in the discriminator to improve the detection accuracy. The loss functions of the generator and the discriminator are accumulated to obtain the final probability loss. S3 uses the training set in S1 to train the building automatic detection model in S2, and uses the trained model to realize building change detection.

2. The method according to claim 1, characterized in that Step S1 includes: Artificially produced urban building change images are used as a dataset. Actual change images are produced based on the dual-temporal images in the dataset. The actual change images are the changed areas in the dual-temporal images. Each pixel in the actual change images represents a category, either unchanged or changed. The preceding and following time series images and their corresponding actual change images are combined into an urban building automatic detection image dataset, in which the training set and the test set are divided into 8:2 ratios.

3. The method according to claim 1, wherein: In step S2, the weight-shared dual-channel Siamese network performs batch normalization on the input dual-phase image, including convolution kernel 3, two-dimensional convolution with a step size of 1, two-dimensional BatchNorm and ReLU activation function with an output channel number of 64. Then, feature information is extracted through three downsampling blocks, and x is defined as i,j is the output node of the downsampling block, and the objective function of the downsampling block is: Among them, N(·) represents the nested convolution function, D(·) represents the downsampling layer, U(·) represents the upsampling layer, [] represents the feature connection function, x i,j Represents the output feature map, i represents the number of layers, j represents the j-th convolutional layer of the layer, and k represents the k-th connection layer; finally, the twin network channel outputs four types of multi-scale feature information.

4. The method according to claim 1, wherein: In step S2, the objective function of the multi-scale feature fusion module is: M i =W1·V(T l )+W2·V(O r ) Among them, W1 and W2 are the weight parameters of the two linear layers, T l Represents the feature information token, l represents the feature information of the lth scale, O r represents the output of the multi-head cross attention module, and r represents the output of the r-th attention head.

5. The method according to claim 1, wherein: In step S2, the objective function of the differential context discrimination module is: L(P)=L(D)+L(G) L(D)=L LSGAN (D) L(G)=L LSGAN (D)+αL SCAD Among them, L(P) represents the probability loss, L(D) represents the discriminator loss, L(G) represents the generator loss, and L LSGAN (D) represents the least squares LSGAN loss of the discriminator, L LSGAN (G) represents the least squares LSGAN loss of the generator, L SCAD Indicates SCAD loss.

6. The method according to claim 5, characterized in that: The SCAD loss is defined as: Where C represents the detection type, v(c) represents the pixel error value of the detection type, and J C is the loss term, ρ is the parameter for continuous optimization, and v(c) is defined as follows: Among them, y i is the actual change image, s g (c) is the detection score, g represents the g-th pixel.

7. The method according to claim 5, characterized in that: The least squares LSGAN loss is: Among them, D(x1,y) and D(x1,G(x1)) represent the output of the discriminator for the first phase image, G(x1) represents the output of the generator for the first phase image, D(x2,y) and D(x2,G(x2)) represent the output of the discriminator for the second phase image, and G(x2) represents the output of the generator for the second phase image. and represents the detection expectation of the first phase image, and represents the detection expectation of the second phase image, x 1, x2 represents the first and second phase images input to the discriminator, and y represents the actual change image.

8. The method according to claim 5, wherein: The least squares LSGAN loss is: in, represents the detection expectation of the first phase image, represents the detection expectation of the second phase image, D(x1, G(x1)) represents the output of the discriminator for the first phase image, G(x1) represents the output of the generator for the first phase image, D(x2, G(x2)) represents the output of the discriminator for the second phase image, G(x2) represents the output of the generator for the second phase image, x 1, x2 represents the first and second phase images input to the discriminator respectively.

Citation Information

Patent Citations

  • Method for detecting illegally occupied building in rural region

    CN113378642A

  • Remote sensing image change detection method based on twinborn multi-scale difference feature fusion

    CN113420662A