A building change detection method based on remote sensing image and twin neural network

Through the method based on twin neural network, the problem of low automation and intelligence of traditional remote sensing image detection methods is solved, and efficient and accurate positioning of changes in buildings is achieved, with fast processing speed, strong robustness and high F1 indicators.

CN114119532BActive Publication Date: 2024-11-05YUNNAN POWER GRID CO LTD ELECTRIC POWER RES INST
View PDF 0 Cites -1 Cited by

Patent Information

Application Number
CN202111395778.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-23
Publication Date
2024-11-05
Estimated Expiration
2041-11-23

Smart Images

  • Figure CN114119532B_ABST
    Figure CN114119532B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of artificial intelligence image segmentation, target detection and classification, and in particular to a building change detection method based on remote sensing images and twin neural networks, the method comprising: obtaining a data set containing several pairs of remote sensing images; dividing the data set into a training set, a validation set and a test set, and cropping the remote sensing images therein respectively; training the cropped training set remote sensing images to obtain a network model weight file; testing the cropped test set remote sensing images according to the network model weight file to obtain the building change results. The present method has the advantages of automation, intelligence and rapidity. For the two remote sensing images of the previous and next phases that have been input and have been corrected for radiation, they only need to be input into the algorithm interface for preprocessing and then passed to the network. The present method realizes efficient and accurate positioning and end-to-end detection of changed buildings in the previous and next phases of remote sensing images. The operation is simple after deployment, and the results of building change detection are reliable.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of artificial intelligence image segmentation, target detection and classification, and in particular to a building change detection method based on remote sensing images and twin neural networks. Background Art

[0002] Requirements for the construction of a test site for ground object change and classification detection: collection and acquisition of multi-temporal image data; reproducible physical ground object changes; change detection and change analysis; and standardized output of ground object change true value results.

[0003] The scene analysis unit of ground object change mainly realizes the function of satellite remote sensing image change detection, which is divided into two parts: change detection and change analysis. The change detection part mainly realizes the detection of changed areas for the input multi-temporal satellite remote sensing images. According to the technical process, it includes necessary preprocessing such as geometric correction and radiation correction, pixel-oriented change detection for multi-temporal satellite remote sensing images, and object-oriented change detection; the change analysis part mainly extracts change information for the possible change area after detection, identifies the pixels caused by the change of specific ground object categories on the result map obtained by change detection, and evaluates the degree of "change" of these pixels. According to the application process, it includes change information identification and change information quantitative evaluation. Change information identification mainly extracts the corresponding change area from the change detection results based on the ground object category and ground object characteristic model of concern. Change information quantitative evaluation is mainly a quantitative description method of the change of ground object categories in various places to obtain the final change evaluation result.

[0004] Pixel-oriented multi-temporal image change detection mainly requires the identification of changed pixels and unchanged pixels. Classic change detection algorithms take images acquired at different times as input, then use the difference between the input data to generate a difference image, and generate a change mask by judging the pixels in the difference image. It mainly consists of three main steps: 1) preprocessing, mainly including geometric registration or denoising; 2) difference image (DI) generation; 3) identification of changed pixels and unchanged pixels, among which the key is the acquisition of difference data and threshold selection. For optical images, it is usually necessary to extract change vectors from the image sequence for analysis. For SAR images, due to the special imaging characteristics of SAR images, likelihood ratio tests are usually performed based on the statistical distribution of SAR images. In recent years, deep learning has become a popular way to classify by automatically learning feature representations from data. Current deep learning methods usually consist of multiple superimposed training stages, and each stage usually consists of a convolutional filter bank layer, a nonlinear processing layer, and a feature pooling layer. Summary of the invention

[0005] The present application provides a building change detection method based on remote sensing images and twin neural networks to solve the problem that the traditional method is not highly automated, intelligent, and rapid when detecting changes in land objects.

[0006] The technical solutions adopted by this application to solve the above technical problems are as follows:

[0007] A building change detection method based on remote sensing images and twin neural networks, characterized by comprising:

[0008] Acquire a data set, the data set comprising a plurality of pairs of remote sensing images;

[0009] Dividing the data set into a training set, a validation set, and a test set;

[0010] The remote sensing images in the training set, the validation set and the test set are respectively trimmed to obtain trimmed training set remote sensing images, trimmed validation set remote sensing images and trimmed test set remote sensing images;

[0011] Training the trimmed training set remote sensing images to obtain a network model weight file;

[0012] The trimmed test set remote sensing images are tested according to the network model weight file to obtain building change results.

[0013] Furthermore, training the trimmed training set remote sensing images includes:

[0014] Using the trimmed training set remote sensing image to simultaneously train each branch in the twin network, to obtain two feature maps of the same size as the trimmed training set remote sensing image;

[0015] Compare the two feature maps respectively to obtain a three-channel distance map;

[0016] The three-channel distance map is compared with the true value using multi-classification Focal Loss and back-propagated.

[0017] Furthermore, the function of the multi-classification Focal Loss loss is

[0018] FL(p t )=-α t (1-p t ) γ log(p t ),

[0019] In the formula, γ and α t Represents the parameters of two balanced positive and negative samples, p t Represents the classification prediction value of the pixel.

[0020] Furthermore, the training set includes several pairs of training set remote sensing images and labels corresponding to the training set remote sensing images, which are used to input the twin neural network and perform network training on the training set.

[0021] Furthermore, the validation set includes several pairs of validation set remote sensing images and labels corresponding to the validation set remote sensing images, which are used to verify the loss and F1 value to evaluate the learning effect and convergence when the network is trained on the training set.

[0022] Furthermore, the test set includes several pairs of test set remote sensing images and labels corresponding to the test set remote sensing images, which are used to evaluate the generalization ability of the model after the network training of the training set is completed.

[0023] Furthermore, the trimmed test set remote sensing images are tested according to the network model weight file to obtain building change results, and also include calculating evaluation indicators based on the building change results.

[0024] Furthermore, the building change results include building addition and building reduction.

[0025] Furthermore, after acquiring the data set, radiation correction and atmospheric correction are performed on several pairs of remote sensing images included in the data set.

[0026] The technical solution provided by this application includes the following beneficial technical effects:

[0027] The building change detection method based on remote sensing images and twin neural networks provided in the present application includes: obtaining a data set, which contains several pairs of remote sensing images; dividing the data set into a training set, a validation set and a test set; trimming the remote sensing images in the training set, the validation set and the test set respectively to obtain trimmed training set remote sensing images, trimmed validation set remote sensing images and trimmed test set remote sensing images; training the trimmed training set remote sensing images to obtain a network model weight file; testing the trimmed test set remote sensing images according to the network model weight file to obtain the building change results. The building change detection method provided in the present application has the advantages of automation, intelligence and rapidity. For the two remote sensing images of the input front and rear phases that have been corrected by radiation, they only need to be input into the algorithm interface for preprocessing and then passed to the network. For a three-channel image with a resolution of 1024*1024, the network processing speed is about 5600ms, and the mask of the building with the same resolution increase and decrease is finally output. The F1 index of this method reaches 67% on the Tianzhi Cup building change test set, and it has strong robustness. This method achieves efficient and accurate positioning and end-to-end detection of changed buildings in remote sensing images in previous and next phases. It is easy to operate after deployment and the results of building change detection are reliable. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 A twin neural network structure diagram provided for an embodiment of the present application;

[0029] Figure 2 The backbone network framework and input and output schematic diagram provided for the embodiment of the present application;

[0030] Figure 3 The embodiments of the present application provide remote sensing images of previous and next phases and detection change masks. DETAILED DESCRIPTION

[0031] To facilitate the description and understanding of the technical solution of the application, the technical solution of the application is further explained below in conjunction with the accompanying drawings and embodiments.

[0032] The building change detection method based on remote sensing image and twin neural network provided in the embodiment of the present application includes the following steps:

[0033] First, the input data preprocessing stage. Figure 1 , which is a twin neural network structure diagram provided in the embodiment of the present application. The data source is a domestically produced satellite with independent property rights. The data set input to the network contains 5,000 pairs of L2-level remote sensing images that have been radiation corrected and atmospherically corrected, including farmland, forests, deserts and other non-urban areas. The format is png, including three bands of R, G, and B, with a size of 1024*1024 pixels and a resolution of 0.5-0.7 meters. The true value label includes corresponding increase labels and decrease labels of equal size, representing the increase and decrease of buildings, where the pixel value of (0,0,0) represents that no building has changed, (0,0,255) represents an increase in buildings, and (255,0,0) represents a decrease in buildings. 3,500 pairs of images and their corresponding labels in the data set are defined as training sets for inputting twin networks for training; 500 pairs of images and labels are validation sets, which are used to verify loss and F1 values ​​during training to evaluate learning effects and convergence; 1,000 pairs of images and labels are test sets, which are used to evaluate the generalization ability of the model after the network training is completed.

[0034] In order to balance the relationship between limited computing power and image batch size, the original data images with a size of 3*1024*1024 and the corresponding labels were cropped into 16 images of 3*256*256 and input into the network, so the final training set contains 56,000 pairs of images. The same processing was performed on the validation set and the test set.

[0035] Using the training set divided above, each branch in the twin network is trained separately and simultaneously. The code specifically implements a DLinkNet network, and the two branches simultaneously forward propagate the front and back phase images.

[0036] According to the previous step, two feature maps of the same size as the original image and with 3 channels are obtained. The pixel differences are compared to obtain the 3-channel distance map, and the multi-classification Focal Loss is compared with the true value and back-propagated. During the training process, the validation set is used to evaluate the F1 indicator of each generation result, and finally the trained network model weight file is obtained.

[0037] The test set is tested according to the network model weight file obtained in the previous step to obtain the increase and decrease of buildings at the pixel level and calculate the evaluation index.

[0038] Among them, in the network design stage, for the two branches of the twin network, the use of a suitable feature extraction framework directly affects the performance of the network. Considering the desire to output a feature map with the same size as the original input image, UNet is a classic and applicable image segmentation network. It downsamples the input image through several convolutions and maximum pooling operations to obtain high-level semantic information, and then restores it to a high resolution slightly lower than the original resolution through up-convolution operations and connecting the corresponding cropped feature maps saved during downsampling. However, due to the limitations of the datasets that UNet is targeting, the network design also has the disadvantage of insufficient feature extraction. DLinkNet (such as Figure 1 As shown in Figure 2, it is based on the UNet network structure and has made the following structural improvements:

[0039] 1. Using residual components as the backbone structure for feature extraction greatly improves the depth of the network and makes the network feature extraction capability more powerful.

[0040] 2. A dilated convolution with short-circuit connections is added to the central part of the network to expand the receptive field and fuse multi-scale information. The cropped feature map saved during downsampling is connected during upsampling, which greatly reduces the information loss when restoring the resolution.

[0041] These two improvements enhance the feature extraction capabilities of the entire network, and the restored size is exactly the same as the original input, which is easier to compare with the true value of the data set. Therefore, this embodiment of the application selects DLinkNet as the backbone of the twin network branch.

[0042] The two before and after phase images are forward propagated through the twin network feature extraction backbone to generate two feature maps of the same size as the original image and with 3 channels. Then the difference in the feature maps is calculated, so the twin network can be regarded as a classification process: each pixel in the difference map can be classified as increased, decreased, or unchanged. By observing the true value of the data set, it is found that there is an extreme imbalance between the changed areas and the unchanged areas. The areas of increased and decreased buildings are much smaller than the unchanged areas, and the latter are very easy to classify.

[0043] In terms of the choice of loss function, if multi-classification cross entropy is used directly, there will be an obvious imbalance of positive and negative samples. The embodiment of the present application uses multi-classification Focal Loss as the loss function. In the scenario where the pixels in the changing area of ​​the remote sensing image are much smaller than the pixels in the non-changing area, the network training problem caused by the uneven distribution of positive and negative samples is greatly reduced. The multi-classification Focal Loss loss function is:

[0044] FL(p t )=-α t (1-p t ) γ log(p t ),

[0045] In the formula, γ and α t are two parameters that balance positive and negative samples. When γ = 0, Focal Loss is equivalent to cross entropy. When γ increases, if the classification prediction value p of a pixel t close to 1, then the coefficient number (1-p t ) γ The impact on the loss is significantly reduced, which can enable the network to better learn samples that are difficult to classify.

[0046] The CPU used in the embodiment of this application is a 12-core Intel i5-10500@3.10GHz; the GPU is an Nvidia GeForce3080; the video memory is 10G; the operating system is Ubuntu 20.04.1LTS; and the Pytorch framework is used to implement and train the proposed twin network model. During training, the batch size is limited by the size of the video memory, and the optimization method uses Adam, with a fixed learning rate of 3e-4 and a weight decay of 0. The number of iterations is 200, until the loss no longer decreases and the F1 value no longer increases. The training time on the complete training set is 97 hours.

[0047] The building change detection method based on remote sensing images and twin neural networks provided in the embodiment of the present application has the advantages of automation, intelligence and speed compared with the previous artificial building change detection methods. For the two L2-level remote sensing images with radiation correction in the front and back phases of the input, they only need to be input into the algorithm interface, pre-processed and then passed to the network. For the three-channel image with a resolution of 1024*1024, the network processing speed is about 5600ms, and the final output is the mask of the building with the same resolution increase and decrease, see Figure 3, which is the change mask of the remote sensing image and detection of the previous and next phases provided by the embodiment of the present application. The F1 index of this method reaches 67% on the Tianzhi Cup building change test set, which has strong robustness, and realizes efficient and accurate positioning and end-to-end detection of the changed buildings in the previous and next phases of remote sensing images. The operation is simple after deployment, and the detection results of building changes are reliable.

Claims

1. A building change detection method based on remote sensing images and twin neural networks, characterized in that: include: Acquire a data set, the data set comprising a plurality of pairs of remote sensing images; Dividing the data set into a training set, a validation set, and a test set; The remote sensing images in the training set, the validation set and the test set are respectively trimmed to obtain trimmed training set remote sensing images, trimmed validation set remote sensing images and trimmed test set remote sensing images; Training the trimmed training set remote sensing images to obtain a network model weight file; Training the trimmed training set remote sensing images includes: Using the trimmed training set remote sensing image to simultaneously train each branch in the twin network, to obtain two feature maps of the same size as the trimmed training set remote sensing image; Compare the two feature maps respectively to obtain a three-channel distance map; Compare the three-channel distance map with the true value using multi-classification Focal Loss and back-propagate; The trimmed test set remote sensing images are tested according to the network model weight file to obtain building change results.

2. The building change detection method based on remote sensing image and twin neural network according to claim 1 is characterized in that: The function of the multi-classification Focal Loss loss is FL(p t )=-a t (1-p t ) γ log(p t ), In the formula, γ and α t Represents the parameters of two balanced positive and negative samples, p t Represents the classification prediction value of the pixel.

3. The building change detection method based on remote sensing image and twin neural network according to claim 1 is characterized in that: The training set includes several pairs of training set remote sensing images and labels corresponding to the training set remote sensing images, which are used to input the twin neural network and perform network training on the training set.

4. The building change detection method based on remote sensing image and twin neural network according to claim 3 is characterized in that: The validation set includes several pairs of validation set remote sensing images and labels corresponding to the validation set remote sensing images, which are used to verify the loss and F1 value to evaluate the learning effect and convergence when performing network training on the training set.

5. The building change detection method based on remote sensing image and twin neural network according to claim 3 is characterized in that: The test set includes several pairs of test set remote sensing images and labels corresponding to the test set remote sensing images, which are used to evaluate the generalization ability of the model after the network training of the training set is completed.

6. The building change detection method based on remote sensing image and twin neural network according to claim 1 is characterized in that: The trimmed test set remote sensing images are tested according to the network model weight file to obtain building change results, and also include calculating evaluation indicators based on the building change results.

7. The building change detection method based on remote sensing image and twin neural network according to claim 6 is characterized in that: The building change results include building addition and building reduction.

8. The building change detection method based on remote sensing image and twin neural network according to claim 1 is characterized in that: After the data set is acquired, radiation correction and atmospheric correction are performed on several pairs of remote sensing images contained in the data set.