Building detection system and method driven by remote sensing data and AI model
By using remote sensing image registration and multi-branch networks to generate image pairs of the same style, combined with an interactive attention change detection network, the problem of false differences in remote sensing image change detection is solved, and the accuracy and stability of building change detection are improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- WEINAN NORMAL UNIV
- Filing Date
- 2026-02-05
- Publication Date
- 2026-04-28
AI Technical Summary
Existing remote sensing image change detection technologies fail to effectively control changes to occur only in the buildings themselves when generating virtual samples, while keeping non-changing factors such as background and lighting consistent. This results in generated spurious differences that affect the accuracy of model recognition, leading to false alarms and missed alarms.
By acquiring and registering remote sensing images, a multi-branch prior coding segmentation network and an inverse style mapping network are used to generate image pairs of the same style. The model is then trained through an interactive attention change detection network to filter out untrusted samples, generate reliable change maps, and update the building fragment library, thereby achieving building change detection.
Ensure that the generated virtual samples meet the requirements for change detection, reduce false differences, improve the model's recognition accuracy and system stability, and reduce false positives and false negatives.
Smart Images

Figure CN121661046B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of remote sensing image processing, and more specifically, to a building detection system and method driven by remote sensing data and AI models. Background Technology
[0002] Remote sensing imagery is widely used for building change detection in urban renewal and illegal construction investigation. With technological advancements, high-resolution and multi-temporal images from remote sensing provide abundant information resources, enabling the automation of these tasks. However, one challenge is the availability of limited labeled data for training, often covering only common change types and lacking sufficient samples for subtle or less common building changes (such as partial additions or minor alterations). To compensate for this deficiency, techniques like Generative Adversarial Networks (GANs) are typically used to expand the sample set, allowing models to be trained to recognize diverse change scenarios.
[0003] However, existing generative techniques primarily focus on the overall visual realism of images, neglecting the specific requirements of change detection tasks. Especially in remote sensing image change detection, the generated virtual samples must not only maintain temporal consistency but also ensure that changes occur only within the buildings themselves, while non-changing factors such as background and lighting remain largely consistent. During generation, a lack of control over these specific requirements can lead to spurious changes in non-changing areas, such as background texture variations and shadow errors. These spurious differences are learned by the model during training, affecting its recognition accuracy. The model may misclassify these spurious changes as genuine building changes, resulting in false positives and false negatives, impacting system stability and practical application performance. Therefore, ensuring that generated virtual samples meet the requirements of change detection without introducing spurious differences is a core problem that urgently needs to be solved in current technologies.
[0004] To address the aforementioned problems, a technical solution is provided. Summary of the Invention
[0005] To overcome the aforementioned deficiencies of the prior art, embodiments of the present invention provide a building detection system and method driven by remote sensing data and AI models. This system generates registered image pairs from first-temporal and second-temporal remote sensing images. A multi-branch prior coding segmentation network outputs a first-temporal building mask, a second-temporal building mask, a stable region mask, a building boundary map, and a building fragment library. An inverse style mapping network generates image pairs of the same style and constructs synthetic image pairs and synthetic change label maps. A reliability determination of synthetic samples filters out unreliable samples. An interactive attention change detection network is trained to obtain a change detection model. The system then infers and generates a reliable change map and updates the building fragment library, thereby solving the problems mentioned in the background art.
[0006] To achieve the above objectives, the present invention provides the following technical solution:
[0007] S1: Acquire the first phase remote sensing image of the target area, acquire the second phase remote sensing image of the target area, perform registration and brightness normalization to obtain the registered image pair;
[0008] S2: Input the registered image pairs into the multi-branch prior coding segmentation network, output the first phase building mask, output the second phase building mask, calculate the common non-building area of the two building masks to obtain the stable region mask, extract the building mask boundary to obtain the building boundary map, and crop building fragments from the two images and write them into the building fragment library.
[0009] S3: Use a stable region mask-constrained inverse style mapping network to achieve style unification of two temporal images. Based on the building boundary map, limit the candidate change area of buildings and perform building fragment structure replacement to generate synthetic image pairs and synthetic change label maps. Perform a confidence judgment on the synthetic image pairs and select to enter the training set or regenerate according to the judgment result.
[0010] S4: Train the interactive attention change detection network using registered image pairs, image pairs of the same style, and building boundary maps. The interactive attention change detection network includes local and global interactive attention modules. During the training phase, synthetic image pairs and synthetic change label maps are used for supervision. During the training phase, stable region masks are used to constrain change evidence to reduce the response in stable regions, thus obtaining the change detection model.
[0011] S5: The change detection model processes image pairs of the same style and outputs a change evidence map. The change detection model processes image pairs of the same style that have been swapped and outputs a reverse change evidence map. The change evidence map and the reverse change evidence map are compared to obtain a consistency map. The residual map is calculated in the stable region mask. Based on the consistency map and the residual map, false changes are screened out to obtain a reliable change map. The building fragments corresponding to the reliable change map are added to the building fragment library. The newly added building fragments are used to reconstruct the synthetic image pair and update the change detection model once.
[0012] In a preferred embodiment, corner point and line segment intersection features are extracted from the first time-phase remote sensing image and the second time-phase remote sensing image. An initial pairing set is established based on the consistency of local gradient direction. Mismatched pairs are screened out based on the median cost of relative displacement in the neighborhood. The geometric transformation matrix is solved based on the minimum median error criterion of bidirectional reprojection. Interpolation resampling is performed on the second time-phase remote sensing image based on the geometric transformation matrix to form a second time-phase resampled image.
[0013] A set of stable textured pixels is selected from the first-phase remote sensing image and the second-phase resampled image. The set of stable textured pixels satisfies the requirements of consistent gradient direction and consistent local contrast energy. Based on the set of stable textured pixels, the cumulative gray level ratio between the two phases is established and a gray level mapping table is constructed. The gray level mapping table is applied to the second-phase resampled image to obtain the second-phase normalized image. The first-phase remote sensing image and the second-phase normalized image form a registration image pair.
[0014] In a preferred embodiment, the registered image pair enters a multi-branch prior coding segmentation network. The backbone semantic branch outputs a building probability map, the boundary prior branch outputs a boundary response map, and the texture suppression branch outputs a road similarity map. Non-building connected regions are eliminated based on the perimeter closure support of connected regions. The first temporal building mask and the second temporal building mask are obtained by fusing the pixel consistency of the building probability map, the boundary response map, and the road similarity map.
[0015] The intersection of the inverted first-phase building mask and the inverted second-phase building mask is used to obtain a stable region mask. The single-pixel boundary lines of the first-phase building mask and the second-phase building mask are extracted and their union is taken to obtain a building boundary map. The first-phase building mask and the second-phase building mask are marked with connected components and a buffer zone mask is constructed. The clipping window is applied to the first-phase remote sensing image and the second-phase normalized image to obtain building fragments and write them into the building fragment library.
[0016] In a preferred embodiment, a reversible style mapping network is trained using registered image pairs and a stable region mask. The stable region mask defines the range of backpropagation consistency and stable region texture consistency constraints. The reversible style mapping network generator adopts a dense block structure. The reversible style mapping network maps a first-temporal remote sensing image to a first-temporal same-style image and maps a second-temporal normalized image to a second-temporal same-style image. The same-style image pair consists of the first-temporal same-style image and the second-temporal same-style image.
[0017] In a preferred embodiment, the building boundary map is subjected to tangential and normal expansion to generate candidate building change areas. The building fragment library selects replacement source building fragments according to the boundary shape similarity criterion. The replacement source building fragment clipping mask is translated and scale-aligned and mapped to the replacement position within the candidate building change area. Pixels within the coverage area of the replacement position are replaced with pixels of the replacement source building fragment. The buffer zone is subjected to grayscale cumulative ratio alignment to form a gradual transition, resulting in a synthetic image pair and a synthetic change label map is generated simultaneously.
[0018] In a preferred embodiment, the confidence determination of the synthesized sample involves calculating the building boundary normal misalignment length and the stable area illumination direction deviation angle on the same style image pair. The stable area illumination direction deviation angle is combined with the confidence of the shadow principal direction to perform gating determination. If the gating passes, the stable area reference misalignment level is calculated within the stable area mask. The building boundary normal misalignment length and the stable area reference misalignment level are compared by the main peak segment overlap and the determination result is output. If the determination passes, the synthesized image pair and the synthesized change label map are added to the training set. If the determination fails, the position is replaced, the synthesized image pair is reselected, and a new synthesized image pair is generated.
[0019] In a preferred embodiment, a difference map is generated from images of the same style. The difference map is then stitched together with the building boundary map of the first and second time-same style images of the same style to form the input of an interactive attention change detection network. The interactive attention change detection network sets local and global encoding paths to obtain local and global features. The local and global interactive attention performs query matching and convergence on the local and global features and introduces boundary embedding features to form fused features. The decoding outputs a change evidence map and a change probability map.
[0020] In a preferred embodiment, during the training phase, the change discrimination loss is calculated using synthetic image pairs and synthetic change label maps, the boundary consistency loss is calculated using the spatial gradient of the change probability map and the building boundary map, the stable region suppression loss is calculated using the stable region mask and the change evidence map, the reverse change probability map is obtained by swapping the input order of image pairs of the same style and the consistency loss is calculated with the change probability map, and the parameters of the interactive attention change detection network are updated by summing the four types of losses to obtain the change detection model.
[0021] In a preferred embodiment, the same style image pairs and building boundary maps are input into the change detection model to obtain a positive change probability map and a negative change probability map, and a consistency score map is calculated. Within the stable region mask, bin counting smoothing is performed on the consistency score map, and the consistency threshold is determined by the valley point to the right of the main peak to obtain a consistency mask. Within the stable region mask, bin counting smoothing is performed on the absolute value of the positive change evidence map, and the residual threshold is determined by the valley point to the right of the main peak to obtain a false change risk extension mask. The positive change probability map is statistically determined by the changes within the stable region mask to obtain a change candidate mask. The intersection of the change candidate mask and the building boundary neighborhood band is used to eliminate the false change risk extension mask to obtain a reliable change map and update the building fragment library.
[0022] Building detection systems driven by the synergy of remote sensing data and AI models include:
[0023] Alignment and normalization module: Acquire the first phase remote sensing image of the target area, acquire the second phase remote sensing image of the target area, perform registration and brightness normalization, and obtain the registered image pair;
[0024] Building Prior Module: Input the registered image pairs into the multi-branch prior coding segmentation network, output the first phase building mask, output the second phase building mask, calculate the common non-building area of the two building masks to obtain the stable region mask, extract the building mask boundary to obtain the building boundary map, and crop building fragments from the two images and write them into the building fragment library.
[0025] Style synthesis module: Uses a stable region mask-constrained inverse style mapping network to achieve style unification of two temporal images. Based on the building boundary map, it limits the candidate change areas of buildings, performs building fragment structure replacement to generate synthetic image pairs and synthetic change label maps. It performs a confidence judgment on the synthetic image pairs and selects to enter the training set or regenerate according to the judgment result.
[0026] Interactive Detection Module: The interactive attention change detection network is trained using registered image pairs, image pairs of the same style, and building boundary maps. The interactive attention change detection network includes local and global interactive attention modules. During the training phase, synthetic image pairs and synthetic change label maps are used for supervision. During the training phase, stable region masks are used to constrain change evidence to reduce the response in stable regions, thus obtaining the change detection model.
[0027] Verification Iteration Module: The change detection model processes image pairs of the same style and outputs a change evidence map. The change detection model processes image pairs of the same style that have been swapped and outputs a reverse change evidence map. The change evidence map and the reverse change evidence map are compared to obtain a consistency map. The residual map is calculated within a stable region mask. Based on the consistency map and the residual map, false changes are screened out to obtain a reliable change map. The building segments corresponding to the reliable change map are added to the building segment library. The newly added building segments are used to reconstruct the synthetic image pair and update the change detection model once.
[0028] The technical effects and advantages of the building detection system and method driven by remote sensing data and AI model of this invention are as follows:
[0029] 1. Unified preprocessing: The first-phase remote sensing image and the second-phase remote sensing image are registered image pairs. The multi-branch prior coding segmentation network outputs the first-phase building mask, the second-phase building mask, the stable region mask, the building boundary map, and the building fragment library. The texture suppression branch combines the building boundary map to reduce the number of buildings that are mistakenly entered on the hardened road surface.
[0030] 2. The inverse style mapping network generates image pairs of the same style under the constraint of a mask in a stable region. In the candidate building change area, it generates synthetic image pairs and synthetic change label maps from a building fragment library. The credibility of the synthetic samples is determined by filtering out untrustworthy samples based on the building boundary normal misalignment length and the deviation angle of the lighting direction in the stable region. An interactive attention change detection network is trained to obtain a change detection model, and the positive change probability map is used to map the negative change probability. Figure 1 The consistency and stability of the mask residuals generate a reliable change map and write it back to the building fragment library to achieve self-adaptive updates. Attached Figure Description
[0031] Figure 1 This is a flowchart illustrating the building detection method driven by the collaborative use of remote sensing data and AI models according to the present invention.
[0032] Figure 2 This is a schematic diagram of the building detection system driven by remote sensing data and AI model according to the present invention. Detailed Implementation
[0033] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0034] Example 1: Figure 1 This invention presents a building detection method driven by the collaborative integration of remote sensing data and an AI model, comprising:
[0035] S1: Acquire the first-phase remote sensing image of the target area, acquire the second-phase remote sensing image of the target area, perform registration and brightness normalization to obtain the registered image pair.
[0036] S2: Input the registered image pairs into the multi-branch prior coding segmentation network, output the first temporal building mask, output the second temporal building mask, calculate the common non-building area of the two building masks to obtain the stable region mask, extract the building mask boundary to obtain the building boundary map, and crop building fragments from the two images and write them into the building fragment library.
[0037] S3: Use a stable region mask-constrained inverse style mapping network to achieve style unification of two temporal images. Based on the building boundary map, limit the candidate change areas of buildings and perform building fragment structure replacement to generate synthetic image pairs and synthetic change label maps. Perform credibility judgment on the synthetic image pairs and select to enter the training set or regenerate according to the judgment result.
[0038] S4: Train the interactive attention change detection network using registered image pairs, image pairs of the same style, and building boundary maps. The interactive attention change detection network includes local and global interactive attention modules. During the training phase, synthetic image pairs and synthetic change label maps are used for supervision. During the training phase, stable region masks are used to constrain change evidence to reduce the response in stable regions, thus obtaining the change detection model.
[0039] S5: The change detection model processes image pairs of the same style and outputs a change evidence map. The change detection model processes image pairs of the same style that have been swapped and outputs a reverse change evidence map. The change evidence map and the reverse change evidence map are compared to obtain a consistency map. The residual map is calculated in the stable region mask. Based on the consistency map and the residual map, false changes are screened out to obtain a reliable change map. The building fragments corresponding to the reliable change map are added to the building fragment library. The newly added building fragments are used to reconstruct the synthetic image pair and update the change detection model once.
[0040] In building change detection scenarios, first-phase and second-phase remote sensing images often originate from different imaging times, resulting in geometric misalignment and overall shifts in brightness and contrast. Building change detection emphasizes the comparability of boundary locations; image alignment alone, achieving spatial alignment, is insufficient for reliable building segmentation and change discrimination. Inconsistent brightness scales can misinterpret differences in shadows and material reflections as structural changes. Step S1 aims to transform the two temporal images into a registered image pair that corresponds pixel-by-pixel and has a consistent brightness scale. However, urban textures are complex, with similar textures on paved roads and rooftops. Simply relying on registration based on similar grayscale levels can easily lead to mismatches and local distortions. Therefore, a processing logic that preserves edge structure while suppressing mismatches must be introduced.
[0041] S101 Feature Extraction and Candidate Matching.
[0042] Corner points and line segment intersections are stable geometric structures in urban remote sensing imagery, less affected by overall brightness drift, and can provide clear positioning at building edges and road intersections. Feature extraction was performed on the first and second time-phase remote sensing images respectively. Feature extraction included two types of locations: one type came from locations where local gray-level changes were significant in both orthogonal directions, and the other type came from the intersection points formed by the intersection of two or more line segments after line segment detection.
[0043] Each feature location constructs a local orientation description, which is formed by statistically analyzing the gradient directions of multiple sampling points within the neighborhood. The gradient is calculated from the gray-level difference between adjacent pixels, and the gradient direction is determined by a combination of horizontal and vertical differences. Candidate matching employs local orientation consistency filtering. Feature locations from the first and second time phases are paired within a defined search range. During pairing, the orientation similarity is calculated point-by-point within the homomorphic neighborhood of the two locations. The orientation similarity calculation involves multiplying the corresponding gradient vector components, summing the results, and then dividing by the product of the two gradient magnitudes, while adding a small positive number to avoid division by zero. The average of all orientation similarities within the neighborhood yields the orientation consistency score. Pairings meeting the orientation consistency score are retained and added to the initial pairing set. The initial pairing set tends to retain correspondences between the same building edges or the same road edges, significantly reducing the probability of mistaking shadow textures for structural correspondences, making subsequent geometric consistency filtering more likely to converge.
[0044] S102 Neighborhood Geometric Consistency Screening and Geometric Transformation Solution.
[0045] Urban areas contain repetitive textures, and the initial pairing set may still contain mispairings. These mispairings are amplified into local distortions during geometric solving, directly affecting building boundary alignment. Neighborhood geometric consistency screening uses relative displacement stability as the criterion. For each pair in the initial pairing set, spatial nearest neighbors are selected around the first temporal characteristic position to form a neighborhood set. For each pair in the neighborhood set, the difference vector between the relative vectors of the first temporal nearest neighbor positions and the relative vectors of the second temporal nearest neighbor positions is calculated. The length of the difference vector reflects the degree of consistency in relative displacement. The median value of all nearest neighbor difference lengths for a pair is taken as the geometric consistency cost. The median value is not sensitive to a small number of outlier mispairings. Pairings whose geometric consistency cost does not exceed the median level of the geometric consistency cost of all pairs are retained, forming the consistency screening set. The consistency screening set is used to solve the geometric transformation, which adopts a planar projection mapping form. The solution criterion is to minimize the median of the two-way reprojection error. The bidirectional reprojection error consists of two parts. One part maps the second-phase feature position to the first-phase coordinate system through a geometric transformation and compares the pixel distance with the first-phase feature position. The other part maps the first-phase feature position to the second-phase coordinate system through the inverse geometric transformation and compares the pixel distance with the second-phase feature position. The two distances are added together to form the bidirectional error. The median value is taken for all pairs, and the geometric transformation that minimizes the median value is found. The bidirectional error can simultaneously constrain the mapping consistency in both directions, and it can remain stable even in urban scenes with large viewing angle differences and local distortions. The geometric transformation has a higher degree of fit to building edges and road edges.
[0046] S103 resampling creates a spatially consistent image.
[0047] Geometric transformations only provide coordinate mapping relationships; the image pixel grids remain different. Building outlines will exhibit sub-pixel to multi-pixel misalignment in the two images. Change detection is extremely sensitive to boundary positions, necessitating resampling of the second-temporal image onto the first-temporal image grid. Based on the geometric transformation, the corresponding continuous coordinate position in the second temporal phase is calculated for each pixel position in the first-temporal image. This continuous coordinate position is obtained by applying the geometric transformation to the pixel position. A fixed-size interpolation neighborhood is taken around the continuous coordinate position, consisting of multiple integer pixel positions near the continuous coordinate. Bicubic interpolation is used, which calculates the grayscale value at the continuous coordinate using the grayscale values of multiple rows and columns of pixels within the interpolation neighborhood and distance weights. The distance weight is obtained by first squaring the horizontal and vertical distances separately, summing them, and then taking the square root. The reciprocal of this sum is then used to obtain the distance weight. The weight function uses a continuously differentiable cubic convolution kernel. The second temporal resampled image is obtained by resampling. The first temporal remote sensing image and the second temporal resampled image are in the same spatial grid. The building boundary and the road edge form a one-to-one correspondence at the pixel level. The subsequent brightness normalization will not treat the edge difference as a brightness difference due to spatial misalignment.
[0048] S104 stable texture band constrained brightness normalization and registration image pair output.
[0049] Spatial consistency alone is insufficient for reliable comparisons. Variations in solar altitude angle and atmospheric scattering cause overall brightness drift, while differences in building shadows and roof reflections create systematic shifts between time phases. If brightness normalization is applied directly to the entire image, areas of actual change will be mapped and incorrectly flattened. Stable texture band constraints select pixel sets from spatially consistent imagery that are more likely to belong to invariant features and have stable textures; these pixel sets are used to establish the brightness map. The stable texture band selection adopts two consistency conditions in combination: The first consistency condition is gradient direction consistency. The gradient vector direction similarity is calculated at the same pixel position in the first time-phase remote sensing image and the second time-phase resampled image. The direction similarity is obtained by multiplying the gradient vector components, summing them, and then dividing by the product of the two gradient magnitudes. A small positive number is added to avoid division by zero. A direction similarity close to one indicates that the edge direction is consistent. The second consistency condition is local contrast consistency. A fixed neighborhood is taken at the same pixel position, and the gradient magnitude of each pixel in the neighborhood is added to obtain the local contrast energy. Then the ratio of the local contrast energy of the two time phases is calculated, the logarithm is taken, and the absolute value is taken. An absolute value close to zero indicates that the local contrast of the two time phases is close.
[0050] The stable texture band pixel set is obtained by the intersection of pixels with high directional similarity and low contrast deviation. The selection process uses a quantile method to determine the boundary between high and low levels. The quantile method involves selecting a certain proportion of the upper and lower intervals across the entire pixel distribution to avoid the influence of extreme values. After determining the stable texture band pixel set, the cumulative grayscale ratio of the first-time-phase remote sensing image and the second-time-phase resampled image on the stable texture band pixel set is statistically analyzed. The cumulative grayscale ratio is established by calculating the proportion of pixels in the stable texture band pixel set whose grayscale value does not exceed any grayscale threshold for any given threshold; this proportion increases monotonically as the threshold increases.
[0051] Gray-scale mapping employs a cumulative scaling alignment method. A gray-scale value in the second-phase resampled image corresponds to a percentage on the second-phase cumulative scaling curve. The gray-scale value with the same percentage is found on the first-phase cumulative scaling curve, and the mapping replaces the second-phase gray-scale value with the first-phase gray-scale value. The mapping is performed on the entire second-phase resampled image to obtain the second-phase normalized image. The first-phase remote sensing image and the second-phase normalized image form a registered image pair. The registered image pair possesses both spatial and brightness scale consistency properties. Stable texture band constraints establish the mapping on a more reliable, non-changing texture, significantly reducing pseudo-variations caused by building shadows and material differences, while preserving local structural differences at building edges.
[0052] After step S1 is completed, a registered image pair is formed. The registered image pair maintains stable geometric consistency in areas with complex urban textures, while avoiding misinterpreting differences in shadows and reflections as structural changes at the brightness scale. The uniformity of the spatial grid and brightness scale of the registered image pair enables the multi-branch prior coding segmentation network in step S2 to stably output the first-phase and second-phase building masks, and reliably generate stable region masks and building boundary maps based on them. This ensures that the boundary positions and texture distribution have a consistent reference when cropping the building fragment library, reducing uncontrollable deviations introduced by subsequent style unification and structural replacement.
[0053] When the building change detection proceeds to step S2, the registered image pairs have already achieved spatial mesh unification and brightness scale unification. However, the image content still contains urban texture aliasing, and roof textures and hardened road surfaces show similarities in local textures. Building boundary neighborhoods also exhibit both shadow edges and material reflection edges. If building segmentation relies solely on the semantic features of a single path, roads and plazas are easily misclassified as building areas, resulting in jagged edges and breaks at the boundaries. Step S2 employs a multi-branch prior coding segmentation network, incorporating the overall building area provided by the semantic branch, the contour cues provided by the boundary prior branch, and the background suppression cues provided by the texture suppression branch into the same segmentation process. This outputs a first-phase building mask, a second-phase building mask, a stable region mask, a building boundary map, and a building fragment library, ensuring that subsequent style unification and structural replacement are carried out around the building target.
[0054] S201 Prior Input Construction and Three-Branch Input Organization.
[0055] Urban building boundaries and road edges often exhibit similar brightness gradients, roof textures display multi-directional details, while paved road surfaces show unidirectional extension. A single image intensity is insufficient to stably distinguish between these two types of areas. The registered image pair comprises a first-phase remote sensing image and a second-phase normalized image. First, gradient magnitude maps are calculated on both images. These gradient magnitude maps are obtained from both horizontal and vertical gray-level differences. Specifically, for each pixel, the gray-level difference between its left and right adjacent pixels is calculated to obtain the horizontal difference, and the gray-level difference between its top and bottom adjacent pixels is calculated to obtain the vertical difference. Then, the square root of the sum of the squares of the two differences is taken to obtain the gradient magnitude.
[0056] Subsequently, directional dispersion maps are calculated on both images. These maps are obtained by statistically analyzing gradient directions within their neighborhoods. Specifically, the gradient direction of each pixel is assigned to a preset directional interval within a fixed neighborhood. The percentage of pixels in each directional interval is calculated, normalized to a sum of one, and then the directional dispersion is obtained by multiplying each interval's percentage by its own logarithm and summing the results, taking the negative value. The main semantic branch receives the first-temporal remote sensing image and the second-temporal normalized image, the boundary prior branch receives the gradient magnitude maps from both temporal phases, and the texture suppression branch receives the directional dispersion maps from both temporal phases.
[0057] The three types of inputs simultaneously provide the network with the overall building structure, boundary strength, and texture direction structure, and can still maintain segmentation and discrimination information even when the building and road textures are similar.
[0058] S202 Multi-branch Prior Encoding Segmentation and Two-Temporal Building Mask Generation.
[0059] Building areas in urban imagery exhibit overall connectivity and boundary closure. Paved road surfaces, based on local texture, readily enter high-confidence regions in the semantic branch. Boundary cues and texture cues need to participate in the same decision-making process. The multi-branch prior coding segmentation network first outputs two-temporal building probability maps from the backbone semantic branch, representing the confidence level of each pixel belonging to a building. The boundary prior branch outputs two-temporal boundary response maps, representing the contour intensity at each pixel. The texture suppression branch outputs two-temporal road similarity maps, representing the confidence level of each pixel exhibiting the texture features of paved road surfaces. The three-branch fusion process is completed in two stages: The first stage performs geometric closure support screening, calculating the perimeter closure support for each candidate building connected region in the building probability map. The perimeter closure support is obtained by the proportion of pixels whose boundary response meets the threshold condition. Connected regions with insufficient closure support are removed from the candidates. The second stage performs pixel-level consistency fusion, taking the minimum value among the building probability value, boundary response value, and road similarity inverse value for each pixel as the fusion score. The fusion score is compared with the building determination threshold to obtain a binary result, which forms the first-phase building mask and the second-phase building mask, respectively. The fusion method requires semantic support, boundary support, and background suppression to be simultaneously achieved, resulting in a more complete building region outline, suppressed road mis-entry, and a significant reduction in jagged edges and holes on building edges.
[0060] Building probability value: The main semantic branch performs multi-scale convolutional encoding and decoding on the registered image pairs, and outputs the posterior probability of belonging to the building category at each pixel position as the building probability value.
[0061] Boundary response value: The boundary prior branch calculates the gradient magnitude and gradient direction consistency from the registered image pair and performs high-frequency enhancement, outputting the edge intensity as the boundary response value at each pixel location.
[0062] Road similarity: The texture suppression branch extracts local binary pattern histograms and directional gradient histograms in the pixel neighborhood and concatenates them into a texture vector. Then, it calculates the cosine similarity with the road texture prototype learned from non-building hardened ground samples to obtain the road similarity.
[0063] S203 stable region mask generation.
[0064] Style consistency training and reliable judgment require stable non-building regions as references. If building pixels are mixed into the reference region, it will introduce building change information into the stability constraints and cause deviations. The stable region mask is generated from the common non-building regions of the first-phase building mask and the second-phase building mask. Specifically, at each pixel position, the condition that the first-phase building mask and the second-phase building mask are both zeroed is checked. If the condition is true, the stable region mask is set to one; otherwise, it is set to zero. The stable region mask only retains the locations that are consistently judged as non-buildings in both phases. The stable region mask covers areas such as roads, squares, water surfaces, and vegetation. The stable region mask has stronger temporal consistency, a cleaner reference region, and more stable style consistency constraints.
[0065] S204 Building Boundary Map Generation.
[0066] Candidate change regions require boundary representations with linear structures. Region masks do not directly provide boundary direction and location; directly using region masks for expansion would mix internal textures with the external background in the same neighborhood. The building boundary map is obtained by extracting single-pixel-width boundary lines from two temporal building masks and then performing a union operation. Boundary line extraction uses morphological boundary operators. Specifically, an erosion operation is performed on the building mask to obtain a shrunken building mask. The erosion operation uses a fixed structuring element to shrink the boundary inward by one structuring element scale. Then, the shrunken building mask is subtracted from the original building mask to obtain the boundary line. The boundary line result is then binarized to ensure only zero and one values. The first-temporal boundary line and the second-temporal boundary line are combined at the pixel level to form the building boundary map. The building boundary map transforms the building outline from a region representation to a line representation. Line representation facilitates consistent directional expansion, making candidate change regions more closely resemble the real building shape, and providing more robust structural replacement positioning.
[0067] S205 building fragment library generation.
[0068] Structural replacement requires real architectural texture fragments. Directly cropping the interior of a building will result in texture breaks at the replacement boundary. Cropping that includes boundary transition textures can reduce splicing artifacts. The architectural fragment library is obtained by cropping guided by two-phase architectural masks. Specifically, connected component marking is performed in the first-phase architectural mask to obtain a set of connected components for the first phase, and then in the second-phase architectural mask to obtain a set of connected components for the second phase. A buffer band mask is constructed for each connected component. The buffer band mask is obtained by first performing a dilation operation on the connected component to obtain the expanded region, and then subtracting the original connected component from the expanded region. The dilation operation uses a fixed structuring element to expand the boundary outward by one structuring element scale. The connected component mask and the buffer band mask are combined at the pixel level to obtain the cropping mask. The minimum bounding rectangle of the cropping mask determines the cropping window, and cropping constraints are applied to the cropping window at the image boundary to prevent out-of-bounds errors. The cropping window is applied to the first-phase remote sensing image and the second-phase normalized image, respectively, to obtain building fragments containing both the building's own texture and boundary transition texture. These building fragments, along with the cropping mask, are written into a building fragment library. The building fragment library provides a realistic texture source for structural replacement, and the buffer band ensures a continuous transition at the replacement boundary, significantly reducing the stitching artifacts of the composite image pairs.
[0069] Step S2 outputs a first-phase building mask, a second-phase building mask, a stable region mask, a building boundary map, and a building fragment library. The first-phase and second-phase building masks provide explicit representations of building regions in both phases, the stable region mask provides stable reference regions, the building boundary map provides an outline structure representation, and the building fragment library provides a set of real building texture fragments. These four outputs satisfy the constraints of style uniformity on the stable region mask, the limitations of candidate change areas on the building boundary map, and the texture source requirements of structural replacement for the building fragment library. The building change detection process maintains interpretable segmentation results and controllable sample construction conditions even in complex urban texture scenes.
[0070] The registered image pairs have ensured that the first-temporal remote sensing image and the second-temporal normalized image are on the same spatial grid and have a uniform brightness scale. Step S2 has already output the first-temporal building mask, the second-temporal building mask, the stable region mask, the building boundary map, and the building fragment library. Urban remote sensing images still show differences in shadow direction and material reflection at different imaging times. If the synthetic image pairs generated by structure replacement have boundary misalignment or shadow pseudo-differences, the change detection model will treat the pseudo-differences as evidence of change. However, step S3 needs to complete style unification, complete structure replacement generation, and complete credibility judgment to keep risky samples out of the training input without destroying the real change clues, so that image pairs of the same style and synthetic image pairs have stable comparability.
[0071] Inverse style unification training with S301 stable region constraints.
[0072] The main differences between two temporal remote sensing images often stem from changes in imaging conditions rather than changes in ground features. Building change detection focuses on the comparability of stable regions, and a stable region mask provides a reference region without building pixels. The reversible style mapping network takes registered image pairs as input. During training, the first temporal remote sensing image is fed into the reversible style mapping network to obtain a first-temporal image with the same style, and the second temporal normalized image is fed into the reversible style mapping network to obtain a second-temporal image with the same style.
[0073] The inverse constraint is executed using an input-backtracking consistency method. The first-temporal remote sensing image is processed by an inverse style mapping network to obtain a first-temporal style-consistent image. This first-temporal style-consistent image is then input into the inverse style mapping network again to obtain the first-temporal backtracking image. The second-temporal normalized image undergoes the same backtracking process to obtain the second-temporal backtracking image. The backtracking consistency error is calculated only at the locations where the mask is set to one in the stable region. The calculation method is to compare the absolute values of the grayscale differences between the original image and the backtracking image pixel by pixel and sum them up. Locations where the mask is set to zero in the stable region are not included in the backtracking consistency calculation.
[0074] The consistency constraint for texture in stable regions is also limited to the location of the mask in the stable region. The calculation method is to calculate the gradient direction in the first and second time-series images of the same style, respectively. The gradient direction is determined by the difference in gray levels in the horizontal and vertical directions. Then, the angle difference between the gradient directions in the two time-series images is compared and summed. The generator of the inverse style mapping network adopts a dense block structure. The dense blocks concatenate and transmit multi-layer features hierarchically, so that shallow texture details can still be preserved in deep layers, the texture direction in stable regions is more consistent, and the overall style difference caused by shadows and reflections is significantly reduced.
[0075] S302 Building Candidate Change Zone Limitation and Structural Replacement Sample Construction.
[0076] Architectural changes typically occur near or within the building's outline. The building boundary map provides the outline structure, while the building fragment library offers realistic building texture fragments and boundary buffer zone textures. Candidate change zones are formed by expanding the building boundary map, considering both the boundary tangential and normal directions simultaneously. The boundary tangential direction is obtained by connecting the local boundary points of the building boundary map along the main direction, while the boundary normal direction is obtained by rotating the boundary tangential direction 90 degrees. Linear expansion structural elements are generated along both directions and applied to the building boundary map. The union of the two expansion results forms the candidate change zone.
[0077] The structural replacement selects a replacement source building fragment from a building fragment library, based on similarity in boundary shape. The boundary shape is obtained from the boundary chain code of the building fragment clipping mask, which is then converted into a curvature sequence. The similarity of the curvature sequences is measured by the median absolute value of the curvature difference at corresponding locations; building fragments with smaller metrics are prioritized as candidates. The structural replacement locates the replacement position within the candidate building change area. The clipping mask of the replacement source building fragment is translated and scale-aligned to the replacement position. Pixels within the clipping mask's coverage area are directly taken from the replacement source building fragment. A gradual transition is achieved using cumulative grayscale ratio alignment in the boundary buffer band. This is done by statistically analyzing the cumulative grayscale ratio curve of the replacement source within the buffer band and the cumulative grayscale ratio curve of the target location's neighborhood, then mapping the grayscale of the replacement source buffer band to the grayscale distribution of the target neighborhood, making the grayscale change in the buffer band more natural. The composite image pair is obtained by structural replacement of the first time-same style image and the second time-same style image. The composite change label map is directly generated by the replacement mask, and the boundary of the composite change label map is aligned with the local direction of the building boundary map, so that the change label presents the building outline features, and the stitching edge continuity of the composite image pair is stronger.
[0078] S303 Calculation of the normal misalignment length of building boundary.
[0079] Boundary misalignment is the most typical source of pseudo-change in synthetic samples. Boundary misalignment often manifests as a shift in the building outline along the normal direction between two time phases, and change detection networks are highly sensitive to this shift. The building boundary normal misalignment length is calculated on the same style image pair, with the dimension being ground length and the unit being meters. The calculation is performed in two steps: First, a set of boundary normal detection lines is constructed. A set of boundary sampling points is selected on the building boundary map at fixed pixel intervals. For each boundary sampling point, the local boundary direction is calculated in its neighborhood. The local boundary direction is taken as the main direction of the line connecting the neighboring boundary points, and the boundary normal direction is taken as the perpendicular direction of the local boundary direction. A one-dimensional detection line is generated from the boundary sampling point to both sides along the boundary normal direction, and the length of the detection line is set according to a fixed pixel length. Second, edge polarity consistency matching is performed. A one-dimensional gray-level difference sequence is calculated along each detection line on the same style image at the first time and the same style image at the second time. The sign of the one-dimensional gray-level difference sequence represents the polarity from bright to dark or dark to bright, and the absolute value of the one-dimensional gray-level difference sequence represents the edge intensity. The peak position with the largest absolute value is found and the peak polarity is recorded.
[0080] When the peak polarity of the first time phase is consistent with that of the second time phase, the difference in position between the two peaks is taken as the effective misalignment. When the peak polarities are inconsistent, the misalignment result of the probe line is ignored. The effective misalignment result is multiplied by the pixel ground resolution to obtain the ground misalignment length set. The ground misalignment length set is constructed into a segmented counting distribution. The misalignment segment with the highest count is taken as the main peak misalignment segment, and the misalignment length corresponding to the main peak misalignment segment is taken as the building boundary normal misalignment length. The building boundary normal misalignment length uses the normal probe line to lock the boundary direction, further reducing mismatches caused by tangential texture repetition. The misalignment result is expressed as ground length, which is more interpretable.
[0081] Calculation of illumination direction deviation angle in the stable region of S304.
[0082] Changes in shadow direction can cause significant brightness variations in stable feature areas. When the shadow edge is close to the building boundary, the change detection network may mistake shadow differences for building changes. The illumination direction deviation angle in stable areas is calculated on image pairs of the same style, with the dimension in degrees. The calculation is performed in two steps: First, shadow cues in stable areas are extracted. Candidate shadow pixels are selected at a position in the mask of the stable area. Candidate shadow pixels must meet the following conditions: their grayscale level is in the low range of their neighborhood grayscale ranking, and there must be a significant brightness jump in the neighborhood. The brightness jump is determined by the gradient magnitude reaching a threshold. Connectivity is marked for the candidate shadow pixels. The shape extensibility of the connected components is determined by the ratio of the principal axis length to the secondary axis length. Connectivity with insufficient extensibility is discarded, and shadow connected components with clear extensibility are retained. Second, the illumination direction is estimated and the angle deviation is calculated. Each shadow connected component is refined to obtain the skeleton line. The refinement process uses a method of peeling away boundary pixels layer by layer to retain the centerline structure of the connected components. The adjacent points of the skeleton line are connected to form a direction set. The direction set is counted according to the direction interval to form a direction histogram distribution. The direction interval with the highest count is taken as the main direction of shadow extension. The illumination direction is taken as the opposite of the main direction of shadow extension. The illumination direction angles are obtained from the first and second time-series images of the same style. The difference between the two illumination direction angles is taken as the minimum angle and converted into degrees to obtain the illumination direction deviation angle in the stable region. The illumination direction deviation angle in the stable region expresses the change of the main direction of shadow in terms of angle. The stable region mask limits the analysis range, and the building change area will not interfere with the shadow direction estimation, resulting in more stable judgment results.
[0083] S305 Gating Decision and Confidential Decision-Making for Synthetic Samples.
[0084] The risks of synthetic image pairs include both geometric misalignment and imaging perturbation. Neither boundary misalignment nor shadow angle alone can cover both types of risks. The gating system uses the stable region illumination direction deviation angle as the imaging perturbation gating signal, the building boundary normal misalignment length as the structural reliability signal, and introduces a stable region reference misalignment level as a reference. The confidence level of the shadow principal direction is obtained by dividing the highest count of the shadow direction histogram distribution by the total count. The confidence level of the shadow principal direction reflects whether the shadow extension principal direction is concentrated; a low concentration indicates unstable shadow direction estimation. The gating system first determines whether the confidence level of the shadow principal direction has reached a stable level. If the confidence level is stable, it then determines whether the stable region illumination direction deviation angle is within a stable range. The stable range is derived from the historical statistical upper bound or the operational statistical upper bound within the stable region mask.
[0085] When the gating conditions are met, the reference misalignment level of the stable region is calculated. The calculation method is the same as that of the building boundary normal misalignment length. The difference is that the probe line originates from the stable edge segment within the stable region mask. The stable edge segment simultaneously satisfies the condition of consistent gradient direction for images of the same style in both time periods. The normal probe lines of the stable edge segment are matched to obtain the stable misalignment length set. The main peak misalignment segment of the stable misalignment length set corresponds to the reference misalignment level of the stable region. The reliability decision of the synthetic sample adopts the main peak segment overlap rule. The main peak misalignment segment where the building boundary normal misalignment length falls into the reference misalignment level of the stable region is judged as passing, and the main peak misalignment segment where the building boundary normal misalignment length falls out of the main peak misalignment segment is judged as failing. When failing, the structure replacement position is reselected and the synthetic image pair is regenerated. The gating decision separates the unstable shadow direction scene from the boundary misalignment risk scene, making the synthetic image pairs entering the training set more consistent, the consistency between the change label and the building boundary stronger, and the contamination of pseudo-change samples significantly reduced.
[0086] Step 3 outputs style-matched image pairs, composite image pairs, and composite change label maps, along with the reliability judgment results for the composite samples. The stable region mask limits the consistency range during style unification training, the building boundary map provides contour representation in defining candidate change areas, and the building fragment library provides a source of realistic textures during structural replacement. The building boundary normal misalignment length and the stable region illumination direction deviation angle jointly constrain the composite samples to enter the training set. The naturalness of the composite sample boundaries and the consistency of the imaging are clearly controlled, and the change detection training stage focuses more on the changes in the building structure itself.
[0087] The registered image pairs have completed spatial grid unification and brightness scale unification. Step S2 has output the first-phase and second-phase building masks and generated stable region masks and building boundary maps. Step 3 has generated image pairs of the same style and constructed synthetic image pairs and synthetic change label maps. Urban remote sensing images have residual differences in shadow direction and reflection intensity, and local stitching transitions can also produce subtle texture differences. If the change detection network relies only on single-scale features, it is easy to interpret shadow residuals as building changes. Step S4 needs to put local details and global semantics into the same inference link and transform the building boundary map and stable region mask into computable constraints, so that the change evidence is closer to the changes in building structure.
[0088] S401 Training Sample Organization and Input Construction.
[0089] The synthetic image pairs contain clear boundary changes resulting from structural replacements, the synthetic change label map indicates the pixel-level location of the changes, the same-style image pairs contain residuals from real-world imaging perturbations, the building boundary map marks the location of the building outline, and the stable region mask marks the stable reference area. Training batches consist of two types of samples: one type consists of synthetic image pairs and synthetic change label maps, and the other type consists of same-style image pairs and stable region masks from the building boundary map.
[0090] The input is constructed using image pairs of the same style to generate a difference map. At each pixel location, the difference map calculates the difference between the pixel value of the first and second time-series image of the same style, and then takes the absolute value of the difference. For multi-channel image pairs, the absolute difference is calculated for each channel, and then summed along the channel dimension to obtain the single-channel difference intensity. The network input is obtained by stitching the difference map, the first and second time-series images of the same style, and the building boundary map along the channel dimension. This allows the network to simultaneously see the intensity of change, texture details, and contour constraints. Change cues near building contours are more concentrated, while road textures and shadow textures are less likely to dominate the discrimination.
[0091] S402 dual-channel encoding extracts local and global features.
[0092] Architectural changes involve both subtle boundary displacements and the addition or subtraction of large-scale structures. In densely built-up areas, single-path features can easily lead to boundary details being obscured by semantic smoothing. The interactive attention-based change detection network employs both local and global encoding paths. The local encoding path maintains high spatial resolution and uses multi-layer convolutions to extract edge details and short-range texture associations layer by layer. The global encoding path expands the receptive field through layered downsampling and extracts the semantic context and long-range structural relationships of the building complex. The feature channels of the two encoding paths are aligned using a one-to-one convolution mapping. This one-to-one convolution performs a linear transformation on the channel vector at each pixel position, maintaining the spatial size but unifying the channel dimension to avoid scale bias in subsequent interactive calculations. Local features carry detailed orientations of roof and wall boundaries, while global features carry the outline of the building complex and background semantics. Parallel execution of both paths makes it more difficult for the fragmented noise in densely built-up areas to form evidence of continuous change.
[0093] The interactive attention change detection network consists of an input construction module, a local encoding path, a global encoding path, a local-global interactive attention module, a boundary embedding module, and a decoding output module.
[0094] The input construction module overlays the first time-same style image and the second time-same style image by channel, and simultaneously calculates the pixel-wise absolute difference map of the two time-same style images. Then, the building boundary map is overlaid as an independent channel to form the network input tensor.
[0095] The local encoding path employs multi-layer convolutional residual blocks while maintaining high spatial resolution, extracting edge textures and short-range structural relationships layer by layer, and outputting a multi-scale local feature set.
[0096] The global encoding path uses hierarchical downsampling convolutional residual blocks to expand the receptive field layer by layer, extract the semantic and long-range structural relationships of building clusters, and output a multi-scale global feature set.
[0097] The boundary embedding module maps the building boundary map to a resolution consistent with the features at each scale through continuous convolution and downsampling, resulting in a multi-scale boundary embedding feature set. The boundary embedding features are concatenated with local and global features at each scale by channel, and then channel alignment is completed by one-to-one convolution to ensure that the boundary information enters the subsequent interactive calculation.
[0098] The local-global interactive attention module performs bidirectional query matching at each scale. Local features generate query vectors, and global features generate key vectors and value vectors. The query vectors and key vectors are calculated for similarity and then normalized to obtain the attention distribution. The attention distribution is weighted and converged on the value vectors to obtain local interactive features constrained by the global. At the same time, the global features perform query matching on the local features in the same way to obtain global interactive features constrained by local details. The two types of interactive features are then concatenated with the boundary embedding features at the same scale to form a fused feature.
[0099] The decoding output module uses progressive upsampling and convolution to restore spatial resolution, and incorporates the scale features corresponding to the local encoding path into the decoding process through skip connections. The decoding output includes a change evidence map and a change probability map. The role of the building boundary map in the training phase is divided into two lines. One line enters the feature and attention calculation through the boundary embedding module, making the attention distribution more concentrated in the neighborhood of the building outline. The other line is used for boundary consistency constraints. The boundary consistency constraints calculate the spatial gradient intensity map from the change probability map. The spatial gradient intensity map and the building boundary map are evaluated pixel by pixel and a penalty term is formed to make the probability transition position of the change probability map fit the boundary position of the building boundary map, thereby structurally suppressing large-area probability drift inside the building and false triggering of background textures.
[0100] S403 Local and Global Interactive Attention Forms Interactive Features.
[0101] Directly concatenating local and global features can mix local noise with global semantics in the same representation. Shadow edges are easily misinterpreted as change boundaries in local features, requiring global semantics to participate in the filtering and interpretation. The local-global interactive attention module first maps local features to query features using a 1x1 convolution, and maps global features to key and value features using two sets of 1x1 convolutions. Then, at each local location, the intra-channel dot product similarity between the query feature and the key features at each global location is calculated. This similarity is normalized along the channel dimension and then exponentially normalized to obtain the attention distribution corresponding to the local location. This attention distribution satisfies normalization constraints in the global space. The attention distribution is then used to perform positional aggregation on the global value features, resulting in interactive features that correspond one-to-one with the local locations. The interactive features and local features are concatenated along the channel dimension. Simultaneously, the building boundary map is input into the boundary embedding map. The boundary embedding map uses continuous convolutions to transform the binary boundary lines into learnable boundary features, which are then merged with the concatenated result to form a fused feature. This interactive mechanism subjectes local boundary changes to global semantic constraints, making differences in shadow direction more easily interpreted as imaging perturbations rather than building changes.
[0102] The S404 decoder outputs a change evidence graph and a change probability graph.
[0103] Change discrimination requires a continuous intensity map to represent the distribution of change evidence, and a probability map to represent the confidence level of pixel-level changes. Continuous intensity is more conducive to suppressing stable regions, while probability is more conducive to label supervision. The decoding path receives fused features and performs multi-scale upsampling to restore spatial resolution. Upsampling uses a combination of interpolation and convolution to avoid boundary blurring caused by direct interpolation. The decoding path also incorporates high-resolution features from the local encoding path and performs skip connections. Skip connections concatenate and fuse high-resolution details with the decoded features at the same spatial scale, ensuring the continuity of subtle changes near building boundaries. The decoding output is a change evidence map, which is a real-valued intensity map. The change evidence map is then converted into a change probability map by a monotonic exponential compression function. The compression function maps any real value to a closed interval between zero and one. Positive intensity corresponds to a probability closer to one, and negative intensity corresponds to a probability closer to zero. The probability gradient near the building outline is clearer, and stable regions are less likely to exhibit large areas of high-probability responses.
[0104] S405 supervised constraint and stable region inhibition joint training.
[0105] The synthesized image pairs have clearly defined change locations. The synthesized change label map must drive the network to learn change discrimination boundaries. The stable region mask must suppress pseudo-changes in stable regions. The building boundary map must pull change edges towards the building outline. Temporal exchange consistency must constrain accidental texture responses. The change discrimination loss is calculated on the synthesized image pair samples. At each pixel location, the change label map is read. When the change label indicates change, the natural logarithm of the change probability is taken and its negative value is calculated. When the change label indicates no change, the natural logarithm of the change probability is subtracted and its negative value is calculated. The change discrimination loss is accumulated across all pixels. The boundary consistency loss first calculates the spatial gradient map from the change probability map. The spatial gradient map calculates the absolute value of the probability difference between adjacent pixels in the horizontal direction at each pixel location, and then calculates the absolute value of the probability difference between adjacent pixels in the vertical direction. The two are added together to obtain the spatial gradient strength. Then, the spatial gradient map and the building boundary map are compared to calculate the consistency ratio in the form of intersection-union ratio. The intersection is calculated by taking the minimum value pixel by pixel and then summing it, and the union is calculated by taking the maximum value pixel by pixel and then summing it. Subtracting the consistency ratio gives the boundary consistency loss.
[0106] The stable region suppression loss is calculated at the stable regions marked as stable locations on the mask. The absolute value of the change evidence map is taken pixel-by-pixel and summed to bring the change evidence in stable regions close to zero. The temporal exchange consistency loss is calculated on samples of the same style image pairs. The input order of the same style image pairs is swapped to obtain the reverse change probability map. Then, the absolute value of the difference between the forward and reverse change probability maps is calculated pixel-by-pixel and summed to ensure consistency between the two inference results. The four types of losses are directly added to form the total loss, which is used to update the network parameters in reverse. After training convergence, change edges fit the building boundary map more closely, the response in stable regions is sparser, and shadow residuals are less likely to form continuous change evidence.
[0107] After step S4, the change detection model is obtained. The change detection model uses image pairs of the same style as the main input, while also incorporating a building boundary map to provide contour constraints. During the training phase, synthetic image pairs and synthetic change label maps are used to establish clear change discrimination boundaries. Stable region masks are used to suppress spurious changes in stable regions, and temporal exchange consistency constraints are used to suppress accidental texture responses. The change evidence map shows a more coherent intensity distribution in the neighborhood of the building contour, the change probability map forms a clearer spatial gradient near the building boundary, and false alarms in the areas covered by the stable region mask are significantly reduced. The output of the change detection model more closely reflects real building structural changes.
[0108] The registered image pairs have achieved spatial grid unification and brightness scale unification. Step S2 has generated stable region masks and building boundary maps. Step 3 has generated image pairs of the same style and created a building fragment library. Step S4 has trained a change detection model and output change evidence maps and change probability maps. Urban remote sensing scenes still have shadow directional and reflection residuals, and single inference is prone to random responses. Change determination needs to separate random responses from actual building structural changes and apply stable references and building outline constraints to pixel-level screening to generate reliable change maps and update the fragment library.
[0109] S501 forward reasoning generates a positive change evidence map and a positive change probability map.
[0110] Image pairs of the same style have already converged in stable regions, and pixel-level differences are closer to structural differences. Forward inference is more likely to obtain continuous and stable change responses under this input. The change detection model receives two images of the same style from the first and second time points, and uses a building boundary map as a contour prior. The model outputs a positive change evidence map and a positive change probability map. The positive change evidence map provides the change intensity at each pixel location, while the positive change probability map converts the change intensity into a confidence level between zero and one. The conversion process uses monotonic compression; higher intensity corresponds to a probability closer to one, and lower intensity corresponds to a probability closer to zero. When the building boundary map is used for inference, continuous probability gradients are more likely to form near building contours, while background textures are less likely to form large areas of high probability.
[0111] S502 exchange reasoning generates a reverse change evidence diagram and a reverse change probability diagram.
[0112] Real-world architectural structural changes are independent of the temporal input order; however, shadow edges and incidental texture responses are more sensitive to the input order. Exchange inference is used to expose these order-sensitive responses. The change detection model receives images of the same style from the second and first time periods, along with the same architectural boundary map. The model outputs a reverse change evidence map and a reverse change probability map. The reverse and positive change probability maps show similar high probabilities in real-world change areas, but a weaker difference is more likely to appear in shadow residual areas. Exchange inference forms a second, independent judgment perspective, meaning a single incidental response no longer directly determines the final change area.
[0113] S503 Consistency Map Calculation and Consistency Threshold Determination.
[0114] The difference in bidirectional change probabilities directly characterizes the order-sensitive response. The consistency score transforms this difference into a filterable strength indicator, and the stable region mask provides an adaptive source for the threshold. The consistency score is calculated at each pixel location as follows: first, the difference between the positive and negative change probabilities is taken; then, the absolute value of the difference is taken to obtain the probability difference strength. Finally, the consistency score is obtained by subtracting the probability difference strength from one. The closer the consistency score is to one, the more consistent the two inferences are. To avoid outliers causing the consistency score to exceed the limit, the probability difference strength is limited to between zero and one. The consistency threshold is statistically obtained from within the stable region mask. This is achieved by collecting consistency scores at the mask's coverage area and constructing a bin count distribution. The bin count distribution is first smoothed by summing the counts of adjacent bins, then the bin with the highest count is identified as the main peak. Subsequently, a significant valley point appears to the right of the main peak after the first continuous decline, and the consistency score corresponding to this valley point is used as the consistency threshold. The consistency mask determines whether the consistency score at each pixel position is not lower than the consistency threshold. Pixels that meet the condition are marked as consistent regions, and pixels that do not meet the condition are marked as inconsistent regions. Consistent regions are closer to the stable response pattern of real changes.
[0115] S504 Stable Residual Map Calculation and Pseudo-Change Risk Extension Mask Generation.
[0116] The stable region mask coverage area theoretically does not include building changes. Evidence of changes appearing in the stable region belongs to the imaging perturbation residuals, and the residual distribution can reflect the pseudo-change risk level of the current image pair. The calculation of the stable residual map is performed at the stable region mask coverage area. The method involves taking the value of the positive change evidence map at the corresponding pixel position, and then taking the absolute value as the residual intensity. The residual intensity in the areas not covered by the stable region mask is set to zero. The residual threshold is statistically obtained from within the stable region mask. The method involves collecting stable residual intensities and constructing a bin count distribution. The bin count distribution is smoothed by summing the counts of adjacent bins, and the bin with the highest count is identified as the main peak. Then, the first obvious valley point is located to the right of the main peak, and the residual intensity corresponding to the valley point is used as the residual threshold. The pseudo-change risk mask checks whether the residual intensity at the stable region mask coverage area is not lower than the residual threshold. Locations that meet the condition are marked as risk points. To prevent the shadow edges of stable regions from affecting the building outline neighborhood, the pseudo-change risk mask performs a morphological expansion. The expansion structural element is generated by the neighborhood width rule of the building boundary map, so that the risk impact zone covers the building boundary neighborhood, thereby including the shadow residuals near the building boundary in the risk elimination range.
[0117] S5055 Reliable Change Map Generation and Building Fragment Library Feedback Updates.
[0118] Credible changes require simultaneously satisfying high confidence and bidirectional consistency, avoiding the risk of residuals in stable regions, and being confined to the building outline neighborhood. These four constraints work together to isolate shadow residuals and splicing residuals. The change threshold is statistically derived from within the stable region mask. This is achieved by collecting the positive change probabilities of the mask's coverage locations and constructing a binning count distribution. The binning count distribution is smoothed by summing adjacent binning counts. After locating the main peak, the first obvious valley point is found to the right of the main peak, and the change probability corresponding to the valley point is used as the change threshold. The change candidate mask checks whether the positive change probability at each pixel location is not lower than the change threshold. The building boundary neighborhood is obtained by performing a fixed-width expansion on the building boundary map, with the fixed width consistent with the expansion width of the building candidate change area generated in step three. The credible change map is formed through the following logic: the change candidate mask and the consistency mask are intersected; then, false change risks are eliminated by expanding the mask coverage locations; finally, the intersection with the building boundary neighborhood is performed, resulting in a change area that is only located within the building outline neighborhood, satisfies bidirectional consistency, and avoids the risk of stable residuals. The reliable change map performs connected component labeling. For each changed connected component, the minimum bounding rectangle is calculated and expanded outward according to the width of the building fragment library buffer to obtain a clipping window. The clipping window is applied to the first and second time-series images of the same style, respectively, forming new building fragments and corresponding clipping masks. The new building fragments are written to the building fragment library. After the building fragment library is updated, synthetic image pairs and synthetic change label maps are regenerated, and the change detection model is fine-tuned. The fine-tuning training maintains the stable region mask suppression constraint and the building boundary map boundary consistency constraint, making the model more closely reflect the newly emerging building forms in the current area.
[0119] Step S5 outputs a reliable change map and completes the fragment library feedback update. The difference between forward inference and commutative inference is filtered out for order-sensitive responses using a consistency threshold. Residual statistics within the stable region mask explicitly locate the imaging perturbation risk and extend it to the building outline neighborhood. The reliable change map retains consistent high-confidence changes within the building boundary neighborhood and removes residual risk areas. New building fragments are added to the building fragment library and trigger a fine-tuning training. The change detection model further converges to reduce false positives of shadow residuals and splicing residuals, and the boundary representation of building structural changes becomes more stable.
[0120] Example 2: Figure 2 This invention presents a building detection system driven by remote sensing data and an AI model, comprising:
[0121] Alignment and normalization module: Acquire the first phase remote sensing image of the target area, acquire the second phase remote sensing image of the target area, perform registration and brightness normalization, and obtain the registered image pair;
[0122] Building Prior Module: Input the registered image pairs into the multi-branch prior coding segmentation network, output the first phase building mask, output the second phase building mask, calculate the common non-building area of the two building masks to obtain the stable region mask, extract the building mask boundary to obtain the building boundary map, and crop building fragments from the two images and write them into the building fragment library.
[0123] Style synthesis module: Uses a stable region mask-constrained inverse style mapping network to achieve style unification of two temporal images. Based on the building boundary map, it limits the candidate change areas of buildings, performs building fragment structure replacement to generate synthetic image pairs and synthetic change label maps. It performs a confidence judgment on the synthetic image pairs and selects to enter the training set or regenerate according to the judgment result.
[0124] Interactive Detection Module: The interactive attention change detection network is trained using registered image pairs, image pairs of the same style, and building boundary maps. The interactive attention change detection network includes local and global interactive attention modules. During the training phase, synthetic image pairs and synthetic change label maps are used for supervision. During the training phase, stable region masks are used to constrain change evidence to reduce the response in stable regions, thus obtaining the change detection model.
[0125] Verification Iteration Module: The change detection model processes image pairs of the same style and outputs a change evidence map. The change detection model processes image pairs of the same style that have been swapped and outputs a reverse change evidence map. The change evidence map and the reverse change evidence map are compared to obtain a consistency map. The residual map is calculated within a stable region mask. Based on the consistency map and the residual map, false changes are screened out to obtain a reliable change map. The building segments corresponding to the reliable change map are added to the building segment library. The newly added building segments are used to reconstruct the synthetic image pair and update the change detection model once.
[0126] Specifically, the above description is only a preferred embodiment of this application and is not intended to limit this application.
[0127] In the description of this specification, references to terms such as "an embodiment," "example," and "specific example" indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0128] The preferred embodiments of the present invention disclosed above are merely illustrative of the invention. These preferred embodiments do not exhaustively describe all details, nor do they limit the invention to any specific implementation. Clearly, many modifications and variations can be made based on the content of this specification. This specification selects and specifically describes these embodiments to better explain the principles and practical applications of the invention, thereby enabling those skilled in the art to better understand and utilize the invention. The invention is limited only by the claims and their full scope and equivalents.
Claims
1. A building detection method driven by remote sensing data and AI models, characterized in that, Including the following steps: S1: Acquire the first phase remote sensing image of the target area, acquire the second phase remote sensing image of the target area, perform registration and brightness normalization to obtain the registered image pair; Step S1 includes the following: Corner and line segment intersection features are extracted from the first and second time-phase remote sensing images. An initial pairing set is established based on the consistency of local gradient direction. Mismatched pairs are screened out based on the median cost of relative displacement in the neighborhood. The geometric transformation matrix is solved based on the minimum median error criterion of bidirectional reprojection. Interpolation resampling is performed on the second time-phase remote sensing image based on the geometric transformation matrix to form the second time-phase resampled image. A set of stable textured pixels is selected from the first-phase remote sensing image and the second-phase resampled image. The set of stable textured pixels satisfies the requirements of consistent gradient direction and consistent local contrast energy. Based on the set of stable textured pixels, the cumulative gray level ratio between the two phases is established and a gray level mapping table is constructed. The gray level mapping table is applied to the second-phase resampled image to obtain the second-phase normalized image. The first-phase remote sensing image and the second-phase normalized image form a registration image pair. S2: Input the registered image pairs into the multi-branch prior coding segmentation network, output the first phase building mask, output the second phase building mask, calculate the common non-building area of the two building masks to obtain the stable region mask, extract the building mask boundary to obtain the building boundary map, and crop building fragments from the two images and write them into the building fragment library. S3: Use a stable region mask-constrained inverse style mapping network to achieve style unification of two temporal images. Based on the building boundary map, limit the candidate change area of buildings and perform building fragment structure replacement to generate synthetic image pairs and synthetic change label maps. Perform a confidence judgment on the synthetic image pairs and select to enter the training set or regenerate according to the judgment result. S4: Train the interactive attention change detection network using registered image pairs, image pairs of the same style, and building boundary maps. The interactive attention change detection network includes local and global interactive attention modules. During the training phase, synthetic image pairs and synthetic change label maps are used for supervision. During the training phase, stable region masks are used to constrain change evidence to reduce the response in stable regions, thus obtaining the change detection model. Step S4 includes the following: A difference map is generated from images of the same style. The difference map is stitched together with the building boundary map of the first and second time-of-the-year images of the same style to form the input of the interactive attention change detection network. The interactive attention change detection network sets local and global encoding paths to obtain local and global features. Local and global interactive attention performs query matching and convergence on the local and global features and introduces boundary embedding features to form fused features. The decoding outputs a change evidence map and a change probability map. S5: The change detection model processes image pairs of the same style and outputs a change evidence map. The change detection model processes image pairs of the same style that have been swapped and outputs a reverse change evidence map. The change evidence map and the reverse change evidence map are compared to obtain a consistency map. The residual map is calculated in the stable region mask. Based on the consistency map and the residual map, false changes are screened out to obtain a reliable change map. The building fragments corresponding to the reliable change map are added to the building fragment library. The newly added building fragments are used to reconstruct the synthetic image pair and update the change detection model once.
2. The building detection method driven by remote sensing data and AI model according to claim 1, characterized in that, Step S2 includes the following: The registered image pairs are fed into a multi-branch prior coding segmentation network. The backbone semantic branch outputs a building probability map, the boundary prior branch outputs a boundary response map, and the texture suppression branch outputs a road similarity map. Non-building connected regions are eliminated based on the perimeter closure support of connected regions. The first-phase building mask and the second-phase building mask are obtained by fusing the pixel consistency of the building probability map, boundary response map, and road similarity map. The intersection of the inverted first-phase building mask and the inverted second-phase building mask is used to obtain a stable region mask. The single-pixel boundary lines of the first-phase building mask and the second-phase building mask are extracted and their union is taken to obtain a building boundary map. The first-phase building mask and the second-phase building mask are marked with connected components and a buffer zone mask is constructed. The clipping window is applied to the first-phase remote sensing image and the second-phase normalized image to obtain building fragments and write them into the building fragment library.
3. The building detection method driven by remote sensing data and AI model according to claim 2, characterized in that, Step S3 includes the following: The inverse style mapping network is trained using registered image pairs and stable region masks. The stable region masks limit the range of backpropagation consistency and stable region texture consistency constraints. The inverse style mapping network generator adopts a dense block structure. The inverse style mapping network maps the first time-phase remote sensing image to the first time-phase same style image and maps the second time-phase normalized image to the second time-phase same style image. The same style image pair is composed of the first time-phase same style image and the second time-phase same style image.
4. The building detection method driven by remote sensing data and AI model according to claim 3, characterized in that, Step S3 also includes the following: The building boundary map is expanded tangentially and normally to generate candidate building change areas. The building fragment library selects replacement source building fragments according to the principle of similar boundary shape. The replacement source building fragment clipping mask is translated and scale-aligned and mapped to the replacement position within the candidate building change area. Pixels within the coverage area of the replacement position are replaced with pixels of the replacement source building fragment. The buffer zone is aligned by grayscale accumulation ratio to form a gradual transition, resulting in a composite image pair and a composite change label map is generated simultaneously.
5. The building detection method driven by remote sensing data and AI model according to claim 4, characterized in that, Step S3 also includes the following: The confidence determination of the synthetic sample is based on the calculation of the building boundary normal misalignment length and the stable area illumination direction deviation angle on the same style image pair. The stable area illumination direction deviation angle is combined with the confidence of the shadow principal direction to perform gating judgment. If the gating passes, the stable area reference misalignment level is calculated in the stable area mask. The building boundary normal misalignment length and the stable area reference misalignment level are compared by the main peak segment overlap and the judgment result is output. If the judgment passes, the synthetic image pair and the synthetic change label map are added to the training set. If the judgment fails, the position is replaced, the synthetic image pair is reselected and regenerated.
6. The building detection method driven by remote sensing data and AI model according to claim 5, characterized in that, Step S4 also includes the following: During the training phase, the change discrimination loss is calculated using synthetic image pairs and synthetic change label maps, the boundary consistency loss is calculated using the spatial gradient of the change probability map and the building boundary map, the stable region suppression loss is calculated using the stable region mask and the change evidence map, and the reverse change probability map is obtained by swapping the input order of image pairs of the same style and calculating the consistency loss with the change probability map. The four types of losses are summed to update the parameters of the interactive attention change detection network to obtain the change detection model.
7. The building detection method driven by remote sensing data and AI model according to claim 6, characterized in that, Step S5 includes the following: The same style image is input into the building boundary map to obtain a positive change probability map and a negative change probability map, and a consistency score map is calculated. Within the stable region mask, the consistency score map is subjected to bin counting smoothing, and the consistency threshold is determined by the valley point to the right of the main peak to obtain a consistency mask. Within the stable region mask, the absolute value of the positive change evidence map is subjected to bin counting smoothing, and the residual threshold is determined by the valley point to the right of the main peak to obtain a false change risk extension mask. The positive change probability map is statistically determined by the internal statistics of the stable region mask to obtain a change candidate mask. The intersection of the change candidate mask, the building boundary neighborhood band, and the false change risk extension mask are removed to obtain a reliable change map and update the building fragment library.
8. A building detection system driven by remote sensing data and an AI model, used to implement the building detection method driven by remote sensing data and an AI model as described in any one of claims 1-7, characterized in that, include: Alignment and normalization module: Acquire the first phase remote sensing image of the target area, acquire the second phase remote sensing image of the target area, perform registration and brightness normalization, and obtain the registered image pair; Building Prior Module: Input the registered image pairs into the multi-branch prior coding segmentation network, output the first phase building mask, output the second phase building mask, calculate the common non-building area of the two building masks to obtain the stable region mask, extract the building mask boundary to obtain the building boundary map, and crop building fragments from the two images and write them into the building fragment library. Style synthesis module: Uses a stable region mask-constrained inverse style mapping network to achieve style unification of two temporal images. Based on the building boundary map, it limits the candidate change areas of buildings, performs building fragment structure replacement to generate synthetic image pairs and synthetic change label maps. It performs a confidence judgment on the synthetic image pairs and selects to enter the training set or regenerate according to the judgment result. Interactive Detection Module: The interactive attention change detection network is trained using registered image pairs, image pairs of the same style, and building boundary maps. The interactive attention change detection network includes local and global interactive attention modules. During the training phase, synthetic image pairs and synthetic change label maps are used for supervision. During the training phase, stable region masks are used to constrain change evidence to reduce the response in stable regions, thus obtaining the change detection model. Verification Iteration Module: The change detection model processes image pairs of the same style and outputs a change evidence map. The change detection model processes image pairs of the same style that have been swapped and outputs a reverse change evidence map. The change evidence map and the reverse change evidence map are compared to obtain a consistency map. The residual map is calculated within a stable region mask. Based on the consistency map and the residual map, false changes are screened out to obtain a reliable change map. The building segments corresponding to the reliable change map are added to the building segment library. The newly added building segments are used to reconstruct the synthetic image pair and update the change detection model once.
Citation Information
Patent Citations
Method and device for detecting building changes in remote sensing image
CN111291622A
Identification method for automatically finding new building
CN115100518A