Building change detection method and system based on siamese unet model

By constructing a differential feature pyramid in the twin Unet model and introducing a convolutional attention mechanism, the problems of misdetection of small and medium-sized targets and rough edge detection in the existing technology are solved, and higher change detection accuracy and robustness are achieved.

WO2025030625A1PCT designated stage expired Publication Date: 2025-02-13YANGTZE DELTA REGION INST OF UNIV OF ELECTRONIC SCI & TECH OF CHINA HUZHOU

Patent Information

Application Number
PCT/CN2023/117918
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-08-07
Filing Date
2023-09-11
Publication Date
2025-02-13

AI Technical Summary

Technical Problem

The existing semantic segmentation network has problems such as small target error detection and rough edge detection in remote sensing image change detection tasks.

Method used

Using a building change detection method based on the twin Unet model, the differential feature pyramid is constructed and the convolutional attention mechanism is introduced, and the differential feature and attention mechanism are integrated to improve the change detection accuracy.

Benefits of technology

It significantly improves the accuracy of building change detection, reduces the error detection rate, enhances the detection ability of small targets and edges, and can effectively reduce noise interference.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023117918_13022025_PF_FP_ABST
    Figure CN2023117918_13022025_PF_FP_ABST
Patent Text Reader

Abstract

A building change detection method based on a siamese Unet model. The method is characterized in: constructing a Unet-based siamese network structure, and combining a differential feature pyramid and an attention mechanism to obtain a D-Unet-based change detection model; on the basis of a public remote sensing data set, training and testing the constructed change detection model, so as to obtain a trained change detection model; and inputting into the trained change detection model remote sensing images of different time phases, so as to obtain a final detection result.
Need to check novelty before this filing date? Find Prior Art

Description

A building change detection method and system based on twin Unet model Technical Field

[0001] The present invention belongs to the technical field of change detection, and in particular relates to a building change detection method and system based on a twin Unet model. Background Art

[0002] With the continuous development of remote sensing technology, the spatial and spectral resolutions of remote sensing images have significantly increased, providing crucial data support for interpreting ground feature information. With the advancement of urbanization and industrialization, buildings, as a type of ground feature closely associated with human activities, have gradually become a key feature of interest in remote sensing imagery. Building change detection can provide decision-making support for urban planning, disaster warning and emergency response, military reconnaissance, and the updating of basic geographic information, and thus has important practical implications.

[0003] Currently, change detection methods are mainly divided into two categories: traditional change detection methods and deep learning-based change detection methods. Traditional change detection methods mainly include pixel-based and object-based change detection methods. Pixel-based change detection methods ignore the spatial correlation and contextual information between pixels and are easily affected by noise. Object-based change detection methods can only utilize low-level features such as geometric texture and cannot well represent deeper semantic information. In recent years, with the development of artificial intelligence, deep learning has achieved remarkable success in the field of image segmentation. Remote sensing image change detection is essentially a pixel-level binary classification problem. Therefore, it is possible to provide a solution to the change detection problem of remote sensing images by improving semantic segmentation networks such as FCN, Unet, and SegNet. However, the current mainstream semantic segmentation networks have certain errors when applied to remote sensing image change detection tasks, such as misdetection of small objects and rough edge detection. Technical issues

[0004] Through the above analysis, the problems and defects of the existing technology are: the current mainstream semantic segmentation network has problems such as misdetection of small targets and rough edge detection when applied to remote sensing image change detection tasks. Technical Solutions

[0005] In response to the problems existing in the prior art, the present invention provides a building change detection method and system based on the twin Unet model.

[0006] The present invention is implemented as follows: a building change detection method based on a twin Unet model, wherein the building change detection method based on the twin Unet model constructs a twin network structure based on Unet, integrates a differential feature pyramid and an attention mechanism, and obtains a change detection model based on D-Unet; based on a publicly available remote sensing dataset, the constructed change detection model is trained and tested to obtain a trained change detection model; remote sensing images of different phases are input into the trained change detection model to obtain the final detection results.

[0007] Furthermore, the building change detection method based on the twin Unet model includes the following steps:

[0008] Step 1: Data preprocessing, which involves cropping the dual-phase images and change labels in the LEVIR-CD dataset into 256×256 pixel blocks to obtain image blocks of uniform size.

[0009] Step 2: Construct a twin network structure based on Unet: Since change detection requires two images as input, the single-input semantic segmentation Unet network needs to be improved into a twin structure with two inputs. The weight values ​​of the left-half encoder are shared between the two inputs, and features are extracted from the two inputs separately. The two extracted feature maps are then concatenated and channel-wise spliced ​​and input to the right-half decoder together. At the same time, the original jump connection of Unet is retained, and the feature maps of each level obtained from the two sub-networks are concatenated and channel-wise spliced, and connected to the corresponding part of the right decoder, and finally the pixel-by-pixel classification change detection results are output.

[0010] Step 3: Optimize the twin Unet structure to build a D-Unet change detection model: Based on the basic twin Unet structure, the feature maps extracted by the encoders of the two branches are used to construct a differential feature pyramid. The convolutional attention module is used to reduce redundant information. Finally, the upsampled differential feature map is fused with the output of the decoder to improve the accuracy of the change detection results using differential features.

[0011] Step 4: Train the D-Unet change detection model: Based on the LEVIR-CD dataset, train and test the D-Unet-based change detection model to obtain a trained D-Unet-based change detection model.

[0012] Step 5: Input remote sensing images of different time phases into the trained D-Unet change detection model to obtain the final detection results.

[0013] Furthermore, the differential feature pyramid in step three is constructed based on the encoder of the Twin U-Net. The differential feature maps at each level of the Twin U-Net encoder contain semantic information of different scales, which are used to represent target features of different scales. The differences of the differential feature maps at each level are calculated and the absolute values ​​are taken to obtain differential feature maps of different sizes, forming a differential feature pyramid.

[0014] Furthermore, the differential feature pyramid in step three is combined with an attention mechanism to reduce redundant information, specifically including: passing differential feature maps of different sizes in the differential feature pyramid through convolutional attention modules respectively.

[0015] Furthermore, the prediction result in step three is fused with the output of the decoder and the differential feature pyramid, and the output result of the last layer of the decoder is concatenated with the four differential feature maps obtained by the operation. Then, a convolution with a size of 1×1 and a convolution kernel of 1 is performed to reduce the number of channels to 1, and finally the convolution is input into the sigmoid function to obtain the final probability result map.

[0016] Furthermore, the loss function of the network training in step 4 uses Focal Loss.

[0017] Another object of the present invention is to provide a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the building change detection method based on the twin Unet model.

[0018] Another object of the present invention is to provide a computer-readable storage medium storing a computer program, which, when executed by a processor, enables the processor to execute the building change detection method based on the twin Unet model.

[0019] Another object of the present invention is to provide an information data processing terminal, which is used to implement the building change detection method based on the twin Unet model.

[0020] Another object of the present invention is to provide a building change detection system based on a twin Unet model based on the building change detection method based on the twin Unet model, wherein the building change detection system based on the twin Unet model comprises:

[0021] The model building module is used to build a twin network structure based on Unet, integrating the differential feature pyramid and attention mechanism to obtain a change detection model based on D-Unet;

[0022] The model training module is used to train and test the constructed change detection model based on the public remote sensing dataset to obtain a trained change detection model;

[0023] The model detection module is used to input remote sensing images of different phases into the trained change detection model to obtain the final detection results. Beneficial effects

[0024] In combination with the above technical solutions and the technical problems solved, the advantages and positive effects of the technical solutions to be protected by the present invention are as follows:

[0025] First, this paper proposes a twin UNet building change detection method that integrates differential feature pyramid and attention mechanism. By constructing a differential feature pyramid and introducing the attention mechanism, the accuracy of building change detection is further improved.

[0026] Second, the present invention integrates the differential feature pyramid and convolutional attention module into the twin Unet to establish a D-Unet model. By constructing the differential feature pyramid layer, the change information of the dual-phase image can be explicitly emphasized, improving the model's ability to obtain change features and reducing the loss of shallow information. By introducing the convolutional attention module, redundant change information of non-buildings is reduced, further emphasizing the feature information of the changing target, and improving the accuracy of change detection. Experimental results show that compared with change detection methods such as Unet and FC-Siam-diff, the present invention has higher accuracy, F1 coefficient, and IoU.

[0027] Third, after extracting features from bi-temporal images, some practitioners in this field simply fuse the features directly to extract change information in the encoder, thereby solving the problem of change detection. This approach fails to explicitly emphasize the feature differences between the bi-temporal images. Considering that feature differences also carry change information and contribute to change detection, this failure to explicitly emphasize the feature differences between the bi-temporal images is a technical bias in this field.

[0028] The present invention overcomes this technical bias by constructing a differential feature pyramid based on the twin U-Net, utilizing shallow feature change information, reducing the loss of original change information, and improving the change detection accuracy for small targets and target edges.

[0029] Fourth, each claim brings about significant technological advancement.

[0030] Claim 1: A building change detection method based on the Twin Unet model is proposed. This method leverages the powerful segmentation capabilities of the Unet network and the contrastive learning characteristics of the Twin network structure. Furthermore, it further improves the accuracy of change detection by integrating a differential feature pyramid and an attention mechanism. The significant technical advancement of this claim lies in the proposal of a novel building change detection model for remote sensing images.

[0031] Claim 2 describes in detail the implementation steps of the aforementioned change detection method, including data preprocessing, constructing a twin Unet network structure, optimizing the twin Unet structure to construct a D-Unet change detection model, training the D-Unet change detection model, and inputting remote sensing images from different time phases into the trained D-Unet change detection model. This claim represents a significant technical advancement in providing a complete and implementable change detection method.

[0032] Claim 3: This patent specifies a method for constructing a differential feature pyramid based on the Twin Unet encoder. This method can capture target features at different scales, thereby improving the accuracy of change detection. The significant technical advancement of this claim lies in the proposal of a novel differential feature pyramid construction method that helps improve change detection accuracy.

[0033] Claim 4: A method for combining an attention mechanism with a differential feature pyramid to reduce redundant information is proposed, which can further improve model performance. The significant technical advancement of this claim lies in the introduction of an attention mechanism into the differential feature pyramid, which effectively improves model performance.

[0034] Claim 5 specifies how the prediction results are fused with the outputs of the decoder and the differential feature pyramid. This method concatenates the output of the last decoder layer and the four differential feature maps obtained by the operation, then performs convolution to reduce the number of channels to 1. This is then input into a sigmoid function to obtain the final probability result map. This claim represents a significant technical advancement in proposing a novel prediction result fusion method that helps improve change detection accuracy.

[0035] Claim 6: Clarifies the use of Focal Loss as a loss function during network training, which effectively addresses the class imbalance problem and improves model performance. This claim's significant technical advancement lies in its use of Focal Loss, which effectively addresses the class imbalance problem and improves model performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] FIG1 is a flow chart of a building change detection method based on a twin Unet model provided by an embodiment of the present invention;

[0037] FIG2 is a schematic diagram of the structure of a differential feature pyramid provided by an embodiment of the present invention;

[0038] FIG3 is a schematic diagram of the structure of a convolutional attention module provided by an embodiment of the present invention;

[0039] FIG4 is a schematic diagram of the network structure of D-Unet provided in an embodiment of the present invention;

[0040] FIG5 is a schematic diagram of a change detection result provided by an embodiment of the present invention. Modes for Carrying Out the Invention

[0041] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0042] As shown in FIG1 , the building change detection method based on the twin Unet model provided by an embodiment of the present invention includes the following steps:

[0043] S101: Construct a twin network structure based on Unet, integrate the differential feature pyramid and attention mechanism, and obtain a change detection model based on D-Unet. This mainly includes: the construction of twin Unet, the construction of differential feature pyramid, the construction of convolutional attention mechanism, and the construction of D-Unet;

[0044] S102: Based on the publicly available remote sensing dataset, the constructed change detection model is trained and tested to obtain a trained change detection model;

[0045] S103: Inputting remote sensing images of different time phases into the trained change detection model to obtain the final detection results.

[0046] Example 1:

[0047] The building change detection method based on the twin Unet model provided in an embodiment of the present invention includes the following steps:

[0048] Step 1: Data preprocessing, which involves cropping the dual-phase images and change labels in the LEVIR-CD dataset into 256×256 pixel blocks to obtain image blocks of uniform size.

[0049] Step 2: Construct a twin network structure based on Unet: Since change detection requires two images as input, the single-input semantic segmentation Unet network needs to be improved to a twin structure with two inputs. The weight values ​​of the left-half encoder are shared between the two inputs, and features are extracted from the two inputs separately. Then, the two extracted feature maps are spliced ​​through concatenation and input to the right-half decoder together. At the same time, the original jump connection of Unet is retained, and the feature maps of each level obtained from the two sub-networks are connected to the corresponding parts of the right decoder through concatenation channel splicing, and finally the pixel-by-pixel classification change detection results are output;

[0050] Step 3: Optimize the twin Unet structure to build a D-Unet change detection model: Based on the basic twin Unet structure, the feature maps extracted by the encoders of the two branches are used to construct a differential feature pyramid, and the convolutional attention module is used to reduce redundant information. Finally, the upsampled differential feature map is fused with the output of the decoder, thereby using differential features to improve the accuracy of change detection results.

[0051] Step 4: Train the D-Unet change detection model: Based on the LEVIR-CD dataset, train and test the D-Unet-based change detection model to obtain a trained D-Unet-based change detection model.

[0052] Step 5: Input remote sensing images of different time phases into the trained D-Unet change detection model to obtain the final detection results.

[0053] In an embodiment of the present invention, the differential feature pyramid in step 3 is constructed based on the Twin Unet encoder. Because the differential feature maps of each level of the Twin Unet encoder have a pyramid structure from large to small, they themselves contain semantic information of different scales and can be used to represent target features of different scales. Therefore, the differential feature maps at each level naturally have the structure of a feature pyramid. The difference of the differential feature maps at each level is calculated and the absolute value is taken to obtain differential feature maps of different sizes, thereby forming a differential feature pyramid.

[0054] In an embodiment of the present invention, the differential feature pyramid in step three is combined with an attention mechanism to reduce redundant information, specifically comprising: passing differential feature maps of different sizes in the differential feature pyramid through a convolutional attention module respectively, thereby reducing information redundancy in the non-building part of the differential feature map.

[0055] In an embodiment of the present invention, the prediction result in step three fuses the output of the decoder and the differential feature pyramid, and the output result of the last layer of the decoder is concatenated with the four differential feature maps obtained by the above operation. Then, a convolution with a size of 1×1 and a convolution kernel of 1 is performed to reduce the number of channels to 1, and finally the result is input into the sigmoid function to obtain the final probability result map.

[0056] In an embodiment of the present invention, in step 4, to address the problem of a large difference between the number of changed pixels and the number of non-changed pixels and an imbalance in the number of positive and negative samples, the loss function of network training uses Focal Loss to suppress the contribution of a large number of non-changed pixels to the loss and improve the accuracy of change detection.

[0057] Example 2:

[0058] The CPU of the environment server used in the embodiment of the present invention is Intel(R) Core(TM) i5-12500H, the GPU is NVIDIA GeForce GTX 3050, the operating system is Windows 11, and the compilation environment is Tensorflow-gpu 2.6.0, Python 3.9, CUDA 11.3.1 and CUDNN 8.2.1.

[0059] A building change detection model based on deep learning of the present invention comprises the following steps:

[0060] Step 1: Prepare the dataset and crop the images and labels using a sliding window of 256×256 pixels to obtain image blocks of the same pixel size.

[0061] Step 2: Build a twin network structure based on Unet: To meet the application requirements of remote sensing image change detection, the remote sensing image change detection problem is converted into an image semantic segmentation problem for processing. First, a Unet network is built and then improved into a twin structure based on this.

[0062] Step 2.1: Construct a Unet network: In this embodiment of the present invention, the U-Net network structure has a total of 5 layers, mainly consisting of a decoder and an encoder, each of which contains five convolution blocks. Each convolution block consists of two repeated 3×3 convolution operations (padding = 0), each followed by a rectified linear unit (ReLU) activation function, and the two sets of convolutions are followed by a maximum pooling operation with a stride of 2 for downsampling. The input image of size 256×256×1 is convolved and downsampled layer by layer by the encoder, and the number of channels is doubled while the size is halved, and finally converted into a feature map of size 16×16×512. Then, the feature map is convolved and upsampled layer by layer by the decoder, and the number of channels is reduced while the size is doubled. During the upsampling process, the feature map is spliced ​​with the corresponding feature map of the encoder to fuse the shallow layer information. After obtaining the feature map of size 256×256×32, all channels are fused through 1×1 convolution, and the final output is a classification result map of size 256×256×1.

[0063] Step 2.2: Improved to a Twin U-net Change Detection Model: The Twin U-net model builds on the basic U-net network by adding an input branch and sharing the weights of the left-half encoder between the two inputs. Feature extraction is performed on each input separately, and the two extracted feature maps are then concatenated channel-wise and fed into the right-half decoder. While retaining the original skip connections of the U-net, the feature maps at each level obtained from the two sub-networks are concatenated channel-wise and connected to the corresponding part of the right decoder, ultimately outputting pixel-by-pixel change detection results.

[0064] Step 3: Optimize the twin Unet structure to construct a D-Unet change detection model: The D-Unet change detection network used in the embodiment is shown in Figure 4. The two dual-phase feature maps output by the weight-sharing encoder are differentiated and their absolute values ​​are taken to obtain a differential feature pyramid containing change information. The differential feature map is passed through the convolutional attention module to emphasize the features of the changed area and reduce redundant information. Finally, by upsampling the differential feature maps at all levels to the original image size and fusing them with the output of the decoder, the network's change detection ability for small objects and object edges is improved.

[0065] Step 3.1: Referring to Figure 2, the construction of the differential feature pyramid involves: using a shared-weight encoder to output two feature maps, calculating the difference between the two and taking the absolute value, and using the result as the differential feature map representing the changed features. Then, the above operation is performed on the feature maps obtained by the first four blocks of the encoder, resulting in four sets of differential feature maps with sizes of 1 / 2, 1 / 4, 1 / 8, and 1 / 16 of the original image, forming the differential feature pyramid.

[0066] Step 3.2: Construct channel attention: (1) Generate weight vector: Perform global maximum pooling and global evaluation pooling on the input feature map respectively, and convert the two feature maps of dimension (N, N, C) into two vectors of dimension (1, 1, C). (2) Update weights: First, pass the two weight vectors through a multi-layer perceptron with shared weights. This module includes two stacked fully connected layers and an activation layer to map the input vector without changing its dimension. Then, the weight vector is normalized to between 0 and 1 through sigmoid activation as the final weight of each channel. (3) Channel weighting: Multiply the above channel weight vector with the input feature map to obtain the channel-weighted feature map;

[0067] Step 3.3: Construct spatial attention: (1) Generate weight vector: Calculate the maximum and average values ​​of all channels for each pixel of the input feature map, and convert the feature map of dimension (N, N, C) into two vector maps of dimension (N, N, 1). (2) Update weight: Concatenate the two feature maps and perform 1×1 convolution, then perform sigmoid activation as the weight value of each channel pixel in the feature map. (3) Spatial weighting: Multiply the weight vector with the input feature map to obtain a feature map with spatial pixel weighting;

[0068] Step 3.4: Referring to Figure 3, channel attention and spatial attention are cascaded to calculate the distribution of weights from two independent dimensions, channel and space. Different weights are then assigned to each channel and pixel of the input feature map to form a convolutional attention module, and the feature map is weighted by the convolutional attention module.

[0069] Step 3.5: The feature map output by the convolutional attention module is convolved with a size of 1×1 and a number of convolution kernels of 1. Batch Normalization and ReLU activation functions are used after the convolution to output four differential feature maps with a channel number of 1. The four feature maps are upsampled by 2, 4, 8, and 16 times using bilinear interpolation to obtain four differential feature maps with a channel number of 1, which are the same size as the original image. The output of the last layer of the decoder is concatenated with the four differential feature maps obtained by the above operation, and then convolved with a size of 1×1 and a number of convolution kernels of 1. The final probability result map is input to the sigmoid function.

[0070] Step 4: Divide the LEVIR-CD dataset into training, validation, and test sets with a ratio of 70%, 10%, and 20%, respectively. Train the network model obtained in Step 3. Set key hyperparameters such as the batch size and learning rate appropriately. If hardware allows, generally set a larger batch size.

[0071] The optimizer used for training the network is Adam, and the loss function used is Focal Loss. The calculation is shown in (1).

[0072] (1)

[0073] Where y represents the value of the label (0 or 1), p represents the probability of being classified as a changed pixel (between 0 and 1), and α and γ are empirical parameters. By adjusting the values ​​of α and γ, the degree of correction of sample imbalance can be controlled to adapt to the degree of sample imbalance. In this embodiment, α is 0.9 and γ is 1.5.

[0074] In change detection tasks, data imbalance often occurs due to the large difference in the total number of pixels between the changed area and the background. Focal Loss essentially uses binary cross-entropy to weight the predicted values ​​and adjust the contribution of positive and negative samples to the loss function, thereby better addressing the data imbalance and improving the accuracy of farmland extraction.

[0075] Step 5: Change Detection: For the remote sensing image to be detected, a sliding window is used to generate 256×256 pixel image patches. Each image patch is then fed into the network model trained in Step 4, which outputs the change detection results. Finally, the image patches are stitched together to restore the image size.

[0076] After completing network training and achieving convergence, we selected the experimental area shown in Figure 5 for comparative analysis. The image size of the experimental area was 256 × 256 × 3 (H × W × C). We used three network models: Unet, FC-Siam-diff, and D-Unet to detect building changes. All three models used Reinforced Luminance (ReLU) as the hidden layer activation function, Focal Loss as the loss function, and the Adam optimizer.

[0077] To ensure comparability, the three training methods have the same hyperparameters such as Epoch, Batch Size, initial learning rate, and neural network input size.

[0078] The building change detection system based on the twin Unet model provided in an embodiment of the present invention includes:

[0079] The model building module is used to build a twin network structure based on Unet, integrating the differential feature pyramid and attention mechanism to obtain a change detection model based on D-Unet;

[0080] The model training module is used to train and test the constructed change detection model based on the public remote sensing dataset to obtain a trained change detection model;

[0081] The model detection module is used to input remote sensing images of different phases into the trained change detection model to obtain the final detection results.

[0082] For remote sensing images from the LEVIR-CD dataset, 256×256 pixel image patches were obtained using a sliding window. Three network models, Unet, FC-Siam-diff, and D-Unet, were iteratively trained on this dataset. To ensure comparability, the three models were trained using the same hyperparameters, including epochs, batch size, initial learning rate, and neural network input size.

[0083] After the entire network training was completed and the results converged, the experimental area shown in Figure 5 was selected for experimental comparison and analysis. The experimental area had an image size of 256×256×3 (H×W×C). Three network models, Unet, FC-Siam-diff, and D-Unet, were used to detect building changes. All three models used Reinforced Luminance (ReLU) as the hidden layer activation function, Focal Loss as the loss function, and the Adam optimizer. It should be noted that embodiments of the present invention can be implemented using hardware, software, or a combination of software and hardware. The hardware portion can be implemented using dedicated logic; the software portion can be stored in memory and executed by an appropriate instruction execution system, such as a microprocessor or dedicated hardware. Those skilled in the art will appreciate that the above-described apparatus and methods can be implemented using computer-executable instructions and / or embodied in processor control code, for example, provided on a carrier medium such as a disk, CD, or DVD-ROM, a programmable memory such as read-only memory (firmware), or a data carrier such as an optical or electronic signal carrier. The device and its modules of the present invention can be implemented by hardware circuits such as very large-scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, etc., or programmable hardware devices such as field programmable gate arrays, programmable logic devices, etc., or can be implemented by software executed by various types of processors, or can be implemented by a combination of the above hardware circuits and software, such as firmware.

[0084] As shown in the change detection results in Figure 5, using the Unet and FC-Siam-diff networks to detect changes in buildings in the experimental area can detect changed areas in the image. However, both methods suffer from the U-Net misclassification problem, resulting in some false changes, such as salt and pepper and isolated points, resulting in low overall accuracy. The D-Unet network, which integrates differential features and an attention mechanism, focuses more on changed areas and emphasizes shallow edge information. This fully utilizes shallow information in the image, enhancing the network's ability to distinguish between changes and non-changes. It can also largely overcome the influence of noise and has good immunity to "false changes." Compared with the change detection results of the Unet and FC-Siam-diff networks, it reduces the false detection rate and further improves change detection accuracy.

[0085] In order to further verify the advantages of the proposed method, the Unet, FC-Siam-diff and D-Unet networks were used for change detection in four experimental areas, and the average values ​​of the evaluation indicators were compared and analyzed. The prediction accuracy results of the three networks are shown in Table 1:

[0086] Table 1 Comparison of evaluation indicators of different methods

[0087] ModelPrecisionF1 scoreIoUUnet0.69060.80290.6732FC-Siam-diff0.70980.81600.6900D-Unet0.74860.83920.7242

[0088] As can be seen from Table 1, compared with the Unet and FC-Siam-diff network models, D-Unet has higher overall change detection accuracy and stronger detection robustness.

[0089] Example 1: Data preprocessing

[0090] Implementation: During the data preprocessing phase, this paper uses the LEVIR-CD dataset, which contains pairs of remote sensing images and corresponding change labels. This paper crops the bi-temporal images and change labels in the dataset into 256×256 pixel blocks, obtaining uniformly sized image patches for subsequent model training and testing.

[0091] Example 2: Building a Twin Unet Network

[0092] Implementation: At this stage, the present invention improves the single-input semantic segmentation Unet network into a twin architecture with two inputs. The weights of the left-half encoder are shared between the two inputs, and features are extracted from each input separately. The two extracted feature maps are then concatenated and fed into the right-half decoder. While retaining the original skip connections of the Unet, the feature maps at each level obtained from the two sub-networks are connected to the corresponding parts of the right decoder through concatenated channel splicing, ultimately outputting pixel-by-pixel change detection results.

[0093] Example 3: Building a D-Unet change detection model

[0094] Implementation: Based on the basic Twin Unet architecture, this method constructs a differential feature pyramid using feature maps extracted by the two-branch encoder. A convolutional attention module is then used to reduce redundant information. The upsampled differential feature map is then fused with the decoder output, leveraging the differential features to improve the accuracy of change detection.

[0095] Example 4: Training the D-Unet change detection model

[0096] Implementation: This paper trains and tests a D-Unet-based change detection model based on the LEVIR-CD dataset. During the training phase, the present invention uses Focal Loss as the loss function to address class imbalance. After several rounds of training, the present invention obtains a trained D-Unet-based change detection model. The present invention then inputs remote sensing images from different time phases into the trained D-Unet change detection model to obtain final detection results.

[0097] The above description is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any modifications, equivalent substitutions and improvements made by any technician familiar with this technical field within the technical scope disclosed by the present invention and within the spirit and principles of the present invention should be covered by the scope of protection of the present invention.

Claims

1. A building change detection method based on the twin Unet model, characterized in that: A twin network structure based on Unet is constructed, and the differential feature pyramid and attention mechanism are integrated to obtain a change detection model based on D-Unet. Based on the public remote sensing dataset, the constructed change detection model is trained and tested to obtain a trained change detection model. The remote sensing images of different phases are input into the trained change detection model to obtain the final detection results.

2. The building change detection method based on the twin Unet model according to claim 1, characterized in that: The following steps are involved: Step 1: Data preprocessing, including cropping the dual-phase images and change labels in the LEVIR-CD dataset into 256×256 pixel images to obtain image blocks of the same size; Step 2: Construct a twin network structure based on Unet: Since change detection requires two images as input, the single-input semantic segmentation Unet network needs to be improved into a twin structure with two inputs; the weight value of the left-half encoder is shared between the two inputs, and features are extracted from the two inputs respectively. Then, the two extracted feature maps are concatenated for channel splicing and input into the right-half decoder together; at the same time, the original jump connection of Unet is retained, and the feature maps of each level obtained by the two sub-networks are connected to the corresponding part of the right decoder through concatenated channel splicing, and finally the change detection result of pixel-by-pixel classification is output; Step 3: Optimize the twin Unet structure to build a D-Unet change detection model: Based on the basic twin Unet structure, the feature maps extracted by the encoders of the two branches are used to build a differential feature pyramid, and the convolutional attention module is used to reduce redundant information. Finally, the upsampled differential feature map is fused with the output result of the decoder, and the differential features are used to improve the accuracy of the change detection results. Step 4: Train the D-Unet change detection model: Based on the LEVIR-CD dataset, train and test the D-Unet-based change detection model to obtain a trained D-Unet-based change detection model. Step 5: Input remote sensing images of different phases into the trained D-Unet change detection model to obtain the final detection results.

3. The building change detection method based on the twin Unet model as claimed in claim 2, characterized in that: The differential feature pyramid in the step three is constructed based on the encoder of the twin U-Net. The differential feature maps at each level of the twin U-Net encoder contain semantic information of different scales, which are used to characterize target features of different scales. The differences of the differential feature maps at each level are calculated and the absolute values ​​are taken to obtain differential feature maps of different sizes, forming a differential feature pyramid.

4. The building change detection method based on the twin Unet model as claimed in claim 2, characterized in that: In the step three, the differential feature pyramid is combined with the attention mechanism to reduce redundant information, specifically including: passing the differential feature maps of different sizes in the differential feature pyramid through the convolution attention module respectively.

5. The building change detection method based on the twin Unet model as claimed in claim 3, characterized in that: The prediction result in the step three is fused with the output of the decoder and the differential feature pyramid, and the output result of the last layer of the decoder is concatenated with the four differential feature maps obtained by the operation, and then a convolution with a size of 1×1 and a convolution kernel number of 1 is performed to reduce the number of channels to 1, and finally input into the sigmoid function to obtain the final probability result map.

6. The building change detection method based on the twin Unet model as claimed in claim 2, characterized in that: The loss function of the network training in step 4 uses Focal Loss.

7. A computer device, characterized in that: The computer device includes a memory and a processor, the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the building change detection method based on the twin Unet model as described in any one of claims 1 to 6.

8. A computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the processor executes the building change detection method based on the twin Unet model as described in any one of claims 1 to 6.

9. An information data processing terminal, characterized in that: The information data processing terminal is used to implement the building change detection method based on the twin Unet model as described in any one of claims 1 to 6.

10. A building change detection system based on a twin Unet model based on the building change detection method based on a twin Unet model according to any one of claims 1 to 6, characterized in that: The building change detection system based on the twin Unet model includes: The model building module is used to build a twin network structure based on Unet, integrate the differential feature pyramid and attention mechanism, and obtain a change detection model based on D-Unet; The model training module is used to train and test the constructed change detection model based on the public remote sensing dataset to obtain a trained change detection model; The model detection module is used to input remote sensing images of different phases into the trained change detection model to obtain the final detection results.

Citation Information

Patent Citations

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

    CN113420662A

  • Remote sensing image change detection method based on image segmentation and twin neural network

    CN113569815A

  • Method and processing device for training a neural network

    WO2020240477A1

Cited By

  • U-Net + + remote sensing semantic segmentation method based on visual basic model optimization

    CN119810454A

  • Construction process monitoring method based on construction remote sensing image analysis

    CN120046872A

  • Karst landform remote sensing dynamic evolution analysis method and system

    CN120164122A

  • Flow velocity identification method and device based on improved U-Net network model

    CN120182324A

  • Remote sensing image change detection method and system based on prior knowledge and frequency domain learning

    CN120219983A