A method for road extraction from remote sensing images combining AST and hierarchical transmission aggregation
By combining AST with hierarchical propagation aggregation, a dual-path mechanism of global and local attention is constructed. The Agent-Swin Transformer module is used to solve the problems of inaccuracy and discontinuity in road extraction from remote sensing images, realize efficient multi-scale feature fusion and long-range topological association, and improve the accuracy and computational efficiency of road extraction.
Patent Information
- Application Number
- CN202510619472.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-14
- Publication Date
- 2025-12-02
- Estimated Expiration
- 2045-05-14
AI Technical Summary
Existing methods for road extraction from remote sensing images suffer from problems such as conflict between shallow texture features and deep semantic features and low computational efficiency when processing high-resolution remote sensing images, resulting in inaccurate and discontinuous road extraction.
We adopt a method that combines AST and hierarchical transmission aggregation. The hierarchical transmission aggregation module constructs a dual-path collaborative mechanism of global attention and local positional attention. Combined with the Agent-Swin Transformer module, we utilize multi-granularity window partitioning and agent attention mechanism to achieve multi-scale feature fusion and long-range topological association.
It significantly improves the accuracy and continuity of road extraction, and reduces the computational resource consumption of high-resolution image processing, especially in the feature fusion quality of high-density building areas and shadow-occluded areas.
Smart Images

Figure CN120451793B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of road segmentation technology in remote sensing images, and in particular to a method for road extraction from remote sensing images that combines AST with hierarchical transmission aggregation. Background Technology
[0002] With the continuous development of remote sensing satellite technology, we can more easily acquire high-resolution remote sensing imagery. Extracting roads from high-resolution remote sensing imagery plays a crucial role in urban planning, traffic management, and environmental monitoring. However, in remote sensing imagery, roads typically span the entire image and often possess different shapes, widths, and materials. This makes extracting accurate and complete road structures very difficult. Furthermore, remote sensing images contain numerous objects similar to roads, such as rivers and field ridges, which severely interfere with the road extraction results, leading to inaccurate and discontinuous extractions. Therefore, accurately and efficiently extracting road network structures from remote sensing imagery remains a significant challenge.
[0003] Domestic and international researchers have conducted extensive research in the field of remote sensing road extraction, proposing numerous deep learning-based methods. These methods can be categorized into road extraction methods based on traditional convolutional neural networks (CNNs) and those based on Transformers. However, traditional CNN-based methods often suffer from a conflict between shallow texture features and deep semantic features in skip connections, and the computational efficiency of traditional Transformers is low. Therefore, current methods require further improvement. Summary of the Invention
[0004] To address the aforementioned technical issues, this application proposes a method for road extraction from remote sensing images that combines AST with hierarchical transmission aggregation.
[0005] The technical solution adopted in this application is: a method for road extraction from remote sensing images combining AST and hierarchical transmission aggregation, comprising the following steps:
[0006] Step 1: Create a remote sensing road segmentation dataset and divide it into a training set and a test set;
[0007] Step 2: Construct a road segmentation network from remote sensing images, including:
[0008] Step 2.1: Build the encoder and decoder modules;
[0009] Step 2.2: Add a hierarchical transmission and aggregation module at the skip connection of the encoder and decoder at each stage. The hierarchical transmission and aggregation module builds a pyramid-shaped dual-path attention architecture based on the skip connection. Through the dual-path attention mechanism and the pyramid-shaped feature interaction architecture, noise suppression, semantic enhancement and multi-scale feature fusion are gradually completed. Finally, the multi-scale optimized features are passed to the corresponding decoder through the skip connection.
[0010] Step 2.3: Add an Agent-SwinTransformer module between the encoder in the last stage and the decoder in the first stage. The Agent-Swin Transformer module integrates the Agent-Attention mechanism and the SwinTransformer architecture. Through multi-granularity window partitioning and agent attention mechanism, it constructs global road topology association while maintaining local detail accuracy.
[0011] Step 3: Train the constructed remote sensing image road segmentation network using the training set and save the training weights;
[0012] Step 4: Input the processed remote sensing road image into the trained remote sensing image road segmentation network, and output the accurate segmentation result of the remote sensing image data.
[0013] Furthermore, the encoder and decoder modules adopt the encoder-decoder structure of CNN, and the encoder module uses a pre-trained ResNet-34 network for multi-level feature extraction.
[0014] Furthermore, the feature map input to the encoder module is the basic feature map obtained after normalization, initial 7×7 convolution, and max pooling.
[0015] Furthermore, the dual-path attention mechanism in the hierarchical transmission aggregation module includes global attention and local positional attention. The global attention is composed of a channel attention submodule and a spatial attention submodule connected in series.
[0016] The hierarchical propagation and aggregation module receives the original feature map from the current layer of the encoder and the shallow optimized features processed by the previous layer's hierarchical propagation and aggregation module. First, it implements dual-path attention weighting on the original feature map of the current layer: global attention uses a channel-space dual calibration mechanism, uses MLP to generate channel weights to suppress noise, and then superimposes spatial weights generated by 7×7 large kernel convolution to enhance road continuity; local position attention uses a horizontal-vertical decomposition strategy to generate direction-sensitive weights through direction-specific pooling. After the two are weighted and superimposed to form semantically enhanced features, the shallow optimized features processed by the previous layer's hierarchical propagation and aggregation module are downsampled by 3×3 convolution and batch normalized to adjust their resolution. These features are then concatenated with the current layer's features along the channel dimension to obtain fused features, achieving cross-layer interaction.
[0017] Furthermore, the Agent-Swin Transformer module uses the feature map output by the encoder module as input features and performs differential processing through three parallel branches: first, the input features are decomposed into multiple non-overlapping pixel blocks, and then feature enhancement is performed using three window granularities of 2×2, 4×4, and 8×8 respectively.
[0018] Each branch achieves efficient feature interaction through a hierarchical stacked proxy attention module. The core proxy token mechanism pools the four patch features within the window into one proxy token, reducing the attention computation complexity from quadratic to linear. The proxy token first interacts with the original features within the window in a local context, and then passes global information across windows through a shift window mechanism.
[0019] Furthermore, the Agent-Swin Transformer module has three parallel branches: a fine-grained branch, a medium-grained branch, and a coarse-grained branch. The fine-grained branch uses a 2×2 window to divide 64 sub-regions to capture lane-level details, the medium-grained branch uses a 4×4 window to construct 16 sub-regions to analyze the medium-scale structure of the intersection, and the coarse-grained branch uses an 8×8 window to form 4 sub-regions to model the macroscopic topology of the overpass.
[0020] A computer device includes a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method.
[0021] A computer-readable storage medium having a computer program / instructions stored thereon, which, when executed by a processor, implement the steps of the method.
[0022] A computer program product includes a computer program / instructions that, when executed by a processor, implement the steps of the method.
[0023] The advantages of this application over the prior art are as follows:
[0024] (1) This application constructs a dual-path collaborative mechanism of global attention (including channel attention and spatial attention) and local position attention through a hierarchical transmission and aggregation module (HPAM), which effectively solves the representation conflict between shallow texture features and deep semantic features in traditional skip connections. Global attention introduces three-dimensional arrangement and reorganization dimensional information, and uses two layers of multilayer perceptron (MLP) to amplify global interaction between channels and significantly suppress background noise interference; local position attention constructs a spatial weight matrix based on road topology priors to enhance the spatial alignment accuracy of multi-scale features. The pyramid-shaped feature interaction architecture improves the continuity representation of road edges in complex scenes through cross-level refinement transmission and multi-scale aggregation strategies, especially improving the feature fusion quality of high-density building areas and shadow-occluded areas.
[0025] (2) The Agent Swin Transformer (AST) module designed in this application innovatively integrates local window self-attention and global shift window mechanisms, breaking through the computational efficiency bottleneck of traditional Transformers. Window agent self-attention establishes a pixel-level long-range topological association network through a two-stage feature aggregation-propagation mechanism, significantly enhancing the ability to perceive the continuity of broken road segments; the shift window mechanism captures the global road context dependency through cross-window interaction, effectively restoring the geometric coherence of complex structures such as overpasses and intersections. This design significantly reduces the computational resource consumption of high-resolution image processing while preserving road edge details. Attached Figure Description
[0026] The following description, in conjunction with the accompanying drawings, further illustrates this application:
[0027] Figure 1 This is a flowchart illustrating a remote sensing image road extraction algorithm combining AST and hierarchical transmission aggregation provided in an embodiment of this application.
[0028] Figure 2 This is a schematic diagram of the network structure of a remote sensing image road extraction algorithm that combines AST and hierarchical transmission aggregation, provided in an embodiment of this application.
[0029] Figure 3 This is a schematic diagram of the structure of the hierarchical transmission aggregation module in a remote sensing image road extraction algorithm that combines AST and hierarchical transmission aggregation, provided in an embodiment of this application.
[0030] Figure 4 This is a schematic diagram of the Agent Swin Transformer (AST) module in a remote sensing image road extraction algorithm that combines AST and hierarchical transmission aggregation, provided in an embodiment of this application. Detailed Implementation
[0031] like Figures 1 to 4 As shown, this application provides a method for road extraction from remote sensing images that combines AST with hierarchical transmission aggregation, including the following steps:
[0032] Step 1: Divide the high-resolution remote sensing image dataset into a training set and a test set according to a certain ratio. The high-resolution remote sensing image dataset is acquired by remote sensing satellites and includes raw remote sensing image data and manually labeled remote sensing image data. Preprocess and data augmentation are performed on the remote sensing images and labels in the training set to obtain the data-augmented remote sensing image dataset.
[0033] Data augmentation is performed on the remote sensing images and labels in the training set, including image vertical flipping, horizontal flipping, vertical and horizontal flipping, image rotation, deformation scaling, random noise addition, and color transformation operations.
[0034] Step Two: Constructing a Remote Sensing Image Road Segmentation Network: The remote sensing image road segmentation network includes an encoder module, a decoder module, a Hierarchical Propagation Aggregation Module (HPAM), and an Agent Swin Transformer (AST) module, such as... Figure 2 As shown, the specific setup steps are as follows:
[0035] Step 2.1: Constructing the encoder module: The encoder module uses a ResNet-34 encoder: The encoder stage uses a ResNet-34 network for multi-level feature extraction. The encoder position is as follows... Figure 2 As shown by the green and gray arrows, the network initialization uses ImageNet pre-trained weights to achieve parameter transfer, which can accelerate the convergence speed of the model while effectively extracting features.
[0036] The network input receives RGB remote sensing images with a size of 1024×1024×3. First, the 1024×1024 pixel RGB remote sensing image undergoes normalization preprocessing and is then input into a ResNet-34 encoder network pre-trained on ImageNet. This network performs spatial dimension compression through an initial 7×7 convolution (stride=2), followed by downsampling using a max pooling layer with kernel_size=3×3 and stride=2, obtaining a basic feature map of 512×512×32. The 1024×1024 pixel RGB remote sensing image is downsampled to 512×512 resolution, and then multi-scale features are extracted step-by-step through four residual modules, generating four sets of feature maps at different levels (256×256, 128×128, 64×64, 32×32). During the encoding process, ImageNet pre-trained weights accelerate feature extraction and model convergence.
[0037] The encoder consists of four hierarchical modules, each containing [3, 4, 6, 3] residual units. Cross-layer identity connections effectively alleviate the gradient vanishing problem. The pre-training strategy accelerates model convergence, while the deep residual structure significantly improves feature abstraction capabilities compared to shallower networks.
[0038] Step 2.2: Constructing the Hierarchical Propagation Aggregation Module: The multi-scale features output by the encoder module are fused across layers through the Hierarchical Propagation Aggregation Module (HPAM). This module plays a role at the jump connection between the encoder and decoder: for the feature map of each layer, a global attention mechanism is used to suppress background noise, and positional attention combined with orientation decomposition is used to enhance the road topology. Finally, the shallow detail features with adjusted resolution are concatenated and fused with the deep semantic features to form an enhanced feature that combines spatial detail and semantic information.
[0039] Step 2.3: Constructing the AST module: This module employs a three-parallel branch processing strategy, using 2×2, 4×4, and 8×8 window partitions to perform local proxy attention calculations. It preserves road edge details through pixel-level interactions within the window, while utilizing a shifted window mechanism to establish long-range cross-regional associations, effectively repairing road breaks caused by occlusion. Each branch undergoes five layers of stacked processing to capture multi-granularity feature representations.
[0040] Step 2.4: Construct the decoder module: The multi-scale enhanced features output by the hierarchical transmission aggregation module and the detailed features captured by the AST module are convolved and upsampled to obtain the fused feature map.
[0041] Step 3: Input the preprocessed training set data into the designed remote sensing image road segmentation network, and initialize the ResNet encoder module using the parameters trained on the ImageNet dataset using the ResNet-34 network. Randomly initialize the remaining network parameters and train the remote sensing image road segmentation network. After training, save the trained remote sensing image road segmentation network model parameters.
[0042] Step 4: Input the processed remote sensing road image into the trained network and output the accurate segmentation result of the remote sensing image data.
[0043] To address the scale differences in feature maps across different encoder stages, this application proposes a hierarchical transmission and aggregation module to collaboratively integrate shallow high-resolution features with deep abstract semantics. Based on skip connections, a pyramid-shaped dual-path attention architecture is constructed. A collaborative weighting mechanism is used to modulate attention on deep features, suppressing background interference and enhancing road feature representation. Simultaneously, cross-layer progressive fusion is performed with shallow features. Finally, multi-scale optimized features are passed to the corresponding decoder via skip connections. Its structure is as follows: Figure 3 As shown, the hierarchical propagation and aggregation module receives the original feature map from the current level of the encoder and the shallow optimized features after HPAM processing in the previous level. Through a dual-path attention mechanism and a pyramid-shaped feature interaction architecture, it gradually completes noise suppression, semantic enhancement, and multi-scale feature fusion.
[0044] The dual-path attention mechanism includes global attention and local positional attention. Global attention is composed of a channel attention submodule and a spatial attention submodule connected in series. For example... Figure 3 The lower half is shown. First, in the first part, the feature map... The input channel attention submodule uses a three-dimensional arrangement to retain information in three dimensions, facilitating mutual learning between channels. It uses a two-layer MLP (Multilayer Perceptron) to amplify cross-dimensional channel-space dependencies (MLP is an encoder-decoder structure, similar to BAM, with a compression ratio of r). Features are processed through a sigmoid activation function and then compared with the input feature map E. i Multiplication. This process can be represented by the following formula.
[0045]
[0046] In the formula, δ represents the Sigmoid operation, and E p For deep feature maps, RePre is short for reverse permutation, used to recover the channel dimension information of the permutation, and Pre is short for permutation, used to permutate the channel dimension information.
[0047] In the spatial attention submodule, two convolutional layers are used to fuse spatial information in order to focus on spatial information. The same reduction ratio r as BAM is also used from the channel attention submodule. Meanwhile, max pooling operations negatively impact information utilization. Therefore, pooling operations are removed here to further preserve feature mappings. Thus, the spatial attention submodule can sometimes significantly increase the number of parameters. Features are processed through a sigmoid activation function and then combined with the input deep feature map E. p Multiplication. This process can be represented by the following formula.
[0048]
[0049] In the formula E s This is the feature map output after global attention.
[0050] The structure of local location attention PA is as follows: Figure 3 The upper part is shown. Considering the inconsistent horizontal and vertical position weights of feature map pixels, the 2D encoding is split into two 1D directional encodings to design a more accurate positional attention mechanism.
[0051] Assuming our input feature map X has dimensions H×W×C, we use an (H,1) pooling kernel to pool the feature map horizontally along the x-direction. The average value is taken over all horizontal positions i (from i=0 to i=W) in the h-th row of the c-th channel. This process can be represented by the following formula:
[0052]
[0053] In the formula The output feature map is the channelized average pooled feature map in the horizontal direction, where W is the width of the input feature map, i is a variable representing the horizontal position of the feature map, and X is the horizontal position of the feature map. c(H,i) The values of the feature map at channel c, height H, and width i.
[0054] Then to Global average pooling and global max pooling are performed to obtain two feature maps of size 1×1×H. Subsequently, feature concatenation, convolution, and sigmoid activation are performed to obtain the horizontal positional weights. The same method is used to obtain the vertical positional weights of the feature maps. This process can be represented by the following formula:
[0055]
[0056] In the formula Z H δ represents the position weights in the horizontal direction, δ is the Sigmoid operation, Conv is a 1×1 convolution, Conact represents the channel concatenation operation, Max is the max pooling, and Avg is the average pooling.
[0057] The positional attention weights in the horizontal and vertical directions are combined to obtain an accurate feature map. The same method is used to obtain the Z-axis corresponding to the feature map in the vertical direction. W , for Z H and Z W Perform a multiplication operation to obtain the feature map Z of the local position attention output.
[0058] Finally, the feature map E after global attention weighting is... S Adding the feature map Z after positional attention weighting yields the deep feature map F after weighting by two attention modules. To fuse multi-scale feature information from different stages of the encoder and obtain more road details and edge information, this embodiment uses a convolutional block with a kernel size of 3×3 and a stride of 2 to further adjust the shallow feature map E processed by the attention modules. i-1 The size of the feature map is calculated, and then it is concatenated with the processed deep feature map F to obtain the final feature map E, which is weighted by a dual attention mechanism and incorporates multi-scale information. i This process can be represented by the following formula:
[0059]
[0060] In the formula, γ is the ReLU activation function, and BN is Batch Normalization. This is a feature map splicing operation.
[0061] The 64×64×256 feature map output by encoder Stage 3 carries the semantic information of the current layer. Due to downsampling, it may have problems such as road breaks or blurred boundaries and be mixed with vegetation and building noise. In contrast, the 128×128×128 shallow features transmitted by Stage 2 retain high-resolution details such as pedestrian crossing texture and intersection topology. The HPAM module first implements dual-path attention weighting on the current layer features: the global path uses a channel-spatial dual calibration mechanism, uses MLP to generate channel weights to suppress noise, and then superimposes spatial weights generated by 7×7 large kernel convolution to enhance road continuity; the location path adopts a horizontal-vertical decomposition strategy to generate direction-sensitive weights through direction-specific pooling. After the two are weighted and superimposed to form a semantically enhanced 32×32×256 feature, the shallow features are downsampled by 3×3 convolution and batch normalized to adjust to a resolution of 32×32×128. This is then concatenated with the current layer features along the channel dimension to form a 32×32×384 fused feature to achieve cross-layer interaction. For example, the high-level semantics corrects the confusion between the middle layer and the ground road, the middle layer gradient details refine the blurred boundaries of the high-level features, and finally the optimized features are output through 1×1 convolution to the decoder Stage 3 for reconstruction.
[0062] Attention mechanisms can be categorized into two types based on their computational paradigm: linear attention and standard attention. Linear attention reduces its complexity to linear order O(n) by using kernel function approximation or low-rank decomposition, but it is limited by non-parametric or weakly nonlinear characteristics, making it difficult to capture higher-order correlations of input units. Standard attention, based on Softmax to achieve differentiable dynamic alignment, possesses strong representational capabilities but suffers from O(n) complexity. 2 The complexity of Softmax limits its application in long sequence scenarios. The agent attention framework constructs a hierarchical attention architecture using learnable agent tokens, linearizing the overall computational complexity while retaining the strong representational advantages of Softmax. This process can be represented by the following formula.
[0063] O S =Attn S (Q,K,V)=σ(QK T V;
[0064] In the formula O S For the output of Softmax attention, Attn S For Softmax attention, σ is the Softmax function, and K... T This is the transpose of the key-value sequence.
[0065] In the standard Softmax attention framework, the query, key, and value matrices Q, K, V ∈ R N×C The interaction elements of the input sequence are represented by N, where N represents the sequence length and C is the feature dimension. σ represents the Softmax function, and the attention weights are calculated by normalizing the query-key similarity matrix using the Softmax function. However, this mechanism requires calculating the pairwise similarity matrices of Q and K. This results in a computational complexity of O(n). 2 When processing high-resolution images (N = H × W), this quadratic increase in complexity leads to enormous computational overhead. Agent-Attention achieves a breakthrough balance between computational efficiency and feature representation capability by introducing a two-stage attention reorganization strategy. The Agent-Attention process can be represented by the following formula.
[0066] O A =Attn S (Q,A,Attn S (A,K,V));
[0067] In the formula O A For the output of proxy attention, Attn S For Softmax attention.
[0068] The Agent-Attention mechanism compresses the original query sequence Q through pooling operations to generate a proxy token A as a hub for feature interaction. During the feature aggregation stage, A is used as the query vector, and cross-attention calculations are performed with the key K and value V. Softmax is used to establish a global association, generating a proxy feature VA that integrates the context. Subsequently, during the feature propagation stage, A is used as the key, VA as the value, and a second attention interaction is performed with the original query Q. Based on the similarity calculation between Q and the proxy key A, global semantic information is injected into the original feature space. This hierarchical attention architecture bridges local and global feature interactions through the proxy token. While linearizing computational complexity, it utilizes a two-stage attention mechanism to collaboratively capture fine-grained details and global context, effectively avoiding the feature loss problem caused by dimensionality reduction in traditional linear methods.
[0069] In this mechanism, the proxy token A acts as a feature proxy for Q. First, it aggregates the global context information of K and V through an attention mechanism, and then the fused features are re-injected into the Q space. Since A is generated from Q through pooling operations, its sequence length is much smaller than Q (M << N), reducing the computational complexity of Softmax from O(n^2) to O(n^2). 2 The value is reduced to O(mn). To further enhance position awareness, a surrogate bias term is introduced to optimize the attention weight distribution, and its complete calculation process can be represented by the following formula.
[0070]
[0071] In the formula For the proxy token A, the intermediate output after biased proxy computation is introduced through an attention mechanism, where A = Pooling(Q) ∈ R. n*C B1∈R n*N B2∈R N*n Two additional agent biases are introduced, where N is the sequence length of the original input and n is the number of agent labels. These agent biases, by embedding spatial location priors, effectively alleviate the feature homogenization problem of Agent-Attention. Although this mechanism reduces computational complexity (from O(n...),... 2 While Softmax attention excels in reducing the complexity to O(mn) and enhancing nonlinear representations, it suffers from entropy reduction during QK similarity matrix computation, tending to strengthen high-frequency feature responses while suppressing low-frequency semantics, leading to a decline in representation diversity. To address this issue, Agent-Attention introduces Deep Convolution (DWC) to preserve feature diversity. Therefore, the complete agent attention module can be represented by the following formula:
[0072] O=σ(Q*A T +B2)*σ(A*K T +B1)*V+DWC(V);
[0073] Where Q, K, V ∈ R N*C B1∈R n*N B2∈R N*n A = Pooling(Q) ∈ R n*C .
[0074] Agent Attention combines the strong representational power of Softmax attention with the computational efficiency of linear attention, using agent tokens to construct a hierarchical attention mechanism for global feature modeling. Addressing the spatial characteristic of roads traversing the entire remote sensing image, this module captures long-distance road context through cross-window interaction of agent tokens, while simultaneously reducing computational complexity from O(n log n). 2 The computation time is compressed to O(mn) (m << n), which significantly reduces GPU memory consumption while maintaining accuracy.
[0075] The Agent-Swin Transformer module proposed in this application deeply integrates the Agent-Attention mechanism and the Swing Transformer architecture. Its core improvement lies in upgrading the window multi-head self-attention component in the original Swing module to a proxy attention mechanism. Compared to the basic architecture which includes components such as Patch Merging, layer normalization, multi-head self-attention, and MLP, the core of this scheme is replaced by window multi-head proxy self-attention and sliding window multi-head proxy self-attention modules. The network adopts a three-branch parallel architecture. Each branch achieves multi-scale feature capture by stacking proxy attention modules with different granularity window configurations: after the input image is split into 256 2×2 pixel blocks, each branch performs proxy attention calculation using 2×2, 4×4, and 8×8 window configurations with 4 / 16 / 64 patches, respectively. After five layers of feature extraction, an optimized feature map that integrates multi-granularity details and global semantics is generated through dynamic fusion. Its core structure is as follows: Figure 4 As shown.
[0076] The Agent Swin Transformer module employs a multi-granularity window partitioning and agent attention mechanism for collaborative optimization. It constructs global road topology associations while maintaining local detail accuracy, overcoming the low computational efficiency and detail loss inherent in traditional Transformers when processing high-resolution remote sensing images. This module uses a 32×32×512 feature map output from a ResNet-34 encoder as input features and performs differentiated processing through three parallel branches: First, the input features are decomposed into 256 2×2 non-overlapping pixel blocks. Then, feature enhancement is performed using 2×2, 4×4, and 8×8 window granularities, respectively. The fine-grained branch uses a 2×2 window to divide 64 sub-regions to capture lane-level details; the medium-grained branch uses a 4×4 window to construct 16 sub-regions to analyze mesoscale structures such as intersections; and the coarse-grained branch uses an 8×8 window to form 4 sub-regions to model macroscopic topology such as overpasses. Within each branch, efficient feature interaction is achieved through a hierarchical stacked proxy attention module. The core proxy token mechanism pools the features of four patches within a window into a single proxy token, reducing the computational complexity of attention from quadratic to linear. The proxy token first interacts with the original features within the window in a local context, and then transmits global information across windows through a shifting window mechanism. For example, it reconstructs road connections obscured by obstacles through cyclic shifting operations. This multi-scale dynamic fusion strategy ultimately outputs optimized features that combine millimeter-level detail with macroscopic semantics.
[0077] To further verify the effectiveness and feasibility of this method, experiments were conducted according to the following embodiments, and the experimental results are shown in Table 1.
[0078] Table 1. Specific metrics on the DeepGlobe road extraction dataset.
[0079]
[0080] The architecture of the remote sensing road extraction network was built using the deep learning framework PyTorch 1.12. The DeepGlobe road extraction dataset was used in the experiments, and four commonly used semantic segmentation evaluation metrics—precision, intersection-over-union ratio, recall, and harmonic mean—were employed to evaluate the model's road segmentation performance.
[0081] This application discloses a remote sensing road extraction method based on AST and hierarchical transmission aggregation. It achieves efficient feature extraction by employing a ResNet-34 pre-trained encoder and designs a hierarchical transmission aggregation module to construct a dual-path attention mechanism, fusing global attention and local positional attention at skip connections to effectively suppress background noise interference and enhance multi-scale feature interaction. An innovative Agent Swin Transformer module is introduced, which, through the synergy of window proxy self-attention and shift window mechanism, establishes pixel-level long-range topological associations while preserving road edge details, significantly improving the ability to perceive the continuity of broken roads. Compared with existing technologies, this application improves the model's road segmentation performance by designing a hierarchical transmission aggregation module and an Agent Swin Transformer (AST) module, ultimately obtaining the extracted road image. Its advantages include high segmentation accuracy, clear road segmentation results, and strong robustness.
[0082] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A method for road extraction from remote sensing images combining AST and hierarchical transmission aggregation, characterized in that: Includes the following steps: Step 1: Create a remote sensing road segmentation dataset and divide it into a training set and a test set; Step 2: Construct a road segmentation network from remote sensing images, including: Step 2.1: Build the encoder and decoder modules; Step 2.2: Add a hierarchical transmission and aggregation module at the skip connection of the encoder and decoder at each stage. The hierarchical transmission and aggregation module builds a pyramid-shaped dual-path attention architecture based on the skip connection. Through the dual-path attention mechanism and the pyramid-shaped feature interaction architecture, noise suppression, semantic enhancement and multi-scale feature fusion are gradually completed. Finally, the multi-scale optimized features are passed to the corresponding decoder through the skip connection. The dual-path attention mechanism in the hierarchical transmission aggregation module includes global attention and local positional attention. The global attention is composed of a channel attention submodule and a spatial attention submodule connected in series. The hierarchical propagation and aggregation module receives the original feature map from the current layer of the encoder and the shallow optimized features processed by the previous layer's hierarchical propagation and aggregation module. First, it applies dual-path attention weighting to the original feature map of the current layer: global attention uses a channel-space dual calibration mechanism, generates channel weights using MLP to suppress noise, and then superimposes spatial weights generated by 7×7 large kernel convolution to enhance road continuity; local position attention uses a horizontal-vertical decomposition strategy to generate direction-sensitive weights through direction-specific pooling. After the two are weighted and superimposed to form semantically enhanced features, the shallow optimized features processed by the previous layer's hierarchical propagation and aggregation module are downsampled by 3×3 convolution and batch normalized to adjust their resolution. These features are then concatenated with the current layer's features along the channel dimension to obtain fused features, achieving cross-layer interaction. Step 2.3: Add an Agent-SwinTransformer module between the encoder in the last stage and the decoder in the first stage. The Agent-Swin Transformer module integrates the Agent-Attention mechanism and the SwinTransformer architecture. Through multi-granularity window partitioning and agent attention mechanism, it constructs global road topology association while maintaining local detail accuracy. The Agent-Swin Transformer module uses the feature map output by the encoder module as input features and performs differential processing through three parallel branches: first, the input features are decomposed into multiple non-overlapping pixel blocks, and then feature enhancement is performed using three window granularities of 2×2, 4×4, and 8×8 respectively. Each branch achieves efficient feature interaction through a hierarchical stacked proxy attention module. The core proxy token mechanism pools the four patch features in the window into one proxy token, reducing the attention computation complexity from quadratic to linear. The proxy token first interacts with the original features in the window in a local context, and then passes global information across windows through a shift window mechanism. Step 3: Train the constructed remote sensing image road segmentation network using the training set and save the training weights; Step 4: Input the processed remote sensing road image into the trained remote sensing image road segmentation network, and output the accurate segmentation result of the remote sensing image data.
2. The method for road extraction from remote sensing images combining AST and hierarchical transmission aggregation according to claim 1, characterized in that: The encoder and decoder modules adopt a CNN encoder-decoder structure. The encoder module uses a pre-trained ResNet-34 network for multi-level feature extraction.
3. The method for road extraction from remote sensing images combining AST and hierarchical transmission aggregation according to claim 1, characterized in that: The feature map input to the encoder module is the basic feature map obtained after normalization, initial 7×7 convolution and max pooling.
4. The method for road extraction from remote sensing images combining AST and hierarchical transmission aggregation according to claim 1, characterized in that: The Agent-Swin Transformer module has three parallel branches: fine-grained branch, medium-grained branch, and coarse-grained branch. The fine-grained branch uses a 2×2 window to divide 64 sub-regions to capture lane-level details, the medium-grained branch uses a 4×4 window to construct 16 sub-regions to analyze the medium-scale structure of the intersection, and the coarse-grained branch uses an 8×8 window to form 4 sub-regions to model the macroscopic topology of the overpass.
5. A computer device comprising a memory, a processor, and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the steps of the method according to any one of claims 1-4.
6. A computer-readable storage medium having a computer program / instructions stored thereon, characterized in that: When the computer program / instructions are executed by the processor, they implement the steps of the method according to any one of claims 1-4.
7. A computer program product comprising a computer program / instructions, characterized in that: When the computer program / instructions are executed by the processor, they implement the steps of the method according to any one of claims 1-4.
Citation Information
Patent Citations
Remote sensing image road segmentation method fusing multi-scale features and double attention mechanism
CN117078943A