An image building change detection method and system fusing a transformer and an HRNet, a terminal, and a storage medium

By integrating Transformer and HRNet, the problems of background noise interference and low ground feature discrimination in building change detection are solved, achieving accurate change detection in complex scenes, outputting structured results, and improving the robustness and accuracy of detection.

CN122090287BActive Publication Date: 2026-06-26深圳市规划和自然资源数据管理中心(深圳市空间地理信息中心)
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
深圳市规划和自然资源数据管理中心(深圳市空间地理信息中心)
Filing Date
2026-04-24
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

Existing building change detection methods are susceptible to background noise interference in complex scenarios, have coarse change boundary localization, low ground feature differentiation, and cannot automatically output structured results, thus limiting the robustness and accuracy of the detection.

Method used

By employing a method that integrates Transformer and HRNet, imaging differences are eliminated through preprocessing. The global semantic modeling capability of Transformer and the high-resolution feature preservation of HRNet are utilized, combined with contrastive learning and attention-guided mechanisms, to achieve fine segmentation of globally changing regions and accurate differentiation of easily confused ground features.

Benefits of technology

It significantly improves the robustness and accuracy of building change detection, and can automatically output structured results containing precise boundaries, feature categories and change types, meeting the business application needs in complex scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122090287B_ABST
    Figure CN122090287B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of remote sensing image processing, and discloses an image building change detection method and system fusing a Transformer and an HRNet, a terminal and a storage medium. The method comprises the following steps: performing preprocessing on double-phase high-resolution remote sensing images of a region to be detected to obtain standardized image blocks; inputting the standardized image blocks into a change detection subnetwork to extract global semantic features of the two-phase images and perform feature fusion, and generating a change map; inputting the standardized image blocks and the change map into a fine segmentation subnetwork to output a ground object category probability map; determining a building change type according to the change map and the ground object category probability map, and generating a building change detection result. The application realizes fine segmentation of a building edge and accurate differentiation of easily confused ground objects in a complex scene, automatically outputs a structured result containing an accurate boundary, a ground object category and a specific change type, and improves the robustness and precision of building change detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of remote sensing image processing technology, and in particular to a method, system, terminal, and computer-readable storage medium for detecting changes in building structures in images by integrating Transformer and HRNet. Background Technology

[0002] In existing building change detection methods, traditional algorithms are sensitive to imaging differences and environmental noise, and have many false changes. Mainstream deep learning models are limited by the local receptive field of convolution, making it difficult to capture global semantics to suppress background interference. Furthermore, the downsampling operation leads to the loss of spatial details and coarse change boundaries. In addition, they lack strong discrimination mechanisms for easily confused features and the logical reasoning ability from pixel differences to high-level semantics (such as specific change types). As a result, they have poor robustness and low accuracy in complex scenarios and cannot automatically output structured results containing precise boundary and attribute information, which seriously restricts practical business applications.

[0003] Therefore, existing technologies still need to be improved and developed. Summary of the Invention

[0004] The main objective of this invention is to provide an image building change detection method, system, terminal, and computer-readable storage medium that integrates Transformer and HRNet. This invention aims to solve the problems of existing building change detection methods, such as susceptibility to background noise interference in complex scenes, resulting in false changes, coarse change boundary positioning, low distinguishability of easily confused ground features, and inability to automatically output structured detection results, which limit the robustness, accuracy, and practical usability of the detection.

[0005] To achieve the above objectives, this invention provides a method for detecting building changes in images that integrates Transformer and HRNet. This method includes the following steps:

[0006] A dual-temporal high-resolution remote sensing image of the area to be detected is acquired. The dual-temporal high-resolution remote sensing image is preprocessed to obtain a standardized image patch. The dual-temporal high-resolution remote sensing image includes a first temporal image and a second temporal image.

[0007] The standardized image patch is input into the change detection sub-network, the global semantic features of the first temporal image and the second temporal image are extracted and the features are fused to generate change patches;

[0008] The standardized image patches and the changed patches are input into the fine segmentation sub-network. By introducing a contrastive learning mechanism during the feature learning process and fusing attention-guided information from the change detection sub-network, a land cover category probability map is output.

[0009] Based on the change patch and the land feature category probability map, the building change type is determined, and a building change detection result is generated. The building change detection result includes change boundary, land feature category, and change type information.

[0010] The change detection subnetwork is based on the Transformer architecture, and the fine segmentation subnetwork is based on the HRNet architecture.

[0011] Furthermore, the preprocessing includes radiometric correction, geometric registration, color balancing, and cropping the image into fixed-size image blocks.

[0012] Further, the step of extracting global semantic features from the first temporal image and the second temporal image and performing feature fusion to generate change patches specifically includes:

[0013] The first global semantic features and the second global semantic features of the first temporal image and the second temporal image are extracted using an encoder based on the Transformer architecture, respectively.

[0014] The interaction relationship between the first global semantic feature and the second global semantic feature is calculated through a dual-temporal feature cross-fusion mechanism to generate a fused feature map;

[0015] A preliminary change probability map is output based on the fused feature map, and the preliminary change probability map is binarized to obtain the change patch.

[0016] Furthermore, the step of calculating the interaction relationship between the first global semantic feature and the second global semantic feature through a dual-temporal feature cross-fusion mechanism to generate a fused feature map specifically includes:

[0017] Use the first global semantic feature as the query vector and the second global semantic feature as the key vector and value vector;

[0018] The attention weights between the query vector and the key vector are calculated using a cross-attention mechanism, and the value vector is weighted and aggregated using the attention weights to generate a feature representation containing second-phase change information.

[0019] The feature representation is residually concatenated with the first global semantic feature to obtain a fused feature map.

[0020] Furthermore, the step of outputting a preliminary change probability map based on the fused feature map specifically includes:

[0021] Clustering is performed on the fused feature map to divide pixels with similar semantic features into multiple object regions;

[0022] The context features of each object region are aggregated to obtain an object-level feature representation;

[0023] The object-level feature representation is distributed in reverse to the corresponding pixel position, the prediction boundary is corrected and noise is suppressed to obtain the target feature map, and a preliminary change probability map is generated based on the target feature map.

[0024] Furthermore, the contrastive learning mechanism specifically includes:

[0025] Construct positive sample pairs and negative sample pairs, wherein the positive sample pairs include images or enhanced views of the same land feature from different perspectives, and the negative sample pairs include easily confused land feature category pairs;

[0026] The model is trained using a contrastive loss function, which reduces the distance between the positive sample pairs in the feature space to a first preset range and increases the distance between the negative sample pairs in the feature space to a second preset range.

[0027] Furthermore, determining the building change type based on the change patch and the land feature category probability map specifically includes:

[0028] Based on the land feature category probability map, the land feature categories of the changed patches in the first temporal image and in the second temporal image are determined respectively;

[0029] If the land cover category in the first temporal image is non-building and the land cover category in the second temporal image is building, then the change type is determined to be new building addition;

[0030] If the land cover category in the first temporal image is building and the land cover category in the second temporal image is non-building, then the change type is determined to be building demolition;

[0031] If the land feature category in the first temporal image is a building and the land feature category in the second temporal image is a building, and the land feature category or shape changes within a preset range, then the change type is determined to be building reconstruction.

[0032] Furthermore, to achieve the above objectives, the present invention also provides an image building change detection system that integrates Transformer and HRNet. This system is used to implement the image building change detection method that integrates Transformer and HRNet as described above. The image building change detection system that integrates Transformer and HRNet includes:

[0033] The data preprocessing module is used to acquire dual-temporal high-resolution remote sensing images of the area to be detected, and to preprocess the dual-temporal high-resolution remote sensing images to obtain standardized image patches. The dual-temporal high-resolution remote sensing images include a first temporal image and a second temporal image.

[0034] The change detection module is used to input the standardized image patch into the change detection sub-network, extract the global semantic features of the first temporal image and the second temporal image and perform feature fusion to generate change patches;

[0035] The fine segmentation module is used to input the standardized image patch and the changed patch into the fine segmentation sub-network. By introducing a contrastive learning mechanism during the feature learning process and fusing attention-guided information from the change detection sub-network, it outputs a land cover category probability map.

[0036] The result generation module is used to determine the building change type based on the changed patch and the land feature category probability map, and generate building change detection results, which include change boundary, land feature category and change type information;

[0037] The change detection subnetwork is based on the Transformer architecture, and the fine segmentation subnetwork is based on the HRNet architecture.

[0038] Furthermore, to achieve the above objectives, the present invention also provides a terminal, wherein the terminal includes: a memory, a processor, and an image building change detection program that fuses Transformer and HRNet, stored in the memory and executable on the processor, wherein when the image building change detection program that fuses Transformer and HRNet is executed by the processor, it implements the steps of the image building change detection method that fuses Transformer and HRNet as described above.

[0039] Furthermore, to achieve the above objectives, the present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores an image building change detection program that integrates Transformer and HRNet, and when the image building change detection program that integrates Transformer and HRNet is executed by a processor, it implements the steps of the image building change detection method that integrates Transformer and HRNet as described above.

[0040] The beneficial effects of this invention are as follows: This invention eliminates imaging difference interference and standardizes the input through preprocessing, accurately captures macroscopic change areas to suppress background noise by utilizing the global modeling capability of the Transformer architecture, and combines the high resolution preservation advantage of the HRNet architecture, the strong discriminative power of contrastive learning, and the attention guidance mechanism to achieve fine segmentation of building edges and accurate differentiation of easily confused ground features in complex scenes. Finally, through multi-dimensional information fusion, the underlying pixel detection is upgraded to high-level semantic understanding, and structured results containing precise boundaries, ground feature categories, and specific change types are automatically output, which significantly improves the robustness, accuracy, and business usability of building change detection. Attached Figure Description

[0041] Figure 1 This is a flowchart of a preferred embodiment of the image building change detection method integrating Transformer and HRNet of the present invention;

[0042] Figure 2 This is a schematic diagram of the change detection subnetwork based on the Transformer architecture in an embodiment of the present invention;

[0043] Figure 3 This is a schematic diagram of the fine segmentation subnetwork based on the HRNet architecture in an embodiment of the present invention;

[0044] Figure 4 This is a structural diagram of a preferred embodiment of the image building change detection system integrating Transformer and HRNet of the present invention;

[0045] Figure 5 This is a structural diagram of a preferred embodiment of the terminal of the present invention. Detailed Implementation

[0046] This application provides a method, system, terminal, and storage medium for detecting changes in building structures in images by integrating Transformer (a deep learning architecture based on a self-attention mechanism) and HRNet (High-Resolution Network). To make the objectives, technical solutions, and effects of this application clearer and more explicit, the following detailed description, with reference to the accompanying drawings and embodiments, further illustrates this application. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0047] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the same meaning as in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined as herein.

[0048] Furthermore, if the embodiments of this invention involve descriptions such as "first" or "second," these descriptions are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first" or "second" may explicitly or implicitly include at least one of those features. Additionally, the technical solutions of the various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. If the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed by this invention.

[0049] The preferred embodiment of the image building change detection method integrating Transformer and HRNet described in this invention, such as... Figure 1 As shown, the image building change detection method that integrates Transformer and HRNet includes the following steps:

[0050] S10. Acquire dual-temporal high-resolution remote sensing images of the area to be detected, and preprocess the dual-temporal high-resolution remote sensing images to obtain standardized image blocks, wherein the dual-temporal high-resolution remote sensing images include a first temporal image and a second temporal image.

[0051] The purpose of this step is to eliminate interference from non-ground object changes caused by differences in imaging conditions (such as illumination, atmosphere, and sensor angle), and to convert large-format remote sensing images into fixed-size data suitable for input to deep learning networks, thus providing a high-quality, standardized data foundation for subsequent feature extraction.

[0052] It should be noted that dual-temporal imagery refers to remote sensing images of the same geographic area acquired at different time points (e.g., time T1 and time T2). Preprocessing is a crucial preliminary step to ensure the accuracy of change detection; if registration is inaccurate or radiometric inconsistencies occur, false changes can easily arise.

[0053] Furthermore, in step S10, the preprocessing includes radiometric correction, geometric registration, color balancing, and cropping the image into fixed-size image blocks.

[0054] In this embodiment, the specific operation is as follows:

[0055] Radiometric correction: Histogram matching or physical model-based radiometric normalization methods are used to eliminate the radiometric differences between two temporal images caused by different solar elevation angles and atmospheric conditions, ensuring that the same ground features have similar gray values ​​in the two temporal images.

[0056] Geometric registration: Using a registration algorithm based on feature points or deep learning, one temporal image is used as a reference to perform spatial transformation on the other temporal image to ensure that the two images are strictly aligned at the pixel level, and the registration error is controlled at the sub-pixel level (e.g., <0.5 pixels).

[0057] Color balancing: Adjusting the color balance of the registered image to eliminate color deviation.

[0058] Image cropping: The preprocessed large-format dual-temporal images are cropped into fixed-size image patch pairs (e.g., 256×256 or 512×512 pixels) according to the sliding window strategy, and overlapping areas are preserved to ensure the continuity of edge detection, thus forming a standardized image patch dataset.

[0059] S20. The standardized image patch is input into the change detection sub-network to extract global semantic features from the first temporal image and the second temporal image and perform feature fusion to generate change patches. The change detection sub-network is a network based on the Transformer architecture. In this embodiment, step S20 is implemented using a change detection sub-network based on the Transformer architecture. Figure 2 As shown, this sub-network mainly includes an encoder, a cross-fusion module, and an object context awareness (OCR) module. In specific implementation, the dual-temporal images are first divided into image patches and embedded with positional codes. These patches are then input into a multi-layer Transformer encoder, which uses a multi-head self-attention mechanism to extract a feature sequence F containing global semantics. T1 and F T2 Subsequently, through the cross-attention mechanism, F T1 For query, F T2 The key-value pairs are used for bidirectional interaction to accurately focus on the changing areas and suppress background noise, generating a fused feature map. Finally, the OCR (Object Context Representation) module is used to automatically cluster and generate object centers, aggregating global context information to enhance the consistency of similar land features. After upsampling by the decoder, a preliminary binarized change patch M is output. change This ensures the consistency of the boundary of change.

[0060] T1 norm and T2 normThese refer to the normalized image patches obtained after preprocessing (including radiometric correction, geometric registration, and color balancing) of images of the same region acquired at time points T1 and T2, as described in step S10. Pchange is an intermediate result generated by the change detection sub-network (based on the Transformer architecture), a probability map where each pixel value is between 0 and 1, representing the likelihood of a "change" at that location. This map will undergo subsequent binarization to obtain M. change .

[0061] The purpose of this step is to leverage the powerful long-range dependency modeling capabilities of the Transformer architecture to capture global contextual information in dual-temporal images, overcome the problem of limited receptive fields in traditional convolutional neural networks, and thus accurately identify macroscopic regions that have changed (i.e., changed patches), providing guidance for subsequent fine segmentation of regions of interest.

[0062] In this embodiment, a change detection sub-network based on Vision Transformer (ViT) or its variants (such as Swing Transformer (a sliding window-based vision transformer architecture)) is constructed. Normalized image patch pairs are input into the encoder branch of this network, deep semantic features are extracted using a self-attention mechanism, dual-temporal features are fused using a cross-attention mechanism, and finally, a preliminary change probability map is generated by the decoder. After thresholding, a binarized change patch is obtained.

[0063] It should be noted that the change patch is a coarse binary mask that indicates "where changes have occurred," but it does not yet distinguish specific land cover categories or precise boundaries. The advantage of Transformer here is that it can directly establish the relationship between any two pixels within an image patch, effectively suppressing false detections caused by background noise.

[0064] Further, in step S20, the extraction of global semantic features from the first temporal image and the second temporal image, followed by feature fusion to generate change patches, specifically includes:

[0065] A10. Using an encoder based on the Transformer architecture, extract the first global semantic features and the second global semantic features of the first temporal image and the second temporal image, respectively.

[0066] A20. Calculate the interaction relationship between the first global semantic feature and the second global semantic feature through a dual-temporal feature cross-fusion mechanism to generate a fused feature map.

[0067] In steps A10 to A20 above, the image patch is first divided into several sequence patches, embedded with positional encoding, and then input into a Transformer encoder. The encoder extracts global semantic feature sequences for time phases T1 and T2 independently through a multi-head self-attention (MHSA) mechanism and a feed-forward network (FFN). Subsequently, a dual-temporal feature cross-fusion mechanism is introduced to overcome the limitation of single-temporal feature independence and calculate the differences and correlations between the first global semantic feature and the second global semantic feature.

[0068] This embodiment uses the Swing Transformer as the backbone network, extracting features from two branches with shared (or independent) weights. In the fusion stage, a difference enhancement module is designed to concatenate the feature maps of T1 and T2 along the channel dimension or interact through an attention mechanism. This embodiment can effectively capture structural change information of buildings at large scales, solving the problem that traditional methods struggle to handle interference from large-scale background changes (such as seasonal vegetation changes) in building detection, and significantly improving the recall rate of changed areas.

[0069] Furthermore, the step of calculating the interaction relationship between the first global semantic feature and the second global semantic feature through a dual-temporal feature cross-fusion mechanism to generate a fused feature map specifically includes:

[0070] A21. Use the first global semantic feature as the query vector and the second global semantic feature as the key vector and value vector.

[0071] A22. Calculate the attention weights between the query vector and the key vector using a cross-attention mechanism, and use the attention weights to perform weighted aggregation on the value vector to generate a feature representation containing second-phase change information.

[0072] A23. Perform a residual connection between the feature representation and the first global semantic feature to obtain a fused feature map.

[0073] In steps A21 to A23 above, a cross-attention mechanism is used to "query" the corresponding part of the T2 features (Key or Value) based on the T1 feature (Query). The attention weight reflects the similarity of a certain position in T1 to T2; the lower the weight, the greater the change. The weighted aggregated value vector contains the difference information between T2 and T1. The residual connection preserves the original semantic information, prevents gradient vanishing, and accelerates convergence.

[0074] This embodiment achieves fine-grained difference measurement at the pixel or feature level, which can keenly capture subtle changes such as the construction and demolition of buildings, while suppressing false differences caused by changes in lighting. The generated fused feature map has extremely strong change discrimination ability.

[0075] A30. Output a preliminary change probability map based on the fused feature map, and perform binarization on the preliminary change probability map to obtain the change patch.

[0076] Further, in step A30, the step of outputting a preliminary change probability map based on the fused feature map specifically includes:

[0077] B10. Perform clustering operation on the fused feature map to divide pixels with similar semantic features into multiple object regions;

[0078] B20. Aggregate the context features within each object region to obtain an object-level feature representation;

[0079] B30. Distribute the object-level feature representation in reverse to the corresponding pixel positions, correct the prediction boundary and suppress noise to obtain the target feature map, and generate a preliminary change probability map based on the target feature map.

[0080] In steps B10 to B30 above, an object context-aware mechanism is introduced. First, the feature map is divided into several homogeneous regions (objects) through clustering (such as simple threshold segmentation or learnable clustering layers). Then, contextual information is aggregated at the object level to enhance the consistency of features within the region. Finally, the aggregated high-level semantic information is fed back to each pixel to correct the uncertainty of individual pixel classification.

[0081] This embodiment uses adaptive average pooling or graph convolutional networks to aggregate features in superpixel regions, and then uses upsampling or broadcasting mechanisms to restore object-level features to pixel level. After fusing with the original fused feature map, a change probability map between 0 and 1 is output through the Sigmoid activation function. Finally, a threshold (e.g., 0.5) is set for binarization to obtain change patches. This embodiment effectively solves the common "salt-and-pepper noise" problem in change detection, making the boundaries of the generated change patches smoother and more complete, with fewer internal holes, providing a high-quality prior mask for subsequent fine segmentation.

[0082] S30. Input the standardized image patch and the changed patch into the fine segmentation sub-network, introduce a contrastive learning mechanism during the feature learning process, and fuse the attention guidance information from the change detection sub-network to output a land cover category probability map; wherein, the fine segmentation sub-network is a network based on the HRNet architecture.

[0083] The purpose of this step is to leverage the high-resolution representation advantage of HRNet, combined with the guidance of change patches, to achieve pixel-level fine classification of buildings and their changing boundaries; at the same time, contrastive learning is introduced to enhance the model's ability to distinguish easily confused features (such as roofs and roads, shadows and water bodies), and output a probability map containing specific feature categories.

[0084] In this embodiment, step S30 is implemented using a finely segmented subnetwork based on the HRNet architecture. Figure 3 As shown, this sub-network consists of a multi-resolution parallel backbone, a contrastive learning module, and an attention guidance unit. A multi-resolution parallel HRNet network is constructed. The original image patch and the change patch generated in S20 (as an attention mask) are input together. During the training phase, positive and negative sample pairs are constructed, and the feature space distribution is optimized using a contrastive loss function. During the inference phase, the network outputs the probability that each pixel belongs to the category of "building", "non-building", "background", etc. In specific implementation, firstly, the HRNet is used to maintain the high and low resolution feature streams in parallel, and the spatial details and strong semantic information are repeatedly exchanged through a multi-scale fusion module to avoid the loss of details caused by downsampling; secondly, a contrastive learning module is embedded to significantly improve the discrimination power of easily confused features (such as buildings and bare soil) by bringing the feature distance of similar pixels closer and pushing the feature distance of dissimilar pixels further apart; thirdly, the change patch generated in step S20 is converted into a spatial attention mask, and the high-resolution features are weighted and guided so that the network focuses on the feature details in the change area; finally, the pixel-level feature category probability map containing attribute information such as "new building" and "demolished building" is output after classification, realizing the structured result output.

[0085] It is important to note that Figure 3 In this context, (B, H, W, C) is a general representation of tensor dimensions in deep learning, used to describe the data shape of the input or feature map. Specifically, in the context of this document, it means:

[0086] B: Batch, batch size, which is the number of image blocks input into the network at one time.

[0087] H: Height, the height (in pixels) of the image or feature map.

[0088] W: Width, the width (in pixels) of the image or feature map.

[0089] C: Channel, number of channels. For input images, this usually represents the number of spectral bands; for feature maps in the middle of the network, it represents the number of feature channels.

[0090] It's important to note that the fine-grained segmentation subnetwork focuses not only on "whether things have changed," but also on "what they have become." The HRNet architecture, by connecting high- and low-resolution subnetworks in parallel and repeatedly performing multi-scale fusion, can perfectly preserve the edge details of buildings.

[0091] Further, in step S30, the contrastive learning mechanism specifically includes:

[0092] C10. Construct positive sample pairs and negative sample pairs, wherein the positive sample pairs include images or enhanced views of the same land feature from different perspectives, and the negative sample pairs include easily confused land feature category pairs.

[0093] C20. Use the contrastive loss function to train the model, reduce the distance between the positive sample pairs in the feature space to a first preset range, and increase the distance between the negative sample pairs in the feature space to a second preset range.

[0094] In steps C10 to C20 above, contrastive learning aims to enable the model to learn more discriminative feature representations. Positive sample pairs (such as different enhanced versions of the same building) should be as close as possible in the feature space, while negative sample pairs (such as a building and a road of similar color) should be as far apart as possible.

[0095] In this embodiment, during training, the input image undergoes enhancement operations such as random cropping, rotation, and color dithering to generate the view. A contrastive loss function (such as InfoNCE Loss, an information loss function based on noise contrast estimation) is defined to calculate the similarity of positive and negative sample pairs on the feature map extracted by HRNet, and the network parameters are updated through backpropagation. Hard negative sample pairs are specifically constructed for difficult examples such as "building-shadow" and "building-bare soil". This embodiment significantly improves the robustness of the model in complex scenes, reduces the misclassification of shadows and water bodies as buildings, or the misclassification of buildings as background, resulting in higher classification accuracy of the land cover category probability map.

[0096] Further, in step S30, the fusion of attention guidance information from the change detection subnetwork specifically includes:

[0097] D10. Convert the preliminary change probability map output by the change detection sub-network into an attention mask or weight map;

[0098] D20. Apply the attention mask or weight map to the feature map of the fine segmentation sub-network during the decoding stage to guide the fine segmentation sub-network to focus on feature extraction of changing regions.

[0099] In steps D10 to D20 above, the coarse-grained variation patch generated in S20 is used as a guiding signal for the spatial attention mechanism. This patch is adjusted to the same resolution as the HRNet feature map and used as a weight map multiplied by the feature map, so that the network assigns higher weights to the variation region when calculating the loss and extracting features.

[0100] This embodiment performs Gaussian smoothing on the binarized change patches to generate a soft attention mask. During the HRNet decoder fusion stage, this mask is either element-wise multiplied with the multi-scale fusion features or used as an additional channel input. This embodiment implements a "coarse-to-fine" detection strategy, forcing the fine segmentation network to concentrate computational resources on potentially changing regions while ignoring a large number of unchanged background regions. This improves detection efficiency while maintaining accuracy and further optimizes the localization accuracy of change boundaries.

[0101] S40. Based on the changed patches and the land feature category probability map, determine the building change type and generate building change detection results, which include change boundary, land feature category and change type information.

[0102] The purpose of this step is to logically deduce the specific type of building change (new building addition, building demolition, building reconstruction) by combining the macroscopic location of changes and the microscopic type of land cover, and output structured detection results to directly serve practical applications such as urban planning and illegal construction monitoring.

[0103] In this embodiment, change patches are overlaid with a dual-temporal probability map of land cover categories. Within the area marked by the change patches, the land cover category with the highest probability at time T1 and T2 is read. The change type is determined according to preset logical rules. Finally, the change boundary is vectorized, attribute labels are attached, and the final detection report or layer is generated.

[0104] It should be noted that this step is crucial in transforming the probability graph output by deep learning into semantic information that is understandable to the business.

[0105] Further, in step S40, determining the building change type based on the change patch and the land feature category probability map specifically includes:

[0106] F10. Based on the land feature category probability map, determine the land feature category of the changed patch in the first temporal image and the land feature category in the second temporal image, respectively;

[0107] F20. If the land cover category in the first temporal image is non-building (such as vegetation, water body, bare land, road, etc.) and the land cover category in the second temporal image is building, then the change type is determined to be new building addition;

[0108] F30. If the land cover category in the first temporal image is building and the land cover category in the second temporal image is non-building, then the change type is determined to be building demolition.

[0109] F40. If the land feature category in the first temporal image is a building and the land feature category in the second temporal image is a building, and further analysis (such as morphological indicators, area change rate, etc.) reveals that the land feature category (such as building height, material) or shape (such as outline) has undergone significant changes within a preset range, then the change type of the map patch is determined to be "building reconstruction".

[0110] Finally, the precise boundaries of each changed patch (derived from the optimization of change detection and segmentation results), the land cover categories of the preceding and following time periods (derived from the land cover category probability map), and the determined change types are fused together to generate building change detection results with complete attribute information that can be used in GIS systems or business platforms.

[0111] The beneficial effects of this invention are as follows: By combining the Transformer, which has strong global semantic modeling capabilities, with the HRNet, which has strong high-resolution feature preservation capabilities, a dual-model collaborative architecture is constructed, responsible for "change area localization" and "refined feature classification," respectively. This scheme effectively solves the problem of balancing global context awareness and local detail preservation in traditional single models. Specifically, the Transformer branch effectively captures long-distance dependencies and dual-temporal differences through self-attention and cross-attention mechanisms, significantly suppressing spurious changes (such as changes in illumination, shadows, and seasonal vegetation) in complex scenes; the HRNet branch ensures accurate segmentation of building boundaries and high discriminative power for easily confused features through parallel multi-resolution feature fusion and contrastive learning. Experiments show that this method can achieve high recall and high intersection-over-union ratio (IoU) for building change detection in complex urban scenes, meeting the needs of large-scale, business-oriented applications.

[0112] Furthermore, such as Figure 4 As shown, based on the above-mentioned image building change detection method integrating Transformer and HRNet, the present invention also provides an image building change detection system integrating Transformer and HRNet, the image building change detection system integrating Transformer and HRNet comprising:

[0113] The data preprocessing module 51 is used to acquire dual-temporal high-resolution remote sensing images of the area to be detected, and to preprocess the dual-temporal high-resolution remote sensing images to obtain standardized image blocks. The dual-temporal high-resolution remote sensing images include a first temporal image and a second temporal image.

[0114] The change detection module 52 is used to input the standardized image patch into the change detection sub-network, extract the global semantic features of the first temporal image and the second temporal image and perform feature fusion to generate change patches;

[0115] The fine segmentation module 53 is used to input the standardized image patch and the changed patch into the fine segmentation sub-network, and output the land cover category probability map by introducing a contrastive learning mechanism in the feature learning process and fusing attention guidance information from the change detection sub-network.

[0116] The result generation module 54 is used to determine the building change type based on the changed patch and the land feature category probability map, and generate building change detection results, the building change detection results including change boundary, land feature category and change type information;

[0117] The change detection subnetwork is based on the Transformer architecture, and the fine segmentation subnetwork is based on the HRNet architecture.

[0118] Furthermore, such as Figure 5 As shown, based on the above-mentioned image building change detection method and system that integrates Transformer and HRNet, the present invention also provides a terminal, which includes a processor 10, a memory 20 and a display 30. Figure 5 Only some of the terminal components are shown; however, it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.

[0119] In some embodiments, the memory 20 may be an internal storage unit of the terminal, such as a hard disk or memory. In other embodiments, the memory 20 may be an external storage device of the terminal, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, etc. Further, the memory 20 may include both internal and external storage devices. The memory 20 is used to store application software and various types of data installed on the terminal, such as the program code installed on the terminal. The memory 20 can also be used to temporarily store data that has been output or will be output. In one embodiment, the memory 20 stores an image building change detection program 40 that integrates Transformer and HRNet, which can be executed by the processor 10 to implement the image building change detection method integrating Transformer and HRNet in this application.

[0120] In some embodiments, the processor 10 may be a central processing unit (CPU), an intelligent computing bare metal server, a microprocessor, or other data processing chip, used to run program code stored in the memory 20 or process data, such as executing the image building change detection method that integrates Transformer and HRNet.

[0121] In some embodiments, the display 30 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen. The display 30 is used to display information on the terminal and to display a visual user interface. The components of the terminal communicate with each other via a system bus.

[0122] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores an image building change detection program that integrates Transformer and HRNet, and the image building change detection program that integrates Transformer and HRNet, when executed by a processor, implements the steps of the image building change detection method that integrates Transformer and HRNet as described above.

[0123] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal that includes that element.

[0124] Of course, those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided by this invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0125] It should be understood that the application of the present invention is not limited to the examples above. Those skilled in the art can make improvements or modifications based on the above description, and all such improvements and modifications should fall within the protection scope of the appended claims.

Claims

1. A method for detecting changes in building structures in images, integrating Transformer and HRNet, characterized in that, The image-based building change detection method that integrates Transformer and HRNet includes the following steps: A dual-temporal high-resolution remote sensing image of the area to be detected is acquired. The dual-temporal high-resolution remote sensing image is preprocessed to obtain a standardized image patch. The dual-temporal high-resolution remote sensing image includes a first temporal image and a second temporal image. The standardized image patch is input into the change detection sub-network, the global semantic features of the first temporal image and the second temporal image are extracted and the features are fused to generate change patches; The standardized image patches and the changed patches are input into the fine segmentation sub-network. By introducing a contrastive learning mechanism during the feature learning process and fusing attention-guided information from the change detection sub-network, a land cover category probability map is output. Based on the change patch and the land feature category probability map, the building change type is determined, and a building change detection result is generated. The building change detection result includes change boundary, land feature category, and change type information. The change detection subnetwork is based on the Transformer architecture, and the fine segmentation subnetwork is based on the HRNet architecture.

2. The image building change detection method integrating Transformer and HRNet according to claim 1, characterized in that, The preprocessing includes radiometric correction, geometric registration, color balancing, and cropping the image into fixed-size image blocks.

3. The image building change detection method integrating Transformer and HRNet according to claim 1, characterized in that, The step of extracting global semantic features from the first temporal image and the second temporal image and fusing these features to generate change patches specifically includes: The first global semantic features and the second global semantic features of the first temporal image and the second temporal image are extracted using an encoder based on the Transformer architecture, respectively. The interaction relationship between the first global semantic feature and the second global semantic feature is calculated through a dual-temporal feature cross-fusion mechanism to generate a fused feature map; A preliminary change probability map is output based on the fused feature map, and the preliminary change probability map is binarized to obtain the change patch.

4. The image building change detection method integrating Transformer and HRNet according to claim 3, characterized in that, The step of calculating the interaction relationship between the first global semantic feature and the second global semantic feature through a dual-temporal feature cross-fusion mechanism to generate a fused feature map specifically includes: Use the first global semantic feature as the query vector and the second global semantic feature as the key vector and value vector; The attention weights between the query vector and the key vector are calculated using a cross-attention mechanism, and the value vector is weighted and aggregated using the attention weights to generate a feature representation containing second-phase change information. The feature representation is residually concatenated with the first global semantic feature to obtain a fused feature map.

5. The image building change detection method integrating Transformer and HRNet according to claim 3, characterized in that, The step of outputting a preliminary change probability map based on the fused feature map specifically includes: Clustering is performed on the fused feature map to divide pixels with similar semantic features into multiple object regions; The context features of each object region are aggregated to obtain an object-level feature representation; The object-level feature representation is distributed in reverse to the corresponding pixel position, the prediction boundary is corrected and noise is suppressed to obtain the target feature map, and a preliminary change probability map is generated based on the target feature map.

6. The image building change detection method integrating Transformer and HRNet according to claim 1, characterized in that, The contrastive learning mechanism specifically includes: Construct positive sample pairs and negative sample pairs, wherein the positive sample pairs include images or enhanced views of the same land feature from different perspectives, and the negative sample pairs include easily confused land feature category pairs; The model is trained using a contrastive loss function, which reduces the distance between the positive sample pairs in the feature space to a first preset range and increases the distance between the negative sample pairs in the feature space to a second preset range.

7. The image building change detection method integrating Transformer and HRNet according to claim 1, characterized in that, The step of determining the building change type based on the change patch and the land feature category probability map specifically includes: Based on the land cover category probability map, the land cover category of the changed patch in the first temporal image and the land cover category in the second temporal image are determined respectively; If the land cover category in the first temporal image is non-building and the land cover category in the second temporal image is building, then the change type is determined to be new building addition; If the land cover category in the first temporal image is building and the land cover category in the second temporal image is non-building, then the change type is determined to be building demolition; If the land feature category in the first temporal image is building and the land feature category in the second temporal image is building, and the land feature attributes or morphology change within a preset range, then the change type is determined to be building reconstruction.

8. A system for detecting changes in building images that integrates Transformer and HRNet, characterized in that, The image building change detection system integrating Transformer and HRNet is used to implement the image building change detection method integrating Transformer and HRNet as described in any one of claims 1-7, wherein the image building change detection system integrating Transformer and HRNet comprises: The data preprocessing module is used to acquire dual-temporal high-resolution remote sensing images of the area to be detected, and to preprocess the dual-temporal high-resolution remote sensing images to obtain standardized image patches. The dual-temporal high-resolution remote sensing images include a first temporal image and a second temporal image. The change detection module is used to input the standardized image patch into the change detection sub-network, extract the global semantic features of the first temporal image and the second temporal image and perform feature fusion to generate change patches; The fine segmentation module is used to input the standardized image patch and the changed patch into the fine segmentation sub-network. By introducing a contrastive learning mechanism during the feature learning process and fusing attention-guided information from the change detection sub-network, it outputs a land cover category probability map. The result generation module is used to determine the building change type based on the changed patch and the land feature category probability map, and generate building change detection results, which include change boundary, land feature category and change type information; The change detection subnetwork is based on the Transformer architecture, and the fine segmentation subnetwork is based on the HRNet architecture.

9. A terminal, characterized in that, The terminal includes: a memory, a processor, and an image building change detection program that fuses Transformer and HRNet, stored in the memory and executable on the processor. When the image building change detection program that fuses Transformer and HRNet is executed by the processor, it implements the steps of the image building change detection method that fuses Transformer and HRNet as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores an image building change detection program that integrates Transformer and HRNet, which, when executed by a processor, implements the steps of the image building change detection method that integrates Transformer and HRNet as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Remote sensing image change detection method based on adaptive Transform and deformable convolution

    CN119418204A

  • Dynamic temporal fusion for video recognition

    US20240282081A1