Remote sensing image road extraction method combining AST and layered conduction aggregation
By introducing a hierarchical conduction aggregation module and an Agent-Swin Transformer module in remote sensing images, the accuracy and continuity of road extraction in remote sensing images are solved, efficient multi-scale feature fusion and long-range topological association are achieved, and the accuracy and computing efficiency of road extraction are improved.
Patent Information
- Application Number
- CN202510619472.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-14
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2045-05-14
AI Technical Summary
Traditional convolutional neural networks have problems in the representation of shallow texture features and deep semantic features in remote sensing images, and the calculation efficiency of Transformer-based methods is not high, resulting in inaccurate and discontinuous road extraction in remote sensing images.
The hierarchical conduction aggregation module (HPAM) is used to build a dual-path coordination mechanism between global attention and local position attention. Combined with the Agent-Swin Transformer module, multi-scale feature fusion and long-range topological association are achieved through multi-grained window division and proxy attention mechanism.
It effectively solves the representation conflict between shallow texture features and deep semantic features, improves the accuracy and continuity of road extraction, and reduces the computing resource consumption of high-resolution image processing.
Smart Images

Figure CN120451793A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of remote sensing image road segmentation, and in particular to a remote sensing image road extraction method combining AST and layered conductive aggregation. Background Art
[0002] With the continuous development of remote sensing satellite technology, we can more easily obtain high-resolution remote sensing imagery. Extracting roads from high-resolution remote sensing imagery plays a vital role in urban planning, traffic management, and environmental monitoring. However, in remote sensing imagery, roads typically span the entire image and often have different shapes, widths, materials, and other characteristics. This makes it very difficult to extract accurate and complete road structures. In addition, remote sensing images contain a large number of objects that resemble roads, such as rivers and ridges. These factors can seriously interfere with the results of road extraction, resulting in inaccurate and discontinuous extracted roads. Therefore, accurately and efficiently extracting road network structures from remote sensing imagery still faces significant challenges.
[0003] Researchers both domestically and internationally have conducted extensive research in the field of remote sensing road extraction and have proposed numerous deep learning-based methods for extracting roads from remote sensing images. These methods can be categorized as those based on traditional convolutional neural networks (CNNs) and those based on Transformers. However, traditional CNN-based road extraction methods often suffer from a conflict between the representation of shallow texture features and deep semantic features in skip connections. Furthermore, traditional Transformers are computationally inefficient, and current methods need improvement. Summary of the Invention
[0004] In order to solve the above technical problems, this application proposes a remote sensing image road extraction method that combines AST and layered conductive aggregation.
[0005] The technical solution adopted in this application is: a remote sensing image road extraction method combining AST and layered conductive aggregation, including 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: Build a remote sensing image road segmentation network, including:
[0008] Step 2.1: Build the encoder module and decoder module;
[0009] Step 2.2: A hierarchical conduction aggregation module is added to the skip connection between the encoder and decoder at each stage. The hierarchical conduction aggregation module builds a pyramidal dual-path attention architecture based on the skip connection. Through the dual-path attention mechanism and the pyramidal feature interaction architecture, it gradually completes noise suppression, semantic enhancement, and multi-scale feature fusion. Finally, the multi-scale optimized features are transferred 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 combines the Agent-Attention mechanism with the SwinTransformer architecture. Through multi-granularity window partitioning and the coordinated optimization of the agent attention mechanism, it constructs global road topology while maintaining the accuracy of local details.
[0011] Step 3: Use the training set to train the constructed remote sensing image road segmentation network 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 module and decoder module adopt the CNN codec structure, 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 maximum pooling.
[0015] Furthermore, the dual-path attention mechanism in the hierarchical conduction aggregation module includes global attention and local position attention. The global attention is composed of a channel attention submodule and a spatial attention submodule connected in series.
[0016] The hierarchical conduction aggregation module receives the original feature map of the current layer of the encoder and the shallow optimized features processed by the hierarchical conduction aggregation module of the previous layer. It first implements dual-path attention weighting on the original feature map of the current layer: global attention uses a channel-space dual calibration mechanism to suppress noise using MLP to generate channel weights, and then superimposes the spatial weights generated by 7×7 large kernel convolution to enhance road continuity; local position attention adopts a horizontal-vertical decomposition strategy to generate direction-sensitive weights through direction-specific pooling. After the weighted superposition of the two forms semantically enhanced features, the shallow optimized features processed by the hierarchical conduction aggregation module of the previous layer are downsampled by 3×3 convolution and batch normalized to adjust their resolution, and then spliced with the current layer features along the channel dimension to obtain fused features to achieve 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] Efficient feature interaction is achieved within each branch through hierarchical stacking of proxy attention modules. The core proxy token mechanism pools the four patch features in the window into one proxy token, reducing the attention calculation complexity from the quadratic level to the linear level. The proxy token first interacts with the original features in the window in the local context, and then transmits global information across windows through the shift window mechanism.
[0019] Furthermore, the three parallel branches in the Agent-Swin Transformer module are respectively the fine-grained branch, the medium-grained branch and the coarse-grained branch. The fine-grained branch divides the image into 64 sub-regions with a 2×2 window to capture lane-level details, the medium-grained branch constructs 16 sub-regions with a 4×4 window to analyze the mesoscale structure of the intersection, and the coarse-grained branch forms 4 sub-regions with an 8×8 window to model the macro-topology of the overpass.
[0020] A computer device comprises 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 stores a computer program / instruction thereon, which implements the steps of the method when executed by a processor.
[0022] A computer program product comprises a computer program / instructions which, when executed by a processor, implement the steps of the method.
[0023] The beneficial effects of this application compared to the prior art are:
[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 conduction aggregation module (HPAM), effectively solving the representation conflict problem between shallow texture features and deep semantic features in traditional skip connections. Global attention introduces three-dimensional arrangement and reorganization dimensional information, using two layers of multi-layer perceptrons (MLPs) to amplify global interactions 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 feature interaction architecture improves the continuity expression of road edges in complex scenes through cross-level refinement conduction and multi-scale aggregation strategies, especially improving the feature fusion quality in 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 mechanism, breaking through the computational efficiency bottleneck of traditional Transformer. The window agent self-attention establishes a pixel-level long-range topological association network through a two-stage feature aggregation-propagation mechanism, significantly enhancing the continuity perception ability of broken road segments; the shift window mechanism captures global road context dependencies through cross-window interaction, effectively repairing 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. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The present application will be further described below with reference to the accompanying drawings:
[0027] Figure 1 This is a flowchart of a remote sensing image road extraction algorithm combining AST and layered conductive aggregation provided in an embodiment of the present 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 conductive aggregation, provided in an embodiment of the present application;
[0029] Figure 3 This is a schematic structural diagram of a hierarchical conductive aggregation module in a remote sensing image road extraction algorithm combining AST and hierarchical conductive aggregation provided in an embodiment of the present application;
[0030] Figure 4 This is a structural diagram of the Agent Swin Transformer (AST) module in a remote sensing image road extraction algorithm that combines AST and hierarchical conductive aggregation, provided in an embodiment of the present application. DETAILED DESCRIPTION
[0031] like Figures 1 to 4 As shown, the present application provides a remote sensing image road extraction method combining AST and layered conductive aggregation, comprising the following steps:
[0032] Step 1: Divide a 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 original remote sensing image data and manually labeled remote sensing image data. Preprocess and data augment the remote sensing images and labels of the training set to obtain a remote sensing image dataset after data augmentation.
[0033] Data enhancement is performed on the remote sensing images and labels of the training set, including vertical flipping, horizontal flipping, vertical and horizontal flipping, image rotation, deformation and scaling, random noise addition, and color transformation operations.
[0034] Step 2: Build 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 construction steps are as follows:
[0035] Step 2.1: Construct the encoder module: The encoder module uses ResNet-34 encoder: The encoder stage uses ResNet-34 network for multi-level feature extraction. The encoder position is as follows Figure 2 As shown by the green and gray arrows in the figure, the network initialization uses ImageNet pre-trained weights to achieve parameter migration, which can effectively extract features while accelerating the convergence of the model.
[0036] The network input receives an RGB remote sensing image of size 1024×1024×3. The 1024×1024 pixel RGB remote sensing image is first normalized and preprocessed before being fed into a ResNet-34 encoder network pre-trained on ImageNet. This network performs spatial dimension compression via an initial 7×7 convolution (stride = 2). This network then downsamples the image using a max-pooling layer with kernel_size = 3×3 and stride = 2, yielding a base feature map of 512×512×32. The 1024×1024 pixel RGB remote sensing image is then downsampled to a resolution of 512×512. Four residual modules are then used to extract multi-scale features step by step, generating four sets of feature maps at different levels (256×256, 128×128, 64×64, and 32×32). During the encoding process, the ImageNet pre-trained weights accelerate feature extraction and model convergence.
[0037] The encoder consists of four layers of modules, each containing [3, 4, 6, 3] residual units. Cross-layer identity connections effectively mitigate the vanishing gradient problem. A pre-training strategy accelerates model convergence, while the deep residual structure significantly improves feature abstraction compared to shallow networks.
[0038] Step 2.2: Constructing a Hierarchical Propagation Aggregation Module: The multi-scale features output by the encoder module are fused across layers using a Hierarchical Propagation Aggregation Module (HPAM). This module operates at the jump connection between the encoder and decoder. For each layer's feature map, a global attention mechanism is used to suppress background noise. Positional attention based on directional decomposition is combined to enhance road topology. Finally, the resolution-adjusted shallow detail features are concatenated and fused with deep semantic features to form enhanced features that combine both spatial detail and semantic information.
[0039] Step 2.3: Construct the AST module: This module uses a three-branch parallel processing strategy, performing local proxy attention calculations with 2×2, 4×4, and 8×8 window partitions, respectively. This module preserves road edge details through pixel-level interactions within the window and uses a shifting window mechanism to establish long-range cross-region correlations, effectively repairing road breaks caused by occlusion. Each branch is stacked five times to capture multi-granular feature representations.
[0040] Step 2.4: Construct the decoder module: The multi-scale enhanced features output by the hierarchical conduction aggregation module and the detail features captured by the AST module are convolved and upsampled to obtain a fused feature map.
[0041] Step 3: Input the preprocessed training data into the designed remote sensing image road segmentation network. Initialize the ResNet encoder module using the parameters of the ResNet-34 network trained on the ImageNet dataset. Randomly initialize the remaining network parameters and train the remote sensing image road segmentation network. After training is complete, 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] In view of the scale characteristic differences of feature maps at different stages of the encoder, this application proposes a hierarchical conduction aggregation module to collaboratively integrate shallow high-resolution features with deep abstract semantics: a pyramid-type dual-path attention architecture is constructed based on skip connections, and attention modulation is implemented on deep features through a collaborative weighting mechanism to suppress background interference and enhance road feature expression. At the same time, cross-layer progressive fusion is performed with shallow features, and finally the multi-scale optimized features are transmitted to the corresponding decoder through skip connections. Its structure is as follows: Figure 3 The hierarchical conduction aggregation module receives the original feature map from the current encoder layer and the shallow optimized features after HPAM processing in the previous layer. Through the dual-path attention mechanism and pyramid 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 position attention. The global attention is composed of the channel attention submodule and the spatial attention submodule in series. Figure 3 As shown in the lower part. 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 (Multi-layer Perceptron) to amplify cross-dimensional channel-space dependencies (MLP is an encoder-decoder structure, similar to BAM, with a compression ratio of r). The features are processed by the Sigmoid activation function and then compared with the input feature map E i Multiply. This process can be expressed by the following formula.
[0045]
[0046] Where δ is the Sigmoid operation, E p It is a deep feature map, RePre is the abbreviation of reverse permutation, which is used to restore the permuted channel dimension information, and Pre is the abbreviation of permutation, which is used to permute 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. At the same time, the maximum pooling operation reduces the use of information, which has a negative impact. The pooling operation is removed here to further preserve the feature map. Therefore, the spatial attention submodule sometimes significantly increases the number of parameters. The features are processed by the Sigmoid activation function and then combined with the input deep feature map E. p Multiply. This process can be expressed by the following formula.
[0048]
[0049] Where E s is the feature map output by global attention.
[0050] The structure of local position attention PA is as follows Figure 3 As shown in the upper part, considering that the horizontal and vertical position weights of feature map pixels are inconsistent, the 2D encoding is split into two 1D direction encodings to design a more accurate position attention mechanism.
[0051] Assume that the size of our input feature map X is H×W×C. Here, we use the (H, 1) pooling kernel to pool the feature map horizontally along the x direction. The average of all values of horizontal position i (from i=0 to i=W) in the hth row of the cth channel is taken. This process can be expressed as follows:
[0052]
[0053] In the formula is the output feature after channelized average pooling in the horizontal direction of the feature map, W is the width of the input feature map, i is a variable, indicating the horizontal position of the feature map, X c(H,i) is the value of the feature map at channel c, height H, and width i.
[0054] Then Global average pooling and global maximum pooling are performed to obtain two feature maps of size 1×1×H. Subsequently, feature concatenation, convolution, and sigmoid activation are performed to obtain horizontal position weights. The same method is used to obtain vertical position weights for the feature maps. This process can be expressed as follows:
[0055]
[0056] Where Z H is the position weight in the horizontal direction, δ is the Sigmoid operation, Conv is a 1×1 convolution, Conact represents the channel connection operation, Max is the maximum pooling, and Avg is the average pooling.
[0057] The position 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 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 S Adding it to the feature map Z weighted by the position attention module, we get the deep feature map F weighted by the two attention modules. In order to fuse the multi-scale feature information of different stages of the encoder and obtain more road details and edge information, this embodiment uses a convolution block with a convolution kernel size of 3×3 and a stride of 2 to further adjust the shallow feature map E processed by the attention module. i-1 ', and then splice it with the processed deep feature map F, and finally obtain the feature map E that is weighted by the dual attention mechanism and integrates multi-scale information. i '. This process can be expressed by the following formula:
[0059]
[0060] Where γ is the Relu activation function, BN is Batch Normalization, It is the feature map concatenation operation.
[0061] The 64×64×256 feature map output by the encoder Stage 3 carries the semantic information of the current layer. Due to downsampling, it may contain broken roads, blurred boundaries, and be mixed with vegetation and building noise. However, the 128×128×128 shallow features delivered by Stage 2 retain high-resolution details such as crosswalk textures and intersection topology. The HPAM module first applies dual-path attention weighting to the current layer features: the global path uses a channel-spatial dual calibration mechanism, using an MLP to generate channel weights to suppress noise, and then superimposes spatial weights generated by a 7×7 large kernel convolution to enhance road continuity. The position path uses a horizontal-vertical decomposition strategy to generate direction-sensitive weights through direction-specific pooling. After the weighted superposition of the two forms a semantically enhanced 32×32×256 feature, the shallow features are downsampled by 3×3 convolution and batch normalized to a resolution of 32×32×128, and then spliced with the current layer features along the channel dimension to form a 32×32×384 fused feature to achieve cross-layer interaction. For example, high-level semantics correct the confusion between the viaduct and the ground road in the middle layer, and the gradient details in the middle layer refine the blurred boundaries of the high layer. Finally, the optimized features are output through the 1×1 convolution compression channel and passed to the decoder Stage 3 for reconstruction.
[0062] Attention mechanisms can be divided into two categories according to the computational paradigm: linear attention and standard attention. Linear attention reduces the complexity to linear order O(n) by kernel function approximation or low-rank decomposition, but it is difficult to capture the high-order correlation of input units due to its non-parametric or weak nonlinear characteristics. Standard attention implements differentiable dynamic alignment based on Softmax, and although it has strong representation capabilities, it has a large computational complexity due to O(n). 2 ) complexity restricts its application in long sequence scenarios. The proxy attention framework constructs a hierarchical attention architecture using learnable proxy tokens, linearizing the overall computational complexity while retaining the strong representational advantages of Softmax. This process can be expressed as the following formula.
[0063] O S =Attn S (Q,K,V)=σ(QK T )V;
[0064] Where O S is the output of Softmax attention, Attn S is Softmax attention, σ is Softmax function, K T 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 Represent the interaction elements of the input sequence, where N represents the sequence length and C is the feature dimension. σ represents the Softmax function, and the attention weight is calculated by normalizing the query-key similarity matrix through the Softmax function. However, this mechanism requires calculating the pairwise similarity matrix of Q and K. The computational complexity reaches 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 capabilities by introducing a two-stage attention reorganization strategy. The Agent-Attention process can be expressed as follows.
[0066] O A =Attn S (Q,A,Attn S (A,K,V));
[0067] Where O A is the output of the agent attention, Attn S is Softmax attention.
[0068] The Agent-Attention mechanism compresses the dimensions of the original query sequence Q through a pooling operation, generating a proxy token A as the feature interaction hub. In the feature aggregation phase, A is used as the query vector, along with the key K and value V, to perform cross-attention calculations. A Softmax is used to establish global associations and generate context-integrated proxy features VA. Subsequently, in the feature propagation phase, A is used as the key and VA as the value for a secondary attention interaction with the original query Q. Global semantic information is injected into the original feature space based on the similarity calculated between Q and the proxy key A. This hierarchical attention architecture bridges the interaction between local and global features through proxy tokens, linearizing computational complexity while leveraging a two-stage attention mechanism to collaboratively capture fine-grained details and global context, effectively avoiding the feature loss associated with dimensionality reduction in traditional linear methods.
[0069] In this mechanism, the proxy token A acts as a feature proxy for Q. It first aggregates the global context information of K and V through the attention mechanism, and then injects the fused features back into the Q space. Since A is generated from Q through the pooling operation, its sequence length is much smaller than Q (M<<N), which reduces the Softmax computation complexity from O(n 2 ) is reduced to O(mn). To further enhance the position perception capability, a proxy bias term is introduced to optimize the attention weight distribution. The complete calculation process can be expressed as follows.
[0070]
[0071] In the formula The intermediate output after the proxy token A is calculated by introducing the bias proxy through the attention mechanism, A = Pooling(Q)∈R n*C , B1∈R n*N , B2∈R N*n The two additional agent biases are introduced, N is the sequence length of the original input, and n is the number of agent tags. The agent bias effectively alleviates the feature homogeneity problem of Agent-Attention by embedding spatial position priors. Although this mechanism reduces the computational complexity (from O(n 2 ) and enhance nonlinear representations. However, due to the entropy drop in the Softmax attention when calculating the QK similarity matrix, it tends to enhance high-frequency feature responses while suppressing low-frequency semantics, resulting in reduced representation diversity. To address this issue, Agent-Attention introduces DeepWave Convolution (DWC) to preserve feature diversity. The complete Agent-Attention module can be expressed as follows:
[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 representation ability of Softmax attention with the computational efficiency of linear attention, and builds a hierarchical attention mechanism through proxy tokens to achieve global feature modeling. In view of the spatial characteristics of roads in remote sensing images that run through the entire domain, this module captures long-distance road context through cross-window interactions of proxy tokens, while reducing the computational complexity from O(n 2 ) is compressed to O(mn) (m<<n), significantly reducing GPU memory consumption while maintaining accuracy.
[0075] The Agent-Swin Transformer module proposed in this application deeply integrates the Agent-Attention mechanism and the Swin Transformer architecture. Its core improvement is to upgrade the window multi-head self-attention component in the original Swin module to a proxy attention mechanism. Compared with the basic architecture including Patch Merging, layer normalization, multi-head self-attention and MLP components, the core of this solution 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 realizes 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 uses 2×2, 4×4, and 8×8 window configurations containing 4 / 16 / 64 patches to perform proxy attention calculations. After five layers of feature extraction, it is dynamically fused to generate an optimized feature map that integrates multi-granularity details and global semantics. Its core structure is as follows: Figure 4 shown.
[0076] The Agent Swin Transformer module utilizes multi-granularity windowing and an agent-attention mechanism for collaborative optimization. This module constructs global road topology while maintaining local detail accuracy, overcoming the computational inefficiency and detail loss inherent in traditional Transformers when processing high-resolution remote sensing imagery. This module uses the 32×32×512 feature map output by a ResNet-34 encoder as input and implements differentiated processing via three parallel branches. First, the input features are broken down into 256 2×2 non-overlapping pixel blocks. Feature enhancement is then performed using window granularities of 2×2, 4×4, and 8×8, respectively. The fine-grained branch uses a 2×2 window to create 64 subregions to capture lane-level details. The medium-grained branch uses a 4×4 window to construct 16 subregions to resolve mesoscale structures such as intersections. Finally, the coarse-grained branch uses an 8×8 window to create four subregions to model macrotopology, such as overpasses. Each branch implements efficient feature interaction through a layered stack of proxy attention modules. The core proxy token mechanism pools four patch features 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 for local context, then uses a shifting window mechanism to transfer global information across windows. For example, circular shifts can be used to reconstruct road connections obscured by obstacles. This multi-scale dynamic fusion strategy ultimately outputs optimized features that combine millimeter-level detail with macroscopic semantics.
[0077] In order to further verify the effectiveness and feasibility of this method, experiments were conducted according to the following examples, and the experimental results are shown in Table 1.
[0078] Table 1 Specific indicators 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 experimental dataset used the DeepGlobe road extraction dataset. Four commonly used semantic segmentation evaluation metrics, namely precision, intersection-over-union (IoU), recall, and harmonic mean, were used to evaluate the model's road segmentation performance.
[0081] The present application discloses a remote sensing road extraction method based on AST and hierarchical conduction aggregation. By adopting the ResNet-34 pre-trained encoder to achieve efficient feature extraction, the hierarchical conduction aggregation module is designed to construct a dual-path attention mechanism, and the global attention and local position attention are integrated at the jump connection, effectively suppressing background noise interference and strengthening multi-scale feature interaction. The Agent Swin Transformer module is innovatively introduced. Through the collaboration of window agent self-attention and shift window mechanism, pixel-level long-range topological association is established while retaining the edge details of the road, significantly improving the continuity perception ability of broken roads. Compared with the existing technology, the present application improves the road segmentation effect of the model by designing a hierarchical conduction aggregation module and an Agent Swin Transformer (AST) module, and finally obtains the extracted road image. The advantage is that it has 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 the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some or all of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for extracting roads from remote sensing images by combining AST and layered conductive aggregation, characterized by: The following steps are involved: Step 1: Create a remote sensing road segmentation dataset and divide it into a training set and a test set; Step 2: Build a remote sensing image road segmentation network, including: Step 2.1: Build the encoder module and decoder module; Step 2.2: A hierarchical conduction aggregation module is added to the skip connection between the encoder and decoder at each stage. The hierarchical conduction aggregation module builds a pyramidal dual-path attention architecture based on the skip connection. Through the dual-path attention mechanism and the pyramidal feature interaction architecture, it gradually completes noise suppression, semantic enhancement, and multi-scale feature fusion. Finally, the multi-scale optimized features are transferred to the corresponding decoder through the skip connection. 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 combines the Agent-Attention mechanism with the SwinTransformer architecture. Through multi-granularity window partitioning and the coordinated optimization of the agent attention mechanism, it constructs global road topology while maintaining the accuracy of local details. Step 3: Use the training set to train the constructed remote sensing image road segmentation network 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 extracting roads from remote sensing images by combining AST and layered conductive polymerization according to claim 1, characterized in that: The encoder module and decoder module adopt the CNN encoder-decoder structure, and the encoder module uses the pre-trained ResNet-34 network for multi-level feature extraction.
3. The method for extracting roads from remote sensing images by combining AST and layered conductive polymerization 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 maximum pooling.
4. The method for extracting roads from remote sensing images by combining AST and layered conductive polymerization according to claim 1, characterized in that: The dual-path attention mechanism in the hierarchical conduction aggregation module includes global attention and local position attention. The global attention is composed of a channel attention submodule and a spatial attention submodule in series. The hierarchical conduction aggregation module receives the original feature map of the current layer of the encoder and the shallow optimized features processed by the hierarchical conduction aggregation module of the previous layer. It first implements dual-path attention weighting on the original feature map of the current layer: global attention uses a channel-space dual calibration mechanism to suppress noise using MLP to generate channel weights, and then superimposes the spatial weights generated by 7×7 large kernel convolution to enhance road continuity; local position attention adopts a horizontal-vertical decomposition strategy to generate direction-sensitive weights through direction-specific pooling. After the weighted superposition of the two forms semantically enhanced features, the shallow optimized features processed by the hierarchical conduction aggregation module of the previous layer are downsampled by 3×3 convolution and batch normalized to adjust their resolution, and then spliced with the current layer features along the channel dimension to obtain fused features to achieve cross-layer interaction.
5. The method for extracting roads from remote sensing images by combining AST and layered conductive polymerization according to claim 1, characterized in that: The Agent-Swin Transformer module takes 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; Efficient feature interaction is achieved within each branch through hierarchical stacking of proxy attention modules. The core proxy token mechanism pools the four patch features in the window into one proxy token, reducing the attention calculation complexity from the quadratic level to the linear level. The proxy token first interacts with the original features in the window in the local context, and then transmits global information across windows through the shift window mechanism.
6. The method for extracting roads from remote sensing images by combining AST and layered conductive polymerization according to claim 5, characterized in that: The three parallel branches in the Agent-Swin Transformer module are the fine-grained branch, the medium-grained branch, and the 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 mesoscale structure of the intersection, and the coarse-grained branch uses an 8×8 window to form 4 sub-regions to model the macro-topology of the overpass.
7. A computer device comprising 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 according to any one of claims 1 to 6.
8. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer program product comprising a computer program / instructions, characterized in that: When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Remote sensing image road segmentation method based on context information and attention mechanism
CN112183258A
Remote sensing image road segmentation method based on contextual information and multi-scale feature fusion
CN113850825A
Remote sensing image road segmentation method based on topology perception neural network
CN115937704A
Remote sensing image road segmentation method fusing multi-scale features and double attention mechanism
CN117078943A
Remote sensing image road segmentation method combining channel attention mechanism and multilayer axial Transform feature fusion structure
CN118351538A