Building extraction method and system based on collaborative encoder and uncertainty aggregation decoder
Through the method of collaborative encoder and uncertain aggregation decoder, combined with local and global feature fusion, the problem of insufficient aggregation of multi-scale information extracted in building in remote sensing images is solved, and high-precision and robust building extraction effect is achieved.
Patent Information
- Application Number
- CN202411894317.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2044-12-20
AI Technical Summary
The prior art has problems in the extraction of remote sensing image building with low coding feature extraction quality and insufficient multi-scale information aggregation, resulting in low extraction accuracy in complex scenarios.
The building extraction method based on collaborative encoder and uncertain aggregation decoder is adopted. The collaborative encoder captures local features in the early stage, and the global feature is captured at the end stage. The global-local fusion module and uncertain aggregation decoder are used for feature fusion and uncertainty learning, integrating multi-scale feature maps to extract buildings.
Improve the accuracy and robustness of remote sensing image building extraction, especially in complex scenarios, where buildings can be more accurately identified and segmentation uncertainty can be reduced.
Smart Images

Figure CN119832422B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing and large model technology, and in particular to a building extraction method and system based on a collaborative encoder and an uncertainty aggregation decoder. Background Art
[0002] Building extraction from remote sensing images aims to identify buildings from high-resolution remote sensing imagery and has been widely used in fields such as urban planning, population forecasting, and geographic information systems (GIS). With the rapid development of satellite and aerial remote sensing imaging technologies, accurately and efficiently extracting buildings from aerial imagery has become a focus of attention in the field of computer vision. Early building extraction algorithms used hand-crafted features such as texture, geometry, and neighboring connectivity for pixel-level classification. While intuitive and simple, these hand-crafted features cannot effectively handle the complex structural variations of buildings, resulting in low accuracy and limited generalization. With the advancement of deep learning technology, a series of building extraction methods based on convolutional neural networks (CNNs) have emerged. These methods employ local convolutional kernels to capture discriminative features through forward and backward propagation, enabling the model to construct a hierarchical semantic representation of foreground buildings through large-scale model training. However, because CNN-based architectures rely on stacking multiple convolutional blocks with limited receptive fields, they struggle to leverage long-range information from different regions, resulting in poor performance in complex scenarios with occlusion and blur. In recent years, Vision Transformers (ViTs) have been applied to building extraction tasks. ViTs-based methods utilize non-local self-attention to capture long-range dependencies, enabling them to mine informative global context for dense prediction. However, due to the large variations in building sizes in remote sensing images, transformers struggle to perceive local details of multiple scales and shapes, often producing unclear segmentation outputs. Recent methods also employ hybrid CNN and ViT architectures, leveraging their complementary strengths.
[0003] While existing methods have made progress in detecting buildings in remote sensing imagery, they suffer from two potential issues: low-quality feature extraction and insufficient aggregation of multi-scale information. Features in shallow layers tend to retain more local information but are insensitive to the global context of buildings. Conversely, features in deeper layers are more effective at exploiting the overall global connectivity of building instances, but are prone to losing local details. Summary of the Invention
[0004] In view of this, embodiments of the present invention provide a building extraction method and system based on a collaborative encoder and an uncertainty aggregation decoder to eliminate or improve one or more defects in the prior art.
[0005] In one aspect, the present invention provides a building extraction method based on a collaborative encoder and an uncertainty aggregation decoder, the method comprising the following steps:
[0006] Acquiring a remote sensing image, wherein the remote sensing image contains a building to be extracted;
[0007] Inputting the remote sensing image into a pre-trained building extraction model to extract buildings from the remote sensing image;
[0008] Among them, the building extraction model includes a collaborative encoder, a global-local fusion module and an uncertainty aggregation decoder connected in sequence; the remote sensing image is input into the collaborative encoder to capture the local characteristics of the remote sensing image in the early stage and the global features of the remote sensing image in the final stage; the multi-scale features extracted by the collaborative encoder are respectively input into the global-local fusion module for feature fusion in stages to obtain local aggregated features and global aggregated features; the local aggregated features and the global aggregated features are respectively input into the uncertainty aggregation decoder to obtain the local uncertainty of the local aggregated features and the global uncertainty of the global aggregated features, the local uncertainty and the global uncertainty are mapped to attenuation weights, and based on the attenuation weights, the local aggregated features and the global aggregated features are integrated to obtain the final feature map to extract the building.
[0009] In some embodiments of the present invention, before inputting the remote sensing image into the pre-trained building extraction model, the remote sensing image is pre-processed, including: scaling the remote sensing image to a preset size and performing normalization processing.
[0010] In some embodiments of the present invention, the collaborative encoder includes four stages, wherein the first and second stages are the early stages, the third stage is the intermediate stage, and the fourth stage is the terminal stage; in the early stage, a multi-core convolution modulation block is used to construct the local features; in the intermediate stage, an intermediate cooperative interaction block is used to perform global and local feature interaction; in the terminal stage, a multi-head self-attention block is used to enhance the global features.
[0011] In some embodiments of the present invention, when the collaborative encoder is used to extract multi-scale features of the remote sensing image, the method includes:
[0012] Flattening and linearly projecting the remote sensing image into a one-dimensional vector, and reshaping to obtain an embedded feature map;
[0013] Splitting the embedded feature map in the channel dimension to obtain multiple feature groups;
[0014] In the early stage, for each feature group, depth-wise separable convolution with different kernel sizes is used to capture local information, and point convolution is performed to combine to obtain the combined feature, which is calculated as:
[0015] Z ′ =Cat(DW 3×3 (Z1),…,DW k×k (Z n ));
[0016] M=W p *Z ′ ;
[0017] Among them, Z ′ Represents the local information; DW k×k represents a depth-wise separable convolution with a kernel size of k×k; Z n represents the nth feature group; M represents the combined feature; W p represents the point convolution;
[0018] The multi-core convolution modulation block is used to enhance the combined features, and the calculation formula is:
[0019]
[0020] Among them, MKFAM(·) represents the multi-core convolution operation; F i represents the output features of the i-th stage;
[0021] In the intermediate stage, after the input features of the intermediate cooperative interaction block are normalized, they are input into the multi-core convolution modulation block with residual connection. The calculation formula is:
[0022]
[0023] In the final stage, the features obtained in the intermediate stage are input into the multi-head self-attention block to simulate the global dependency relationship. The calculation formula is:
[0024]
[0025] Among them, X l represents the input features of the lth intermediate cooperative interaction block; FFN(·) represents the operation of the multi-layer perceptron; MHSA(·) represents the operation of the multi-head self-attention block.
[0026] In some embodiments of the present invention, the multi-scale features extracted by the collaborative encoder are input into the global-local fusion module for feature fusion in stages, further comprising:
[0027] The multi-scale features are input into the deep convolution block with residual connection to establish the information propagation path. The calculation formula is:
[0028]
[0029] in, Indicates F i Information propagation path; F i represents the output features of the i-th stage of the collaborative encoder; DWConv(·) represents the operation of the depthwise convolution block.
[0030] In some embodiments of the present invention, obtaining local aggregate features and global aggregate features includes:
[0031] The output features of the early stage and the mid-stage are fused to obtain the local aggregated features, which are calculated as follows:
[0032]
[0033] The output features of the mid-term stage and the terminal stage are fused to obtain the global aggregate feature, which is calculated as follows:
[0034]
[0035] Among them, F L represents the local aggregation feature; F G represents the global aggregate feature; Indicates F i Information propagation path; F i represents the output features of the i-th stage of the collaborative encoder; UpConv(·) represents the up-convolution operation.
[0036] In some embodiments of the present invention, inputting the local aggregated features and the global aggregated features into the uncertainty aggregation decoder respectively to obtain local uncertainty and global uncertainty includes:
[0037] For any pixel in the local aggregate feature or the global aggregate feature, a Gaussian distribution model is established; and a reparameterization technique is used to implement uncertainty learning to obtain the local uncertainty and the global uncertainty.
[0038] In some embodiments of the present invention, based on the attenuation weight, the local aggregated features and the global aggregated features are integrated to obtain a final feature map, which is calculated as follows:
[0039] F out =(1-U G )×F G+(1-U L )×F L ;
[0040] Among them, F out Represents the final feature map; U G represents the global uncertainty; U L represents local uncertainty; F G represents the global aggregation feature; F L represents the local aggregation feature.
[0041] On the other hand, the present invention further provides a building extraction system based on a collaborative encoder and an uncertainty aggregation decoder. When the system is executed, the steps of any of the methods mentioned above are implemented. The system includes:
[0042] An image processing module, used for acquiring remote sensing images and preprocessing the remote sensing images;
[0043] The building extraction module inputs the remote sensing image into a pre-trained building extraction model to extract buildings from the remote sensing image.
[0044] On the other hand, the present invention further provides a computer-readable storage medium having a computer program / instruction stored thereon, which implements the steps of any of the methods mentioned above when executed by a processor.
[0045] The present invention provides a building extraction method and system based on a collaborative encoder and an uncertainty aggregation decoder. The method comprises: inputting a preprocessed remote sensing image into a building extraction model to extract buildings. The building extraction model provided by the present invention comprises a collaborative encoder, a global-local fusion module, and an uncertainty aggregation decoder, connected in sequence. Unlike traditional hybrid architectures that stack convolutional neural networks and visual transformers in parallel or sequentially, the collaborative encoder uses a convolutional neural network to capture local information in the early stages and a visual transformer to capture global information in the final stages. Subsequently, an intermediate collaborative interaction block based on a hybrid layer is introduced. This block uses non-local operators to collaboratively merge multi-scale local features, narrowing the gap between local and global semantics and improving the quality of multi-scale feature extraction. This addresses the multi-scale information loss caused by simple stacking in the prior art. Subsequently, a global-local fusion module is used to complementarily fuse the layered visual representations, avoiding the semantic information deficiency caused by serial connection in the prior art. Finally, to reduce segmentation uncertainty, an uncertainty aggregation decoder is used to identify difficult pixels, forcing the model to focus on fuzzy regions, improving segmentation accuracy and providing a more robust solution for building extraction in complex scenes.
[0046] Additional advantages, objects, and features of the present invention will be set forth in part in the following description and will become apparent to those skilled in the art upon examination of the following or may be learned from practice of the present invention. The objects and other advantages of the present invention may be realized and obtained by the structures particularly pointed out in the description and drawings.
[0047] Those skilled in the art will understand that the purposes and advantages that can be achieved by the present invention are not limited to the above specific descriptions, and the above and other purposes that can be achieved by the present invention will be more clearly understood based on the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] The drawings described herein are used to provide a further understanding of the present invention, constitute a part of this application, and do not constitute a limitation of the present invention. In the drawings:
[0049] Figure 1 Schematic diagram of the steps of a building extraction method based on a collaborative encoder and an uncertainty aggregation decoder in one embodiment of the present invention.
[0050] Figure 2 Schematic diagram of a flow chart of a building extraction method based on a collaborative encoder and an uncertainty aggregation decoder in one embodiment of the present invention.
[0051] Figure 3 Schematic diagram of the modulation process of a multi-scale feature map in one embodiment of the present invention.
[0052] Figure 4 Schematic diagram of stacking multiple intermediate cooperative interaction blocks to perform global-local information interaction in one embodiment of the present invention.
[0053] Figure 5 This is a comparison diagram of the effects of the building extraction method of the present application and other existing extraction methods in one embodiment of the present invention. DETAILED DESCRIPTION
[0054] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments and the accompanying drawings. Here, the exemplary embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.
[0055] It should also be noted that, in order to avoid obscuring the present invention due to unnecessary details, the accompanying drawings only show structures and / or processing steps closely related to the solutions according to the present invention, while other details that are not closely related to the present invention are omitted.
[0056] It should be emphasized that the term "include / comprises" when used herein refers to the existence of features, elements, steps or components, but does not exclude the existence or addition of one or more other features, elements, steps or components.
[0057] It should also be noted that, unless otherwise specified, the term "connection" herein may refer not only to a direct connection but also to an indirect connection involving an intermediate.
[0058] Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. In the accompanying drawings, the same reference numerals represent the same or similar components, or the same or similar steps.
[0059] In order to solve the problems of low quality of coding feature extraction and insufficient multi-scale information aggregation in the existing technology, the present invention provides a building extraction method based on collaborative encoder and uncertainty aggregation decoder, such as Figure 1 As shown, the method includes the following steps S101-S102:
[0060] Step S101: Acquire a remote sensing image, wherein the remote sensing image contains a building to be extracted.
[0061] Step S102: Input the remote sensing image into the pre-trained building extraction model to extract buildings from the remote sensing image.
[0062] like Figure 2 As shown in the figure, the building extraction model includes a collaborative encoder, a global-local fusion module, and an uncertainty aggregation decoder connected in sequence. The remote sensing image is input into the collaborative encoder to capture local characteristics of the remote sensing image in the early stage and global features in the final stage. The multi-scale features extracted by the collaborative encoder are input into the global-local fusion module for stage-by-stage feature fusion to obtain local aggregated features and global aggregated features. The local aggregated features and global aggregated features are respectively input into the uncertainty aggregation decoder to obtain local uncertainty of the local aggregated features and global uncertainty of the global aggregated features. The local uncertainty and global uncertainty are mapped to attenuation weights. Based on the attenuation weights, the local aggregated features and global aggregated features are integrated to obtain the final feature map for building extraction.
[0063] In step S101, a remote sensing image is acquired. Remote sensing images are images of the ground or atmosphere collected using remote sensing technology. Remote sensing technology primarily relies on various sensors and satellite / aerospace platforms to collect information such as surface reflectance and radiation, generating images. These images are commonly used in various fields, including geographic information system (GIS) analysis, environmental monitoring, agricultural management, and urban planning.
[0064] In some embodiments, a preprocessing operation is performed on the remote sensing image, and the remote sensing image is scaled to a preset size, such as 512*512, and then the image is normalized so that the data distribution of the image is adapted to the pre-trained parameters of the backbone network of the building extraction model.
[0065] In step S102, the remote sensing image is fed into a pre-trained building extraction model to extract buildings from the image. The building extraction model comprises a collaborative encoder, a global-local fusion module, and an uncertainty aggregation decoder, all connected in sequence. These three modules are described in more detail below.
[0066] The Cooperative Encoder (CE) uses its hybrid convolution and self-attention operators to capture both local and global features of remote sensing images. In the early stages, the CE employs layered convolutional blocks to construct local representations of buildings. In the middle stages, cooperative interaction blocks are introduced to perform global-local information exchange. In the final stage, a pure transformer is used to enhance the global context.
[0067] In some embodiments, the collaborative encoder includes four stages, where the first and second stages are early stages, the third stage is an intermediate stage, and the fourth stage is a final stage. In the early stage, a multi-kernel convolutional modulation block (MKFM) is used to construct local features; in the intermediate stage, an intermediate cooperative interaction block (CIB) is used to perform global and local feature interaction; and in the final stage, a multi-head self-attention block (MHSA) is used to enhance global features.
[0068] Based on the above description, we can know that the remote sensing image (denoted as I) is input into the collaborative encoder, which captures the global and local features of the remote sensing image at different stages and generates a multi-scale feature map F i , F i represents the output features of the i-th stage of the collaborative encoder.
[0069] Specifically: In the first two stages (early stages), convolutional neural networks with different convolution kernels are used to capture local information. First, the remote sensing image I is flattened and linearly projected into a one-dimensional vector, and the embedded feature map Z is reshaped. The embedded feature map Z is then split in the channel dimension to obtain multiple feature groups, denoted as Z = Z1, Z2, ..., Z n For each feature group, depthwise separable convolution with different kernel sizes is used to capture local information, and pointwise convolution is performed to combine them to obtain the combined features. The calculation formula is shown in formula (1) and formula (2):
[0070] Z ′ =Cat(DW 3×3 (Z1),…,DW k×k (Z n )); (1)
[0071] M=W p *Z ′ ; (2)
[0072] Among them, Z ′ Indicates the captured local information; DW k×k represents a depth-wise separable convolution with a kernel size of k×k; Z n represents the nth feature group; M represents the combined feature; W p Represents point convolution.
[0073] like Figure 3 As shown in the figure, the combined feature M can be regarded as a multi-kernel convolution modulation block (MKFM), which enhances the local representation through the convolution of the multi-kernel structure. i The modulation process can be expressed as formula (3):
[0074]
[0075] Where MKFA(·) represents the multi-kernel convolution operation; F i represents the output features of the i-th stage.
[0076] By stacking multiple multi-kernel convolutional modulation blocks in the first two stages, diverse multi-scale local features can be captured with only a small computational cost.
[0077] Then, the features learned in the deep stage tend to focus on the discriminative global context. In order to narrow the gap between local and global features, the present invention uses an intermediate cooperative interaction block in the next stage (the third stage). Figure 4 As shown, in the third stage, multiple intermediate cooperative interaction blocks are stacked to perform global-local information interaction.
[0078] For the lth intermediate cooperative interaction block in the third stage, the input feature X l-1 First, it is normalized and then input into the multi-core convolution modulation block with residual connection, as shown in formula (4) and formula (5):
[0079]
[0080] Among them, X l represents the input feature of the lth intermediate cooperative interaction block; MKFA(·) represents the multi-kernel convolution operation; FFN(·) represents the operation of the multi-layer perceptron; * represents the intermediate quantity.
[0081] Then X l It is sent to the standard multi-head self-attention block to simulate the global dependency, as shown in formulas (6) and (7):
[0082]
[0083] Among them, MHSA(·) is the operation of the multi-head self-attention block.
[0084] By using multiple intermediate cooperative interaction blocks for alternative communication between the multi-kernel convolutional modulation block and the multi-head self-attention block, the collaborative encoder can effectively interact between global and local visual semantics, thereby narrowing the semantic gap, and in the terminal stage, multiple multi-head self-attention blocks are used to enhance global context learning.
[0085] The global-local fusion module fuses the multi-scale features output by the collaborative encoder, supplements the fusion of hierarchical visual semantics, and thus gives full play to the complementary advantages of global and local features.
[0086] In some embodiments, the multi-scale feature F i Input a deep convolution block with residual connection to establish the information propagation path. The calculation formula is shown in formula (8):
[0087]
[0088] in, Indicates F i Information propagation path; F i represents the output features of the i-th stage of the collaborative encoder; DWConv(·) represents the operation of the depthwise convolution block, which exemplarily consists of two depthwise separable convolution layers and one pointwise convolution layer.
[0089] Then multi-scale feature F i Perform feature fusion. Considering that due to the reduction in resolution, deep-level features will present more global contextual information while local details will be degraded; while shallow-level features will retain more local details but lack the global understanding required to identify buildings, this invention fuses multiple-stage features separately to aggregate local and global representations.
[0090] For local aggregation features, the output features of the early and mid-stages of the collaborative encoder are fused, and the calculation formula is shown in formula (9):
[0091]
[0092] Similarly, for the global aggregation feature, the output features of the mid-stage and final stage of the collaborative encoder are fused, and the calculation formula is shown in formula (10):
[0093]
[0094] Among them, F L represents local aggregation features; FG Represents global aggregate features; Indicates F i Information propagation path; F i represents the output features of the i-th stage of the collaborative encoder; UpConv(·) represents the upconvolution (upsampling) operation.
[0095] Based on this fusion strategy, the intermediate features generated by the intermediate cooperative interaction blocks can be supplemented and integrated into the local features and global features respectively.
[0096] Uncertainty Aggregated Decoder (UAD) is used to quantify pixel-wise uncertainty, with the goal of forcing the model to focus on uncertain regions to reduce segmentation uncertainty.
[0097] In some embodiments, for any pixel in the local aggregate feature or the global aggregate feature, a Gaussian distribution model is established. Taking the local aggregate feature as an example, for the local aggregate feature F L For any pixel p in the image, a probability Gaussian distribution model with mean μ and variance σ is established to quantify uncertainty. p is regarded as a random variable, and two embedding functions are introduced to predict the uncertainty of the pixel. As shown in formulas (11) and (12):
[0098] μ=Φ μ (F L ),σ=Φ σ (F L ); (11)
[0099]
[0100] Among them, F L Represents local aggregate features; μ and σ represent mean and variance respectively, with a shape of H×W×1; represents the Gaussian distribution of pixel p.
[0101] Here, σ can also measure the uncertainty of the pixel. If the response of any pixel in σ is high, it means that the model has no confidence in the predicted output at that location.
[0102] In conventional processing, T samples are randomly drawn from the probability representation to generate a series of uncertainty-aware segmentation maps, and the turbulence of the segmentation output is considered in the formula, and its variance is calculated as the uncertainty map, as shown in formula (13):
[0103] U=Norm(Var(x (1) ,x (2) ,…,x (T) )); (13)
[0104] Where U represents the obtained uncertainty map.
[0105] While the uncertainty modeling described above is intuitively feasible, the sampling operation in the formulation requires indiscriminate sampling to estimate the uncertainty map, which makes it challenging to train the uncertainty aggregation decoder using forward-backward propagation.
[0106] To address this issue, we employ a reparameterization trick to convert direct sampling operations into trainable components. Specifically, rather than sampling directly from the probability representation, we introduce a turbulent epsilon, generated from a standard Gaussian distribution N(0, I), and then compute x = σ × epsilon + μ.
[0107] By this method, the indiscriminate sampling process can be avoided and the gradient information can be effectively propagated backward, thereby achieving uncertainty learning. By the above method, the local aggregation feature F can be obtained. L The local uncertainty U L and global aggregate feature F G The global uncertainty U G .
[0108] In order to mitigate the impact of low confidence areas, the uncertainty maps in the local and global branches can be regarded as attenuated weights, and the local aggregated features and the global aggregated features are combined for feature integration, as shown in formula (14):
[0109] F out =(1-U G )×F G +(1-U L )×F L ; (14)
[0110] Among them, F out Represents the final feature map; U G represents global uncertainty; U L represents local uncertainty; F G represents the global aggregation feature; F L Represents local aggregation features.
[0111] The buildings contained in the remote sensing image are extracted based on the final feature map.
[0112] To further illustrate the advantages of the building extraction method provided by this application, Figure 5 As shown, by comparing the extraction method of the present application with other existing technologies, it can be seen that the extraction method of the present application can also achieve high-quality building extraction in challenging scenarios.
[0113] Corresponding to the building extraction method based on the collaborative encoder and the uncertainty aggregation decoder, the present invention also provides a building extraction system based on the collaborative encoder and the uncertainty aggregation decoder, the system comprising:
[0114] The image processing module is used to acquire remote sensing images and preprocess them.
[0115] The building extraction module inputs the remote sensing image into the pre-trained building extraction model to extract buildings from the remote sensing image.
[0116] Corresponding to the above method, the present invention also provides an electronic device, which includes a computer device, the computer device includes a processor and a memory, the memory stores computer instructions, and the processor is used to execute the computer instructions stored in the memory. When the computer instructions are executed by the processor, the electronic device implements the steps of the method described above.
[0117] An embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the aforementioned edge computing server deployment method. The computer-readable storage medium may be a tangible storage medium, such as a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a floppy disk, a hard disk, a removable storage disk, a CD-ROM, or any other form of storage medium known in the art.
[0118] It should be understood by those skilled in the art that the various exemplary components, systems and methods described in conjunction with the embodiments disclosed herein can be implemented in hardware, software or a combination of the two. Whether it is specifically performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present invention are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link via a data signal carried in a carrier.
[0119] It should be understood that the present invention is not limited to the specific configurations and processes described above and illustrated in the figures. For the sake of brevity, a detailed description of known methods is omitted. In the above embodiments, several specific steps are described and illustrated as examples. However, the method of the present invention is not limited to the specific steps described and illustrated. Those skilled in the art may make various changes, modifications, and additions, or change the order of the steps after understanding the spirit of the present invention.
[0120] In the present invention, features described and / or illustrated for one embodiment may be used in the same or similar manner in one or more other embodiments, and / or combined with or replace features of other embodiments.
[0121] The foregoing description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations to the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention are intended to be within the scope of protection of the present invention.
Claims
1. A building extraction method based on collaborative encoder and uncertainty aggregation decoder, characterized in that: The method comprises the following steps: Acquiring a remote sensing image, wherein the remote sensing image contains a building to be extracted; Inputting the remote sensing image into a pre-trained building extraction model to extract buildings from the remote sensing image; The building extraction model includes a collaborative encoder, a global-local fusion module and an uncertainty aggregation decoder connected in sequence; the remote sensing image is input into the collaborative encoder, and the collaborative encoder includes four stages, wherein the first and second stages are early stages, the third stage is an intermediate stage, and the fourth stage is a terminal stage; in the early stage, a multi-core convolution modulation block is used to construct local features; in the intermediate stage, an intermediate cooperative interaction block is used to perform global and local feature interaction; in the terminal stage, a multi-head self-attention block is used to enhance global features; the multi-scale features extracted by the collaborative encoder are respectively input into the global-local fusion module, and the output features of the early stage and the intermediate stage are fused to obtain local aggregate features; the output features of the intermediate stage and the terminal stage are fused to obtain global aggregate features; the local aggregate features and the global aggregate features are respectively input into the uncertainty aggregation decoder to obtain local uncertainty of the local aggregate features and global uncertainty of the global aggregate features, the local uncertainty and the global uncertainty are mapped to attenuation weights, and based on the attenuation weights, the local aggregate features and the global aggregate features are integrated to obtain a final feature map to extract the building; Flattening the remote sensing image and linearly projecting it into a one-dimensional vector, reshaping it to obtain an embedded feature map; segmenting the embedded feature map in the channel dimension to obtain multiple feature groups; In the early stage, for each feature group, depth-wise separable convolution with different kernel sizes is used to capture local information, and point convolution is performed to combine to obtain the combined feature, which is calculated as: Z ′ =Cat(DW 3×3 (Z1),…,DW k×k (Z n )); M=W p *Z ′ ; Among them, Z ′ Represents the local information; DW k×k represents a depth-wise separable convolution with a kernel size of k×k; Z n represents the nth feature group; M represents the combined feature; W p represents the point convolution; The multi-core convolution modulation block is used to enhance the combined features, and the calculation formula is: Among them, MKFAM(·) represents the multi-core convolution operation; F i represents the output features of the i-th stage; In the intermediate stage, after the input features of the intermediate cooperative interaction block are normalized, they are input into the multi-core convolution modulation block with residual connection. The calculation formula is: In the final stage, the features obtained in the intermediate stage are input into the multi-head self-attention block to simulate the global dependency relationship. The calculation formula is: Among them, X l represents the input features of the lth intermediate cooperative interaction block; FFN(·) represents the operation of the multi-layer perceptron; MHSA(·) represents the operation of the multi-head self-attention block.
2. The building extraction method based on collaborative encoder and uncertainty aggregation decoder according to claim 1, characterized in that: Before inputting the remote sensing image into the pre-trained building extraction model, the remote sensing image is pre-processed, including: The remote sensing image is scaled to a preset size and normalized.
3. The building extraction method based on collaborative encoder and uncertainty aggregation decoder according to claim 1 is characterized in that The multi-scale features extracted by the collaborative encoder are input into the global-local fusion module for feature fusion in stages, further comprising: The multi-scale features are input into the deep convolution block with residual connection to establish the information propagation path. The calculation formula is: in, Indicates F i Information propagation path; F i represents the output features of the i-th stage of the collaborative encoder; DWConv(·) represents the operation of the depthwise convolution block.
4. The building extraction method based on collaborative encoder and uncertainty aggregation decoder according to claim 3 is characterized in that: Obtain local aggregation features and global aggregation features, including: The output features of the early stage and the intermediate stage are fused to obtain the local aggregated features, which are calculated as follows: The output features of the intermediate stage and the final stage are fused to obtain the global aggregate feature, which is calculated as follows: Among them, F L represents the local aggregation feature; F G represents the global aggregate feature; Indicates F i Information propagation path; F i represents the output features of the i-th stage of the collaborative encoder; UpConv(·) represents the up-convolution operation.
5. The building extraction method based on collaborative encoder and uncertainty aggregation decoder according to claim 1, characterized in that: Inputting the local aggregated features and the global aggregated features into the uncertainty aggregation decoder respectively to obtain local uncertainty and global uncertainty, including: For any pixel in the local aggregate feature or the global aggregate feature, establishing a Gaussian distribution model; Reparameterization technology is used to implement uncertainty learning and obtain the local uncertainty and the global uncertainty.
6. The building extraction method based on collaborative encoder and uncertainty aggregation decoder according to claim 1, characterized in that: Based on the attenuation weight, the local aggregated features and the global aggregated features are integrated to obtain the final feature map, which is calculated as follows: F out =(1-U G )×F G +(1-U L )×F L ; Among them, F out Represents the final feature map; U G represents the global uncertainty; U L represents local uncertainty; F G represents the global aggregation feature; F L represents the local aggregation feature.
7. A building extraction system based on collaborative encoder and uncertainty aggregation decoder, characterized in that: When the system is executed, the steps of the method according to any one of claims 1 to 6 are implemented, and the system comprises: An image processing module, used for acquiring remote sensing images and preprocessing the remote sensing images; The building extraction module inputs the remote sensing image into a pre-trained building extraction model to extract buildings from the remote sensing image.
8. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Small sample target detection method based on multi-view feature fusion and meta-feature coding
CN118196575A
Image Recognition Method and System of Convolutional Neural Network Based on Global Detail Supplement
US20230368497A1