Urban remote sensing image segmentation method and system based on bidirectional coordinate attention and multi-scale adaptive feature fusion
By employing a bidirectional coordinate attention mechanism and a multi-scale adaptive feature fusion module, the problem of long-distance dependencies and multi-scale feature fusion in urban scene remote sensing images is solved, improving the accuracy and consistency of remote sensing image segmentation and making it suitable for urban remote sensing image processing systems.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-11
- Publication Date
- 2026-04-03
AI Technical Summary
Existing technologies struggle to effectively model long-distance dependencies and global contextual information in urban scene remote sensing image segmentation, leading to blurred target boundaries, missed detection of small targets, and semantic inconsistencies. Furthermore, scale imbalance and insufficient alignment of semantic hierarchy differences during multi-scale feature fusion affect segmentation accuracy.
An encoder-decoder architecture based on bidirectional coordinate attention mechanism is adopted, which combines a spatial-channel dual attention recalibration module and a multi-scale adaptive feature fusion module. It captures long-distance dependencies through global average pooling, adaptively enhances feature recalibration in spatial and channel dimensions, and performs adaptive weighted fusion of multi-scale features between the encoder and decoder.
It improves the segmentation accuracy and consistency of remote sensing images of urban scenes, effectively improves the blurring of target boundaries and the recognition of small targets, enhances the segmentation performance of the model on complex backgrounds, and controls the computational complexity, making it suitable for practical remote sensing image processing systems.
Smart Images

Figure CN121788818A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of remote sensing image processing technology, specifically to a method and system for urban remote sensing image segmentation based on bidirectional coordinate attention and multi-scale adaptive feature fusion. Background Technology
[0002] Semantic segmentation of urban remote sensing images is one of the important technologies in remote sensing for urban planning and disaster assessment, with broad practical application value. With the rapid development of remote sensing technology and the increasing abundance of high-resolution, multispectral remote sensing data, the accurate classification of urban land cover using semantic segmentation technology can provide crucial support for refined urban management.
[0003] With the rapid development of deep learning technology, convolutional neural networks (CNNs) and self-attention mechanisms have made significant progress in the field of semantic segmentation of remote sensing images. Traditional CNN methods, such as FCN, U-Net and its variants, can effectively extract local features and spatial hierarchical structures of images through encoder-decoder architectures, laying the foundation for pixel-level segmentation. However, these methods are usually limited by fixed local receptive fields, making it difficult to model long-distance dependencies and global contextual information in images. When dealing with remote sensing images in urban scenes with complex structures, diverse target scales, and severe background interference, problems such as blurred target boundaries, missed detection of small targets, and semantic inconsistencies easily arise, thus limiting the segmentation accuracy and practical application performance of the models.
[0004] To overcome these limitations, researchers have begun to combine self-attention mechanisms, such as Transformers, with CNNs to form hybrid architectures. For example, CN117078943B proposes a remote sensing image road segmentation method that integrates multi-scale features and a dual-attention mechanism. It weights encoder features through spatial and channel dual-attention modules and combines the context information extraction module Swin-Transformer to enhance global modeling capabilities, thus addressing the road fragmentation problem caused by occlusion. CN120088473B introduces a spatial state model with fused channel attention as an edge enhancement module into the SegNext model, aiming to improve the segmentation accuracy of ground feature edge details. CN120147854A further designs a method combining layer-by-layer convolutional units with an adaptive self-attention mechanism, aiming to balance computational efficiency with the ability to capture detailed road features.
[0005] While existing technologies have improved the model's ability to utilize global information and multi-scale features to some extent by introducing attention mechanisms, they still have shortcomings when facing the extreme complexity of urban scenarios: First, most methods still rely on predefined or limited scales to process multi-scale features, lacking the ability to adaptively model continuous scale distributions from small vehicles to large industrial parks. This can easily lead to scale imbalance during feature fusion, causing small target features to be submerged. Secondly, when modeling spatial context, traditional large convolutional kernels or global self-attention mechanisms may disrupt the spatial distribution of features, leading to excessive influence from irrelevant pixels, resulting in jagged edges or overly smoothed surfaces in key areas such as building outlines and road edges. Furthermore, existing methods often lack effective alignment mechanisms for semantic level differences and scale inconsistencies during the feature skipping fusion process between the encoder and decoder, resulting in low quality of fused features and affecting the final segmentation accuracy.
[0006] Therefore, there is an urgent need for a novel semantic segmentation scheme that can more reasonably model feature distribution, adaptively fuse multi-scale information, and effectively capture the global and local context of urban scenes in order to systematically solve the above problems. Summary of the Invention
[0007] In view of this, the present invention aims to overcome the problems of inaccurate target segmentation caused by the complex background of urban scenes and the difficulty of target modeling caused by the great scale diversity. Taking advantage of the easy expansion of the encoder-decoder architecture, a spatial attention mechanism that integrates multi-scale features is added to provide a semantic segmentation method for remote sensing images of complex scenes represented by cities.
[0008] To achieve the above objectives, this invention provides a method for urban remote sensing image segmentation based on a bidirectional coordinate attention mechanism, comprising: S1: Obtain remote sensing images of the urban scene to be segmented.
[0009] S2: Construct a semantic segmentation network based on an encoder-decoder architecture, wherein the network includes an encoder, a decoder, and a skip connection structure connecting the encoder and the decoder; In each layer of the decoder, a spatial-channel dual attention recalibration module is deployed to collaboratively enhance the input features in both spatial and channel dimensions. By explicitly encoding spatial coordinate orientation information and combining it with global channel dependency modeling, the module adaptively enhances features that are beneficial to semantic discrimination during feature fusion and resolution restoration, thereby improving segmentation accuracy and consistency. A multi-scale adaptive feature fusion module is set on the skip connection path between the encoder and the decoder to perform adaptive multi-scale fusion of high-resolution shallow texture features from the encoder and low-resolution deep semantic features from the previous layer of the decoder, and to construct a learnable adaptive weight mechanism to dynamically allocate the fusion ratio according to the contribution of features of different scales in the target region. Preferably, the encoder uses a pre-trained model based on a residual network to sequentially output feature maps at multiple scales; the decoder part gradually restores the spatial resolution of the feature maps through cascaded upsampling operations, and each upsampling layer is connected to the spatial-channel dual attention recalibration module.
[0010] S3: Train the semantic segmentation network model using a dataset containing training samples to obtain a trained model; S4: Input the remote sensing image of the urban scene to be segmented into the trained model, and output the semantic segmentation result image after network calculation.
[0011] Furthermore, the spatial-channel dual attention recalibration module includes: (1) The orientation-aware attention branch is used to perform global average pooling on the input feature map along the height and width dimensions respectively to obtain one-dimensional global context encodings in two directions. These two one-dimensional encodings are then fused and processed into a two-dimensional orientation-aware spatial attention weight map. This weight map is then used to recalibrate the spatial dimensions of the input features. (2) Local convolutional attention branch, used to perform local convolution operation on the input feature map, extract local detail features, calculate global channel attention weight vector for the local detail features, and use the weight vector to recalibrate the channel dimension of the local detail features; (3) Feature fusion unit, used to fuse features recalibrated by spatial dimension with features recalibrated by channel dimension, and output a refined feature map.
[0012] Furthermore, the specific operations of the direction-aware attention branch include: (1) Perform global average pooling in the width and height directions on the input feature map to obtain width and height-aware feature maps; (2) The width and height sensing feature maps are concatenated; the concatenated feature maps are then subjected to convolutional dimensionality reduction, batch normalization, and ReLU activation in sequence; (3) Separate the activated feature map and map it back to the original spatial dimension to obtain the width and height feature maps; (4) Generate spatial attention weight maps in the width and height directions by passing the width and height feature maps through the Sigmoid function; (5) Multiply the spatial attention weight map element by element with the original input feature map to obtain a feature map with enhanced spatial dimension.
[0013] Furthermore, the specific operations of the local convolutional attention branch include: (1) Perform a 3×3 convolution operation on the input feature map to extract local detail features; (2) Perform global average pooling on the local detail features to obtain the channel description vector; (3) The channel description vector is used to generate a channel weight vector through the Softmax function; (4) Perform matrix multiplication between the channel weight vector and the local detail features to obtain a feature map with enhanced channel dimension.
[0014] Furthermore, the multi-scale adaptive feature fusion module includes: (1) A multi-scale feature extraction unit, comprising at least two parallel convolutional branches with different sizes of convolutional kernels, used to extract multi-scale feature representations from input features under different receptive fields; (2) An adaptive weight generation unit is used to learn and generate a dynamic fusion weight map related to the spatial location and targeting the different receptive field features based on the current input features; (3) Weighted fusion unit, used to perform weighted summation of feature representations at each scale based on the dynamic fusion weight map, and output the fused features.
[0015] Furthermore, the multi-scale adaptive feature fusion module specifically performs the following operations: (1) Input feature maps from the encoder and feature maps from the decoder; (2) Use multiple parallel convolutional branches with different kernel sizes to process the input features respectively to obtain multi-scale feature representations; (3) Perform adaptive weight calculation on the multi-scale feature representation to generate fusion weights for each scale feature; (4) The multi-scale feature representation is weighted and summed according to the fusion weight to obtain the fused feature map.
[0016] Furthermore, the specific operations of the adaptive weight generation unit include: (1) The multi-scale features output by the multi-scale feature extraction unit are spliced together; (2) Compress the concatenated features using 1×1 convolution; (3) The compressed features are normalized by channel dimension through a Softmax layer to generate the dynamic fusion weight map, wherein the sum of the weights of each spatial location on different channels is 1.
[0017] This invention also provides a city remote sensing image segmentation system based on bidirectional coordinate attention and multi-scale adaptive feature fusion, comprising: (1) Image acquisition module, used to acquire remote sensing images of the city to be segmented; (2) Preprocessing module, used to preprocess the acquired urban remote sensing images, including size normalization and data augmentation; (3) Feature encoding module, which includes an encoder based on a deep residual network, used to extract multi-level features from the preprocessed image and generate multi-scale feature maps with different semantic levels and spatial resolutions; (4) Feature decoding and fusion module, comprising a decoder based on a bidirectional coordinate attention mechanism and a multi-scale adaptive feature fusion module, wherein: the decoder comprises multiple decoding layers, each decoding layer comprising a bidirectional coordinate attention unit and a multi-scale upsampling unit, The bidirectional coordinate attention unit is used to perform global context modeling on the input feature map along the height and width directions respectively, generate orientation-aware spatial attention weights, and recalibrate the spatial dimensions of the feature map. The multi-scale adaptive feature fusion module is deployed at the skip connection between the encoder and the decoder. It is used to adaptively weighted fuse shallow high-resolution features from the encoder and deep low-resolution features from the decoder. The module includes at least two parallel convolutional branches with receptive fields of different scales, and a weight generation network that dynamically generates spatially aware fusion weights based on the input features. (5) Output module, which is used to convert the final feature map after the feature decoding and fusion module into a semantic segmentation result and output the category label of each pixel.
[0018] Furthermore, the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the urban remote sensing image segmentation method based on the bidirectional coordinate attention mechanism described above.
[0019] Compared with the prior art, the beneficial effects of the present invention are as follows: First, this invention integrates a spatial attention mechanism with multi-scale features in the decoding stage as the core structure of the decoder. By performing global average pooling in the horizontal and vertical directions respectively, it captures long-distance dependencies and retains positional information in the opposite direction, thereby extracting global contextual information, enhancing the model's ability to express targets at different scales, and effectively improving problems such as blurred target boundaries and inaccurate segmentation in complex urban scenes.
[0020] Secondly, this invention introduces a multi-scale adaptive feature fusion module (MSAFM) between the encoder and decoder to adaptively fuse features from different levels during skip connections. This module achieves dynamic modeling of local and global features through a multi-scale spatial attention mechanism, adaptively and selectively emphasizing key information and suppressing background interference in the spatial dimension, thereby enhancing the semantic consistency and feature interaction efficiency between the encoder and decoder. This design further improves the network's segmentation accuracy for complex backgrounds and multi-scale targets in urban scene remote sensing images.
[0021] Finally, compared with some computationally complex global Transformer modules, this invention significantly improves performance while controlling model complexity and computational overhead based on efficient convolution and pooling operations, making it easy to apply in practical remote sensing image processing systems.
[0022] Other advantages, objectives, and features of the invention will be set forth in part in the description which follows, and in part will be apparent to those skilled in the art from the following examination, or may be learned from practice of the invention. The objectives and other advantages of the invention can be realized and obtained through the following description. Attached Figure Description
[0023] To make the objectives, technical solutions, and advantages of the present invention clearer, the preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings, wherein: Figure 1 This is a network architecture diagram of the present invention; Figure 2 It is an attention recalibration module diagram; Figure 3 This is a schematic diagram of the decoder module; Figure 4 It is a multi-scale adaptive fusion module; Figure 5 These are images selected from the Potsdam dataset; Figure 6 This is a diagram showing the segmentation effect of the truth. Figure 7 This is a diagram illustrating the segmentation effect of the present invention. Detailed Implementation
[0024] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. Unless otherwise specified, the following embodiments and features can be combined with each other.
[0025] The accompanying drawings are for illustrative purposes only and are schematic diagrams, not actual pictures. They should not be construed as limiting the invention. To better illustrate the embodiments of the invention, some parts in the drawings may be omitted, enlarged, or reduced, and do not represent the actual product dimensions. It is understandable to those skilled in the art that some well-known structures and their descriptions may be omitted in the drawings.
[0026] In the accompanying drawings of the embodiments of the present invention, the same or similar reference numerals correspond to the same or similar components. In the description of the present invention, it should be understood that if terms such as "upper," "lower," "left," "right," "front," and "rear" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, they are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, the terms used to describe positional relationships in the drawings are only for illustrative purposes and should not be construed as limiting the present invention. For those skilled in the art, the specific meaning of the above terms can be understood according to the specific circumstances.
[0027] This invention provides a method and system for urban remote sensing image segmentation based on a bidirectional coordinate attention mechanism. The invention will be further described in detail below with reference to the accompanying drawings.
[0028] Example 1: Overall Network Architecture and Process The semantic segmentation neural network for urban scene remote sensing images constructed in this invention adopts an encoder-decoder framework design based on a context residual network (CRN). This structure introduces a spatial attention recalibration module (hereinafter referred to as the "attention recalibration module") and a multi-scale adaptive feature fusion module (hereinafter referred to as the "adaptive fusion module") that fuses multi-scale features in the decoding stage. The model architecture is as follows: Figure 1 As shown, the overall process is as follows: 1.1 Input: Obtain high-resolution remote sensing images of the urban scene to be segmented and perform preprocessing such as standardization.
[0029] 1.2 Encoding Stage: The preprocessed image is input into the encoder, which extracts and outputs four feature maps at different scales through cascaded convolutional layers and downsampling operations. The downsampling rates are 1 / 4, 1 / 8, 1 / 16, and 1 / 32, respectively, forming a feature pyramid with progressively decreasing spatial resolution and progressively enhanced semantic information.
[0030] 1.3 Decoding and Fusion Stage: Decoder such as Figure 1 As shown on the right, it contains multiple decoding layers, each consisting of an upsampling module, an adaptive fusion module, and an attention recalibration module to refine features layer by layer. Each decoding layer receives feature maps enhanced by residual blocks from the corresponding layer of the encoder and the output feature map from the previous layer's decoder. The processing flow includes: 1.3.1 Feature Fusion: First, the multi-scale adaptive feature fusion module is used to deeply fuse the encoder features passed from the skip connection with the features of the previous layer decoder to solve the problem of semantic and scale differences.
[0031] 1.3.2 Feature Enhancement and Upsampling: Subsequently, the fused features are input into a spatial-channel dual attention recalibration module to adaptively enhance key features and suppress interference from both spatial and channel dimensions. Finally, 2x and 4x upsampling are performed through deconvolution to restore spatial resolution.
[0032] 1.4 Output: After several decoding layers, the feature map is restored to a size close to the input size. Finally, a 1×1 convolutional layer is used to adjust the number of channels to the number of classes, and after passing through the Softmax activation function, the class prediction probability map of each pixel is output.
[0033] Example 2: Detailed Implementation of the Core Module 2.1 Spatial-Channel Dual Attention Recalibration Module The module structure and workflow are as follows: Figure 2 As shown, its purpose is to adaptively refine features from both the global structural direction and the local detail channel dimensions during the decoding process, including the following three stages: A. The orientation-aware branch performs context modeling in bidirectional space. (1) Coordinate information embedding: First, input a feature map F in ∈R C×H×W For F in Global average pooling is performed separately in the width and height directions to obtain feature maps with two directions of awareness: F h ∈R C×H×1 and F w ∈R C×1×W .
[0034] (2) Feature splicing and dimensionality reduction: F h and Fw By concatenating the features in the spatial dimension, a joint feature map F is obtained. cat ∈R C ×1×(H+W) Subsequently, a 1×1 convolutional layer is used for dimensionality reduction and initial fusion, outputting the feature map F. mid ∈R C fr ×1×(H+W) , where C fr This represents the number of channels after dimensionality reduction.
[0035] (3) Nonlinear activation and feature separation: For F mid Batch normalization and ReLU activation are performed sequentially. Then, two independent 1×1 convolutional layers are used to process F. mid Separate it and map it back to the original spatial dimension to obtain F. ’ h ∈R C×H×1 and F ’ w ∈R C×1×W .
[0036] (4) Spatial attention generation: F ’ h and F ’ w Spatial attention weight maps A in the height and width directions are generated using the Sigmoid function respectively. h and A w .
[0037] (5) Spatial recalibration: A h and A w Compared with the original input feature map F in Element-wise multiplication is performed to adaptively enhance the feature map in the spatial dimension, outputting the spatially enhanced feature F. spatial .
[0038] B. Local convolutional branches model local features and channel attention. (1) Local feature extraction: The input feature map F in Local detail features F are extracted using a 3x3 convolutional layer (padded with 1s to maintain size). local .
[0039] (2) Channel attention generation: F local Perform global average pooling to obtain a channel description vector, and then use the Softmax function to generate a channel weight vector.
[0040] (3) Channel recalibration: The channel weight vector is recalibrated with F localMatrix multiplication is performed to recalibrate the feature map along the channel dimension, outputting the channel-enhanced feature F. channel .
[0041] C. Integration and Output: The spatial enhancement feature F spatial With the channel enhancement feature F channel The features are then fused; then batch normalization is performed on the fused features, and finally the recalibrated feature map F is output. out ∈R C×H×W .
[0042] 2.2 Multi-scale Adaptive Feature Fusion Module (MSAFM) The module structure is as follows: Figure 4 As shown, multi-scale parallel processing is performed on the high-resolution shallow texture features from the encoder and the low-resolution deep semantic features from the decoder, and a learnable adaptive weighting mechanism is constructed to dynamically allocate the fusion ratio according to the contribution of features at different scales in the target region. The specific operation is as follows: A. Feature Alignment: First, the input consists of features F from the encoder and features F from the previous layer decoder. Since the resolutions of the two features may differ, the feature with the lower resolution is upsampled first to make their spatial dimensions consistent.
[0043] B. Multi-scale feature extraction: The two aligned feature maps are concatenated. Then, they are input into two parallel convolutional branches: Branch 1: Use 1×1 convolution to learn the interactions between channels and lightweight feature transformations.
[0044] Branch 2: Use 3×3 convolution to extract medium-scale spatial features.
[0045] Each branch is followed by BN and ReLU. This yields two feature maps, F1 and F3, at different scales.
[0046] C. Adaptive Weight Generation and Fusion: The feature maps from the two scales are concatenated again, and the concatenated features are processed through a small convolutional network (e.g., two consecutive 1×1 convolutions with ReLU in between) to generate a two-channel weight map W∈R. H×W×2 Furthermore, Softmax is used to ensure that the sum of the channel weights at each spatial location is 1.
[0047] The weight map W is split into w1 and w3 along the channel dimension, and then multiplied element-wise with the corresponding feature maps F1 and F3 respectively, and summed to obtain the adaptive multi-scale fusion feature: F in =w1⊙F1+w3⊙F3.
[0048] Output the fused features Fin The input is fed into the attention recalibration module of the current decoding layer.
[0049] Example 3: Verification of Technical Effect 3.1 Loss Function: A composite loss function combining Dice coefficient loss and cross-entropy loss is adopted to address the class imbalance problem in urban scenarios.
[0050] 3.2 Training Strategy: The encoder part is initialized using ResNet weights pre-trained on ImageNet to accelerate convergence; the decoder and newly added modules are randomly initialized. End-to-end training is performed using the Adam optimizer and a multinomial decay learning rate strategy.
[0051] Table 1 shows a comparative experiment of this invention with some classic models on the Potsdam and Vaihingen datasets. On the Potsdam dataset, this invention outperforms existing models such as Unetformer, DC-Swin, and LskNet in terms of overall performance metrics. Specifically, the overall accuracy (OA) of this invention reaches 92.0%, the mean intersection-over-union (MIoU) reaches 87.5%, and the F1 score reaches 93.2%. Compared with DC-Swin, the best-performing comparative model, this invention improves OA and MIoU by 0.3% and 0.2%, respectively. Furthermore, in specific category recognition, this invention also achieves the best segmentation accuracy for the impermeable surface (ImSurf) and tree (Tree) categories, demonstrating the effectiveness of this invention in handling complex ground feature details.
[0052] As shown in Table 2, this invention also maintained its leading advantage on the Vaihingen dataset. Although different models have their own strengths and weaknesses in each category, this invention still achieved the highest scores on the OA and MIoU metrics, which reflect the overall performance of the model, reaching 92.4% and 84.1%, respectively. This indicates that this invention not only has high segmentation accuracy but also good generalization ability, and can adapt to remote sensing image semantic segmentation tasks in different scenarios.
[0053] Table 1 Potsdam dataset
[0054] Table 2 Vaihingen dataset
[0055] Select an image from the Potsdam dataset ( Figure 5 The segmentation effect is shown in Figure 6 and... Figure 7 It can be seen that the method proposed in this invention has excellent visual segmentation effect.
[0056] First, compare the original images. Figure 5 With segmentation results Figure 7 This invention can accurately identify the main land cover categories in images. It is particularly effective in extracting buildings and impermeable surfaces (imSurf). Figure 7 The segmentation results shown have clear edges and complete outlines, and are consistent with... Figure 6 The ground truth labels shown are highly consistent. Secondly, in terms of detail processing, the model also demonstrates good connectivity and detail preservation capabilities for densely distributed trees and complex road boundaries, effectively avoiding common boundary blurring and misclassification phenomena. This intuitively confirms the effectiveness of each module in the model of this invention in extracting multi-scale features and restoring spatial details.
[0057] In summary, this invention, through bidirectional spatial context modeling, can efficiently capture long-range dependencies along the natural extension direction of urban targets such as buildings and roads, generating a spatial attention map that is more visually intuitive, effectively improving the segmentation quality of object boundaries, and achieving accurate global context capture. By introducing local convolutional branches and channel attention, it ensures that key local texture and edge information are not lost while modeling the global context, and adaptively weights different semantic features, solving the feature overload problem in multi-scale target fusion and balancing details and semantics.
[0058] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A method for segmenting urban remote sensing images based on bidirectional coordinate attention and multi-scale adaptive feature fusion, characterized in that, include: S1: Acquire remote sensing images of the urban scene to be segmented; S2: Construct a semantic segmentation network based on an encoder-decoder architecture, wherein the network includes an encoder, a decoder, and a skip connection structure connecting the encoder and the decoder; A spatial-channel dual attention recalibration module is deployed in each layer of the decoder to perform multi-scale feature fusion and enhancement on features from the encoder. A multi-scale adaptive feature fusion module is set on the skip connection path between the encoder and the decoder to perform adaptive multi-scale fusion of features from the encoder and features from the previous layer of the decoder. S3: Train the semantic segmentation network model using a dataset containing training samples to obtain a trained model; S4: Input the remote sensing image of the urban scene to be segmented into the trained model, and output the semantic segmentation result image after network calculation.
2. The urban remote sensing image segmentation method based on bidirectional coordinate attention and multi-scale adaptive feature fusion as described in claim 1, characterized in that, The spatial-channel dual attention recalibration module includes: (1) The orientation-aware attention branch is used to perform global average pooling on the input feature map along the height and width dimensions respectively to obtain one-dimensional global context encodings in two directions. These two one-dimensional encodings are then fused and processed into a two-dimensional orientation-aware spatial attention weight map. This weight map is then used to recalibrate the spatial dimensions of the input features. (2) Local convolutional attention branch, used to perform local convolution operation on the input feature map, extract local detail features, calculate global channel attention weight vector for the local detail features, and use the weight vector to recalibrate the channel dimension of the local detail features; (3) Feature fusion unit, used to fuse features recalibrated by spatial dimension with features recalibrated by channel dimension, and output a refined feature map.
3. The urban remote sensing image segmentation method based on bidirectional coordinate attention and multi-scale adaptive feature fusion according to claim 2, characterized in that, The specific operations of the orientation-aware attention branch include: (1) Perform global average pooling in the width and height directions on the input feature map to obtain width and height-aware feature maps; (2) The width and height sensing feature maps are concatenated; the concatenated feature maps are then subjected to convolutional dimensionality reduction, batch normalization, and ReLU activation in sequence; (3) Separate the activated feature map and map it back to the original spatial dimension to obtain the width and height feature maps; (4) Generate spatial attention weight maps in the width and height directions by passing the width and height feature maps through the Sigmoid function; (5) Multiply the spatial attention weight map element by element with the original input feature map to obtain a spatial dimension-enhanced feature map.
4. The urban remote sensing image segmentation method based on bidirectional coordinate attention and multi-scale adaptive feature fusion according to claim 2, characterized in that, The specific operations of the local convolutional attention branch include: (1) Perform a 3×3 convolution operation on the input feature map to extract local detail features; (2) Perform global average pooling on the local detail features to obtain the channel description vector; (3) The channel description vector is used to generate a channel weight vector through the Softmax function; (4) Perform matrix multiplication between the channel weight vector and the local detail features to obtain a feature map with enhanced channel dimension.
5. The urban remote sensing image segmentation method based on bidirectional coordinate attention and multi-scale adaptive feature fusion according to claim 1, characterized in that, The multi-scale adaptive feature fusion module includes: (1) A multi-scale feature extraction unit, comprising at least two parallel convolutional branches with different sizes of convolutional kernels, used to extract multi-scale feature representations under different receptive fields from input features; (2) An adaptive weight generation unit is used to learn and generate a dynamic fusion weight map related to the spatial location and targeting the different receptive field features based on the current input features; (3) Weighted fusion unit, used to perform weighted summation of feature representations at each scale based on the dynamic fusion weight map, and output the fused features.
6. The urban remote sensing image segmentation method based on bidirectional coordinate attention and multi-scale adaptive feature fusion according to claim 5, characterized in that, The multi-scale adaptive feature fusion module performs the following operations: (1) Input feature maps from the encoder and feature maps from the decoder; (2) Use multiple parallel convolutional branches with different kernel sizes to process the input features respectively to obtain multi-scale feature representations; (3) Perform adaptive weight calculation on the multi-scale feature representation to generate fusion weights for each scale feature; (4) The multi-scale feature representation is weighted and summed according to the fusion weight to obtain the fused feature map.
7. A method for urban remote sensing image segmentation based on bidirectional coordinate attention and multi-scale adaptive feature fusion as described in claim 4 or 5, characterized in that, The specific operations of the adaptive weight generation unit include: (1) The multi-scale features output by the multi-scale feature extraction unit are spliced together; (2) Compress the concatenated features using 1×1 convolution; (3) The compressed features are normalized by channel dimension through a Softmax layer to generate the dynamic fusion weight map, wherein the sum of the weights of each spatial location on different channels is 1.
8. The urban remote sensing image segmentation method based on bidirectional coordinate attention and multi-scale adaptive feature fusion according to claim 1, characterized in that, The encoder of the semantic segmentation network model adopts a pre-trained model based on residual networks, which outputs feature maps at multiple scales in sequence. The decoder part of the semantic segmentation network gradually restores the spatial resolution of the feature maps through cascaded upsampling operations. Each upsampling layer is connected to the spatial-channel dual attention recalibration module.
9. A city remote sensing image segmentation system based on bidirectional coordinate attention and multi-scale adaptive feature fusion, characterized in that, include: (1) Image acquisition module, used to acquire remote sensing images of the city to be segmented; (2) Preprocessing module, used to preprocess the acquired urban remote sensing images, including size normalization and data augmentation; (3) Feature encoding module, which includes an encoder based on a deep residual network, used to extract multi-level features from the preprocessed image and generate multi-scale feature maps with different semantic levels and spatial resolutions; (4) Feature decoding and fusion module, comprising a decoder based on a bidirectional coordinate attention mechanism and a multi-scale adaptive feature fusion module, wherein: the decoder comprises multiple decoding layers, each decoding layer comprising a bidirectional coordinate attention unit and a multi-scale upsampling unit, The bidirectional coordinate attention unit is used to perform global context modeling on the input feature map along the height and width directions respectively, generate orientation-aware spatial attention weights, and recalibrate the spatial dimensions of the feature map. The multi-scale adaptive feature fusion module is deployed at the skip connection between the encoder and the decoder. It is used to adaptively weighted fuse shallow high-resolution features from the encoder and deep low-resolution features from the decoder. The module includes at least two parallel convolutional branches with receptive fields of different scales, and a weight generation network that dynamically generates spatially aware fusion weights based on the input features. (5) Output module, which is used to convert the final feature map after the feature decoding and fusion module into a semantic segmentation result and output the category label of each pixel.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the urban remote sensing image segmentation method based on bidirectional coordinate attention and multi-scale adaptive feature fusion as described in any one of claims 1 to 8.
Citation Information
Patent Citations
An edge-enhanced remote sensing image segmentation method and system integrating attention and spatial state models
CN120088473B
Remote sensing image road segmentation method and device based on layer-by-layer convolution and adaptive self-attention, and medium
CN120147854A
Cited By
Post-fusion feature enhancement decoding method for remote sensing image semantic segmentation
CN122023830A
A post-fusion feature enhancement decoding method for remote sensing image semantic segmentation
CN122023830B