Remote sensing image building extraction method and system

Through the wavelet transformation and dynamic attention method, low-frequency and high-frequency characteristics are fused, and asymmetric convolution branches and attention bottlenecks are combined, edge blur and scale diversity problems of building extraction in remote sensing images are solved, achieving high-precision building extraction.

CN120451790APending Publication Date: 2025-08-08XI'AN UNIVERSITY OF ARCHITECTURE AND TECHNOLOGY
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510556316.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-29
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

The existing remote sensing image building extraction methods have shortcomings in edge blur, scale diversity and morphological diversity. It is difficult to capture the overall structure of large-scale buildings and the detailed characteristics of small-scale buildings at the same time, and cannot adapt to the complex remote sensing environment.

Method used

The high-resolution remote sensing image building extraction method of wavelet transformation and dynamic attention is adopted. By extracting low-frequency and high-frequency features, it combines asymmetric convolution and inverse asymmetric convolution branch structures, a channel weighting mechanism and attention bottleneck are introduced to generate multi-scale deformable convolutions, and feature expression capabilities are enhanced.

Benefits of technology

It significantly improves the accuracy and adaptability of building extraction, can stably extract buildings under different resolution remote sensing images and complex lighting conditions, adapt to diverse building forms, and improves extraction accuracy and robustness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120451790A_ABST
    Figure CN120451790A_ABST
Patent Text Reader

Abstract

The invention discloses a remote sensing image building extraction method, which not only can accurately extract multi-scale building features in a remote sensing image, but also can establish long-term association between global context and local details, and can adaptively distinguish key information and interference information according to feature importance, thereby remarkably improving feature learning efficiency. In order to make full use of complementary information of multi-level features, a hierarchical context-detail attention mechanism is introduced, step-by-step progressive processing is performed from shallow edge features to deep semantic features, a human visual cognition process is simulated, and collaborative extraction and fusion of multi-scale building features are effectively realized. Compared with a traditional single-scale processing method, the method has the advantages that the extracted building contour is more complete, the details are more abundant, the method has higher adaptability to complex city scenes, and the method has remarkable advantages in processing complex scenes such as shadow shielding of high-rise building groups and irregular buildings in historical blocks; and reliable technical support is provided for smart city construction and territorial space planning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of image processing, and relates to a method and system for extracting buildings from remote sensing images, and in particular to a method and system for extracting buildings from high-resolution remote sensing images based on wavelet transform and dynamic attention. Background Art

[0002] With the acceleration of urbanization and the rapid development of high-resolution remote sensing technology, accurately extracting building information from remote sensing imagery has become a critical task in areas such as urban planning, disaster assessment, and land resource management. Building extraction technology can provide core data support for smart city construction and digital twin cities, and has broad application prospects. However, existing building extraction methods still face numerous challenges due to the diverse shapes and scales of buildings in remote sensing images, as well as the frequent effects of factors such as tree occlusion, shadow interference, and varying lighting.

[0003] Early building extraction methods primarily relied on traditional manually designed feature methods. These methods extract building features such as spectrum, texture, shape, and edges, and combine them with empirical rules or machine learning algorithms for classification and segmentation. For example, Zhang et al. proposed a two-stage optimization method that combines multispectral classification and texture filtering, improving extraction accuracy through adaptive threshold adjustment and morphological post-processing. Wu et al. combined spectral and shape features, optimizing segmentation results using the OTSU algorithm and the Canny edge detection operator. Furthermore, Inglada et al. proposed an automatic recognition method based on support vector machines that integrates shape, edge, texture, and contextual geometric features, significantly improving building detection accuracy. Although traditional methods perform well in specific scenarios, their performance is highly dependent on manually designed features and is difficult to adapt to complex and changing remote sensing environments. Specific issues include: 1. Limited feature representation: Manually designed features cannot fully capture the diversity of buildings, especially under conditions of occlusion or changing lighting, making extraction results prone to failure. 2. Insufficient generalization: Different sensors, building types, and ground conditions lead to differences in feature distribution, making traditional methods less adaptable. 3. Low degree of automation: Relying on manual intervention and post-processing, it is difficult to meet the timeliness requirements of large-scale urban monitoring.

[0004] In recent years, deep learning technology has made significant progress in the field of computer vision. In particular, the introduction of encoder-decoder structures such as fully convolutional networks (FCNs) and U-Nets has provided new solutions for extracting buildings from remote sensing images. For example, the U-Net proposed by Ronneberger et al. effectively combines shallow detail information with deep semantic information through a symmetrical encoder-decoder structure and skip connections. It performs well in medical image segmentation and has since been widely used in remote sensing image building extraction tasks. Lu et al. further designed a dual-resolution U-Net, which improves the accuracy of building boundaries in complex scenes through a parallel dual-branch encoder structure. In addition, SegNet optimizes the ability to retain detail at building edges by recording pooling indices to guide upsampling.

[0005] Although deep learning-based methods are superior to traditional methods in terms of automation and generalization, the following problems still exist: 1. Blurred edge information: The downsampling operation of traditional convolutional networks will lead to the loss of high-frequency details, especially the blurred edge information of buildings, which affects the extraction accuracy. 2. Scale diversity challenge: Building sizes vary significantly, and existing networks find it difficult to effectively capture the overall structure of large-scale buildings and the detailed features of small-scale buildings at the same time. 3. Morphological diversity problem: The shapes and orientations of buildings are complex and changeable, and fixed-shape convolution kernels are difficult to adapt to this diversity, resulting in incomplete segmentation results. 4. Difficulty in feature extraction: When the spectral characteristics of complex backgrounds and buildings are similar, the network is prone to false detection or missed detection. Summary of the Invention

[0006] The purpose of the present invention is to solve the problem of blurred edges when extracting images of buildings in the existing technology. It is difficult to effectively capture the overall structure of large-scale buildings and the detailed features of small-scale buildings, and it is unable to adapt to the diversity of building forms and the complexity of the environment, resulting in low accuracy of feature extraction results. A method and system for extracting buildings from remote sensing images are provided.

[0007] In order to achieve the above object, the present invention adopts the following technical solutions:

[0008] A method for extracting buildings from remote sensing images comprises the following steps:

[0009] S1: Extract low-frequency features and high-frequency features of building images, fuse low-frequency features and high-frequency features, and obtain cross-band fusion features W final ,

[0010] S2: Fusion features W across frequency bands from channel and spatial dimensions final Perform optimization and obtain the optimized feature F out ;

[0011] S3: Optimized feature F from horizontal and vertical directions out Perform feature extraction to obtain features Figure X cat , introduce the channel weighting mechanism to feature Figure X cat Perform dynamic channel weight adjustment to obtain features Figure X CAFRM , splicing features Figure X cat and features Figure X CAFRM Get the feature map after feature enhancement Y=Relu(X CAFRM +X);

[0012] S4: Introduce the attention bottleneck, generate an offset through the attention bottleneck, process the feature map Y through the offset, and obtain the final feature map F.

[0013] A further improvement of the present invention is:

[0014] The cross-band fusion feature W is obtained final ,include:

[0015] Extract the low-frequency and high-frequency components of the building image,

[0016] Extract the directional features of the image based on the high-frequency components, perform weighted fusion on the directional features, and obtain the fused high-frequency features;

[0017] Enhance the features of the image based on the low-frequency components to obtain enhanced low-frequency features;

[0018] Fuse the enhanced low-frequency features and the fused high-frequency features to obtain the cross-band fusion feature W final .

[0019] The optimized feature F is obtained out include:

[0020] For the cross-band fusion feature W final Perform channel attention weighted calculation to obtain the weighted feature map F,;

[0021] Perform spatial attention weighted calculation on the weighted feature map F, and the weighted feature map F,

[0022] Perform edge feature extraction on the feature map F after channel attention weighting to obtain the edge feature E(F) of the image;

[0023] Obtain the optimized feature F based on the feature map F,, the feature map F, and the edge feature E(F) out .

[0024] The features Figure X cat include:

[0025] The optimized feature F out Divided into two parts X1 and X2;

[0026] The horizontal features are extracted by asymmetric convolution, and the output is X1=f AC (X1);

[0027] The vertical features are extracted by inverse asymmetric convolution, and the output is X2=f IAC (X2);

[0028] Set X1 = f 1C (X1) and X2 = F IAC (X2) splicing, get X cat =[X1,X2].

[0029] The obtained features Figure X CAFRM ,include:

[0030] The features Figure X cat The input is sent to the adaptive feature recalibration module for global feature extraction, and the spatial dimension of the input feature map is compressed by global average pooling to obtain the global feature vector Z∈R 1×1×C ;

[0031] Based on the global feature vector Z, generate channel weight S∈R 1×1×c ;

[0032] The channel weight S∈R 1×1×c and features Figure X cat Perform weighted summation to obtain weighted features Figure X CAFRM ∈R B ×G×H×W .

[0033] The final feature map F is obtained, including:

[0034] Generate offsets based on the attention bottleneck and additional convolutional layers;

[0035] Adjust the shape and position of the convolution kernel based on the offset and output feature maps y of different scales;

[0036] The gating mechanism is introduced to process the multi-scale feature map y. The gating mechanism generates a weight map G through the convolution layer. Combined with the weight map G, the gating mechanism weightedly fuses the feature maps y of different scales to generate the final feature map f out .

[0037] When generating the offset, the feature map F out Calculated by the following formula:

[0038] G=Sigmoid(W G ·[F i ,F j ]

[0039] F out =G·F i +(1-G)·F j

[0040] Among them, W G is the weight of the gated convolutional layer, [F i ,F j ] represents the concatenation of feature maps.

[0041] A remote sensing image building extraction system, comprising:

[0042] The first feature processing module is used to extract the low-frequency features and high-frequency features of the building image, fuse the low-frequency features and high-frequency features, and obtain the cross-band fusion feature W final ,

[0043] The second feature processing module is used to process the cross-band fusion feature W from the channel dimension and spatial dimension final Perform optimization and obtain the optimized feature F out ;

[0044] The third feature processing module is used to process the optimized feature F in the horizontal and vertical directions. out Perform feature extraction to obtain features Figure X cat , introduce the channel weighting mechanism to feature Figure X cat Perform dynamic channel weight adjustment to obtain features Figure X CAFRM , splicing features Figure X cat and features Figure X CAFRM Get the feature map after feature enhancement Y=Relu(X CAFRM +X);

[0045] The fourth feature processing module is used to introduce an attention bottleneck, generate an offset through the attention bottleneck, and process the feature map Y through the offset to obtain the final feature map F.

[0046] A terminal device comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any one of the methods of the present invention when executing the computer program.

[0047] A computer-readable storage medium stores a computer program, wherein the computer program implements the steps of any one of the methods of the present invention when executed by a processor.

[0048] Compared with the prior art, the present invention has the following beneficial effects:

[0049] The present invention discloses a remote sensing image building extraction method, which extracts low-frequency features and high-frequency features of building images and performs cross-band fusion feature W. final The low-frequency component retains the global outline, and the high-frequency component enhances the edge details. The features of different frequency bands should be integrated to significantly improve the expression ability of edge features. The dual-branch structure of asymmetric convolution branch and inverse asymmetric convolution branch extracts the features in the horizontal and vertical directions respectively, which improves the feature expression ability. The channel weighting mechanism is introduced to the features. Figure X cat Dynamic channel weight adjustment is performed to enhance the information flow between channels. Multi-scale deformable convolution is introduced to adjust the shape and position of the convolution kernel through dynamic offset to better adapt to the problem of diverse building forms. This method shows excellent adaptability to remote sensing images of different resolutions, complex lighting conditions and diverse building forms. It can be stably applied to urban monitoring needs in different regions of the world and improve the extraction accuracy of the final results. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without paying any creative work.

[0051] Figure 1 The invention discloses a high-resolution remote sensing image building extraction network structure based on wavelet transform and dynamic attention.

[0052] Figure 2 The invention discloses a multi-downsampling fusion extraction structure based on wavelet enhancement.

[0053] Figure 3 The invention discloses a dynamic wavelet fusion sampling network structure.

[0054] Figure 4 The invention discloses a sampling structure based on wavelet transform.

[0055] Figure 5 It is an attention structure based on dynamic adaptive multi-band feature fusion of the present invention.

[0056] Figure 6 It is an attention structure based on hierarchical context-details of the present invention.

[0057] Figure 7 It is a feature enhancement structure based on dynamic channel interaction of the present invention.

[0058] Figure 8 It is a deformable convolution structure based on attention guidance in the present invention.

[0059] Figure 9 This paper presents a high-resolution remote sensing image building extraction method based on wavelet transform and dynamic attention (WDAF-Net) and compares the results with other methods on the WHU building dataset.

[0060] Figure 10 This paper presents a high-resolution remote sensing image building extraction method based on wavelet transform and dynamic attention (WDAF-Net) and compares the results with other methods on the Massachusetts building dataset. DETAILED DESCRIPTION

[0061] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions of the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings herein can be arranged and designed in various different configurations.

[0062] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention as claimed, but rather merely represents selected embodiments of the present invention. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present invention without creative effort shall fall within the scope of protection of the present invention.

[0063] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, it does not need to be further defined or explained in subsequent drawings.

[0064] In the description of the embodiments of the present invention, it should be noted that if the terms "upper," "lower," "horizontal," "inner," etc. appear, the orientation or positional relationship indicated is based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship in which the inventive product is typically placed when in use. These terms are merely for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or component referred to must have a specific orientation, be constructed, or operate in a specific orientation. Therefore, they should not be construed as limitations on the present invention. In addition, the terms "first," "second," etc. are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0065] In addition, if the term "horizontal" appears, it does not mean that the component must be absolutely horizontal, but can be slightly tilted. For example, "horizontal" only means that its direction is more horizontal than "vertical", and does not mean that the structure must be completely horizontal, but can be slightly tilted.

[0066] In the description of the embodiments of the present invention, it should be noted that, unless otherwise expressly specified or limited, the terms "disposed," "installed," "connected," and "connected" should be understood in a broad sense. For example, they can refer to fixed connections, detachable connections, or integral connections; they can refer to mechanical connections or electrical connections; they can refer to direct connections or indirect connections through an intermediate medium; and they can refer to internal connections between two components. Those skilled in the art will understand the specific meanings of the above terms in the present invention based on specific circumstances.

[0067] The present invention is described in further detail below with reference to the accompanying drawings:

[0068] See also Figure 1 The embodiment of the present invention discloses a method for extracting buildings from remote sensing images. The method innovatively adopts a codec architecture, combines a wavelet-enhanced multi-scale feature fusion module, a dynamic channel interaction feature enhancement mechanism, and an attention-guided deformable convolution structure, to achieve accurate and efficient extraction of buildings from high-resolution remote sensing images.

[0069] Step 1: Use two public remote sensing image building datasets as input images;

[0070] Image data was selected as input from two public remote sensing image building datasets. The WHU building dataset and the Massachusetts building dataset were used as data input, each of which has different scenes, densities, and image quality to ensure that the model has good generalization performance in various environments. In the data preprocessing stage, this embodiment performed data enhancement operations such as random hue and saturation adjustment, random scaling, random horizontal and vertical flipping, and random 90° rotation on the original dataset, and randomly cropped image segments with a resolution of 512×512 from the original image as model input to meet the input requirements of the building extraction network. The adjusted image size should meet the standard input size of the model to ensure that the network can effectively process images from different sources.

[0071] The specific implementation process of the embodiment is described as follows:

[0072] The original data of the WHU building dataset is aerial images of the New Zealand area, which contains more than 220,000 buildings of different shapes, as well as corresponding vector files and raster images. It is a classic building extraction dataset. These tiles constitute the entire dataset. The cropped images are then divided into three parts: the training dataset contains 4736 images, the validation dataset contains 1036 images, and the test dataset contains 2416 images. The Massachusetts building dataset is a classic dataset in the building segmentation task, containing aerial images of the Boston area with a spatial resolution of 1 meter, covering an area of 340 km. 2 , the images are merged and cropped, and finally 442 images are obtained for the training set, 82 images for the validation set and 36 images for the test set.

[0073] Compared to the WHU building dataset, the Massachusetts building dataset has lower ground resolution and labeling accuracy. This dataset is suitable for evaluating the model's ability to segment buildings in low-resolution remote sensing imagery. Comparing the WHU building dataset with its high-quality labels and image resolution, and the Massachusetts building dataset with its lower image resolution, allows for a thorough evaluation of the proposed method's building extraction performance and generalization.

[0074] Step 2: Construct a high-resolution remote sensing image building extraction network based on wavelet transform and dynamic attention;

[0075] like Figure 1 As shown in the figure, in this invention, the high-resolution remote sensing image building extraction network based on wavelet transform and dynamic attention (WDAF-Net) includes three key modules:

[0076] The high-resolution remote sensing image building extraction module (WEMDF) based on wavelet transform and dynamic attention, the dynamic channel interaction feature enhancement module (DCIM) and the dynamic deformable fusion decoder (DDFD) are specially optimized for the task of remote sensing image building extraction.

[0077] Furthermore, the network adopts an encoder-decoder architecture:

[0078] In the encoding stage, progressive feature refinement is achieved through the cascade structure of the wavelet-enhanced multi-downsampling fusion network (WEMDF) and the dynamic channel interaction module (DCIM). The WEMDF network decomposes the input features into multiple frequency bands through the dynamic wavelet fusion module (DWFM), using low-frequency components for downsampling while retaining the building edge detail features through high-frequency sub-bands. This embodiment proposes the introduction of a hierarchical context-detail attention module (HCDAM) into the wavelet-enhanced multi-downsampling fusion network (WEMDF) to significantly enhance the discriminative expression ability of multi-scale features.

[0079] In the decoding stage, this embodiment designs a dynamic deformable fusion decoder (DDFD), which combines the attention-guided deformable convolution (AGDCB) proposed in this embodiment with the adaptive gated feature fusion mechanism to achieve adaptive fusion of multi-scale contextual information, thereby enhancing the model's ability to reconstruct complex structures.

[0080] These improvements enable the wavelet transform and dynamic attention-based building extraction network of this embodiment to demonstrate excellent extraction performance in remote sensing image building extraction, further improving the accuracy and stability of high-resolution remote sensing image building extraction.

[0081] Overall, the wavelet transform and dynamic attention-based high-resolution remote sensing image building extraction network cleverly integrates the wavelet transform and dynamic attention mechanisms, leveraging their synergistic advantages. This network architecture, through carefully designed module connections and functional integration, provides a powerful solution for high-resolution remote sensing image building extraction. The advantages of this technology are primarily reflected in significantly improving the accuracy and robustness of building extraction, providing more reliable data support for applications such as smart city construction, refined urban planning, and intelligent traffic management. The network's modules are organically integrated, each performing its own functions while synergizing to achieve synergy, forming a complete and efficient method for high-resolution remote sensing image building extraction.

[0082] The specific steps include:

[0083] Step 2.1 Build a wavelet-enhanced multi-downsampling fusion network:

[0084] The wavelet-enhanced multi-downsampling fusion network (WEMDF) is a key part of this invention, which aims to solve two key problems of traditional convolutional neural networks (CNN) in building extraction in remote sensing images. Traditional pooling or strided convolution downsampling will lose high-frequency details (such as building boundaries), resulting in edge blurring problems; the building sizes in remote sensing images vary greatly (from large building complexes to small independent houses), and a single receptive field is difficult to take into account, resulting in multi-scale adaptability problems. This module achieves edge preservation and multi-scale feature optimization through the collaborative work of the dynamic wavelet fusion module (DWFM) and the hierarchical context-detail attention module (HCDAM).

[0085] Overall, the Wavelet Enhanced Multi-Downsampling Fusion Network (WEMDF) uses a parallel multi-branch architecture to process the input image:

[0086] The convolution branch performs feature extraction and downsampling through a 3×3 convolution operation with a stride of 2, which avoids information loss while preserving local structural features.

[0087] The pooling branch uses a maximum pooling operation with a stride of 2 to reduce the spatial dimension, effectively retaining significant spatial features while reducing computational complexity;

[0088] The dynamic wavelet fusion module (DWFM) branch parses the input image into low-frequency and high-frequency components through frequency domain decomposition, significantly enhancing the ability to extract detail features.

[0089] Furthermore, this embodiment designs a hierarchical context-detail attention module (HCDAM) to address the common scale change problem in building extraction tasks, and integrates it into the wavelet-enhanced multi-downsampling fusion network (WEMDF) to further optimize the feature extraction process, while maximally retaining high-frequency details, effectively reducing information loss. After multi-branch processing and splicing, the hierarchical context-detail attention module is used for optimization, and then the 1×1 convolution is used to perform dimensionality reduction on the optimization results, which not only compresses the number of feature channels to the predetermined target, retains multi-dimensional feature information, but also significantly reduces the model calculation overhead. Finally, in order to improve the efficiency of network training and stabilize the learning process, a batch normalization operation is introduced, and the result is processed by the ReLU activation function, and then sent to the dynamic channel interaction module (DCIM) for feature enhancement.

[0090] Furthermore, the dynamic wavelet fusion module (DWFM) proposed in the present invention consists of two main parts: wavelet transform (HWT) and dynamic adaptive multi-band feature fusion module (DMFF).

[0091] In the dynamic wavelet fusion module, the Haar wavelet transform layer is used to effectively reduce the spatial resolution of the feature map while retaining all the information. Haar wavelet transform is a widely recognized compact, binary and orthogonal transform, which has been widely used in image coding, edge extraction and binary logic design. The two-dimensional wavelet method is an extension of the one-dimensional wavelet, which is a powerful tool for multi-scale analysis of signals and is widely used in image processing. This process uses Haar wavelet transform to decompose the image with H×W resolution, where H0 and H1 represent low-pass and high-pass decomposition filters, respectively, which are used to capture the approximate information and high-frequency features of the image. The symbol ↓2 indicates that both the decomposed approximate component and the detail component are down-sampled by a factor of two. It decomposes the image into four sub-bands, the low-frequency component represents the global contour, and the high-frequency component is used to express the encoded edge texture detail information. It should be noted that the resolution of each component is reduced to The number of channels in the feature map has increased fourfold, and the Haar wavelet transform can encode part of the information from the spatial dimension to the channel dimension without losing any information. Therefore, the two-dimensional discrete wavelet transform (DWT) is lossless and reversible, and representative features can be extracted from the transformed image without any edge issues or information loss.

[0092] After wavelet transform, the low-frequency and high-frequency components of the feature map are fed into the dynamic adaptive multi-band feature fusion module (DMFF) for processing. The initialization structure of the dynamic convolution layer includes a standard 1×1 convolution layer, a batch normalization layer, and a ReLU activation function. The number of output channels is adaptively adjusted based on the channel dimension of the input feature map, ensuring the module's compatibility with input features of different dimensions. The computational process of this dynamic convolution layer can be expressed as:

[0093] f conv (X) = Relu(BN(W*X+b))

[0094] Where X∈R C×H×W is the input feature map, is the convolution kernel weight, is the bias term, * represents the convolution operation, C out is the number of dynamically adjusted output channels.

[0095] Apply dynamic convolution operations to the high-frequency components (LH, HL, HH) to extract directional features:

[0096]

[0097] It is the extracted directional feature. At the same time, a dynamic convolution layer is applied to the low-frequency component LL to enhance its expressive power:

[0098]

[0099] It is the enhanced low-frequency feature. The extracted directional features are spliced along the channel dimension and sent to the dynamic weight generation network to generate the adaptive weight W weight ∈[0,1]:

[0100] W weight =Sigmoid(W2*(Relu(W1*X+b1))+b2)

[0101] Where W1∈R 32×C×1×1 ,W2∈R 32×C×1×1 is the convolution kernel weight, b1∈R 32 ,b2∈R 32 Is the bias term, * represents the convolution operation. The dynamic weight is used to generate the normalized weight W of the output weight =[ω1,ω2,ω3], weighted fusion of high-frequency features:

[0102] W high =ω1⊙LH+ω2⊙HL+ω3⊙HH

[0103] Where ⊙ represents element-wise multiplication (Hadamard product), W high ∈R C×H×E It is the high-frequency feature after fusion. The enhanced low-frequency feature W LL and the fused high-frequency feature W high Add together to achieve cross-band feature fusion:

[0104] W final =W LL +W high

[0105] Then, the fused W final The input is fed into the Hierarchical Context-Detail Attention Module (HCDAM). This module addresses the common scale variation challenge in building extraction tasks by integrating a dual-path global context compression incentive mechanism, a multi-scale expansion spatial attention mechanism, and an edge protection mechanism to significantly improve feature extraction capabilities. Through feature fusion and edge detail preservation, the model's adaptability to complex visual tasks is enhanced, achieving coordinated optimization of global semantic associations and local geometric structures, enhancing the model's adaptability to complex visual tasks. Its overall framework can be summarized as follows:

[0106]

[0107] F out =F+F,,+E(F)

[0108] Among them, F is the input feature map, F C(F) represents the weight generated by the dual-path global context compression incentive mechanism, M S (F,) represents the weight generated by the multi-scale expansion spatial attention mechanism, represents element-wise multiplication, and E(F) represents the edge features extracted by the edge protection mechanism.

[0109] The dual-path global context compression excitation mechanism uses a parallel dual-path structure to process the input feature map F∈R C×H×W The module first generates two complementary global feature description vectors through parallel global average pooling and global maximum pooling operations: global average pooling captures the overall distribution information of the feature map, and global maximum pooling extracts the local significant response of the feature map. The output dimensions of both are R C×1×1 The two feature vectors are then processed through a dual nonlinear transformation layer with shared parameters to generate the channel attention weight M C (F), the calculation formula is as follows:

[0110] M C (F)=Sigmoid(MLP((GAP(F)+GMP(F))))

[0111] =Sigmoid(W2·ReLU(W1·(GAP(F)+GMP(F))))

[0112] Among them, GAP(F) and GMP(F) represent global average pooling and global maximum pooling respectively, and the output dimension is R C ×1×1 ; Dual-path shared weight moment W1∈R C / r×C and W2∈R C / r×C The bottleneck structure is formed, r is the compression ratio; ReLU is the activation function. Finally, the generated channel attention weight M c (F) is multiplied channel by channel with the input feature map F to obtain the weighted feature map F,:

[0113]

[0114] The multi-scale expansion spatial attention mechanism first extracts spatial information from the weighted feature map F, obtained by the dual-path global context compression excitation mechanism, and generates two spatial feature maps F by calculating the average and maximum values along the channel dimension. avg and F max The two feature maps are concatenated and used as the input of the multi-scale expansion spatial attention mechanism F spatial , the specific formula is as follows:

[0115] F spatial =Concat(Mean(F',dim=1),Max(F',dim=1))

[0116] Among them, Mean(F', dim = 1) and Mean(F', dim = 1) represent the average and maximum values along the channel dimension respectively, and the output dimension is R 1×H×W ; Concat represents the concatenation operation, and the generated dimension is R 2×H×W Then, multi-scale spatial information is extracted through parallel hole convolution layers to generate spatial attention weights M s (F'):

[0117]

[0118] Among them, Conv 3×3,rate=r represents a 3×3 convolution operation with a dilation rate of r; the final multi-scale dilation spatial attention weight M s (F') By weighted fusion of multi-scale attention weights and get:

[0119]

[0120] Among them, α1, α2, α3 are learnable weight parameters used to balance the spatial attention weights of different scales, and the multi-scale expansion spatial attention M s (F,) is multiplied element-wise with the feature map F, to obtain the weighted feature map F,,:

[0121]

[0122] The multi-scale dilated spatial attention mechanism captures multi-scale spatial information through parallel dilated convolutions, thereby enhancing the feature response of important areas. The design of dilated convolutions enables the module to extract features in different receptive fields, effectively addressing the limitations of traditional convolution at a fixed scale.

[0123] The edge protection mechanism aims to preserve the edge details in the input feature map. This module first calculates the average value along the channel dimension for the feature map F after the channel attention weighting to generate a single channel feature map F. avg Then, the Sobel operator is used to avg Perform edge detection and extract edge features F edge The specific formula is as follows:

[0124] F edge =Conv Sobel (F avg )

[0125] Among them, Conv Sobel represents the Sobel convolution kernel, which is used to extract edge information; F avg =Mean(F',dim=1) output dimension is R1×H×W Next, the edge features are enhanced through a 3x3 convolutional layer to generate the final edge features E(F):

[0126] E(F)=Conv 3×3 (F edge )

[0127] The Sobel operator and convolutional layers extract and enhance edge information, preserving detailed image features. The Sobel operator effectively captures gradient changes in the image, while the subsequent convolutional layers further enhance the expressiveness of edge features, ensuring that edge information is not lost during feature extraction.

[0128] After optimization using the Hierarchical Context-Detail Attention Module (HCDAM), the optimized results are then subjected to dimensionality reduction using 1×1 convolutions. This not only compresses the number of feature channels to the target, retains multi-dimensional feature information, but also significantly reduces the model's computational overhead. Finally, to improve network training efficiency and stabilize the learning process, batch normalization is introduced. The results are processed using the ReLU activation function and then fed into the Dynamic Channel Interaction Module (DCIM) for feature enhancement.

[0129] Step 2.2 Dynamic Channel Interaction Feature Enhancement Module (DCIM):

[0130] The Dynamic Channel Interaction Module (DCIM) significantly enhances feature extraction and information exchange between channels through a dual-branch architecture consisting of an asymmetric convolution branch and an inverse asymmetric convolution branch, combined with a channel-adaptive feature recalibration mechanism and channel shuffling. Its core design philosophy is to enhance multi-directional feature extraction through asymmetric convolution and to dynamically calibrate feature importance by introducing a channel weighting mechanism, thereby improving feature expression.

[0131] The dynamic channel interaction module (DCIM) first transforms the features processed by the wavelet enhanced multi-downsampling fusion network (WEMDF) Figure X It is divided into two parts X1 and X2, which are processed by asymmetric convolution branch and inverse asymmetric convolution respectively. The asymmetric convolution branch extracts horizontal features through asymmetric convolution, and the output is X1 = f AC (X1), and the inverse asymmetric convolution branch extracts the vertical features through inverse asymmetric convolution, and the output is X2 = f IAC (X2). This dual-branch structure can capture the feature information in the horizontal and vertical directions respectively, thereby enhancing the multi-directional feature extraction capability. Next, the outputs of the two branches are spliced together to obtain X cat = [X1, X2], and perform a splicing operation on the channel dimension. This step combines the feature information in the horizontal and vertical directions to form a richer feature representation. Then, the spliced features Figure X cat Perform channel adaptive feature recalibration module operation to obtain X CAFRM =f CAFRM (X cat ), where f CAFRM Represents the dynamic channel interaction mechanism. This mechanism optimizes the information interaction between channels by adaptively adjusting the weights between channels, thereby further enhancing the feature expression capability. Finally, the features after dynamic channel interaction are connected through residual connections. Figure X CAFRM With input features Figure X Add together and get the output Y=Relu(X CAFRM +X). The design of residual connection not only retains the original feature information, but also introduces nonlinear transformation, further improving the expression ability of the model. Finally, the output X CAFRM Channel shuffling is performed to enhance feature interaction by rearranging the channels of the feature map, thereby improving the model's expressiveness. Through these steps, the DCI module can effectively enhance feature extraction capabilities and strengthen information exchange between channels, thereby significantly improving model performance while reducing computational complexity.

[0132] In order to enhance the ability of multi-directional feature extraction, an asymmetric convolution branch and an inverse asymmetric convolution branch are proposed to extract horizontal and vertical features respectively, thereby solving the limitations of traditional convolution in extracting multi-directional features. Figure X It is divided into two parts X1 and X2, which are processed by the asymmetric convolution branch and the inverse asymmetric convolution branch respectively. AC and F IAC They represent the features extracted by the asymmetric convolution branch and the inverse asymmetric convolution branch respectively. Specifically, the asymmetric convolution branch extracts horizontal features through asymmetric convolution operations with convolution kernel sizes of 3×1 and 1×3. The calculation process is as follows:

[0133] F AC

[0134] =Dropout(BN(Conv 1×3 (ReLU(Conv 3×1 (ReLU(BN(Conv 1×3 (ReLU(Conv 3×1 (X1)))))

[0135] Among them, Conv 3×1 and Conv 1×3Represent convolution operations with kernel sizes of 3×1 and 1×3, respectively. BN represents batch normalization, ReLU is the activation function, and Dropout is used to prevent overfitting. The inverse asymmetric convolution branch extracts vertical features through inverse asymmetric convolution operations with kernel sizes of 1×3 and 3×1. The calculation process is as follows:

[0136] F IA1

[0137] =Dropout(BN(Conv 3×1 (ReLU(Conv 1×3 (ReLU(BN(Conv 3×1 (ReLU(Conv 1×3 (X1)))))

[0138] Finally, by fusing F AC and F IAC Generate X cat , achieving the coordinated optimization of global semantic association and local geometric structure, significantly improving the model's adaptability to complex visual tasks.

[0139] The fusion result is sent to the channel adaptive feature recalibration module, which further adjusts the information flow between channels through dynamically generated weights according to the content of the input feature map, thereby enhancing the interaction between different channel features. The channel adaptive feature recalibration module first Figure X cat ∈R C×H×W Perform global feature extraction and compress the spatial dimension of the input feature map through global average pooling (GAP) to obtain the global feature vector Z∈R 1×1×C The calculation formula for global average pooling is:

[0140]

[0141] Furthermore, two fully connected layers are used to generate channel weights. The first fully connected layer reduces the number of channels C to C / r (r is the reduction ratio, the default value is 8) and uses the ReL activation function. The second fully connected layer restores the number of channels from C / r to C and uses the Sigmoid activation function to generate weights between 0 and 1. By processing the above-obtained Z, the channel weight S∈R is generated. 1×1×c , the specific calculation process is as follows:

[0142] S=F ex (Z)=Sigmoid(W2·ReLU(W1·z))

[0143] in, and Is the weight matrix of the two convolutional layers. Finally, the generated channel weight S is applied to the input features Figure X cat Perform weighted summation to obtain weighted features Figure X CAFRM ∈R B×G×H×W :

[0144] X CAFRM =F scale (X cat ,S)=X cat ·S

[0145] The channel weighting mechanism establishes dependencies between channels based on the content of the input feature map and adaptively adjusts the feature response of each channel. It adaptively adjusts the dependencies between channels based on the content of the input features, thereby enhancing the feature expression capability.

[0146] Finally, the output result X CAFRM ∈R B×G×H×W Perform channel shuffle to get X out . Channel shuffling enhances the feature interaction capability by rearranging the channels of the feature map, thereby improving the expressive power of the model. The channel shuffling operation first divides the number of input feature map channels into several groups. The grouping strategy ensures that the channels of the feature map are evenly distributed to different groups, laying the foundation for subsequent channel rearrangement. Secondly, the dimensionality of the feature map is changed through the reshaping method. Specifically, the four-dimensional structure of the input tensor is transformed from batch size, number of channels, height and width to a new organizational form, namely batch size, number of groups, number of channels per group, height and width. This dimensional reorganization operation can effectively group the feature channels, facilitating subsequent operations such as group convolution. This transformation decomposes the channel dimension into two dimensions: the number of groups and the number of channels per group, thereby providing structural support for the rearrangement of channels within the group. Subsequently, the operation exchanges the number of groups dimension and the number of channels per group dimension through the transposition method to achieve the rearrangement of channels within the group. This step is the core of channel shuffling. It breaks the original order of channels and enables information between different groups to interact more fully.

[0147] Step 2.3 Dynamic Deformable Fusion Decoder:

[0148] To increase the receptive field, the present invention feeds the Y output of the Dynamic Channel Interaction Module (DCIM) into a dynamic deformable fusion decoder. This decoder employs multi-scale deformable convolution and a dynamic feature fusion mechanism to gradually integrate information from different modalities, thereby more accurately incorporating contextual information. Thanks to this dynamic fusion mechanism, the dynamic deformable fusion decoder is able to adaptively incorporate contextual cues and improve the network's ability to capture image details.

[0149] The core part of the dynamic deformable fusion decoder is the attention-guided deformable convolution, which enhances the ability of deformable convolution to capture spatial information through the attention learning module. Figure 10 As shown in the figure, the attention-guided deformable convolution first generates an offset based on the attention bottleneck and additional convolutional layers. The offset is used to adjust the shape and position of the convolution kernel, and the input feature map is processed to generate the final output. Deformable convolution adjusts the shape and position of the convolution kernel by introducing an offset based on the standard convolution. The offset is generated by the offset generation convolution layer enhanced by the attention bottleneck. This module dynamically adjusts the offset of the convolution kernel by introducing the attention bottleneck. The input of the offset generation convolution layer is the product of the original input feature map and the attention map. The generated offset pays more attention to the important areas in the input feature map.

[0150] The core design of the attention bottleneck is a dual attention mechanism that optimizes the extracted features by processing both channel and spatial dimensions. The channel attention module plays a key role in reducing background noise by dynamically assigning higher weights to channels that capture relevant object features, thereby suppressing channels with less information or more noise. Complementary to this, the spatial attention mechanism focuses on identifying and highlighting important foreground areas, directing the network's attention to spatial locations that are more likely to contain small objects. After the channel attention module and the spatial attention module process the feature map, this embodiment performs an element-by-element summation operation, so that the convolution operation can better adapt to the spatial structure of the input feature map. The output feature map y of the deformable convolution can be expressed as:

[0151]

[0152] Among them, p is the spatial position of the output feature map, w k is the convolution kernel weight, pk is the fixed position of the convolution kernel, and Δpk is the learned offset.

[0153] In order to adapt to the diversity of building forms, three different scales of attention-guided deformable convolution (AGDCB) are introduced, using 3×3, 5×5 and 7×7 convolution kernels with a stride of 2 to form a multi-scale feature pyramid. In order to further improve the fusion effect of multi-scale extraction, the module adaptively fuses feature maps of different scales through a gating mechanism to enhance the network's ability to express multi-scale information input. The image generates multi-scale feature maps through three different scales of deformable convolution layers, corresponding to different receptive fields. The gating mechanism generates a weight map G through the convolution layer to control the fusion ratio of features of different scales. Through the gating mechanism, feature maps F of different scales are adaptively fused. i and F j are weighted and fused to generate the final feature map F outThrough this dynamic fusion mechanism, DMD can adaptively select feature information of different scales, thereby enhancing the ability to express multi-scale targets and flexibly adjusting the contribution ratio of information flow between each scale level, thereby avoiding the excessive influence of low-level features on the final output and fully retaining the detailed information of high-level features. The specific formula is as follows:

[0154] G=Sigmoid(W G ·[F i ,F j ]

[0155] F out =G·F i +(1-G)·F j

[0156] Among them, W G is the weight of the gated convolutional layer, [F i ,F j ] represents the splicing work of feature maps.

[0157] To further integrate global information, the Dynamic Deformable Fusion Decoder (DDFD) introduces a global average pooling branch. This branch generates global context features through a global average pooling operation, which are then mapped to the same dimension as the multi-scale feature map through a 1×1 convolutional layer. Finally, the global context features are pixel-wise multiplied with the multi-scale feature map to generate the final output feature map F.

[0158] Step 3: Training high-resolution remote sensing image building extraction results

[0159] This paper describes the experimental configuration and optimization strategy for the WDAF-Net model on the PyTorch platform. The model was trained and evaluated using a hardware environment equipped with a 32GB Tesla V100 GPU. A publicly available dataset was used to extract buildings from high-resolution remote sensing images. Training was performed on Ubuntu 22.04. The network was optimized using the Adam algorithm, with an initial learning rate of 0.0001 and a cosine annealing algorithm for 10 epochs. WDAF-Net was trained for 100 epochs on both the WHU and Massachusetts building datasets.

[0160] For the WHU building dataset and the Massachusetts building dataset, standard metrics for remote sensing image segmentation, including precision, recall, F1 score, and intersection over union (IoU), were used for quantitative performance evaluation. Floating-point operations (FLOPs) and parameters were used to measure the computational complexity and scale of the model. The calculation formulas for all performance metrics are as follows:

[0161]

[0162] Extensive comparative experiments on public datasets validate the superiority of the proposed WDAF-Net. Specifically, this example conducts comparative experiments using the latest state-of-the-art methods on two widely used datasets: the WHU Buildings Dataset and the Massachusetts Buildings Dataset. The selected methods include semantic segmentation models: U-Net, DeepLabV3+, and HR-Net, as well as models specifically for building extraction: UNetFormer, HD-Net, ME-FCN, BuildFormer, and CTANet.

[0163] Table 1: Numerical comparison of different methods on the WHU dataset

[0164]

[0165] Table 2: Numerical comparison of different methods on the Massachusetts dataset

[0166]

[0167] This embodiment has conducted a large number of experiments on well-known benchmark datasets, confirming that the method of this embodiment has achieved new state-of-the-art results and demonstrated more excellent performance in the task of extracting buildings from high-resolution remote sensing images.

[0168] The method disclosed in the present invention addresses the core issues faced by building extraction in high-resolution remote sensing images, such as blurred edge information, scale diversity, morphological diversity, and difficulty in feature extraction. Through innovative module design and algorithm optimization, it significantly improves the accuracy and robustness of building extraction.

[0169] First, traditional convolutional neural networks are prone to losing high-frequency edge information during the downsampling process, resulting in blurred building boundaries. The present invention introduces wavelet transform and decomposes the image into low-frequency and high-frequency components through Haar wavelets. The low-frequency components retain the global contours, and the high-frequency components enhance the edge details. Dynamic adaptive multi-band feature fusion further generates a network through dynamic weights to adaptively fuse features of different frequency bands, significantly improving the expressive power of edge features. To address the problem of building scale diversity, the present invention designs a dual-path global context compression excitation mechanism and a multi-scale expansion spatial attention mechanism to optimize feature responses from the channel and spatial dimensions respectively.

[0170] Secondly, traditional convolutional neural networks have deficiencies in inter-channel information exchange, which limits their ability to express features. This paper uses a dual-branch structure consisting of an asymmetric convolution branch and an inverse asymmetric convolution branch to extract horizontal and vertical features, respectively. Combined with a channel-adaptive feature recalibration module and channel shuffling operations, this significantly enhances inter-channel information flow.

[0171] Finally, to address the diversity of building morphologies, this invention introduces multi-scale deformable convolution in the decoder. This method uses dynamic offsets to adjust the shape and position of the convolution kernel, and incorporates a gating mechanism to adaptively fuse features at different scales. These improvements enable this embodiment's fusion network, based on wavelet transform and dynamic attention, to demonstrate outstanding performance in extracting buildings from remote sensing images, achieving new state-of-the-art results.

[0172] The high-precision remote sensing image building extraction method proposed in the present invention has a wide range of practical application value in the fields of urban planning, disaster assessment and smart city construction. In terms of urban planning, this method can accurately extract building outlines, provide reliable data support for building density analysis, infrastructure layout optimization and urban renewal and transformation, assist government departments in making scientific decisions, improve land use efficiency, and can also be used for monitoring and governance of illegal buildings to maintain urban construction order. In the field of disaster management, this method can quickly identify the damage to buildings after a disaster, provide a key basis for the deployment of emergency rescue forces, disaster assessment and reconstruction planning, and significantly improve the efficiency of emergency response. In addition, the method shows excellent adaptability to remote sensing images of different resolutions, complex lighting conditions and diverse building forms, and can be stably applied to urban monitoring needs in different regions of the world. The present invention provides important technical support for the construction of smart cities and the development of digital twin cities, and will promote urban management to a smarter and more precise direction.

[0173] This embodiment also discloses a remote sensing image building extraction system, comprising:

[0174] The first feature processing module is used to extract the low-frequency features and high-frequency features of the building image, fuse the low-frequency features and high-frequency features, and obtain the cross-band fusion feature Wfinal ,

[0175] The second feature processing module is used to process the cross-band fusion feature W from the channel dimension and spatial dimension final Perform optimization and obtain the optimized feature F out ;

[0176] The third feature processing module is used to process the optimized feature F in the horizontal and vertical directions. out Perform feature extraction to obtain features Figure X cat , introduce the channel weighting mechanism to feature Figure X cat Perform dynamic channel weight adjustment to obtain features Figure X CAFRM , splicing features Figure X cat and features Figure X CAFRM Get the feature map after feature enhancement Y=Relu(X CAFRM +X);

[0177] The fourth feature processing module is used to introduce the attention bottleneck, generate an offset through the attention bottleneck, and process the feature map Y through the offset to obtain the final feature map F

[0178] This embodiment can not only accurately extract multi-scale architectural features in remote sensing images, but also establish a long-term association between global context and local details, and adaptively distinguish key information from interference information based on feature importance, significantly improving feature learning efficiency. In order to make full use of the complementary information of multi-level features, a hierarchical context-detail attention mechanism is introduced, which processes step by step from shallow edge features to deep semantic features, simulates the human visual cognitive process, and effectively realizes the collaborative extraction and fusion of multi-scale architectural features. Compared with traditional single-scale processing methods, the building outline extracted by this method is more complete, the details are more abundant, and it has stronger adaptability to complex urban scenes. It shows significant advantages in dealing with complex scenes such as shadow occlusion of high-rise buildings and irregular buildings in historical blocks, providing reliable technical support for smart city construction and national land space planning.

[0179] A schematic diagram of a terminal device provided in one embodiment of the present invention. The terminal device in this embodiment includes: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of each of the aforementioned method embodiments are implemented. Alternatively, when the processor executes the computer program, the functions of each module / unit in each of the aforementioned device embodiments are implemented.

[0180] The computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to accomplish the present invention.

[0181] The terminal device may be a computing device such as a desktop computer, a notebook computer, a PDA, a cloud server, etc. The terminal device may include, but is not limited to, a processor and a memory.

[0182] The processor can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0183] The memory may be used to store the computer programs and / or modules, and the processor implements various functions of the terminal device by running or executing the computer programs and / or modules stored in the memory and calling the data stored in the memory.

[0184] If the module / unit integrated in the terminal device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the process in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, it can implement the steps of each of the above-mentioned method embodiments. The computer program includes computer program code, which can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0185] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention shall be included within the scope of protection of the present invention.

Claims

1. A method for extracting buildings from remote sensing images, characterized in that: The following steps are involved: S1: Extract low-frequency features and high-frequency features of building images, fuse low-frequency features and high-frequency features, and obtain cross-band fusion features W final , S2: Fusion features W across frequency bands from channel and spatial dimensions final Perform optimization and obtain the optimized feature F out ; S3: Optimized feature F from horizontal and vertical directions out Perform feature extraction and obtain feature map X cat , introduce the channel weighting mechanism, and perform the feature map X cat Perform dynamic channel weight adjustment to obtain feature map X CAFRM , splicing feature map X cat and feature map X CAFRM Get the feature map after feature enhancement Y=Relu(X CAFRM +X); S4: Introduce the attention bottleneck, generate an offset through the attention bottleneck, process the feature map Y through the offset, and obtain the final feature map F.

2. The method for extracting buildings from remote sensing images according to claim 1, wherein: The cross-band fusion feature W is obtained final ,include: Extract the low-frequency and high-frequency components of the building image, Extract the directional features of the image based on the high-frequency components, perform weighted fusion on the directional features, and obtain the fused high-frequency features; Enhance the features of the image based on the low-frequency components to obtain enhanced low-frequency features; Fuse the enhanced low-frequency features and the fused high-frequency features to obtain the cross-band fusion feature W f inal .

3. The method for extracting buildings from remote sensing images according to claim 1, wherein: The optimized feature F is obtained out include: For the cross-band fusion feature W final Perform channel attention weighted calculation to obtain the weighted feature map F , ; Perform spatial attention weighted calculation on the weighted feature map F, and the weighted feature map F, Feature map F after weighting channel attention , Perform edge feature extraction to obtain the edge feature E(F) of the image; Based on the feature map F , , feature map F , And edge feature E(F) to obtain the optimized feature F out .

4. The method for extracting buildings from remote sensing images according to claim 1, wherein: The feature map X cat include: The optimized feature F out Divided into two parts X1 and X2; The horizontal features are extracted by asymmetric convolution, and the output is X1=f AC (X1); The vertical features are extracted by inverse asymmetric convolution, and the output is X2=f IAC (X2); Set X1 = f AC (X1) and X2 = f IAC (X2) splicing, get X cat =[X1,X2].

5. The method for extracting buildings from remote sensing images according to claim 4, wherein: The feature map X is obtained CAFRM ,include: The feature map X cat The input is sent to the adaptive feature recalibration module for global feature extraction, and the spatial dimension of the input feature map is compressed by global average pooling to obtain the global feature vector Z∈R 1×1×C ; Based on the global feature vector Z, generate channel weight S∈R 1×1×c ; The channel weight S∈R 1×1×c With feature map X cat Perform weighted summation to obtain the weighted feature map X CAFRM ∈R B ×G×H×W .

6. The method for extracting buildings from remote sensing images according to claim 1, wherein: The final feature map F is obtained, including: Generate offsets based on the attention bottleneck and additional convolutional layers; Adjust the shape and position of the convolution kernel based on the offset and output feature maps y of different scales; The gating mechanism is introduced to process the multi-scale feature map y. The gating mechanism generates a weight map G through the convolution layer. Combined with the weight map G, the gating mechanism weightedly fuses the feature maps y of different scales to generate the final feature map F. out .

7. The method for extracting buildings from remote sensing images according to claim 6, characterized in that: When generating the offset, the feature map F out Calculated by the following formula: G=Sigmoid(W G ·[F i ,F j ] F out =G·F i +(1-G)·F j Among them, W G is the weight of the gated convolutional layer, [F i ,F j ] represents the concatenation of feature maps.

8. A remote sensing image building extraction system, characterized in that: include: The first feature processing module is used to extract the low-frequency features and high-frequency features of the building image, fuse the low-frequency features and high-frequency features, and obtain the cross-band fusion feature W final , The second feature processing module is used to process the cross-band fusion feature W from the channel dimension and spatial dimension final Perform optimization and obtain the optimized feature F out ; The third feature processing module is used to process the optimized feature F in the horizontal and vertical directions. out Perform feature extraction and obtain feature map X cat , introduce the channel weighting mechanism, and perform the feature map X cat Perform dynamic channel weight adjustment to obtain feature map X CAFRM , splicing feature map X cat and feature map X CAFRM Get the feature map after feature enhancement Y=Relu(X CAFRM +X); The fourth feature processing module is used to introduce an attention bottleneck, generate an offset through the attention bottleneck, and process the feature map Y through the offset to obtain the final feature map F.

9. A terminal device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Dynamic multi-scale convolution and cross-level attention feature fusion method and device

    CN121053505A

  • Remote sensing image segmentation method based on cross-modal feature fusion and fine granularity compensation

    CN121685950A