Search

CN-116994136-B - Building change detection method, system, electronic equipment and storage medium

CN116994136BCN 116994136 BCN116994136 BCN 116994136BCN-116994136-B

Abstract

The embodiment of the application provides a building change detection method, a system, electronic equipment and a storage medium, and belongs to the technical field of high-resolution remote sensing image processing. The method comprises the steps of obtaining a first image to be detected, obtaining a reference image and a reference building label graph, preprocessing the first image, sampling the reference image and the reference building label graph to form a training sample set, training a semantic segmentation model according to the training sample set, inputting the first image into the trained semantic segmentation model to obtain a probability distribution graph, labeling pixels with probability values larger than a first preset threshold value in the probability distribution graph as buildings to generate the first building label graph, obtaining a plurality of building patches in the intersection range of the reference image and the first image, performing similarity matching on the building patches in the probability distribution graph to obtain a matched building patch block graph, and obtaining a building change detection result of the first image according to the matched building patch block graph and the first building label graph.

Inventors

  • WANG JIE
  • ZHANG WEI
  • LIU QIANG

Assignees

  • 鹏城实验室

Dates

Publication Date
20260505
Application Date
20230728

Claims (14)

  1. 1. A method of detecting a change in a building, the method comprising: Acquiring a first image to be detected, wherein the first image is formed by shooting an area from a first angle; Acquiring a reference image and a reference building label corresponding to the reference image, wherein the reference image is an image formed by shooting an area from a second angle; Preprocessing the first image to enable the image attribute parameters of the first image and the image attribute parameters of the reference image to be consistent; Sampling the reference image and a reference building label graph corresponding to the reference image to obtain a plurality of sample blocks, and forming a training sample set according to the plurality of sample blocks, wherein the sample blocks comprise image blocks in a preset range in the reference image and building labels corresponding to the image blocks in the reference building label graph; training the semantic segmentation model according to the training sample set to obtain a trained semantic segmentation model; Inputting the first image into the trained semantic segmentation model to obtain a probability distribution map; Labeling pixel points with probability values larger than a first preset threshold value in the probability distribution diagram as buildings, and generating a first building labeling diagram; acquiring a plurality of building patches of the reference image within an intersection range of the reference image and the first image; Performing similarity matching on the building plaque in the probability distribution diagram to obtain a matching result, and obtaining a matching building plaque block diagram according to the matching result; And comparing the matched building spot block diagram with the first building label diagram to obtain a building change detection result of the first image.
  2. 2. The construction change detection method according to claim 1, wherein after the construction change detection result of the first image is obtained, further comprising: performing a sample amplification process including extracting the sample block within an intersection range of the reference image and the first image in the sample set; Matching the sample block serving as a building patch in the probability distribution diagram to obtain a rectangular area with highest similarity with the building patch serving as a target rectangular area; Calculating the change proportion of the change part in the target rectangular area to the target rectangular area according to the building change detection result; If the change proportion is smaller than a preset threshold value, extracting a first image sub-block according to the preprocessed first image, and extracting a building label sub-block at a position corresponding to the matched building patch according to the first image sub-block; The first image sub-block and the building label sub-block and the sample block and the building label corresponding to the sample block form a plurality of amplification pairs; according to the amplification pair, carrying out mixed sample amplification on the first image sub-block and the building label sub-block to generate a plurality of amplification samples; The sample amplification process is repeatedly performed.
  3. 3. The method of claim 2, further comprising, after the generating the plurality of amplified samples: training the semantic segmentation model according to a sample training set formed by the amplified samples; in the training process, the parameters of the semantic segmentation model are adjusted to obtain a trained semantic segmentation model; According to the semantic segmentation model, building change detection is carried out on the first image and the reference image, and a building change verification result is generated; and comparing and verifying according to the building change verification result and the building change detection result.
  4. 4. The method according to claim 1, wherein the image attribute parameters include coordinate positioning, resolution, band, and spectrum, wherein the preprocessing the first image so that the first image is consistent with the image attribute parameters of the reference image includes: Adjusting the first image by taking the reference image as a reference, so that the coordinate positioning and resolution of the first image are consistent with those of the reference image; Judging whether the first image contains an infrared band and a near infrared band, if the first image contains the infrared band and the near infrared band, extracting a green part of the first image corresponding to the infrared band and the near infrared band to form a green mask, and removing the green mask; Judging whether the wave bands and the spectrum bands of the first image and the reference image are the same, if the wave bands and the spectrum bands of the first image and the reference image are the same, carrying out relative radiation correction on the first image, and if the wave bands or the spectrum bands of the first image and the reference image are different, carrying out linear quantization on the effective pixel value range of the first image so that the effective pixel value range of the first image is the same as the effective pixel value range of the reference image.
  5. 5. The construction change detection method according to claim 4, further comprising, after the making the effective pixel value range of the first image the same as the effective pixel value range of the reference image: Checking the image attribute parameters of the first image and the reference image, and if the image attribute parameters of the first image and the reference image are still different, respectively taking image sample blocks from the first image and the reference image for aggregation, and training a style migration network model; And inputting the first image into the trained style migration network model so as to enable the image attribute parameters of the first image and the reference image to be consistent.
  6. 6. The method for detecting a building change according to claim 1, wherein labeling pixels with probability values greater than a first preset threshold in the probability distribution map as a building, and generating a first building label map includes: Carrying out conditional random field algorithm processing on the probability distribution map to obtain a continuously distributed probability distribution map; selecting pixel points with probability values larger than a first preset threshold value from the probability distribution map; Expanding the pixel points by using morphological dilation filtering; and marking the pixel points larger than the first preset threshold value in the continuously distributed probability distribution diagram as buildings to obtain a first building marking diagram.
  7. 7. The method for detecting building variations according to claim 1, wherein the matching the building patches in the probability distribution map to obtain a matching result, and obtaining a matching building patch map according to the matching result, comprises: in the intersection range, matching is carried out in the probability distribution diagram through the building plaque, so that a plurality of alternative matching points are obtained; Calculating the matching similarity of the building patch and the alternative matching point, forming a weighted bipartite graph according to the matching similarity, and selecting the alternative matching point which is uniquely corresponding to the building patch from the weighted bipartite graph to obtain a matching building patch block graph of the first image.
  8. 8. The method for detecting a building change according to claim 7, wherein said matching in the probability distribution map by the building patches within the intersection range to obtain a plurality of candidate matching points includes: Setting local search parameters and minimum matching distance; Taking an outsourcing rectangle as a matching template block for each building plaque, and selecting a matching reference point from the matching template block; in the intersection range, moving and matching the matched template block in the probability distribution diagram according to local search parameters, and calculating the similarity between the matched template block and a corresponding rectangular area in the probability distribution diagram in real time according to the matched reference point to serve as first similarity; performing normalization transformation on the values of the first similarity so that the measurement ranges of the first similarity in the probability distribution map are the same; in the probability distribution diagram, acquiring the rectangular area with the first similarity larger than a similarity threshold value, and dividing the rectangular area according to a preset dividing number to obtain a plurality of alternative matching positions; Calculating the similarity between the matching reference point and each alternative matching position as second similarity, and selecting a point with the maximum second similarity for each alternative matching position as an alternative matching point of each alternative matching position; selecting the point with the maximum second similarity as a datum point for the alternative matching points; And calculating the reference distances between the rest candidate matching points and the reference point, and screening the candidate matching points with the reference distances smaller than the minimum matching distance to obtain a plurality of screened candidate matching points.
  9. 9. The method for detecting a change in a building according to claim 8, further comprising, after the obtaining the plurality of screened candidate matching points: arranging a plurality of candidate matching points, and performing distance movement matching in the probability distribution map; If a first matching point with the distance smaller than the minimum matching distance exists in the probability distribution diagram, the first matching point is used as a new candidate matching point, and the matching template block corresponding to the first matching point and the matching template block corresponding to the candidate matching point are combined to obtain a second template block; and calculating the combined similarity of the first matching point and the second template block, and carrying out normalization transformation on the value of the combined similarity so that the measurement range of each combined similarity in the probability distribution map is the same.
  10. 10. The method for detecting a building change according to claim 7, wherein the calculating the matching similarity between the building patch and the candidate matching point, forming a weighted bipartite graph according to the matching similarity, and selecting the candidate matching point uniquely corresponding to the building patch from the weighted bipartite graph, to obtain the matching building patch graph of the first image, includes: Calculating the similarity between the matching template block corresponding to the building plaque and the alternative matching point, and taking the similarity as a weight, and assembling the building plaque and the alternative matching point to form a weighted bipartite graph; filling virtual weights in the weighted bipartite graph to enable the number of the matching template blocks corresponding to the building plaques to be consistent with that of the candidate matching points; And carrying out maximum weight matching on the weighted bipartite graph by taking the maximum weight as matching, and enabling each matching template block to correspond to the unique alternative matching point in the matching process, so as to generate a matching building spot block graph.
  11. 11. The method for detecting a building change according to claim 1, wherein the comparing according to the matching building block diagram and the first building label diagram to obtain a building change detection result of the first image includes: Mapping the matched building patch diagram to the first building label diagram, and matching the building patch in the matched building patch diagram in the first building label diagram according to the building patch in the matched building patch diagram; if the building patch does not have the alternative matching point in the matching building patch block diagram, selecting a reference patch closest to the building patch from the matching building patch diagram, and calculating the offset of the building patch relative to the reference patch; searching a region corresponding to the candidate matching point of the reference patch in the first building label graph, and labeling the corresponding region as a demolition building according to the offset; or if the similarity between the building patch and the alternative matching point in the matching building patch diagram is smaller than a preset similarity threshold, marking the area corresponding to the alternative matching point as a demolished building in the first building marking diagram; Or if the candidate matching points of the building patches do not find the corresponding areas in the first building label graph, labeling the corresponding buildings in the first building label graph as newly added buildings.
  12. 12. A building change detection system, the system comprising: the device comprises a first image acquisition module, a second image acquisition module and a display module, wherein the first image acquisition module is used for acquiring a first image to be detected, and the first image is formed by shooting an area from a first angle; The system comprises a reference image acquisition module, a reference image acquisition module and a display module, wherein the reference image acquisition module is used for acquiring a reference image and a reference building annotation corresponding to the reference image, and the reference image is an image formed by shooting an area from a second angle; the preprocessing module is used for preprocessing the first image so that the image attribute parameters of the first image and the image attribute parameters of the reference image are consistent; The training sample set generation module is used for sampling the reference image and the reference building annotation corresponding to the reference image to obtain a plurality of sample blocks, and forming a training sample set according to the plurality of sample blocks, wherein the sample blocks comprise image blocks in a preset range in the reference image and building annotations corresponding to the image blocks in the reference building annotation; the semantic segmentation model acquisition module is used for training the semantic segmentation model according to the training sample set to obtain a trained semantic segmentation model; The probability distribution map acquisition module is used for inputting the first image into the trained semantic segmentation model to obtain a probability distribution map; the first building annotation graph generation module is used for marking pixel points with probability values larger than a first preset threshold value in the probability distribution graph as buildings and generating a first building annotation graph; a building patch obtaining module, configured to obtain a plurality of building patches of the reference image within an intersection range of the reference image and the first image; the matching building patch diagram acquisition module is used for carrying out similarity matching on the building patch in the probability distribution diagram to obtain a matching result, and obtaining a matching building patch diagram according to the matching result; and the building change detection result acquisition module is used for comparing the matched building block diagram with the first building label diagram to obtain a building change detection result of the first image.
  13. 13. An electronic device comprising a memory storing a computer program and a processor implementing the building change detection method according to any one of claims 1 to 11 when the computer program is executed by the processor.
  14. 14. A computer-readable storage medium storing a computer program, characterized in that the computer program, when executed by a processor, implements the construction change detection method of any one of claims 1 to 11.

Description

Building change detection method, system, electronic equipment and storage medium Technical Field The application relates to the technical field of high-resolution remote sensing image processing, in particular to a building change detection method, a system, electronic equipment and a storage medium. Background In the related art, a new image is generally processed so that the resolution of the new image is consistent with that of an original image, so as to reduce the influence of phase and sensor differences on the building change detection process. And then directly comparing the labeling result of the whole new image with the labeling result of the whole original image by using a change detection algorithm to obtain a change label. However, the imaging angle difference cannot be truly eliminated only from the view of resolution, and in two images, the imaging angle difference often causes the difference of local parts of the images, so that the difference of building change labeling is caused, the difficulty in comparing a new image with an original image is often increased, and the accuracy of a labeling result is also reduced. Disclosure of Invention The embodiment of the application mainly aims to provide a building change detection method, a system, electronic equipment and a storage medium, which can reduce the difficulty of comparing a first image with a reference image and improve the accuracy of a labeling result while reducing the influence of imaging angle difference as much as possible. To achieve the above object, a first aspect of an embodiment of the present application provides a method for detecting a building change, including acquiring a first image to be detected; the method comprises the steps of obtaining a first image, obtaining a reference image and a reference building label graph corresponding to the first image, obtaining the reference image, obtaining a reference segmentation model according to the training sample set, inputting the first image into the trained semantic segmentation model to obtain a probability distribution map, labeling pixels with probability values larger than a first preset threshold value in the probability distribution map as buildings, generating a first building label graph, obtaining a plurality of sample blocks, forming a training sample set according to the sample blocks, wherein the sample blocks comprise image blocks in a preset range in the reference image and building labels corresponding to the image blocks in the reference building label graph, training the semantic segmentation model according to the training sample set, obtaining a trained semantic segmentation model, inputting the first image into the trained semantic segmentation model to obtain a probability distribution map, labeling pixels with probability values larger than the first preset threshold value in the probability distribution map as buildings, obtaining a plurality of sample blocks in the first building label graph, obtaining a matching result according to the matching result of the building label graph and the building patch map, and obtaining a matching result according to the matching result of the building patch. According to some embodiments of the application, after the building change detection result of the first image is obtained, a sample amplification process is performed, wherein the sample amplification process comprises the steps of extracting a sample block in an intersection range of the reference image and the first image in the sample set, matching the sample block in the probability distribution map as building patches to obtain a rectangular area with highest similarity to the building patches as a target rectangular area, calculating a change proportion of a change part in the target rectangular area to the target rectangular area according to the building change detection result, extracting a first image sub-block according to the preprocessed first image if the change proportion is smaller than a preset threshold value, extracting building label sub-blocks according to the first image sub-block at positions corresponding to the matched building patches, forming a plurality of amplification pairs by using the first image sub-block, the building label sub-block, the sample block and the building label corresponding to the sample block, mixing the first image sub-block and the building label sub-block according to the amplification pairs, and performing sample labeling repeatedly. According to some embodiments of the application, after generating a plurality of expansion samples, the method further comprises the steps of forming a sample training set according to the expansion samples, training a semantic segmentation model, obtaining a trained semantic segmentation model by adjusting parameters of the semantic segmentation model in the training process, performing building change detection on the first image and the reference image according to the se