A building contour accurate extraction method based on prior information and a related device
By using multi-source prior information guidance and generative iterative optimization, the problem of balancing local details and global structure in building contour extraction of existing models is solved, generating geometrically accurate and structurally complete building contour masks that are adaptable to complex scenes.
Patent Information
- Application Number
- CN202511494349.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-20
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2045-10-20
AI Technical Summary
Existing discriminative models struggle to balance local details with global structure, resulting in geometric distortion of building outlines. Furthermore, the single-step inference process lacks inherent corrective capabilities, making it difficult to address structural defects in initial predictions.
By introducing multi-source prior information for iterative reconstruction, including local control prior information (structural location awareness, boundary detail enhancement, spatial geometric constraints) and global control prior information (semantic guidance), generative modeling and diffusion models are used for iterative optimization to generate geometrically accurate and structurally complete building outlines.
It achieves geometric accuracy and structural integrity of building outlines, improves adaptability in complex scenes, and generates high-precision building outline masks.
Smart Images

Figure CN120953632B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image processing, and in particular to a building contour accurate extraction method based on prior information and related devices. BACKGROUND
[0002] Buildings are important spatial carriers for human habitation and social production, and the accurate extraction of their contour boundaries has important application value in the fields of urban planning, urban management, and emergency response. For example, in urban planning, high-precision building contour data can be used for land use analysis, volume rate calculation, and three-dimensional city modeling. In terms of urban management, building boundary information can support illegal building monitoring and infrastructure layout optimization. In the context of emergency response, fast and accurate building extraction is crucial for disaster assessment, such as earthquake damage analysis and flood inundation delineation.
[0003] The rapid development of deep learning technology has provided strong technical support for building extraction tasks. Semantic segmentation of remote sensing images aims to assign each pixel in the image to a corresponding semantic class label. Compared to traditional low-level feature extraction methods, semantic segmentation can directly obtain pixel-level semantic information, providing important support for image-based intelligent analysis. Semantic segmentation methods based on convolutional neural networks (CNN), such as FCN, Unet, and DeepLabV3, have made significant progress in building extraction tasks. Compared to traditional methods, deep learning models can automatically learn high-dimensional features and achieve efficient pixel-level classification in an end-to-end training framework. Huang et al. proposed an improved DeconvNet, which added upsampling and dense connection operations to the deconvolution layer to improve building extraction performance. Maggiori et al. designed a two-stage network to comprehensively address building recognition and precise positioning issues. Shao et al. proposed the BRRNet network, which uses residual modules to repair the generated prediction map to improve the final segmentation accuracy. Yang et al. proposed a crack segmentation network based on the DeepLabv3+ architecture, which can improve the detection accuracy of cracks of different scales.
[0004] However, existing discriminative models in the prior art cannot balance local details and global structures, leading to geometric distortion of building contours. The single-step reasoning process lacks intrinsic correction ability and is difficult to address structural defects in initial predictions. SUMMARY
[0005] The present application aims to overcome the shortcomings of the prior art and provides a building contour accurate extraction method based on prior information and related devices, which achieves significant benefits in terms of geometric accuracy, structural integrity, and adaptability to complex scenarios.
[0006] To solve the above technical problems, the embodiment of the present application provides a building contour accurate extraction method based on prior information, which comprises:
[0007] Obtaining remote sensing image data, performing prior information mining processing on the contour extraction of the remote sensing image data, obtaining contour extraction prior information corresponding to the remote sensing image data, wherein the contour extraction prior information comprises local control prior information and global control prior information;
[0008] Inputting the remote sensing image data and the contour extraction prior information into a building contour extraction reasoning model, and performing iterative reconstruction processing on the remote sensing image data in the building contour extraction reasoning model with the contour extraction prior information as the coordination guide, and outputting the accurate contour mask corresponding to the building in the remote sensing image data.
[0009] Optionally, the prior information mining processing on the contour extraction of the remote sensing image data to obtain the contour extraction prior information corresponding to the remote sensing image data comprises:
[0010] Performing local control prior information mining processing on the contour extraction of the remote sensing image data to obtain local control prior information corresponding to the remote sensing image data, wherein the local control prior information comprises structure position perception type prior information, boundary detail enhancement type prior information and spatial geometric constraint type prior information;
[0011] Performing global control prior information mining processing on the contour extraction of the remote sensing image data to obtain global control prior information corresponding to the remote sensing image data, wherein the global control prior information comprises semantic guidance type prior information.
[0012] Optionally, the local control prior information mining processing on the contour extraction of the remote sensing image data to obtain the local control prior information corresponding to the remote sensing image data comprises:
[0013] Inputting the remote sensing image data into a pre-trained semantic segmentation network model, performing preliminary segmentation processing on the remote sensing image data in the semantic segmentation network model to form a rough segmentation mask, and taking the rough segmentation mask as structure position perception type prior information;
[0014] Performing edge detection processing on the remote sensing image data by using multiple edge detection algorithms with complementary dimensions to form multiple edge detection graphs, and taking the multiple edge detection graphs as boundary detail enhancement type prior information, wherein the multiple edge detection algorithms with complementary dimensions comprise Canny edge detection algorithm, HED edge response detection algorithm and Sobel gradient detection algorithm;
[0015] perform pixel depth inference on the remote sensing image data based on a pre-trained monocular depth estimation large model to generate a relative depth image, and use the relative depth image as spatial geometric constraint prior information.
[0016] Optionally, the global control prior information mining processing of the contour extraction on the remote sensing image data obtains global control prior information corresponding to the remote sensing image data, and includes:
[0017] The text prompt describing the image content in the remote sensing image data is encoded into a high-dimensional semantic embedding vector based on a large-scale visual-linguistic pre-training model, and the semantic embedding vector is used as the semantic guidance prior information.
[0018] Optionally, the iterative reconstruction processing of the remote sensing image data in the building contour extraction inference model guided by the contour extraction prior information outputs an accurate contour mask corresponding to the building in the remote sensing image data, and includes:
[0019] The local prior guidance processing is performed in the building contour extraction inference model using the local control prior information in the contour extraction prior information to form a local prior guidance condition.
[0020] The global prior guidance processing is performed in the building contour extraction inference model using the global control prior information in the contour extraction prior information to form a global prior guidance condition.
[0021] The iterative reconstruction processing of the remote sensing image data in the building contour extraction inference model based on the local prior guidance condition and the global prior guidance condition outputs an accurate contour mask corresponding to the building in the remote sensing image data.
[0022] Optionally, the local prior guidance processing in the building contour extraction inference model using the local control prior information in the contour extraction prior information forms a local prior guidance condition, and includes:
[0023] In the building contour extraction inference model, the structure position perception prior information, the boundary detail enhancement prior information, and the spatial geometric constraint prior information of the local control prior information are spliced and fused in the channel dimension to form a spliced and fused multi-channel feature.
[0024] The spliced and fused multi-channel feature is input into a dedicated multi-scale feature extractor in the building contour extraction inference model to generate a prior feature map guided at different resolution levels.
[0025] The prior feature map is fused with the features of the decoder itself through spatial adaptive normalization within the decoder of the backbone denoising network in the building contour extraction inference model to form local prior guiding conditions. These local prior guiding conditions can dynamically generate scaling parameters and offset parameters.
[0026] Optionally, the iterative reconstruction processing of the remote sensing image data based on the local prior guidance conditions and the global prior guidance conditions in the building contour extraction inference model, and the output of the precise contour mask corresponding to the building in the remote sensing image data, includes:
[0027] The building contour extraction inference model obtains a coarse segmentation mask corresponding to the remote sensing image data from the input contour extraction prior information, and uses the coarse segmentation mask as the mask in the initial state. ;
[0028] The local prior guiding conditions and the global prior guiding conditions are used as masks in the initial state. Guiding conditions for iterative reconstruction of the building outline extraction inference model;
[0029] During iterative reconstruction processing, from the time step Initially, at a time step t, the mask of the building outline extraction inference model in its current state is... Using all guiding conditions as input, predict the mask of the previous time step with less noise. ;
[0030] Until At that time, the building contour extraction inference model outputs the precise contour mask corresponding to the building in the remote sensing image data.
[0031] In addition, embodiments of the present invention also provide a device for accurate extraction of building outlines based on prior information, the device comprising:
[0032] Information mining module: used to obtain remote sensing image data, perform prior information mining processing on the remote sensing image data for contour extraction, and obtain the contour extraction prior information corresponding to the remote sensing image data, wherein the contour extraction prior information includes local control prior information and global control prior information;
[0033] Iterative Reconstruction Module: This module is used to input the remote sensing image data and the prior information for contour extraction into the building contour extraction inference model, and to perform iterative reconstruction processing on the remote sensing image data in the building contour extraction inference model with the prior information for contour extraction as the guiding factor, and output the accurate contour mask corresponding to the building in the remote sensing image data.
[0034] In addition, the embodiment of the present application also provides an electronic device, comprising a processor and a memory, wherein the processor runs a computer program or code stored in the memory to realize the building contour accurate extraction method according to any one of the above.
[0035] In addition, the embodiment of the present application also provides a computer readable storage medium for storing a computer program or code, when the computer program or code is executed by a processor, realizing the building contour accurate extraction method according to any one of the above.
[0036] In the embodiment of the present application, in view of the problem that the existing discriminant model is difficult to balance local details and global geometric structure, a technical idea of reconstructing the contour optimization task by generative modeling is proposed, instead of regarding the task as an independent pixel-level classification problem, but transforming it into a conditional generation process with initial coarse segmentation mask as a condition and multi-source structured prior information such as depth map and edge detection map as a guide; the external structural knowledge about the real boundary of the building is introduced into the optimization process to guide the model to generate a contour that is more reasonable in geometry and more complete in structure in the area where the pixel-level information is ambiguous or conflicting, thereby overcoming the geometric distortion problem caused by excessive dependence on local pixel features; in view of the problem that the existing single-step reasoning process lacks built-in correction capability, a progressive iterative optimization mechanism based on diffusion model is introduced, which can gradually "polish" a preliminary prediction with defects into a high-precision result with complete structure and clear boundary; thereby achieving significant beneficial effects in the geometric accuracy, structural integrity and complex scene adaptability of the building contour. BRIEF DESCRIPTION OF DRAWINGS
[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiment or prior art description. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor on the basis of these drawings.
[0038] Figure 1 is a flowchart of the building contour accurate extraction method based on prior information in the embodiment of the present application;
[0039] Figure 2 is a flowchart of the building contour accurate extraction method based on prior information in another embodiment of the present application;
[0040] Figure 3 is a structural composition schematic diagram of the building contour accurate extraction device based on prior information in the embodiment of the present application;
[0041] Figure 4 is a structural composition schematic diagram of an electronic device in an embodiment of the present application;
[0042] Figure 5 is a whole framework schematic diagram of a building contour accurate extraction method based on prior information in an embodiment of the present application. DETAILED DESCRIPTION
[0043] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative labor fall within the protection scope of the present application.
[0044] Embodiment one, please refer to Figure 1 , Figure 1 is a flow schematic diagram of a building contour accurate extraction method based on prior information in an embodiment of the present application.
[0045] As Figure 1 shown, a building contour accurate extraction method based on prior information comprises:
[0046] S101: Obtain remote sensing image data, perform prior information mining processing of contour extraction on the remote sensing image data, and obtain contour extraction prior information corresponding to the remote sensing image data, wherein the contour extraction prior information comprises local control prior information and global control prior information;
[0047] In the specific implementation process of the present application, the prior information mining processing of contour extraction on the remote sensing image data to obtain the contour extraction prior information corresponding to the remote sensing image data comprises: local control prior information mining processing of contour extraction on the remote sensing image data to obtain local control prior information corresponding to the remote sensing image data, wherein the local control prior information comprises structure position perception type prior information, boundary detail enhancement type prior information and spatial geometric constraint type prior information; global control prior information mining processing of contour extraction on the remote sensing image data to obtain global control prior information corresponding to the remote sensing image data, wherein the global control prior information comprises semantic guidance type prior information.
[0048] Further, the local control prior information mining processing of the contour extraction of the remote sensing image data obtains local control prior information corresponding to the remote sensing image data, comprising: inputting the remote sensing image data into a pre-trained semantic segmentation network model, performing preliminary segmentation processing on the remote sensing image data in the semantic segmentation network model to form a rough segmentation mask, and taking the rough segmentation mask as structure position perception type prior information; using multiple edge detection algorithms with complementary dimensions to perform edge detection processing on the remote sensing image data to form multiple edge detection maps, and taking the multiple edge detection maps as boundary detail enhancement type prior information, wherein the multiple edge detection algorithms with complementary dimensions include Canny edge detection algorithm, HED edge response detection algorithm and Sobel gradient detection algorithm; performing pixel depth reasoning on the remote sensing image data based on a pre-trained monocular depth estimation large model to generate a pixel-by-pixel relative depth image, and taking the relative depth image as spatial geometric constraint type prior information.
[0049] Further, the global control prior information mining processing of the contour extraction of the remote sensing image data obtains global control prior information corresponding to the remote sensing image data, comprising: encoding a text prompt describing image content in the remote sensing image data into a high-dimensional semantic embedding vector based on a large-scale visual-linguistic pre-training model, and taking the semantic embedding vector as the semantic guidance type prior information.
[0050] Specifically, first, the prior information mining for building contour extraction is introduced, which is to solve the problem that it is difficult to restore complete and regular building contours stably and completely by relying on single image information only, so a multi-source external prior information guidance system is introduced in the embodiment; the core lies in that, instead of simply stacking information, the prior information is systematically classified and organized according to functions, so as to ensure that various types of information can be complementary to each other and provide comprehensive and accurate guidance for the subsequent diffusion optimization process. The specific prior information mainly includes the following four types: structure position perception type prior information, boundary detail enhancement type prior information, spatial geometric constraint type prior information and semantic guidance type prior information; among them, the structure position perception type prior information, the boundary detail enhancement type prior information and the spatial geometric constraint type prior information are defined as local control prior information; the semantic guidance type prior information is defined as global control prior information.
[0051] The significance of structure position-aware prior information is that such prior aims to provide a reliable initial state for the contour optimization process; it defines the approximate position, basic form and spatial distribution of the building in the image, significantly reduces the search space of subsequent iterative optimization, and ensures that the refinement process can efficiently and stably converge to a reasonable result. The extraction method is to perform preliminary segmentation on the original remote sensing image through a pre-trained semantic segmentation network (such as DeepLabV3+), to generate a rough segmentation mask, which is used as the initial input for subsequent processes in this embodiment.
[0052] The significance of boundary detail enhancement prior information is that the core of such prior is to introduce high-frequency gradient information in the image to directly address the problems of boundary blur, fracture and jaggy in the initial mask. It is like providing a fine "boundary map" for the model, guiding the optimization process to accurately "attract" the contour to the position where the pixel value in the image changes dramatically, thereby significantly improving the continuity of the contour and the accuracy of the geometric details; in terms of extraction method, three classical edge detection algorithms are used in parallel to extract boundary features from complementary dimensions: Canny edge map: clear edges with high contrast in the image are extracted through the Canny operator; HED edge response map: multi-scale structural edges including blur and weak texture are captured through the overall nested edge detection (HED) network; Sobel gradient map: linear contours with obvious directionality are strengthened through the Sobel operator to calculate the image gradient.
[0053] The significance of spatial geometry constraint prior information is that such prior aims to introduce three-dimensional geometric information for two-dimensional remote sensing images to solve the depth blur problem caused by projection transformation. By providing pixel-level relative height information, it can help the model effectively distinguish between the main body of the building and its shadow, or the foreground building and the background object, and provide geometric constraints for the generation of the contour based on the real physical world. The extraction method is to use a pre-trained monocular depth estimation large model (such as Depth-Anything) to infer the original image to generate a pixel-by-pixel relative depth map.
[0054] The significance of the semantic guidance type of prior information is that such prior information provides global and target level semantic confirmation for the entire optimization process from the highest level; in the face of extreme cases such as local feature ambiguity, texture loss or severe occlusion, it can ensure that the optimization direction of the model is always anchored on the semantic concept of "building", thereby enhancing the discriminant robustness of the model in complex scenes and effectively preventing the generation of false contours. The extraction method is to use a large-scale visual-linguistic pre-training model (such as CLIP) to encode a text prompt (for example, "a aerial view containing a building") describing the image content into a high-dimensional semantic embedding vector, which is subsequently injected as a global condition in each iteration of the building contour extraction inference model.
[0055] S102: inputting the remote sensing image data and the contour extraction prior information into a building contour extraction inference model, and performing iterative reconstruction processing on the remote sensing image data in the building contour extraction inference model with the contour extraction prior information as a coordination guide, and outputting an accurate contour mask corresponding to a building in the remote sensing image data.
[0056] In the specific implementation of the present application, the iterative reconstruction processing of the remote sensing image data in the building contour extraction inference model with the contour extraction prior information as a coordination guide, and outputting an accurate contour mask corresponding to a building in the remote sensing image data, comprises: performing local prior guidance processing in the building contour extraction inference model using local control prior information in the contour extraction prior information to form a local prior guidance condition; performing global prior guidance processing in the building contour extraction inference model using global control prior information in the contour extraction prior information to form a global prior guidance condition; performing iterative reconstruction processing on the remote sensing image data in the building contour extraction inference model based on the local prior guidance condition and the global prior guidance condition, and outputting an accurate contour mask corresponding to a building in the remote sensing image data.
[0057] Further, the local prior guidance processing in the building contour extraction reasoning model using the local control prior information in the contour extraction prior information forms a local prior guidance condition, including: in the building contour extraction reasoning model, the structure position perception type prior information, the boundary detail enhancement type prior information and the spatial geometric constraint type prior information of the local control prior information are spliced and fused in the channel dimension to form a spliced and fused multi-channel feature; the spliced and fused multi-channel feature is input into a special multi-scale feature extractor in the building contour extraction reasoning model to generate a prior feature map for guidance at different resolution levels; the prior feature map is fused with the features of the decoder itself in the decoder of the main denoising network in the building contour extraction reasoning model through spatial adaptive normalization to form a local prior guidance condition, and the local prior guidance condition can dynamically generate scaling parameters and offset parameters.
[0058] Further, the iterative reconstruction processing of the remote sensing image data in the building contour extraction reasoning model based on the local prior guidance condition and the global prior guidance condition outputs the accurate contour mask corresponding to the building in the remote sensing image data, including: the building contour extraction reasoning model obtains a rough segmentation mask corresponding to the remote sensing image data in the input contour extraction prior information, and takes the rough segmentation mask as the mask in the initial state ; the local prior guidance condition and the global prior guidance condition are taken as the mask in the initial state of the building contour extraction reasoning model as the guidance condition for iterative reconstruction; in the iterative reconstruction processing, from the time step , the mask in the current state of the building contour extraction reasoning model at a time step t is input together with all the guidance conditions to predict the mask in the previous time state with less noise ; until , the building contour extraction reasoning model outputs the accurate contour mask corresponding to the building in the remote sensing image data.
[0059] Specifically, the building contour extraction reasoning model takes the generative diffusion model as the core, and reconstructs the building contour optimization task into a multi-prior guided iterative denoising reconstruction process; wherein the framework of the building contour extraction reasoning model is an iterative optimization based on conditional diffusion; the framework regards a rough segmentation mask with geometric defects as an initial "noisy state", and through a reverse denoising process, a mask with less noise is generated at multiple time steps (t ) are iteratively reconstructed step by step, and finally a geometrically accurate and structurally complete refined mask is reconstructed; in each denoising step, the prediction of the model is guided by the local control prior information and the global control prior information, so as to ensure that the optimization process converges in the correct direction.
[0060] In the decoupled multi-prior guidance, in order to effectively integrate prior information of different modalities and different scales, and avoid feature conflicts and interference caused by direct fusion of multiple information, a decoupled guidance mechanism is adopted; the mechanism is inspired by the structure of ControlNet, and its composition includes: (1) a fixed backbone denoising network: the parameters of the network are frozen during the training process, and the network is responsible for performing the core denoising reconstruction task, and the stable structure ensures the basic ability of the generation process; (2) multiple parallel trainable control modules: each control module is responsible for receiving one kind or one type of prior information (such as edge map, depth map, etc.); these modules are trainable, and their task is to encode the input prior information into control signals that can guide the backbone network; (3) zero convolution connector: the control signals output by the control module are injected into the corresponding level of the backbone denoising network through the zero convolution layer; this mechanism ensures that prior information does not interfere with the backbone network at the beginning of training, and the guidance strength is adaptively learned as the training progresses; wherein the decoupled architecture ensures that the generation ability of the backbone network is not destroyed, and at the same time, the influence of each kind of prior information can be independently and stably learned and regulated.
[0061] The implementation of local prior guidance, for local control prior information (including rough segmentation mask, three edge maps, and depth map) that describes spatial details, its guidance process is mainly implemented through the following three steps: (1) the above local prior information is spliced and fused in the channel dimension; (2) the multi-channel features after splicing are input into a special multi-scale feature extractor to generate feature maps that can guide at different resolution levels; (3) in the decoder part of the backbone denoising network, through a spatially adaptive denormalization (Spatially-Adaptive Denormalization, FDN) module, the above extracted prior features are fused with the decoder's own features; this module can dynamically generate scaling (scaling) and shifting (shifting) parameters according to the spatial distribution of the prior feature map, so as to finely modulate the decoder features pixel by pixel, and realize accurate local contour guidance.
[0062] The implementation of global prior guidance, for high-level global control prior information, its guidance process is realized through cross-attention mechanism; the extracted text semantic embedding vector is injected into the cross-attention layer of the main denoising network; the mechanism enables the model to perceive the global semantic context throughout the denoising process, ensuring that the generated outline always conforms to the high-level semantic concept of "building".
[0063] Inference and reconstruction workflow: the building outline extraction inference model obtains the coarse segmentation mask corresponding to the remote sensing image data in the input outline extraction prior information, takes the coarse segmentation mask as the mask in the initial state ; then takes the Canny edge map, HED edge map, Sobel gradient map, depth map and text semantic embedding vector as the guidance condition; wherein the guidance condition includes local prior guidance condition and global prior guidance condition, that is, taking the local prior guidance condition and global prior guidance condition as the mask in the initial state of the building outline extraction inference model for iterative reconstruction; in the process of iterative reconstruction, from the time step , the mask in the current state of the building outline extraction inference model is taken together with all the guidance conditions as input to predict the mask in the previous time step with less noise ; repeat the iterative reconstruction until , the building outline extraction inference model outputs the accurate outline mask of the building in the remote sensing image data.
[0064] For details, please refer to Figure 5 , building outline accurate extraction mainly includes two parts, the first part is the prior information mining mechanism for building outline extraction, which aims to automatically extract various prior information with clear structural semantics from the input remote sensing image, to enhance the model's perception and expression ability of building outline features; the second part is the building outline extraction inference model guided by multiple priors, which takes the initial segmentation mask as input, gradually optimizes the spatial form of the mask through multiple rounds of diffusion type reverse denoising iteration, and realizes the fine reconstruction of building outline.
[0065] In the embodiment of the present application, in order to solve the problem that the existing discriminant model is difficult to balance local details and global geometric structure, a technical idea of reconstructing the contour optimization task by generative modeling is proposed. Instead of regarding the task as an independent pixel-level classification problem, the task is transformed into a conditional generation process guided by multi-source structured prior information such as depth map and edge detection map, with the initial coarse segmentation mask as the condition. The external structural knowledge about the real boundary of the building is introduced into the optimization process to guide the model to generate a contour that is more reasonable in geometry and more complete in structure in the area where the pixel-level information is ambiguous or conflicting, thereby overcoming the geometric distortion problem caused by excessive dependence on local pixel features. In order to solve the problem that the existing single-step reasoning process lacks built-in correction capability, a progressive iterative optimization mechanism based on diffusion model is introduced, which can gradually "polish" a preliminary prediction with defects into a high-precision result with complete structure and clear boundary. Therefore, significant beneficial effects are achieved in the geometric accuracy, structural integrity and adaptability to complex scenes of building contour.
[0066] Embodiment two, please refer to Figure 2 , Figure 2 is a flowchart of a building contour accurate extraction method based on prior information in another embodiment of the present application.
[0067] As Figure 2 shown, a building contour accurate extraction method based on prior information, the method comprises:
[0068] S201: obtaining remote sensing image data, performing prior information mining processing on the contour extraction of the remote sensing image data to obtain contour extraction prior information corresponding to the remote sensing image data, wherein the contour extraction prior information comprises local control prior information and global control prior information;
[0069] S202: in the building contour extraction reasoning model, the structure position perception type prior information, the boundary detail enhancement type prior information and the spatial geometric constraint type prior information of the local control prior information are fused and processed in the channel dimension to form a multi-channel feature after fusion;
[0070] S203: input the multi-channel feature after fusion into a special multi-scale feature extractor in the building contour extraction reasoning model to generate a prior feature map guided at different resolution levels;
[0071] S204: the prior feature map is fused with the features of the decoder itself in the main denoising network of the building contour extraction reasoning model through spatial adaptive normalization in the decoder of the main denoising network to form a local prior guidance condition, and the local prior guidance condition can dynamically generate scaling parameters and offset parameters.
[0072] The specific implementation of the second embodiment can refer to the above-mentioned embodiments, which will not be repeated here.
[0073] The third embodiment is described as follows Figure 3 , Figure 3 is a structural composition schematic diagram of the building contour accurate extraction device based on prior information in the embodiment of the application.
[0074] As Figure 3 shown, a building contour accurate extraction device based on prior information comprises:
[0075] The information mining module 301 is configured to obtain remote sensing image data, perform prior information mining processing on the remote sensing image data for contour extraction, and obtain contour extraction prior information corresponding to the remote sensing image data, wherein the contour extraction prior information comprises local control prior information and global control prior information.
[0076] In the specific implementation of the application, the prior information mining processing on the remote sensing image data for contour extraction to obtain the contour extraction prior information corresponding to the remote sensing image data comprises: local control prior information mining processing on the remote sensing image data for contour extraction to obtain local control prior information corresponding to the remote sensing image data, wherein the local control prior information comprises structure position perception type prior information, boundary detail enhancement type prior information, and spatial geometric constraint type prior information; and global control prior information mining processing on the remote sensing image data for contour extraction to obtain global control prior information corresponding to the remote sensing image data, wherein the global control prior information comprises semantic guidance type prior information.
[0077] Further, the local control prior information mining processing on the remote sensing image data for contour extraction to obtain the local control prior information corresponding to the remote sensing image data comprises: inputting the remote sensing image data into a pre-trained semantic segmentation network model, performing preliminary segmentation processing on the remote sensing image data in the semantic segmentation network model to form a rough segmentation mask, and taking the rough segmentation mask as the structure position perception type prior information; performing edge detection processing on the remote sensing image data by using multiple edge detection algorithms with complementary dimensions to form multiple edge detection graphs, and taking the multiple edge detection graphs as the boundary detail enhancement type prior information, wherein the multiple edge detection algorithms with complementary dimensions comprise a Canny edge detection algorithm, an HED edge response detection algorithm, and a Sobel gradient detection algorithm; performing pixel depth reasoning on the remote sensing image data based on a pre-trained monocular depth estimation large model to generate a pixel-by-pixel relative depth image, and taking the relative depth image as the spatial geometric constraint type prior information.
[0078] Further, the global control prior information mining processing of the contour extraction of the remote sensing image data obtains global control prior information corresponding to the remote sensing image data, including: encoding a text prompt describing image content in the remote sensing image data into a high-dimensional semantic embedding vector based on a large-scale visual-language pre-training model, and taking the semantic embedding vector as the semantic guide type prior information.
[0079] Specifically, first is the prior information mining for building contour extraction, which is to solve the problem that it is difficult to restore complete and regular building contours stably and completely by relying on single image information only, therefore a multi-source external prior information guidance system is introduced in the embodiment; the core lies in that, rather than simply stacking information, the prior information is systematically classified and organized according to functions, so as to ensure that various types of information can be complementary to each other, and provide comprehensive and accurate guidance for the subsequent diffusion optimization process. The specific prior information mainly includes the following four types: structure position perception type prior information, boundary detail enhancement type prior information, spatial geometric constraint type prior information and semantic guide type prior information; among them, the structure position perception type prior information, the boundary detail enhancement type prior information and the spatial geometric constraint type prior information are defined as local control prior information; the semantic guide type prior information is defined as global control prior information.
[0080] The significance of the structure position perception type prior information lies in that this type of prior information aims to provide a reliable initial state for the contour optimization process; it defines the approximate position, basic form and spatial distribution of the building in the image, and through significantly reducing the search space of the subsequent iterative optimization, it ensures that the fine process can converge to a reasonable result efficiently and stably. The extraction method is to generate a rough segmentation mask by preliminarily segmenting the original remote sensing image through a pre-trained semantic segmentation network (such as DeepLabV3+), and the rough segmentation mask is taken as the initial input in the subsequent process of the embodiment.
[0081] The significance of the boundary detail enhancement prior lies in the fact that the core of this prior is to introduce high-frequency gradient information into the image to directly address the issues of blurred, broken, and jagged boundaries in the initial mask. It is like providing a fine "boundary map" for the model, guiding the optimization process to accurately "attract" the contour to the location where the pixel value changes dramatically in the image, thereby significantly improving the continuity of the contour and the accuracy of the geometric details. In terms of extraction methods, three classical edge detection algorithms are used in parallel to extract boundary features from complementary dimensions: Canny edge map: clear edges with high contrast are extracted from the image through the Canny operator; HED edge response map: multi-scale structural edges, including fuzzy and weak texture, are captured through the overall nested edge detection (HED) network; Sobel gradient map: linear contours with obvious directionality are strengthened by calculating the image gradient through the Sobel operator.
[0082] The significance of the spatial geometry constraint prior lies in the fact that this prior aims to introduce three-dimensional geometric information into two-dimensional remote sensing images to solve the depth ambiguity problem caused by projection transformation. By providing pixel-level relative height information, it can help the model effectively distinguish between building bodies and their shadows, or foreground buildings and background objects, providing geometric constraints based on the real physical world for contour generation. The extraction method is to use a pre-trained monocular depth estimation large model (such as Depth-Anything) to infer the original image and generate a pixel-by-pixel relative depth map.
[0083] The significance of the semantic guidance prior lies in the fact that this prior provides global, target-level semantic confirmation for the entire optimization process at the highest level; when facing extreme cases such as local feature ambiguity, texture loss, or severe occlusion, it can ensure that the optimization direction of the model is always anchored on the semantic concept of "building", thereby enhancing the discriminant robustness of the model in complex scenes and effectively preventing false contour generation. The extraction method is to use a large-scale visual-linguistic pre-training model (such as CLIP) to encode the text prompt (e.g. "a aerial view containing buildings") describing the image content into a high-dimensional semantic embedding vector, which is then injected as a global condition in each iteration of the building contour extraction inference model.
[0084] The iterative reconstruction module 302 is used to input the remote sensing image data and the contour extraction prior information into the building contour extraction inference model, and to perform iterative reconstruction processing on the remote sensing image data in the building contour extraction inference model with the contour extraction prior information as the coordination guide, and output the accurate contour mask corresponding to the building in the remote sensing image data.
[0085] In the specific implementation of the present application, the iterative reconstruction processing of the remote sensing image data in the building contour extraction reasoning model guided by the contour extraction prior information, and outputting the accurate contour mask corresponding to the building in the remote sensing image data, comprises: in the building contour extraction reasoning model, using the local control prior information in the contour extraction prior information to perform local prior guidance processing to form a local prior guidance condition; in the building contour extraction reasoning model, using the global control prior information in the contour extraction prior information to perform global prior guidance processing to form a global prior guidance condition; based on the local prior guidance condition and the global prior guidance condition, performing iterative reconstruction processing on the remote sensing image data in the building contour extraction reasoning model, and outputting the accurate contour mask corresponding to the building in the remote sensing image data.
[0086] Further, the local prior guidance processing in the building contour extraction reasoning model using the local control prior information in the contour extraction prior information to form a local prior guidance condition comprises: in the building contour extraction reasoning model, the structure position perception type prior information, the boundary detail enhancement type prior information and the spatial geometric constraint type prior information of the local control prior information are spliced and fused in the channel dimension to form a spliced and fused multi-channel feature; the spliced and fused multi-channel feature is input into a special multi-scale feature extractor in the building contour extraction reasoning model to generate a prior feature map for guidance at different resolution levels; the prior feature map is fused with the features of the decoder of the main denoising network in the building contour extraction reasoning model through spatial adaptive normalization in the decoder to form a local prior guidance condition, and the local prior guidance condition can dynamically generate scaling parameters and offset parameters.
[0087] Further, the iterative reconstruction processing of the remote sensing image data in the building contour extraction reasoning model based on the local prior guidance condition and the global prior guidance condition, and outputting the accurate contour mask corresponding to the building in the remote sensing image data, comprises: the building contour extraction reasoning model acquires a rough segmentation mask corresponding to the remote sensing image data from the input contour extraction prior information, and takes the rough segmentation mask as the mask in the initial state ; the local prior guidance condition and the global prior guidance condition are taken as the mask in the initial state of the building contour extraction reasoning model as the guidance condition for iterative reconstruction; during the iterative reconstruction processing, from the time step , at a time step t, the mask in the current state of the building contour extraction reasoning model A mask of a previous time state with less noise is predicted as input together with all the guidance conditions ; until the building contour extraction reasoning model outputs an accurate contour mask corresponding to the building in the remote sensing image data.
[0088] Specifically, the building contour extraction reasoning model takes the generative diffusion model as the core, and reconstructs the building contour optimization task into an iterative denoising reconstruction process with multiple prior guidance. The framework of the building contour extraction reasoning model is an iterative optimization based on conditional diffusion. The framework regards a rough segmentation mask with geometric defects as an initial "noisy state", and gradually iterates in multiple time steps (T) through a reverse denoising process to finally reconstruct a fine mask with accurate geometry and complete structure. In each denoising step, the model's prediction is guided by both local control prior information and global control prior information, ensuring that the optimization process converges in the right direction.
[0089] Among them, the decoupled multi-prior guidance is used to effectively integrate prior information of different modalities and different scales, and avoid feature conflicts and interference caused by direct fusion of multiple information. A decoupled guidance mechanism is adopted, which is inspired by the structure of ControlNet. The composition includes: (1) a fixed backbone denoising network: the parameters of this network are frozen during training, and it is responsible for performing the core denoising reconstruction task. Its stable structure ensures the basic ability of the generation process; (2) multiple parallel trainable control modules: each control module is responsible for receiving one kind or one type of prior information (such as edge map, depth map, etc.). These modules are trainable, and their task is to encode the input prior information into control signals that can guide the backbone network; (3) zero convolution connector: the control signal output by the control module is injected into the corresponding level of the backbone denoising network through the zero convolution layer. This mechanism ensures that prior information does not interfere with the backbone network at the beginning of training, and its guidance strength is adaptively learned as training progresses. The decoupled architecture ensures that the generation ability of the backbone network is not destroyed, and at the same time, the influence of each kind of prior information can be independently and stably learned and regulated.
[0090] The implementation of local prior guidance, for local control prior information describing spatial details (including coarse segmentation mask, three edge maps, and depth map), the guidance process is mainly achieved through the following three steps: (1) the above local prior information is spliced and fused in the channel dimension; (2) the spliced multi-channel features are input into a dedicated multi-scale feature extractor to generate feature maps that can be guided at different resolution levels; (3) in the decoder part of the backbone denoising network, the above-extracted prior features are fused with the features of the decoder itself through a spatially adaptive denormalization (FDN) module; this module can dynamically generate scaling and shifting parameters according to the spatial distribution of the prior feature map, thereby performing pixel-by-pixel fine modulation of the decoder features to achieve accurate local contour guidance.
[0091] The implementation of global prior guidance is achieved through a cross-attention mechanism for high-level global control prior information. The extracted text semantic embedding vectors are injected into the cross-attention layer of the backbone denoising network. This mechanism enables the model to perceive the global semantic context throughout the denoising process, ensuring that the generated contours always conform to the high-level semantic concept of "building".
[0092] Inference and Reconstruction Workflow: The building contour extraction inference model obtains a coarse segmentation mask corresponding to the remote sensing image data from the input contour extraction prior information, and uses the coarse segmentation mask as the initial mask. Then, the Canny edge map, HED edge map, Sobel gradient map, depth map, and text semantic embedding vector are used as guiding conditions; the guiding conditions include local prior guiding conditions and global prior guiding conditions, that is, the local prior guiding conditions and global prior guiding conditions are used as masks in the initial state. Guiding conditions for iterative reconstruction using a building outline extraction inference model; during the iterative reconstruction process, starting from the time step... Initially, at a time step t, the mask of the building outline extraction inference model in its current state is... Using all guiding conditions as input, predict the mask of the previous time step with less noise. Repeat the iterative reconstruction until... At that time, the building outline extraction inference model outputs the precise outline mask corresponding to the building in the remote sensing image data.
[0093] For details, please refer to... Figure 5, building contour accurate extraction mainly includes two parts, the first part is the prior information mining mechanism for building contour extraction, aiming to automatically extract a variety of prior information with clear structure semantics from the input remote sensing image, which is used to enhance the perception and expression ability of the model to the building contour features; The second part is a multi-prior collaborative guided building contour extraction reasoning model, which takes the initial segmentation mask as input, and gradually optimizes the spatial form of the mask through multiple rounds of diffusion type reverse denoising iteration, realizing the fine reconstruction of building contour.
[0094] In the embodiment of the application, in view of the problem that the existing discriminative model is difficult to balance local details and global geometric structure, a technical idea of reconstructing the contour optimization task by generative modeling is proposed. Instead of regarding the task as an independent pixel-level classification problem, it is transformed into a conditional generation process with initial coarse segmentation mask as condition and multi-source structured prior information such as depth map and edge detection map as guide. The external structural knowledge about the real boundary of the building is introduced into the optimization process to guide the model to generate a more reasonable geometric and complete structure contour in the area where the pixel-level information is ambiguous or conflicting, thereby overcoming the geometric distortion problem caused by excessive dependence on local pixel features. In view of the problem that the existing single-step reasoning process lacks built-in correction ability, a gradual iterative optimization mechanism based on diffusion model is introduced, which can gradually "polish" a preliminary prediction with defects into a high-precision result with complete structure and clear boundary. Thus, significant beneficial effects are achieved in the geometric accuracy, structural integrity and complex scene adaptability of building contour.
[0095] In the embodiment, the corresponding experimental scheme and result analysis are as follows:
[0096] Experimental setup: In order to verify the effectiveness and generalization ability of the above embodiment, systematic experiments were conducted on three representative public remote sensing building datasets (WHU, INRIA, Massachusetts); A variety of current mainstream discriminative semantic segmentation models were selected as comparison methods, including classic FCN, Unet, DeepLabV3+, and advanced SegFormer and hybrid architecture CBRNet based on Transformer; The experiment adopts F1 coefficient ( and Structural Similarity Index (SSIM) index respectively from two dimensions of pixel precision and geometric structure. The details of three experimental data are as follows: (1) the satellite data set II (East Asia) provided by the WHU building data set is used to check the performance of the network architecture proposed in the above embodiments; the satellite data set II covers an area of 550 square kilometers in East Asia, with a spatial resolution of 2.7 m, and a total of 17388 patches with a size of 512*512 pixels; (2) the Inria (Inria Aerial Image Labeling Dataset) dataset contains multiple remote sensing aerial images, which capture the diversity of urban and rural areas, and it is composed of 180 training sets and 180 test sets, with a resolution of 0.3 meters and a single sample size of 5000*5000 pixels; (3) the Massachusetts dataset is composed of 151 aerial images in the Boston area, each image is 1500*1500 pixels, with a spatial resolution of 1 m, and the entire dataset covers an area of about 340 square kilometers, covering urban, suburban and rural areas and other scenes.
[0097] For the multi-class labeling information in the three data sets, the non-building area is uniformly divided into the background class, and all images and their corresponding labels are cropped into 512*512 pixel patches. Finally, a variety of prior information samples are generated based on remote sensing images; in order to effectively learn the distribution characteristics of buildings of different shapes and areas, 80% of the samples are used for training, and the remaining 20% are used as the test set, to ensure the diversity and representativeness of the training data and test data.
[0098] Quantitative evaluation: the quantitative evaluation results of the method adopted in the above embodiments and all comparative methods are shown in Table 1, and through the analysis of these results, the following two key conclusions can be drawn:
[0099] Table 1 Quantitative evaluation results of various methods on three building recognition data sets (the optimal result is bolded, and the suboptimal result is underlined)
[0100]
[0101] First, the method of the above embodiment consistently and significantly outperforms all existing discriminative models in both pixel-level precision (F1) and geometric similarity (SSIM), establishing a new technical advantage; this advantage remains robust across datasets of different resolutions and scene complexities; for example, even on the highly challenging high-resolution building extraction dataset INRIA, the F1 score of the method of the above embodiment reaches 91.07%, a huge improvement of 6.81% over the suboptimal SegFormer (84.26%); at the same time, the SSIM index also increases from 79.04% to 86.00%. On the other two datasets, the F1 and SSIM indices of the method of the above embodiment are also optimal; this result strongly proves that the technical core, i.e., reconstructing contour optimization from "single-step discrimination" to "iterative generation", is successful; in contrast, the comparative method sacrifices the ability to perceive high-frequency boundary information in pursuit of generalization due to its inherent mechanism of "pattern recognition", while the method of the above embodiment can actively repair and reconstruct these fine geometric structures through progressive denoising and multi-prior guidance, thereby achieving simultaneous large-scale outperformance in both evaluation dimensions.
[0102] Second, the method of the above embodiment exhibits excellent generalization ability and stability on diverse datasets; from medium-resolution WHU satellite images, to high-resolution and scene-complex INRIA aerial images, to the Massachusetts dataset with small and dense buildings, the method of the above embodiment is always the best-performing model; in particular, on the Massachusetts dataset, traditional methods generally have a performance below 81% F1 score due to small targets, shadows, and occlusions, while the method of the above embodiment can still achieve 85.68%; this fully demonstrates that the multi-source prior collaborative guidance system designed by the above embodiment is not a human adjustment for specific data, but a universal and robust technical framework; by fusing complementary information such as edges, depths, and semantics, the limitations of a single image information source are effectively overcome, and high-level performance is maintained in various complex remote sensing scenes.
[0103] In summary, the comprehensive quantitative experimental results confirm that the technical solution proposed by the above embodiment establishes a new, performance-leading technical standard in the task of precise building contour extraction from remote sensing images.
[0104] This invention provides a computer-readable storage medium storing a computer program. When executed by a processor, this program implements the method for accurately extracting building outlines according to any of the above embodiments. The computer-readable storage medium includes, but is not limited to, any type of disk (including floppy disks, hard disks, optical disks, CD-ROMs, and magneto-optical disks), ROM (Read-Only Memory), RAM (Random Access Memory), EPROM (Erasable Programmable Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), flash memory, magnetic cards, or optical cards. In other words, the storage device includes any medium that stores or transmits information in a readable form by a device (e.g., a computer, a mobile phone), and can be a read-only memory, a disk, or an optical disk, etc.
[0105] This invention also provides a computer application running on a computer, which is used to execute the building outline accurate extraction method of any of the above embodiments.
[0106] also, Figure 4 This is a schematic diagram of the structural composition of the electronic device in an embodiment of the present invention.
[0107] This invention also provides an electronic device, such as... Figure 4 As shown. The electronic device includes components such as a processor 402, a memory 403, an input unit 404, and a display unit 405. Those skilled in the art will understand that... Figure 4 The structural components of the illustrated electronic device do not constitute a limitation on all devices and may include more or fewer components than illustrated, or combine certain components. Memory 403 can be used to store application program 401 and various functional modules. Processor 402 runs application program 401 stored in memory 403, thereby performing various functional applications and data processing of the device. Memory can be internal memory or external memory, or both. Internal memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), flash memory, or random access memory. External memory may include hard disks, floppy disks, ZIP disks, USB flash drives, magnetic tapes, etc. The memory disclosed in this invention includes, but is not limited to, these types of memory. The memory disclosed in this invention is only an example and not a limitation.
[0108] The input unit 404 is configured to receive input of signals and receive a keyword input by a user. The input unit 404 can include a touch panel and other input devices. The touch panel can collect a touch operation of a user thereon or adjacent thereto (such as an operation of the user using a finger, a stylus, or any suitable object or accessory on or adjacent to the touch panel), and drive a corresponding connection device according to a preset program; the other input devices can include, but are not limited to, one or more of a physical keyboard, function keys (such as play control buttons, switch buttons, etc.), a trackball, a mouse, a joystick, and the like. The display unit 405 can be configured to display information input by a user or information provided to a user and various menus of a terminal device. The display unit 405 can take the form of a liquid crystal display, an organic light-emitting diode, or the like. The processor 402 is a control center of the terminal device, connects all parts of the entire device through various interfaces and lines, and performs various functions and processes data by running or executing software programs and / or modules stored in the memory 403 and calling data stored in the memory.
[0109] As an embodiment, the electronic device includes: one or more processors 402, a memory 403, and one or more application programs 401, wherein the one or more application programs 401 are stored in the memory 403 and configured to be executed by the one or more processors 402, and the one or more application programs 401 are configured to perform the corresponding building contour accurate extraction method in any one of the above embodiments.
[0110] In the embodiment of the present application, in view of the problem that the existing discriminant model is difficult to balance local details and global geometric structure, a technical idea of reconstructing the contour optimization task by generative modeling is proposed. Instead of regarding the task as an independent pixel-level classification problem, the task is transformed into a conditional generation process guided by multi-source structured prior information such as depth map and edge detection map, with the initial coarse segmentation mask as the condition. The external structural knowledge about the real boundary of the building is introduced into the optimization process to guide the model to generate a contour that is more reasonable in geometry and more complete in structure in the area where the pixel-level information is ambiguous or conflicting, thereby overcoming the geometric distortion problem caused by excessive dependence on local pixel features. In view of the problem that the existing single-step reasoning process lacks built-in correction ability, a progressive iterative optimization mechanism based on diffusion model is introduced, which can gradually "polish" a preliminary prediction with defects into a high-precision result with complete structure and clear boundary. Thus, significant beneficial effects are achieved in the geometric accuracy, structural integrity, and adaptability to complex scenes of the building contour.
[0111] In addition, the above describes in detail the building contour accurate extraction method and related device provided by the embodiment of the application based on prior information. The principle and implementation mode of the application are described by using specific examples in this paper. The above description of the embodiments is only used to help understand the method of the application and its core idea. Meanwhile, for those skilled in the art, according to the idea of the application, the specific implementation mode and application range will be changed. In summary, the content of the specification should not be understood as a limitation of the application.
Claims
1. A method for accurate extraction of building contours based on prior information, characterized in that, The method comprises: obtaining remote sensing image data, performing prior information mining processing on the remote sensing image data for contour extraction, and obtaining contour extraction prior information corresponding to the remote sensing image data, wherein the contour extraction prior information comprises local control prior information and global control prior information; inputting the remote sensing image data and the contour extraction prior information into a building contour extraction reasoning model, and performing iterative reconstruction processing on the remote sensing image data in the building contour extraction reasoning model guided by the contour extraction prior information, and outputting an accurate contour mask corresponding to a building in the remote sensing image data; the iterative reconstruction processing on the remote sensing image data in the building contour extraction reasoning model guided by the contour extraction prior information, and outputting an accurate contour mask corresponding to a building in the remote sensing image data, comprises: performing local prior guided processing in the building contour extraction reasoning model using the local control prior information in the contour extraction prior information to form a local prior guided condition; performing global prior guided processing in the building contour extraction reasoning model using the global control prior information in the contour extraction prior information to form a global prior guided condition; performing iterative reconstruction processing on the remote sensing image data in the building contour extraction reasoning model based on the local prior guided condition and the global prior guided condition, and outputting an accurate contour mask corresponding to a building in the remote sensing image data; the iterative reconstruction processing on the remote sensing image data in the building contour extraction reasoning model based on the local prior guided condition and the global prior guided condition, and outputting an accurate contour mask corresponding to a building in the remote sensing image data, comprises: The building contour extraction reasoning model obtains a rough segmentation mask corresponding to the remote sensing image data in the input contour extraction prior information, and takes the rough segmentation mask as a mask in an initial state ; using the local prior guidance condition and the global prior guidance condition as masks in an initial state under the guidance of iterative reconstruction of the building contour extraction inference model; In the iterative reconstruction process, from a time step At the beginning, at a time step t, the building contour extraction inference model predicts a mask in the current state With all the guiding conditions as input, the mask in the previous time state with less noise is predicted ; up to When the building contour extraction inference model outputs the accurate contour mask corresponding to the building in the remote sensing image data.
2. The building contour precision extraction method according to claim 1, characterized in that, the prior information mining processing on the remote sensing image data for contour extraction, and obtaining contour extraction prior information corresponding to the remote sensing image data, comprises: performing local control prior information mining processing on the remote sensing image data for contour extraction, and obtaining local control prior information corresponding to the remote sensing image data, wherein the local control prior information comprises structure position perception type prior information, boundary detail enhancement type prior information, and spatial geometric constraint type prior information; performing global control prior information mining processing on the remote sensing image data for contour extraction, and obtaining global control prior information corresponding to the remote sensing image data, wherein the global control prior information comprises semantic guidance type prior information.
3. The building contour precision extraction method according to claim 2, characterized in that, the local control prior information mining processing on the remote sensing image data for contour extraction, and obtaining local control prior information corresponding to the remote sensing image data, comprises: inputting the remote sensing image data into a pre-trained semantic segmentation network model, performing preliminary segmentation processing on the remote sensing image data in the semantic segmentation network model to form a rough segmentation mask, and taking the rough segmentation mask as structure position perception type prior information; Edge detection is performed on the remote sensing image data by using multiple edge detection algorithms with complementary dimensions to form multiple edge detection maps, and the multiple edge detection maps are used as boundary detail enhancement type prior information, wherein the multiple edge detection algorithms with complementary dimensions include a Canny edge detection algorithm, an HED edge response detection algorithm, and a Sobel gradient detection algorithm; Pixel depth inference is performed on the remote sensing image data based on a pre-trained monocular depth estimation large model to generate a pixel-by-pixel relative depth image, and the relative depth image is used as spatial geometric constraint type prior information.
4. The building contour accurate extraction method according to claim 2, characterized in that, The global control prior information mining processing of the remote sensing image data for contour extraction obtains global control prior information corresponding to the remote sensing image data, and includes: The text prompt describing the image content in the remote sensing image data is encoded into a high-dimensional semantic embedding vector based on a large-scale visual-linguistic pre-training model, and the semantic embedding vector is used as the semantic guidance type prior information.
5. The building contour precision extraction method according to claim 1, wherein, The local prior guidance condition is formed by using the local control prior information in the contour extraction prior information for local prior guidance processing in the building contour extraction reasoning model, and includes: In the building contour extraction reasoning model, the structure position perception type prior information, the boundary detail enhancement type prior information, and the spatial geometric constraint type prior information of the local control prior information are fused and processed in the channel dimension to form a fused multi-channel feature; The fused multi-channel feature is input into a special multi-scale feature extractor in the building contour extraction reasoning model to generate a prior feature map for guidance at different resolution levels; The prior feature map is fused with the features of the decoder of the main denoising network in the building contour extraction reasoning model through spatial adaptive normalization in the decoder to form a local prior guidance condition, and the local prior guidance condition can dynamically generate scaling parameters and offset parameters.
6. A building contour accurate extraction device based on prior information, characterized by, The device comprises: An information mining module is configured to obtain remote sensing image data, perform prior information mining processing on the remote sensing image data for contour extraction, and obtain contour extraction prior information corresponding to the remote sensing image data, wherein the contour extraction prior information includes local control prior information and global control prior information; An iterative reconstruction module is configured to input the remote sensing image data and the contour extraction prior information into a building contour extraction reasoning model, perform iterative reconstruction processing on the remote sensing image data in the building contour extraction reasoning model with the contour extraction prior information as coordination guidance, and output an accurate contour mask corresponding to a building in the remote sensing image data. The iterative reconstruction processing on the remote sensing image data in the building contour extraction reasoning model with the contour extraction prior information as coordination guidance to output an accurate contour mask corresponding to a building in the remote sensing image data includes: The local priori guidance condition is formed by using the local control priori information in the contour extraction priori information for local priori guidance processing in the building contour extraction inference model; The global priori guidance condition is formed by using the global control priori information in the contour extraction priori information for global priori guidance processing in the building contour extraction inference model; The precise contour mask corresponding to the building in the remote sensing image data is output by performing iterative reconstruction processing on the remote sensing image data in the building contour extraction inference model based on the local priori guidance condition and the global priori guidance condition; The precise contour mask corresponding to the building in the remote sensing image data is output by performing iterative reconstruction processing on the remote sensing image data in the building contour extraction inference model based on the local priori guidance condition and the global priori guidance condition, including: The building contour extraction reasoning model obtains a rough segmentation mask corresponding to the remote sensing image data in the input contour extraction prior information, and takes the rough segmentation mask as a mask in an initial state ; using the local prior guidance condition and the global prior guidance condition as masks in an initial state under the guidance of iterative reconstruction of the building contour extraction inference model; In the iterative reconstruction process, from a time step At the beginning, at a time step t, the building contour extraction inference model predicts a mask in the current state With all the guiding conditions as input, the mask in the previous time state with less noise is predicted ; up to When the building contour extraction inference model outputs the accurate contour mask corresponding to the building in the remote sensing image data.
7. An electronic device comprising a processor and a memory, characterized in that The processor runs the computer program or code stored in the memory to implement the building contour precise extraction method in any one of claims 1 to 5.
8. A computer readable storage medium for storing a computer program or code, characterized in that, When the computer program or code is executed by the processor, the building contour precise extraction method in any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Point cloud data disordered splicing method and system based on ground laser scanning equipment
CN117808673A
Priori structure rule constrained building contour optimization method, medium and equipment
CN120429927A