A Method and Application for Building State Detection Model Based on Variation Simulation Sample Enhancement
By constructing a three-class building status detection framework based on remote sensing image pairs, the problems of sample scarcity and class imbalance in traditional methods are solved, enabling refined differentiation and efficient detection of building status, and improving the applicability and accuracy of the model.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-12
- Publication Date
- 2026-04-03
AI Technical Summary
Traditional building change detection methods cannot distinguish between specific status types such as new construction and demolition, and the scarcity and imbalance of real change samples lead to insufficient training data for the models, which limits their applicability and refined analysis capabilities in complex urban evolution processes.
By acquiring multiple sets of remote sensing image pairs and labeling them pixel by pixel as three categories: newly built, demolished, and background, a building status detection framework is constructed. A shared parameter dual encoding module, a difference calculation module, and dual prediction branches are used to train the model, which combines binary cross-entropy loss and prediction consistency loss to achieve fine-grained differentiation of building status.
It breaks through the limitations of traditional binary classification, expands the scale of training data, improves the comprehensiveness and accuracy of detection, meets the needs of refined analysis of complex urban evolution, and improves the generalization performance and detection accuracy of the model.
Smart Images

Figure CN121505455B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of temporal image processing, and in particular to a method for constructing and applying a building state detection model based on enhanced simulation samples of changes. Background Technology
[0002] Building status change detection, as one of the core directions in the field of temporal image processing technology, plays an irreplaceable role in key scenarios such as dynamic monitoring of urban expansion, governance of illegal buildings, and evaluation of post-disaster reconstruction effects. It is an important technical support for realizing automated urban management and refined spatial monitoring, and is of great significance for optimizing urban planning, rational allocation of resources, and ensuring public safety.
[0003] Traditional building change detection methods generally focus on binary classification tasks of "changed / unchanged", which can only determine whether a building has changed in a region. They cannot further distinguish specific status types such as new construction or demolition, making it difficult to meet the actual needs of refined analysis in the process of complex urban evolution and greatly limiting their applicability in multiple scenarios.
[0004] At the same time, the currently available building change detection datasets have significant shortcomings: on the one hand, the proportion of changed areas in the dataset is extremely low, and the number of samples in the new construction and demolition categories is severely unbalanced, resulting in a lack of sufficient and balanced learning data during model training, which in turn leads to weak state recognition capabilities and insufficient generalization performance; on the other hand, the acquisition of real change samples requires the collection of dual-temporal remote sensing images at fixed spatial locations. Due to limitations such as acquisition costs, time windows, and geographical accessibility, the number of samples is scarce and the coverage of scenarios is limited, which further exacerbates the data bottleneck of model training and restricts the practical application and large-scale development of building state change detection technology. Summary of the Invention
[0005] This application provides a method and application for building state detection model construction based on change simulation sample enhancement. This scheme acquires multiple remote sensing image pairs through simulation and labels each remote sensing image pair pixel by pixel as a joint training set of three categories: newly built, demolished, and background. This enables fine differentiation of building state, breaks through the limitations of traditional binary classification, and meets the needs of fine analysis of complex urban evolution.
[0006] In a first aspect, embodiments of this application provide a method for constructing a building state detection model based on enhanced variation simulation samples, the method comprising:
[0007] Multiple pairs of remote sensing images are acquired. Each pair of remote sensing images includes a first temporal binary image and a second temporal binary image. The first and second temporal binary images have the same spatial region but different temporal regions. In the first and second temporal binary images, a pixel value of 1 represents a building area and a pixel value of 0 represents a non-building area.
[0008] For each pair of remote sensing images, a joint training set is obtained by pixel-by-pixel annotation. The annotation method is as follows: if any pixel value in the first temporal binary image is 0 and the corresponding pixel value in the second temporal binary image is 1, then the corresponding pixel is labeled as a newly created region; if any pixel value in the first temporal binary image is 1 and the corresponding pixel value in the second temporal binary image is 0, then the corresponding pixel is labeled as a demolition region; if any pixel value in the first temporal binary image is the same as the corresponding pixel value in the second temporal binary image, then the corresponding pixel is labeled as a background region.
[0009] A building state detection framework is constructed for detecting building states. The building state detection framework is trained using a joint training set to obtain a building state detection model. The building states include newly built areas, demolished areas, and background areas.
[0010] Secondly, embodiments of this application provide a building status detection method, including:
[0011] A first image and a second image to be detected at different times corresponding to the area to be detected are obtained. The first image and the second image to be detected are input into the constructed building state detection model to obtain the building state of the corresponding area to be detected. The building state includes newly built areas, demolished areas and background areas.
[0012] Thirdly, embodiments of this application provide an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute a method for constructing a building state detection model based on variation simulation sample enhancement or a method based on building state detection.
[0013] Fourthly, embodiments of this application provide a readable storage medium storing a computer program, which, when executed by a processor, implements a method for constructing a building state detection model based on enhanced variation simulation samples or a method based on building state detection.
[0014] The main contributions and innovations of this invention are as follows:
[0015] This scheme addresses the scarcity of real change samples and class imbalance by acquiring multiple sets of simulated image pairs as remote sensing image pairs, thus overcoming the limitations of fixed-space dual-temporal acquisition and expanding the scale of training data. The scheme labels each remote sensing image pair pixel-by-pixel as a joint training set for three categories: newly built, demolished, and background, thereby achieving refined differentiation of building states, overcoming the limitations of traditional binary classification, and meeting the needs of refined analysis of complex urban evolution. This scheme constructs a building state detection framework containing a shared parameter dual-encoding module, a difference calculation module, and dual prediction branches, efficiently extracting multi-scale semantic features and difference information from dual-temporal images, and simultaneously outputting binary change results and three-class state results, improving the comprehensiveness and accuracy of detection. This scheme uses a weighted total loss of binary cross-entropy loss, building state cross-entropy loss, and prediction consistency loss for model training, ensuring logical consistency between binary change prediction and three-class state prediction, effectively optimizing model parameters, and improving detection accuracy and generalization performance.
[0016] Details of one or more embodiments of this application are set forth in the following drawings and description to make other features, objects and advantages of this application more readily apparent. Attached Figure Description
[0017] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0018] Figure 1 This is a flowchart of a method for constructing a building state detection model based on enhanced variation simulation samples, according to an embodiment of this application.
[0019] Figure 2 This is a schematic diagram illustrating an embodiment of acquiring remote sensing image pairs according to an embodiment of this application;
[0020] Figure 3 This is a structural diagram of a building status detection frame according to an embodiment of this application;
[0021] Figure 4 This is a high-resolution remote sensing image dataset of City A according to an embodiment of this application;
[0022] Figure 5 This is a schematic diagram illustrating the performance of the present solution in predicting the state of three-class buildings according to an embodiment of this application;
[0023] Figure 6 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of this application. Detailed Implementation
[0024] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with one or more embodiments of this specification. Rather, they are merely examples of apparatuses and methods consistent with some aspects of one or more embodiments of this specification as detailed in the appended claims.
[0025] It should be noted that the steps of the corresponding methods are not necessarily performed in the order shown and described in this specification in other embodiments. In some other embodiments, the methods may include more or fewer steps than described in this specification. Furthermore, a single step described in this specification may be broken down into multiple steps in other embodiments; and multiple steps described in this specification may be combined into a single step in other embodiments.
[0026] Example 1
[0027] This application provides a method for constructing a building state detection model based on enhanced change simulation samples. It acquires multiple remote sensing image pairs through simulation and labels each remote sensing image pair pixel-by-pixel as a joint training set for three categories: newly built, demolished, and background. This achieves refined differentiation of building states, overcoming the limitations of traditional binary classification and meeting the needs of refined analysis of complex urban evolution. Specifically, refer to... Figure 1 The method includes:
[0028] Multiple pairs of remote sensing images are acquired. Each pair of remote sensing images includes a first temporal binary image and a second temporal binary image. The first and second temporal binary images have the same spatial region but different temporal regions. In the first and second temporal binary images, a pixel value of 1 represents a building area and a pixel value of 0 represents a non-building area.
[0029] For each pair of remote sensing images, a joint training set is obtained by pixel-by-pixel annotation. The annotation method is as follows: if any pixel value in the first temporal binary image is 0 and the corresponding pixel value in the second temporal binary image is 1, then the corresponding pixel is labeled as a newly created region; if any pixel value in the first temporal binary image is 1 and the corresponding pixel value in the second temporal binary image is 0, then the corresponding pixel is labeled as a demolition region; if any pixel value in the first temporal binary image is the same as the corresponding pixel value in the second temporal binary image, then the corresponding pixel is labeled as a background region.
[0030] A building state detection framework is constructed for detecting building states. The building state detection framework is trained using a joint training set to obtain a building state detection model. The building states include newly built areas, demolished areas, and background areas.
[0031] In the current embodiment, two binary images of the same spatial location at different times are obtained through a remote sensing satellite platform or a single-temporal public data source as a real image pair, and the real image pair is used as the remote sensing image pair.
[0032] Specifically, real image pairs are obtained through remote sensing satellite platforms or single-temporal public data sources to simulate the building change process. In the subsequent model training process, illegal demolition, illegal construction and other situations can be accurately detected based on remote sensing image pairs.
[0033] In addition, to ensure the accuracy of training, the acquired remote sensing image pairs must contain a large number of representative samples of illegal demolition and construction. However, in reality, the actual number of building demolition and construction cases is often small and far from sufficient to meet the training requirements of the model. Therefore, this solution constructs multiple simulation image pairs by acquiring simulation methods to simulate the demolition and construction of buildings.
[0034] Specifically, two binary images of remote sensing images from different spatial locations at the same time are obtained to form a simulated image pair. This simulated image pair is then used as the remote sensing image pair. A schematic diagram of this method for obtaining remote sensing image pairs is shown below. Figure 2 As shown.
[0035] Multiple sets of remote sensing image pairs were obtained by mixing simulated image pairs with real image pairs. By controlling the number of simulated image pairs, the problems of scarcity of changes and class imbalance in real change samples were solved, and the limitation of real sample pairs requiring the acquisition of dual-temporal images at fixed spatial locations was eliminated.
[0036] For example, simulated image pairs are obtained from publicly available binary segmentation datasets for buildings (WHU Building Dataset, InriaAerial Image Labeling Dataset, Massachusetts Building Dataset, etc.).
[0037] Specifically, the remote sensing image pairs in this scheme are images containing binary segmentation labels for buildings. In practical applications, any binary segmentation model can be used to achieve binary segmentation of buildings.
[0038] In the current embodiment, after acquiring multiple sets of remote sensing image pairs, each set of remote sensing image pairs is preprocessed. The preprocessing process includes cropping each set of remote sensing image pairs to a fixed size and aligning the images. In this scheme, the remote sensing image pairs are cropped to a size of 256×256.
[0039] Specifically, the preprocessing operation for remote sensing image pairs is the conventional preprocessing procedure for training images in machine learning. This scheme does not limit the preprocessing procedure, and other preprocessing operations can also be used to process remote sensing image pairs to obtain better model training results.
[0040] In the current embodiment, the temporality of the first temporal binary graph is earlier than that of the second temporal binary graph.
[0041] Specifically, the model is trained using a first temporal binary image and a second temporal binary image with temporal differences, which allows the model to identify the differences in architecture between the second temporal binary image and the first temporal binary image, thus obtaining better building status recognition results.
[0042] In the current embodiment, Using this as the first temporal binary graph, Using this as the second temporal binary graph, The binary segmentation labels for the first temporal binary image. For the binary segmentation labels of the second temporal binary image, during the pixel-by-pixel annotation process, if and This indicates that the corresponding pixel is a non-building area in the first temporal binary image and a building area in the second temporal binary image, so the corresponding pixel is a newly created area and is labeled as label=1; if and This indicates that the corresponding pixel is a building area in the first temporal binary image and a non-building area in the second temporal binary image, so the corresponding pixel is a demolition area and is labeled as label=2; if If the corresponding pixel is in either a building area or a non-building area in both the first and second temporal binary images, then the corresponding pixel is a background area, which is an area where the building status remains unchanged.
[0043] Specifically, a large number of training samples are generated through simulation methods, and three-class labeling of newly created areas, demolished areas, and background areas is performed based on binary labels. This enables the generation of an unlimited number of remote sensing image pairs with binary labels and three-class state labels using only a single-temporal binary segmentation dataset, thereby solving the problem of scarce changing areas and imbalanced state categories in actual data due to the limitation of fixed-space dual-temporal acquisition.
[0044] Specifically, the ratio of simulated samples to real samples is automatically adjusted according to the distribution of different labeled categories in the joint training set to ensure a balance of state categories during training, improve the model's generalization ability, effectively ensure that the method pays attention to changing regions, and prevent overfitting due to deviation from the real scene.
[0045] In the current embodiment, the structure of the building status detection frame is as follows: Figure 3 As shown, the building status detection framework includes a first encoding module, a second encoding module, a difference calculation module, a decoding module, a binary change prediction module, and a building status prediction branch. The first encoding module and the second encoding module have the same structure and share parameters, and the binary change prediction module and the building status prediction branch are connected in parallel.
[0046] Furthermore, during the training of the building state detection framework, a first temporal binary image is input into a first encoding module to obtain a first encoding result, and a second temporal binary image is input into a second encoding module to obtain a second encoding result. The difference calculation module calculates the difference between the first encoding result and the second encoding result at different scales, and fuses the difference results at each scale to obtain a difference feature map. The decoding module decodes the difference feature map to obtain a decoded feature map, and inputs the decoded feature map into a binary change prediction branch and a building state prediction branch, respectively. The binary change branch predicts based on the decoded feature map to obtain a binary prediction map. In the binary prediction map, pixels with changed pixel values are marked as changed regions, and pixels without changed pixel values are marked as unchanged regions. The building state prediction branch predicts based on the decoded feature map to obtain a three-class prediction map, and marks the building state of each pixel in the three-class prediction map.
[0047] Specifically, the first and second encoding modules of this scheme adopt ResNet or Swin-Transformer architectures. The first and second encoding modules are twinned to extract features from the first and second temporal binary maps respectively, thereby obtaining the semantic features of the first and second temporal binary maps in multi-scale space. These semantic features include structural contours, edge information and contextual semantics.
[0048] Specifically, the first encoding result is calculated through the difference calculation module. Second encoding result The difference at different scales can accurately reflect the state change information between image pairs, thus significantly enhancing the newly built or demolished areas. Subsequently, the difference results at different scales are fused to form a unified state-aware feature representation. The difference calculation module calculates the difference between the first and second encoding results at different scales, which can be expressed by the formula:
[0049]
[0050] in, The difference results are for the corresponding scales. The first encoding result This is the second encoding result.
[0051] Specifically, the binary prediction image marks the change of each pixel. If any pixel in the second temporal binary image changes compared to the corresponding pixel in the first temporal binary image, the corresponding pixel is marked as a changed region; if any pixel in the second temporal binary image does not change compared to the corresponding pixel in the first temporal binary image, the corresponding pixel is marked as an unchanged region.
[0052] Specifically, in the three-class prediction map, the building status of each pixel is marked. If the pixel value of any pixel changes from 0 in the first temporal binary map to 1 in the corresponding second temporal binary map, it indicates that the building status of the corresponding pixel is a newly built area; if the pixel value of any pixel changes from 1 in the first temporal binary map to 0 in the corresponding second temporal binary map, it indicates that the building status of the corresponding pixel is a demolished area; if the pixel value of any pixel is the same in both the first and second temporal binary maps, it indicates that the building status of the corresponding pixel is a background area.
[0053] In the current embodiment, a binary cross-entropy loss is constructed based on the binary prediction map, a building state cross-entropy loss is constructed based on the three-class prediction map, and a prediction consistency loss is constructed based on the consistency between the binary prediction map and the three-class prediction map. The weighted sum of the binary cross-entropy loss, the building state cross-entropy loss, and the prediction consistency loss is used as the total loss. The parameters of the building state detection framework are adjusted based on the total loss of each round of iterative training. When the preset iteration conditions are met, the optimal parameters of the building state detection framework during the iterative training process are saved to obtain the building state detection model.
[0054] Specifically, the binary cross-entropy loss is the cross-entropy result between the binary prediction map and the corresponding real label, and the building state cross-entropy loss is the cross-entropy result between the three-class prediction map and the corresponding real label.
[0055] Furthermore, the newly created and demolished regions in the three-class prediction map are mapped to changed regions, and the background region is mapped to a non-changed region to obtain a mapped prediction map. The prediction consistency loss is obtained by calculating the prediction consistency between each pixel in the mapped prediction map and the corresponding pixel in the binary prediction map.
[0056] Specifically, the formula for the total loss is expressed as:
[0057]
[0058] in, For the total loss, For binary cross-entropy loss, The cross-entropy loss is the building state. To predict consistency loss, , , For the corresponding weighting coefficients, in this scheme For 1, =1, It is 1.5.
[0059] Specifically, predicting consistency loss The construction formula is as follows:
[0060]
[0061] in, The prediction results are for the binary prediction map. This represents the mask for newly created and demolished areas in a three-class prediction map.
[0062] Specifically, the building status detection model described in this solution predicts the building status based on any two remote sensing images of the same location. The building status includes newly built areas, demolished areas, and background areas. For example, it can predict the building status of the same location in 2001 and 2007, or predict the current building status of the target location and the building status one year ago. This application does not limit the specific application method.
[0063] Correspondingly, other model frameworks can also be used to train and obtain a building state detection model.
[0064] Specifically, this scheme adopts a dual-branch design during the training phase, which has excellent generalization ability and application flexibility. It is especially suitable for real-world scenarios where state labels are incomplete or missing. For example, when real samples lack three-class state labels, this invention allows real samples with only binary change labels to participate in the independent training of the change branch. The model can make full use of limited labeled data, improve the overall data utilization and robustness. Through joint optimization of mixed labeled data, it can achieve accurate three-class state predictions even for real samples with only binary change labels, thereby enhancing the task transfer capability across regions and time phases.
[0065] In some other embodiments, City A is used as a test area to verify the feasibility of this scheme, and a high-resolution remote sensing image dataset of City A is selected, such as... Figure 4 As shown, temporal images 1 and 2 are dual-temporal data collected from the same area in 2006 and 2019, respectively. The data uses 0.55-meter resolution RGB remote sensing imagery. The images show a comparison of changes in six different building states. The training method based on the building state detection framework includes:
[0066] Step 1: Load the high-resolution dual-temporal remote sensing image dataset containing the area of City A, crop each pair of images and its change label map into image patches of size 256×256, and divide them into training set, validation set and test set according to the proportion.
[0067] Step 2: Select the publicly available single-temporal building binary segmentation dataset Inria Aerial Image LabelingDataset, and obtain images with building mask labels and their corresponding binary segmentation maps from it to construct simulation state change labels. Randomly select two image patches with different locations but similar semantics from the same city area as simulation image pairs X1 and X2 to simulate remote sensing observations at different times. Extract the corresponding building mask labels L1 and L2, and generate three types of state label maps Y through pixel-by-pixel comparison: where L1=0 and L2=1 is considered newly built (label=1), L1=1 and L2=0 is considered demolished (label=2), and the area where L1=L2 is considered background (label=0). Combine image pairs X1 and X2 with the generated state label map Y to form simulation samples, and generate a sufficient number of class-balanced training samples in batches to alleviate the problems of scarce changes and extreme class imbalance in real change data.
[0068] Step 3: Merge the simulated samples with the real change data of City A (lacking three-class state labels) to form a training set, and input the image pairs into the ResNet-18 network with shared parameters to extract feature maps layer by layer.
[0069] Step 4: Perform interpolation on the feature maps at each scale to obtain multi-scale difference feature maps. Input the difference features into the decoder module, and restore the image spatial resolution through progressive upsampling, convolution, and nonlinear activation functions. Output three types of state change prediction maps with the same size as the input image, including new construction, demolition, and background state prediction maps.
[0070] Step 5: Using the multi-class cross-entropy loss function as the training objective, calculate the loss between the model output graph and the label graph, train the model through backpropagation, and optimize the parameters to minimize the state prediction error. This is a technique well-known to those skilled in the art and will not be described in detail here.
[0071] Furthermore, the GZ-CD dataset was introduced for testing. The building state detection model constructed in this scheme was compared with a conventional spatiotemporal variation network. The comparison results in terms of precision, recall, F1 score, intersection-over-union ratio, and overall accuracy are shown in Table 1.
[0072] Table 1 Comparison of Building State Detection Model and Spatiotemporal Variation Network
[0073]
[0074] Among them, the detection results of the method proposed in Table 1 numerically surpass the results of the latest spatiotemporal variation networks in all aspects, and at the same time... Figure 4This also indicates that the proposed solution has fewer missed detections (light gray pixels) and false detections (dark gray pixels) in binary change detection, as well as higher accuracy (white pixels).
[0075] Figure 5 This is a performance diagram of the proposed scheme in predicting the state of buildings in three categories, showing newly built areas (dark gray pixels) and demolished areas (white pixels), further verifying the effectiveness of the proposed scheme in detecting changes in dual-time remote sensing images.
[0076] Example 2
[0077] Based on the same concept, this application also proposes a building condition detection method, including:
[0078] A first image to be detected and a second image to be detected at different times corresponding to the area to be detected are obtained. The first image to be detected and the second image to be detected are input into the building state detection model constructed in Example 1 to obtain the building state of the corresponding area to be detected. The building state includes the newly built area, the demolished area and the background area.
[0079] Example 3
[0080] This embodiment also provides an electronic device, see reference. Figure 6 It includes a memory 404 and a processor 402, wherein the memory 404 stores a computer program and the processor 402 is configured to run the computer program to perform the steps in any of the above method embodiments.
[0081] Specifically, the processor 402 may include a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.
[0082] Memory 404 may include a mass storage device for data or instructions. For example, and not limitingly, memory 404 may include a hard disk drive (HDD), a floppy disk drive, a solid-state drive (SSD), flash memory, an optical disk drive, a magneto-optical disk drive, magnetic tape, or a Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 404 may include removable or non-removable (or fixed) media. Where appropriate, memory 404 may be internal or external to a data processing device. In a particular embodiment, memory 404 is non-volatile memory. In a particular embodiment, memory 404 includes read-only memory (ROM) and random access memory (RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable read-only memory (PROM), an erasable read-only memory (EPROM), an electrically erasable read-only memory (EEPROM), an electrically alterable read-only memory (EAROM), or flash memory, or a combination of two or more of these. Where appropriate, the RAM can be Static Random-Access Memory (SRAM) or Dynamic Random-Access Memory (DRAM). DRAM can be Fast Page Mode Dynamic Random-Access Memory (FPMDRAM), Extended Data Out Dynamic Random-Access Memory (EDODRAM), Synchronous Dynamic Random-Access Memory (SDRAM), etc.
[0083] The memory 404 can be used to store or cache various data files that need to be processed and / or communicated, as well as possible computer program instructions executed by the processor 402.
[0084] The processor 402 reads and executes the computer program instructions stored in the memory 404 to implement any of the building state detection model construction methods based on variation simulation sample enhancement in the above embodiments.
[0085] Optionally, the electronic device may further include a transmission device 406 and an input / output device 408, wherein the transmission device 406 is connected to the processor 402, and the input / output device 408 is connected to the processor 402.
[0086] The transmission device 406 can be used to receive or send data via a network. Specific examples of the network described above may include wired or wireless networks provided by the communication provider of the electronic device. In one example, the transmission device includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 406 may be a Radio Frequency (RF) module used for wireless communication with the Internet.
[0087] The input / output device 408 is used to input or output information. In this embodiment, the input information may be multiple sets of remote sensing image pairs, and the output information may be the status of buildings, etc.
[0088] Optionally, in this embodiment, the processor 402 can be configured to perform the following steps via a computer program:
[0089] Multiple pairs of remote sensing images are acquired. Each pair of remote sensing images includes a first temporal binary image and a second temporal binary image. The first and second temporal binary images have the same spatial region but different temporal regions. In the first and second temporal binary images, a pixel value of 1 represents a building area and a pixel value of 0 represents a non-building area.
[0090] For each pair of remote sensing images, a joint training set is obtained by pixel-by-pixel annotation. The annotation method is as follows: if any pixel value in the first temporal binary image is 0 and the corresponding pixel value in the second temporal binary image is 1, then the corresponding pixel is labeled as a newly created region; if any pixel value in the first temporal binary image is 1 and the corresponding pixel value in the second temporal binary image is 0, then the corresponding pixel is labeled as a demolition region; if any pixel value in the first temporal binary image is the same as the corresponding pixel value in the second temporal binary image, then the corresponding pixel is labeled as a background region.
[0091] A building state detection framework is constructed, and a building state detection model is obtained by training the framework using a joint training set.
[0092] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated here.
[0093] Generally, various embodiments can be implemented in hardware or dedicated circuitry, software, logic, or any combination thereof. Some aspects of the invention can be implemented in hardware, while others can be implemented by firmware or software executed by a controller, microprocessor, or other computing device, but the invention is not limited thereto. Although various aspects of the invention may be shown and described as block diagrams, flowcharts, or using some other graphical representation, it should be understood that, by way of non-limiting example, these blocks, apparatuses, systems, techniques, or methods described herein can be implemented in hardware, software, firmware, dedicated circuitry or logic, general-purpose hardware or controllers or other computing devices, or some combination thereof.
[0094] Embodiments of the present invention can be implemented by computer software, which may be executable by a data processor of a mobile device, such as a processor entity, or by hardware, or by a combination of software and hardware. Computer software or programs (also referred to as program products) including software routines, applets, and / or macros can be stored in any device-readable data storage medium, and they include program instructions for performing specific tasks. The computer program product may include one or more computer-executable components configured to perform the embodiments when the program is run. The one or more computer-executable components may be at least one piece of software code or a portion thereof. Additionally, it should be noted in this respect that, as Figure 6 Any box in the logical flow can represent a program step, or interconnected logic circuits, boxes and functions, or a combination of program steps and logic circuits, boxes and functions. Software can be stored on physical media such as memory chips or blocks of storage implemented within a processor, magnetic media such as hard disks or floppy disks, and optical media such as DVDs and their data variants, CDs, etc. The physical medium is a non-transient medium.
[0095] Those skilled in the art should understand that the technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments have been described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0096] The above embodiments are merely illustrative of several implementation methods of this application, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for constructing a building state detection model based on enhanced simulation samples of changes, characterized in that, Includes the following steps: Multiple pairs of remote sensing images are acquired. Each pair of remote sensing images includes a first temporal binary image and a second temporal binary image. The first and second temporal binary images have the same spatial region but different temporal regions. In the first and second temporal binary images, a pixel value of 1 represents a building area and a pixel value of 0 represents a non-building area. For each pair of remote sensing images, a joint training set is obtained by pixel-by-pixel annotation. The annotation method is as follows: if any pixel value in the first temporal binary image is 0 and the corresponding pixel value in the second temporal binary image is 1, then the corresponding pixel is labeled as a newly created region; if any pixel value in the first temporal binary image is 1 and the corresponding pixel value in the second temporal binary image is 0, then the corresponding pixel is labeled as a demolition region; if any pixel value in the first temporal binary image is the same as the corresponding pixel value in the second temporal binary image, then the corresponding pixel is labeled as a background region. A building state detection framework is constructed for detecting building states. The framework is trained using a joint training set to obtain a building state detection model. The building states include newly constructed areas, demolished areas, and background areas. The building state detection framework includes a first encoding module, a second encoding module, a difference calculation module, a decoding module, a binary change prediction module, and a building state prediction branch. The first and second encoding modules have identical structures and share parameters. The binary change prediction module and the building state prediction branch are connected in parallel. During the training of the building state detection framework, a first temporal binary image is input into the first encoding module to obtain the first encoding result, and a second temporal binary image is input into the second encoding module to obtain the second encoding result. The encoding result is obtained by the difference calculation module calculating the difference between the first encoding result and the second encoding result at different scales, and fusing the difference results at each scale to obtain a difference feature map. The decoding module decodes the difference feature map to obtain a decoded feature map, and inputs the decoded feature map into the binary change prediction branch and the building state prediction branch respectively. The binary change prediction branch predicts based on the decoded feature map to obtain a binary prediction map. In the binary prediction map, pixels with pixel value changes are marked as change regions, and pixels without pixel value changes are marked as unchanged regions. The building state prediction branch predicts based on the decoded feature map to obtain a three-class prediction map, and marks the building state of each pixel in the three-class prediction map.
2. The method for constructing a building state detection model based on enhanced variation simulation samples according to claim 1, characterized in that, Two remote sensing images from different spatial locations at the same time are obtained to form a simulated image pair, which is then used as the remote sensing image pair.
3. The method for constructing a building state detection model based on enhanced variation simulation samples according to claim 1, characterized in that, The first temporal binary graph is earlier than the second temporal binary graph, and the background area is a region where the building state does not change.
4. The method for constructing a building state detection model based on enhanced variation simulation samples according to claim 1, characterized in that, A binary cross-entropy loss is constructed based on the binary prediction map, a building state cross-entropy loss is constructed based on the three-class prediction map, and a prediction consistency loss is constructed based on the consistency between the binary prediction map and the three-class prediction map. The weighted sum of the binary cross-entropy loss, the building state cross-entropy loss and the prediction consistency loss is used as the total loss. The parameters of the building state detection framework are adjusted based on the total loss of each round of training iterations. When the preset iteration conditions are met, the optimal parameters of the building state detection framework during the iterative training process are saved to obtain the building state detection model.
5. The method for constructing a building state detection model based on enhanced variation simulation samples according to claim 4, characterized in that, The newly created and demolished regions in the three-class prediction map are mapped to changed regions, and the background region is mapped to an unchanged region to obtain a mapped prediction map. The prediction consistency loss is obtained by calculating the prediction consistency between each pixel in the mapped prediction map and the corresponding pixel in the binary prediction map.
6. A method for detecting the condition of a building, characterized in that, include: A first image to be detected and a second image to be detected at different temporal states corresponding to the area to be detected are obtained. The first image to be detected and the second image to be detected are input into the building state detection model constructed by any one of the methods described in claims 1-5 to obtain the building state of the corresponding area to be detected. The building state includes newly built areas, demolished areas and background areas.
7. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to execute the building state detection model construction method based on change simulation sample enhancement as described in any one of claims 1-5 or the building state detection method as described in claim 6.
8. A readable storage medium, characterized in that, The readable storage medium stores a computer program, which, when executed by a processor, implements a method for constructing a building state detection model based on variation simulation sample enhancement as described in any one of claims 1-5, or a method for building state detection as described in claim 6.
Citation Information
Patent Citations
Homestead change monitoring method and device based on multi-scale fusion model
CN116310802A