A remote sensing image building extraction method coupling multi-scale high and low frequency features
By combining the CICF-Net model with convolutional neural networks and self-attention mechanisms, multi-scale fusion of high and low frequency features was achieved, solving the problems of scale variation and boundary ambiguity in building extraction from remote sensing images, and realizing fine extraction of buildings.
Patent Information
- Application Number
- CN202311790553.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-25
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2043-12-25
AI Technical Summary
Existing technologies struggle to accurately extract buildings from high-resolution remote sensing images, especially small buildings which are easily missed, large buildings which are incompletely segmented, and there is a lack of effective multi-scale feature fusion strategies.
A CICF-Net model is designed to achieve fine extraction and fusion of high and low frequency features by fusing high and low frequency features at multiple scales, combining convolutional neural networks and self-attention mechanisms, and leveraging the feature extraction advantages of encoders and decoders at different network depths.
It achieves accurate and clear segmentation boundary extraction of buildings, effectively solving the problems of missed detection of small buildings and incomplete extraction of large buildings, and achieving the best building extraction results.
Smart Images

Figure CN118015448B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of remote sensing image technology, specifically relating to a method for extracting buildings from remote sensing images by coupling multi-scale high and low frequency features. Background Technology
[0002] Accurate extraction of buildings from high-resolution remote sensing images is crucial for urban planning, urban dynamic monitoring, disaster response, and other related applications. However, due to the significant intra-class variations in buildings, encompassing buildings of different scales and shapes, and the complexity of urban backgrounds, it is difficult to accurately distinguish buildings in complex scenes, resulting in unclear segmentation boundaries. Therefore, achieving efficient and accurate building extraction from high-resolution remote sensing images remains a challenging task.
[0003] To address the common challenges of scale differences and blurred boundaries in building extraction, fully utilizing high- and low-frequency features in remote sensing images is crucial. A lack of high-frequency information can lead to missed detections of small buildings and inaccurate segmentation boundaries; conversely, a lack of low-frequency information can result in discontinuous segmentation of large buildings, potentially revealing internal holes. Currently, Convolutional Neural Networks (CNNs) and Transformers are considered effective methods for extracting both high- and low-frequency features. CNNs excel at extracting high-frequency features but have limited receptive fields and lack the ability to model long-range dependencies; Transformers typically have high computational requirements and perform poorly in extracting high-frequency features. Therefore, combining the advantages of both methods to achieve effective high- and low-frequency feature fusion is necessary to achieve refined building segmentation results.
[0004] Currently, the main implementation schemes for extracting buildings from remote sensing images using convolutional neural networks and self-attention mechanisms are as follows:
[0005] (1) Based on the remote sensing image training data (a dataset with pixel-by-pixel markings of buildings), large-format remote sensing images are cropped according to a certain cropping size and overlap rate if necessary.
[0006] (2) Using images and their image labels, a dedicated deep network is designed for building extraction. An end-to-end encoder-decoder structure is usually adopted. Most methods that combine CNN and Transformer frameworks use Transformer alone in the encoder or decoder; or use independent parallel CNN and Transformer branches to extract features; or use CNN for preliminary feature extraction as a pre-step of Transformer.
[0007] (3) Load the backbone network model weights obtained from fully supervised pre-training (e.g., pre-trained on ImageNet), and then fine-tune them in the downstream building segmentation task to accelerate the model convergence process.
[0008] The training set of the building dataset is input into the semantic segmentation network for model training. The model is then tested using a test set, and the model with the highest accuracy on the test set is selected as the final model. Post-processing of the prediction results can be performed to further optimize the boundary conditions and prediction accuracy.
[0009] Current research on building extraction from remote sensing images neglects the potential advantages of combining CNNs and Transformers in feature extraction, and overlooks the hierarchical nature of features within the network: shallower layers are better at capturing high-frequency features (details such as edges and textures), while deeper layers are better at capturing low-frequency features (more complex patterns and overall shape and structure). Furthermore, there is a lack of more effective multi-scale feature fusion strategies to integrate high- and low-frequency features acquired at different depths to address scale variations in buildings. Summary of the Invention
[0010] Purpose of the invention: To address the issues of varying scales and blurred boundaries in building segmentation, and to fully utilize the important high- and low-frequency features in building extraction, this invention proposes a remote sensing image building extraction method that couples multi-scale high- and low-frequency features. Taking multi-scale high- and low-frequency feature fusion and multi-level spatial interaction as the starting point, a building extraction method for high-resolution remote sensing images is designed to solve the problems of missed detection of small buildings and incomplete extraction of large buildings, thereby achieving precise building extraction.
[0011] Technical solution: A method for extracting buildings from remote sensing images by coupling multi-scale high and low frequency features, comprising the following steps:
[0012] Step 1: Build the CICF-Net model;
[0013] Step 2: Select the remote sensing building dataset and divide it into a training set, a validation set, and a test set;
[0014] Step 3: Train the CICF-Net model using the training set, validate it using the validation set during training, adjust the parameters of the CICF-Net model, test it using the test set, and select the CICF-Net model with the best test results as the final CICF-Net model.
[0015] Step 4: Input the remote sensing image of the building to be extracted into the final CICF-Net model to obtain the building extraction result;
[0016] The CICF-Net model includes an encoder and a decoder.
[0017] The encoder consists of, in sequence, a first Patch Embedding operation, a first multi-scale fusion stage, ..., an i-th Patch Embedding operation, an i-th multi-scale fusion stage, ..., a fourth Patch Embedding operation, and a fourth multi-scale fusion stage;
[0018] Each multi-scale fusion stage includes a first high- and low-frequency feature aggregator, a first downsampling, a second high- and low-frequency feature aggregator, a second downsampling, a focusing block, and a conversion block. The output of the first high- and low-frequency feature aggregator is connected to the second high- and low-frequency feature aggregator via the first downsampling, and the output of the second high- and low-frequency feature aggregator is connected to the focusing block via the second downsampling. The resolution of the first high- and low-frequency feature aggregator is higher than that of the second high- and low-frequency feature aggregator. The output of the focusing block, the output of the first high- and low-frequency feature aggregator, and the output of the second high- and low-frequency feature aggregator are fused through the conversion block to obtain the fused feature map.
[0019] The number of the first high- and low-frequency feature aggregators is one or more, the number of the second high- and low-frequency feature aggregators is one or more, and the number of the focusing blocks is one or more.
[0020] Furthermore, the following process is performed within the high- and low-frequency feature aggregator:
[0021] The input feature map is divided into a low-frequency branch and a high-frequency branch along the channel dimension. The high-frequency branch is further divided into a first high-frequency sub-branch and a second high-frequency sub-branch.
[0022] The features of the low-frequency branch are sequentially processed through depthwise separable convolution and skip connections for position encoding, sparsified using average pooling, multi-head self-attention, and upsampling to obtain the output of the low-frequency branch.
[0023] The features of the first high-frequency branch are sequentially processed through max pooling, a linear layer, and the GELU activation function to obtain the output of the first high-frequency branch;
[0024] The features of the second high-frequency branch pass through the inverse bottleneck layer with channel expansion operation to obtain the output of the second high-frequency branch;
[0025] The outputs of the low-frequency branch, the first high-frequency branch, and the second high-frequency branch are concatenated to obtain the concatenated features. The concatenated features are then passed sequentially through a depthwise separable convolution, skip connections, and a linear layer to obtain the output of the high-low frequency feature aggregator.
[0026] Furthermore, the inverse bottleneck layer with channel expansion operation is used to expand the dimension of the features of the second high-frequency branch from d to 4d, and then shrink it back to d.
[0027] Furthermore, the first high-frequency sub-branch and the second high-frequency sub-branch have the same number of channels, which is half the number of channels in the high-frequency branch.
[0028] Furthermore, based on the frequency ramp mechanism and the set embedding dimension, the channel ratio of high and low frequency branches in each multi-scale fusion stage is adjusted.
[0029] Furthermore, the adjustment of the channel ratio of high- and low-frequency branches in each multi-scale fusion stage based on the frequency ramp mechanism and the set embedding dimension specifically includes:
[0030] For each multi-scale fusion stage, define a pair of channel ratios C. high / C and C low / C, C high / C+C low / C = 1, where C represents the total number of channels. high C represents the number of channels in the high-frequency branch. low This represents the number of channels in the low-frequency branch; as the network deepens and the stages progress, C... low It should be increased gradually;
[0031] Channel ratios are controlled by defining "headers," including:
[0032] For each multi-scale fusion stage, the proportion of self-attention heads to the total number of heads is defined as C for that multi-scale fusion stage. low ;
[0033] At the same time, the ratio of the number of self-attention heads to the total number of heads is multiplied by the embedding dimension of this multi-scale fusion stage to obtain an integer.
[0034] Furthermore, the decoder is obtained based on the UpperNet model through the following operations:
[0035] Operation 1: The feature maps in the downsampling process are convolved with 1×1 and then input into the upsampling process for fusion;
[0036] Operation 2: Both the convolutions in the bottleneck layer of the pyramid pooling module and the final convolutions fused from the feature pyramid are performed using recurrent gated convolutions;
[0037] Operation 3: The feature map after feature pyramid fusion is passed through the segmentation head to obtain the decoder output.
[0038] Furthermore, the first Patch Embedding operation includes two convolution-normalization operations and an activation function located between the two convolution-normalization operations; the second to fourth Patch Embedding operations each include one convolution-normalization operation.
[0039] Beneficial effects: Compared with the prior art, the present invention has the following advantages:
[0040] (1) The method of this invention combines the potential advantages of CNN and Transformer at different network depths in feature extraction, and emphasizes the hierarchical nature of features in the network: shallow layers are better at capturing high-frequency features (detail features such as edges and textures), while deep layers are better at capturing low-frequency features (more complex patterns and overall shape structure); thus achieving accurate and clear segmentation boundary extraction of buildings.
[0041] (2) The method of the present invention extracts and fuses high and low frequency features of different scales through a cascaded multi-scale fusion stage to deal with the scale variation inside the building, effectively solving the problems of missed detection of small buildings and incomplete extraction of large buildings, and can extract accurate and clear segmentation boundaries.
[0042] (3) The method of the present invention performs well on three public building datasets and achieves the best results compared with other building extraction methods. Attached Figure Description
[0043] Figure 1 This is a schematic diagram of the overall architecture of the encoder;
[0044] Figure 2 This is a schematic diagram of the decoder structure;
[0045] Figure 3 This is a schematic diagram of the internal structure of a high- and low-frequency characteristic aggregator;
[0046] Figure 4 This is a comparison chart of the building extraction results obtained by the method of the present invention and other methods on the Massachusetts Buildings Public Dataset;
[0047] Figure 5 This is a comparison chart of the building extraction results obtained by the method of this invention and other methods on the WHU aviation building public dataset;
[0048] Figure 6 This is a comparison chart of the building extraction results obtained by the method of this invention and other methods on the Inria aviation building public dataset. Detailed Implementation
[0049] The technical solution of the present invention will now be further described in conjunction with the accompanying drawings and embodiments.
[0050] This embodiment discloses a method for extracting buildings from remote sensing images by coupling multi-scale high and low frequency features, which mainly includes the following steps:
[0051] Step 1: Select a high-resolution remote sensing building dataset, crop it according to a certain degree of overlap and size, divide the cropped remote sensing building dataset into corresponding training set, validation set and test set, which are used for training and evaluation of the model.
[0052] Step 2: Design a parallel coupled high- and low-frequency network, which includes an encoder and a decoder.
[0053] like Figure 1 As shown, the encoder in this embodiment consists of four multi-scale fusion stages with different channel numbers and sizes. Before each multi-scale fusion stage, a patch embedding operation is required. Except for the first stage, which includes two convolutional-normalization operations (with an activation function in between), the others all involve a single convolutional-normalization operation. Within each multi-scale fusion stage, a high- and low-frequency feature aggregator is introduced to achieve the main feature extraction. That is, the main feature extraction relies on high- and low-frequency feature aggregation blocks. During downsampling through lower-resolution high- and low-frequency feature aggregation blocks and focusing blocks, features of different scales are obtained and then fused through a transformation block.
[0054] Before training the parallel coupled high- and low-frequency network using the training set, the encoder is pre-trained using a self-supervised learning method.
[0055] Now combined Figure 3 The internal structure of the high- and low-frequency characteristic aggregator mentioned in this embodiment will be further explained.
[0056] The input feature map is divided into a low-frequency branch (LF) and a high-frequency branch (HF) along the channel dimension. The high-frequency branch (HF) is further divided into two sub-branches, each of which receives half the number of channels of the total high-frequency branch.
[0057] The initial features of the low-frequency (LF) branch need to be processed through depthwise separable convolutions and skip connections to achieve effective positional encoding. Before the computationally demanding multi-head self-attention operation, average pooling is used for sparsification, and finally, the features are upsampled back to the original resolution. The middle high-frequency sub-branch mainly performs max pooling on the features, followed by a linear layer and the GELU activation function. The bottom high-frequency sub-branch includes an inverse bottleneck layer with channel expansion (the dimension is expanded from d to 4d and then reduced back to d). Finally, the results of the three sub-branches are concatenated, processed through a depthwise separable convolution and skip connections, and then through a linear layer to achieve the initial fusion of the high and low frequency branches within each high- and low-frequency aggregator.
[0058] In this step, the channel ratio of high-frequency and low-frequency branches is set based on the frequency ramp mechanism and the set embedding dimension; further explanation follows.
[0059] As network depth increases, the proportion of channels allocated to low-frequency branches gradually increases to fully utilize the capabilities of high- and low-frequency branches at different network depths. For each multi-scale fusion stage, a pair of channel proportions (C) is defined. high / C and C low / C), to balance the ratio of high and low frequency branches, where C high / C+C low / C = 1. C high / C gradually decreases from shallow to deep layers, while C low / C gradually increases. In this embodiment, the proportion of these channels is controlled by defining "heads," and the optimal network parameters are set through experiments and experience, as shown in Table 1. There are a total of four multi-scale fusion stages, and the proportion of attention heads to the total number of heads in each multi-scale fusion stage is the C of that multi-scale fusion stage. low At the same time, it is necessary to ensure that this ratio can be multiplied by the embedding dimension of the multi-scale fusion stage to obtain an integer.
[0060] Table 1
[0061] Parameter name Phased setup Embedding dimension 96,192,384,512 Total number of heads 3,6,12,16 Number of attention heads 1,3,8,15 <![CDATA[Number of blocks (n i 1 , n i 2 , n i 3 )]]> (1,2,1),(2,2,2),(4,6,4),(2,2,2)
[0062] like Figure 2 As shown, this embodiment introduces recurrent gated convolution (gG) into the decoder. n Conv) is used to achieve multi-level spatial interaction at different scales (between buildings, between buildings and the background), thereby improving the restoration of building details.
[0063] The decoder in this embodiment is based on a modified version of the general UpperNet design. First, it performs 1×1 convolutions on the feature maps during downsampling, and then fuses them during upsampling. Second, and most importantly, it replaces the convolutions in the bottleneck layer of the pyramid pooling module, as well as the convolutions in the final feature pyramid fusion, with recurrent gated convolutions. The fused feature map is then processed by a segmentation head to obtain the extracted building images. Figure 2 The right side shows the computational details of the second-order recurrent gated convolution required for building extraction.
[0064] Step 3: Set up data preprocessing and augmentation strategies during training, including normalization, random rotation, random flip, and random cropping and resizing. Simultaneously, set appropriate hyperparameters for training.
[0065] Step 4: Load the pre-trained weights of the encoder, input the training set of the building dataset for training, and validate and automatically adjust the model weights through the validation set during training.
[0066] Step 5: Conduct tests on the test set, select the model with the best test results as the final model, and achieve refined building extraction.
[0067] The method proposed in this embodiment, denoted as CICF-Net, is compared with other methods (U-Net, Deeplab V3+, SwinTransformer, UNetFormer, MA-FCN, EU-Net, MHA-Net, CBRNet, and BCTNet) on three publicly available building datasets (Massachusetts Building Dataset, WHU Aeronautical Building Dataset, and Inria Aeronautical Image Annotation Dataset). The accuracy results are shown in Tables 2, 3, and 4. A comparison of the building extraction results is also shown in the figure. Figure 4 , Figure 5 and Figure 6 Therefore, it can be seen that, compared with other methods, the method proposed in this embodiment extracts more accurate building results.
[0068] Table 2
[0069] method IoU (%) F1(%) U-Net 70.71 82.84 Deeplab V3+ 68.92 81.60 Swin Transformer 72.11 83.80 UNetFormer 71.67 83.50 MA-FCN 73.80 84.93 EU-Net 73.93 85.01 MHA-Net 74.46 85.36 CBRNet 74.55 85.42 BCTNet 75.04 85.74 CICF-Net 75.17 85.83
[0070] Table 3
[0071]
[0072]
[0073] Table 4
[0074] method IoU (%) F1(%) U-Net 73.01 84.40 Deeplab V3+ 76.81 86.88 Swin Transformer 78.86 88.18 UnetFormer 76.47 86.67 MA-FCN 79.67 88.68 EU-Net 80.50 89.20 CBRNet 81.10 89.56 SST 79.42 87.99 CICF-Net 81.28 89.67
Claims
1. A method for extracting buildings from remote sensing images by coupling multi-scale high- and low-frequency features, characterized in that: Includes the following steps: Step 1: Build the CICF-Net model; Step 2: Select the remote sensing building dataset and divide it into a training set, a validation set, and a test set; Step 3: Train the CICF-Net model using the training set, validate it using the validation set during training, adjust the parameters of the CICF-Net model, test it using the test set, and select the CICF-Net model with the best test results as the final CICF-Net model. Step 4: Input the remote sensing image of the building to be extracted into the final CICF-Net model to obtain the building extraction result; The CICF-Net model includes an encoder and a decoder. The encoder consists of, in sequence, a first Patch Embedding operation, a first multi-scale fusion stage, a second Patch Embedding operation, a second multi-scale fusion stage, a third Patch Embedding operation, a third multi-scale fusion stage, a fourth Patch Embedding operation, and a fourth multi-scale fusion stage; Each multi-scale fusion stage includes a first high- and low-frequency feature aggregator, a first downsampling, a second high- and low-frequency feature aggregator, a second downsampling, a focusing block, and a conversion block. The output of the first high- and low-frequency feature aggregator is connected to the second high- and low-frequency feature aggregator via the first downsampling, and the output of the second high- and low-frequency feature aggregator is connected to the focusing block via the second downsampling. The resolution of the first high- and low-frequency feature aggregator is higher than that of the second high- and low-frequency feature aggregator. The output of the focusing block, the output of the first high- and low-frequency feature aggregator, and the output of the second high- and low-frequency feature aggregator are fused through the conversion block to obtain the fused feature map. The number of the first high- and low-frequency feature aggregators is one or more, the number of the second high- and low-frequency feature aggregators is one or more, and the number of the focusing blocks is one or more; The following process is performed within the high- and low-frequency feature aggregator: The input feature map is divided into a low-frequency branch and a high-frequency branch along the channel dimension. The high-frequency branch is further divided into a first high-frequency sub-branch and a second high-frequency sub-branch. The features of the low-frequency branch are sequentially processed through depthwise separable convolution and skip connections for position encoding, sparsified using average pooling, multi-head self-attention, and upsampling to obtain the output of the low-frequency branch. The features of the first high-frequency branch are sequentially processed through max pooling, a linear layer, and the GELU activation function to obtain the output of the first high-frequency branch; The features of the second high-frequency branch pass through the inverse bottleneck layer with channel expansion operation to obtain the output of the second high-frequency branch; The outputs of the low-frequency branch, the first high-frequency branch, and the second high-frequency branch are concatenated to obtain the concatenated features. The concatenated features are then passed sequentially through a depthwise separable convolution, skip connections, and a linear layer to obtain the output of the high-low frequency feature aggregator.
2. The method for extracting buildings from remote sensing images by coupling multi-scale high and low frequency features according to claim 1, characterized in that: The inverse bottleneck layer with channel expansion operation is used to increase the dimension of the features of the second high-frequency branch from... Expand to Then shrink back .
3. The method for extracting buildings from remote sensing images by coupling multi-scale high and low frequency features according to claim 1, characterized in that: The first high-frequency sub-branch and the second high-frequency sub-branch have the same number of channels, which is half the number of channels in the high-frequency branch.
4. The method for extracting buildings from remote sensing images by coupling multi-scale high and low frequency features according to claim 1, characterized in that: Based on the frequency ramp mechanism and the set embedding dimension, the channel ratio of high and low frequency branches in each multi-scale fusion stage is adjusted.
5. The method for extracting buildings from remote sensing images by coupling multi-scale high and low frequency features according to claim 4, characterized in that: The aforementioned adjustment of the channel ratio of high- and low-frequency branches in each multi-scale fusion stage, based on the frequency ramp mechanism and the set embedding dimension, specifically includes: For each multi-scale fusion stage, define a pair of channel ratios. and , , Indicates the total number of channels. This indicates the number of channels in the high-frequency branch. This represents the number of channels in the low-frequency branch. As the network deepens and the multi-scale fusion stage progresses, Increase; Channel ratios are controlled by defining "headers," including: For each multi-scale fusion stage, the proportion of self-attention heads to the total number of heads is defined as the percentage for that multi-scale fusion stage. ; At the same time, the ratio of the number of self-attention heads to the total number of heads is multiplied by the embedding dimension of this multi-scale fusion stage to obtain an integer.
6. The method for extracting buildings from remote sensing images by coupling multi-scale high and low frequency features according to claim 1, characterized in that: The decoder is obtained by performing the following operations on the UpperNet model: Operation 1: The feature maps in the downsampling process are convolved with 1×1 and then input into the upsampling process for fusion; Operation 2: Both the convolutions in the bottleneck layer of the pyramid pooling module and the final convolutions fused from the feature pyramid are performed using recurrent gated convolutions; Operation 3: The feature map after feature pyramid fusion is passed through the segmentation head to obtain the decoder output.
7. The method for extracting buildings from remote sensing images by coupling multi-scale high and low frequency features according to claim 1, characterized in that: The first Patch Embedding operation includes two convolution-normalization operations and an activation function located between the two convolution-normalization operations; the second to fourth Patch Embedding operations each include one convolution-normalization operation.
Citation Information
Patent Citations
Construction waste detection method and system based on YOLOv11 and wavelet convolution
CN122289656A
High-resolution remote sensing road extraction method based on space-frequency domain characteristics
CN122597994A
