Road extraction method and device based on hollow pyramid and bar attention

By improving the ResNet-34 network and combining it with a hollow pyramid and a bar attention module, the problem of low road extraction accuracy in high-resolution remote sensing images was solved, and high-precision road recognition was achieved under occlusion and shadow backgrounds.

CN118982757BActive Publication Date: 2026-08-25CHINA UNIV OF GEOSCIENCES (WUHAN)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411005258.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-25
Publication Date
2026-08-25
Estimated Expiration
2044-07-25

AI Technical Summary

Technical Problem

Existing technologies do not have high accuracy in road extraction from high-resolution remote sensing images, especially in complex backgrounds with occlusion and shadows, making it difficult to accurately identify road areas.

Method used

A road extraction method based on dilated pyramids and bar attention is adopted. By improving the ResNet-34 network, dilated convolution and bar attention modules are constructed, and skip connections and center modules are combined to improve the semantic expression and recognition ability of road features.

Benefits of technology

It improves the accuracy and coherence of road extraction in complex contexts, effectively identifies occluded road sections, and enhances the prediction accuracy of road areas.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118982757B_ABST
    Figure CN118982757B_ABST
Patent Text Reader

Abstract

The application discloses a road extraction method based on a hollow pyramid and a bar attention, a medium and equipment, relates to the field of high-resolution remote sensing image feature extraction, and the road extraction method based on the hollow pyramid and the bar attention comprises the following steps: preprocessing remote sensing image data and corresponding labeled image data to obtain preprocessing data; improving a ResNet-34 network to obtain a method network; after the method network is trained by using the preprocessing data, a prediction model is obtained; and the prediction model is used to input to-be-predicted remote sensing images to obtain a prediction result. The road extraction method based on the hollow pyramid and the bar attention, the medium and the equipment provided by the application can improve the road extraction precision in a complex background where a road area is partially blocked and road shadows exist.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of high-resolution remote sensing image feature extraction, and more specifically, to a road extraction method, medium, and apparatus based on hollow pyramids and bar attention. Background Technology

[0002] High-resolution remote sensing images contain a wealth of ground road information. Extracting roads from remote sensing images has both civilian and military value. Accurate extraction of road information has significant application value in areas such as regional planning, autonomous driving, road network planning, and traffic control and management.

[0003] Road extraction can be categorized into morphological feature-based methods, handcrafted feature-based methods, and automatically extracted feature-based methods. Generally, traditional road extraction methods include morphological feature-based and handcrafted feature-based methods, while automatically extracted feature-based methods, i.e., deep learning methods, are currently the mainstream approach. Morphological features are widely used because road regions typically exhibit consistent shapes and appearance characteristics. Common morphological features include shape and width, and operations such as binarization, dilation, erosion, opening, and closing are commonly used to obtain these features. Morphological feature-based methods can effectively capture road shape features, but they lack robustness to occlusion, lighting, and contrast variations. Handcrafted features are texture features that satisfy specific constraints. Handcrafted features typically rely on hand-designed operators. After feature extraction, final classification is performed using a classifier. Classic classifiers include decision trees, support vector machines, Hough forests, and tensor voting. While handcrafted feature-based methods are more robust than morphological feature-based methods, they still face challenges such as occlusion, weak scalability to different data sources, and difficulty in selecting optimal parameters.

[0004] In high-resolution remote sensing images, roads are often obscured by other objects, interfered with by shadows, and contain similar spectral features. Automatic feature extraction methods offer advantages over traditional human-computer interactive vectorized road extraction methods in terms of time efficiency and cost. However, current high-resolution remote sensing images often contain numerous and large areas of obscured and shadowed road regions, resulting in relatively low road extraction accuracy with existing technologies. Summary of the Invention

[0005] The purpose of this invention is to provide a road extraction method, medium, and device based on void pyramids and bar attention, which can improve road extraction accuracy in complex backgrounds where the road area is partially occluded and there are road shadows.

[0006] This invention provides a road extraction method based on hollow pyramids and bar attention, comprising the following steps: S1: acquiring remote sensing image data and corresponding labeled image data, and preprocessing the remote sensing image data and corresponding labeled image data to obtain preprocessed data; S2: improving the ResNet-34 network to obtain the network of this method; S3: training the network of this method using the preprocessed data to obtain a prediction model; S4: inputting the remote sensing image to be predicted into the prediction model to obtain the prediction result.

[0007] Furthermore, step S2 of the above-mentioned path extraction method based on dilated pyramids and bar attention specifically includes: S21: constructing a base model based on the ResNet-34 network; S22: obtaining a first improved model based on the base model using dilated convolution and bar attention modules; S23: obtaining a second improved model by performing skip connections on the encoder and decoder based on the first improved model; S24: constructing a central module, and obtaining a prediction model based on the central module and the second improved model.

[0008] Further, step S21 of the road extraction method based on the hollow pyramid and strip attention includes the following steps: S211: Add a 7×7 convolution operation with a stride of 2 to the input of the network of this method. The convolution operation is used to expand the network channel features and output a feature map of 512×512×64; S212: Add a 3*3 convolution kernel with a stride of 2 to the output of the convolution operation. The convolution kernel is used to enhance the semantic expression of the occluded road region; S213: Add a residual block after each encoder of the network of this method. The residual block is used to mitigate the risk of gradient explosion and gradient vanishing in the network; S214: The activation function after the convolution operation of the encoder of the network of this method is the ReLU function, and the activation function after the convolution operation of the decoder of the network of this method is the ELU function, to obtain the base model; The base model includes the first encoder, the second encoder, the third encoder, the fourth encoder, the fifth encoder, the fifth decoder, the fourth decoder, the third decoder, the second decoder and the first decoder connected in series.

[0009] Furthermore, step S22 of the above-mentioned path extraction method based on hollow pyramids and bar attention includes the following steps: S221: Construct a bar attention module according to the dual attention mechanism, as shown in the formula:

[0010]

[0011] y=σ(F1[z h ,z w ])

[0012] g h =δ(F h (y h ))

[0013] g w =δ(F w (y w ))

[0014] Out = p[g h (i)g w (j)]

[0015] in, This represents the output of channel c and height h when encoding each channel along a one-dimensional horizontal axis using a pooling kernel of size (H,1); W is the image width; x c (h,i) represents the i-th pixel at height h; The output of channel c and width w when encoding each channel along a one-dimensional vertical direction using a pooling kernel of size (1, W); H is the image height; x c (j, w) represents the j-th pixel at height w; y is the result of concatenating the two extracted aggregated feature maps and then sending them to a shared 1×1 conventional transform function F; σ is a non-linear activation function; F1[z h ,z w ] is a series z h and z w And perform a 1×1 convolution transformation function; [z h ,z w [] is a connection operation along the spatial dimension, which is an intermediate feature mapping that encodes spatial information in the horizontal and vertical directions; g h δ(.) represents the horizontal attention magnitude; F represents the nonlinear activation function. h (.) represents the convolution kernel of (H,1); y is decomposed into yH,1 along the horizontal direction of the spatial dimension. h g w The magnitude of attention in the vertical direction; F w (.) represents the convolution kernel of (1, W); y is decomposed into yi along the vertical direction of the spatial dimension. w;Out is the result of the bar attention mechanism, which is used as the output of the skip connection and will be combined with the previous decoder to serve as the feature map of the next decoder; p is a learnable parameter; S222: Construct a dilated pyramid module using the bar attention module and dilated convolution. The dilated pyramid module is used to identify partially occluded road regions; The dilated pyramid module includes a first dilated convolution, a second dilated convolution, a third dilated convolution, a fourth dilated convolution, and a bar attention module. The dilation rate of the first dilated convolution is 1, the dilation rate of the second dilated convolution is 2, the dilation rate of the third dilated convolution is 4, and the dilation rate of the fourth dilated convolution is 8; The bar attention module is connected in series with the first dilated convolution, the second dilated convolution, the third dilated convolution, and the fourth dilated convolution, respectively. The first dilated convolution, the second dilated convolution, the third dilated convolution, and the fourth dilated convolution are connected in parallel in sequence; S223: Build a dilated pyramid module after each encoder of the base model to obtain the first improved model.

[0016] Further, step S23 of the above-mentioned path extraction method based on hollow pyramids and bar attention includes the following steps: S231: Perform convolution, upsampling, max pooling operations on the first encoder, second encoder, third encoder, fourth encoder, and fifth encoder respectively, concatenate them, insert them into the bar attention module, and adjust them to the input size of the first decoder to obtain the first skip connection; Perform convolution, upsampling, and max pooling operations on the first encoder, second encoder, third encoder, fourth encoder, and fifth encoder respectively, concatenate them, insert them into the bar attention module, and adjust them to the input size of the second decoder to obtain the second skip connection; Perform convolution, upsampling, and max pooling operations on the first encoder, second encoder, third encoder, fourth encoder, and fifth encoder respectively, concatenate them, insert them into the bar attention module, and adjust them to the input size of the second decoder to obtain the second skip connection; Perform convolution, upsampling, max pooling operations on the first encoder, second encoder, third encoder, fourth encoder, and fifth encoder... Perform convolution, upsampling, and max pooling operations on the encoders respectively, concatenate them, insert a bar attention module, and adjust it to the input size of the third decoder to obtain the third skip connection; perform convolution, upsampling, and max pooling operations on the encoders 1, 2, 3, 4, and 5 respectively, concatenate them, insert a bar attention module, and adjust it to the input size of the fourth decoder to obtain the fourth skip connection; S232: use the first skip connection to concatenate the encoder and decoder 1, use the second skip connection to concatenate the encoder and decoder 2, use the third skip connection to concatenate the encoder and decoder 3, and use the fourth skip connection to concatenate the encoder and decoder 4 to obtain the second improved model.

[0017] Further, step S24 of the above-mentioned path extraction method based on hollow pyramids and bar attention includes the following steps: S241: Constructing a central module, the central module including 3×3 convolutional branches, 3×1 convolutional branches, 1×3 convolutional branches, horizontal pooling branches, vertical pooling branches, bar attention modules, and 1×1 convolutions; the input ends of the 3×3 convolutional branches, 3×1 convolutional branches, 1×3 convolutional branches, horizontal pooling branches, vertical pooling branches, and bar attention modules are connected in parallel as the input ends of the central module, and the input ends of the 3×3 convolutional branches, 3×1 convolutional branches, 1×3 convolutional branches, horizontal pooling branches, and vertical pooling branches are connected in parallel as the input ends of the central module. The output ends are connected in the channel direction and then cascaded with the input end of the 1×1 convolution. The output end of the 1×1 convolution is connected with the output end of the bar attention module by adding matrix values, and then serves as the output end of the central module. The dilation rates of the 3×3 convolution branch, the 3×1 convolution branch and the 1×3 convolution branch are {1, 2, 4, 8}. The horizontal pooling branch includes horizontal pooling, 1×1 convolution and merging connected in series in sequence. The vertical pooling branch includes vertical pooling, 1×1 convolution and merging connected in series in sequence in sequence. S242: According to the second improved model, the central module is connected in series between the 5th encoder and the 5th decoder of the second improved model to obtain the prediction model.

[0018] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described path extraction method based on hollow pyramids and bar attention.

[0019] The present invention also provides a computer 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 steps of the above-described path extraction method based on the hollow pyramid and bar attention.

[0020] The road extraction method, medium, and device based on void pyramids and bar attention provided by this invention have the following beneficial effects:

[0021] This invention builds upon the ResNet34 network by constructing a dilated pyramid module for each encoder. Encoders from different stages are combined at skip connections, and then input into a bar attention module. The central module is improved using bar dilated convolution, one-dimensional pooling layers, and a bar attention mechanism, enhancing the semantic representation of the entire network. After preprocessing the input data, it is fed into this network model for training, resulting in a network model that records road features. Finally, high-resolution remote sensing images to be predicted are input into the trained network model, enabling rapid prediction and acquisition of road information. This fully leverages the features of roads in high-resolution remote sensing images, effectively identifying partially occluded road sections in areas with severe road occlusion, improving road extraction accuracy, and enhancing the coherence of road area prediction to some extent. Attached Figure Description

[0022] The present invention will be further described below with reference to the accompanying drawings and embodiments. In the accompanying drawings:

[0023] Figure 1 This is a flowchart of the road extraction method based on hollow pyramids and strip attention provided by the present invention;

[0024] Figure 2 This is an example of the overall network structure provided by the present invention;

[0025] Figure 3 This is a schematic diagram of the hollow pyramid module provided by the present invention;

[0026] Figure 4 This is a schematic diagram of the improved jump connection provided by the present invention;

[0027] Figure 5 This is a schematic diagram of the bar-shaped attention mechanism module provided by the present invention;

[0028] Figure 6 This is a schematic diagram of the improved central module provided by the present invention;

[0029] Figure 7 This is a comparative schematic diagram of different methods provided by the present invention;

[0030] Figure 8 This is a structural block diagram of the computer device provided by the present invention. Detailed Implementation

[0031] To provide a clearer understanding of the technical features, objectives, and effects of the present invention, specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0032] Figure 1 A schematic diagram of the road extraction method and device based on void pyramids and bar attention in this embodiment is shown. In this embodiment, the road extraction method and device based on void pyramids and bar attention includes the following steps:

[0033] S1: Acquire remote sensing image data and corresponding labeled image data, preprocess the remote sensing image data and corresponding labeled image data to obtain preprocessed data;

[0034] Specifically, the input data includes a 1024×1024×3 three-channel high-resolution remote sensing image and a 1024×1024×1 one-channel labeled image. The input data, including the remote sensing image and the labeled image, are rotated clockwise and counterclockwise by 15 degrees, 30 degrees and 45 degrees respectively, and then cropped. Data augmentation and other preprocessing operations are also performed.

[0035] S2: Improve the ResNet-34 network to obtain the network of this method;

[0036] Specifically, step S2 of the above-mentioned path extraction method based on dilated pyramids and bar attention includes the following steps: S21: Construct a base model based on the ResNet-34 network; S22: Obtain a first improved model based on the base model using dilated convolution and bar attention modules; S23: Obtain a second improved model by performing skip connections on the encoder and decoder based on the first improved model; S24: Construct a central module, and obtain the network of this method based on the central module and the second improved model.

[0037] S3: Using the preprocessed data, train the network of this method to obtain the prediction model;

[0038] Specifically, the Adam optimizer improves the gradient descent method by considering the moving averages of the first and second moments of the gradient, enabling it to intelligently adapt the learning rate for each parameter; its mathematical definition is:

[0039]

[0040] Among them, g t This represents the gradient at iteration step t. f represents the gradient of parameter θ. t (θ t-1 ) is the objective function to be optimized, θ t-1 These are the parameter values ​​evaluated in the previous iteration; the iteration step t and the initial first and second moment vectors are set to 0; the loss function uses a combination of Dice Loss and Bce Loss with an adaptive scaling loss function as follows:

[0041] Loss=α1L Dice +α2L Bce

[0042] For binary classification problems, there are four types of predicted values: TP (predicting the labeled part correctly), TN (predicting the unlabeled part correctly), FP (predicting incorrectly, actually a negative example), and FN (predicting incorrectly, actually a positive example); and the definition of Dice Loss is:

[0043]

[0044] Wherein, the Dice coefficient is a set similarity measure function, and Dice Loss can reduce the risk of overfitting; where X is the prediction result output by the method, and Y is the ground truth; the definition of Bce Loss is:

[0045] L Bce= -YlogX - (1-Y)log(1-X)

[0046] Among them, Bce Loss avoids gradient vanishing to some extent because the gradient is no longer related to the Sigmoid function during backpropagation; the adaptive combination of Dice Loss and Bce Loss greatly reduces the risk of gradient vanishing and is more conducive to the network learning the characteristics of the path.

[0047] S4: Input the remote sensing image to be predicted into the prediction model to obtain the prediction result;

[0048] Specifically, the remote sensing image to be predicted is input into the trained network. After passing through the perceptrons with the saved parameters, the image is finally processed by the Sigmoid activation function to obtain a 1024×1024×1 predicted image. The Sigmoid activation function is defined as follows:

[0049]

[0050] The Sigmoid activation function is commonly used for binary classification tasks, classifying based on whether the value is greater than 0.5, and is located in the last layer of the model.

[0051] Specifically, step S21 of the road extraction method based on the hollow pyramid and strip attention includes the following steps: S211: Add a 7×7 convolution operation with a stride of 2 to the input of the network of this method. The convolution operation is used to expand the network channel features and output a feature map of 512×512×64; S212: Add a 3*3 convolution kernel with a stride of 2 to the output of the convolution operation. The convolution kernel is used to enhance the semantic expression of the occluded road region; S213: Add a residual block after each encoder of the network of this method. The residual block is used to mitigate the risk of gradient explosion and gradient vanishing in the network; S214: The activation function after the convolution operation of the encoder of the network of this method is the ReLU function, and the activation function after the convolution operation of the decoder of the network of this method is the ELU function, to obtain the basic model; The basic model includes the first encoder, the second encoder, the third encoder, the fourth encoder, the fifth encoder, the fifth decoder, the fourth decoder, the third decoder, the second decoder and the first decoder connected in series in sequence;

[0052] Specifically, based on ResNet34, the network's encoders, from shallow to high layers, are: E1, E2, E3, E4, and E5, with encoder sizes of 512×512×64, 256×256×64, 128×128×128, 64×64×256, and 32×32×512, respectively. The preprocessed data of size 1024×1024×3, E0, is input to the network. At this point, image E0 contains a large amount of detailed information as well as local interference information. Since the road features in the occluded area are similar to the surrounding environment, in order to better learn the road features in the occluded area, ... A 3×3 pooling layer with a stride of 2 is used to enhance the semantic representation of the occluded road region. First, a 7×7 convolution operation with a stride of 2 is performed on E0 to expand the network channel features, resulting in a 512×512×64 feature map. Since the road features in the occluded region are similar to the surrounding environment, a 3×3 convolution kernel with a stride of 2 is then used to better learn the features of the occluded road region, thereby enhancing the semantic representation of the occluded road region. A residual block is added after each encoder to mitigate the risks of gradient explosion and gradient vanishing in the network. The ReLU function is used as the activation function after the convolution operation of the encoder, and its formula is as follows:

[0053]

[0054] Where x represents the input image data, since the gradient of the ReLU activation function is constant in the non-negative interval, there is no gradient vanishing problem, allowing the model to converge stably and fit the training data; the ELU function is used as the activation function after the convolution operation of the decoder, and its formula is as follows:

[0055]

[0056] Where μ is a settable parameter, e x As an exponential function, the ELU activation function combines the advantages of the Sigmoid and ReLU activation functions, which can alleviate the gradient vanishing problem while accelerating convergence;

[0057] Specifically, step S22 of the above-mentioned path extraction method based on hollow pyramids and bar attention includes the following steps: S221: Construct a bar attention module according to the dual attention mechanism, as shown in the formula:

[0058]

[0059] y=σ(F1[z h ,z w ])

[0060] g h =δ(F h (y h ))

[0061] g w =δ(F w (y w ))

[0062] Out = p[g h (i)g w (j)]

[0063] in, This represents the output of channel c and height h when encoding each channel along a one-dimensional horizontal axis using a pooling kernel of size (H,1); W is the image width; x c (h,i) represents the i-th pixel at height h; The output of channel c and width w when encoding each channel along a one-dimensional vertical direction using a pooling kernel of size (1, W); H is the image height; x c (j, w) represents the j-th pixel at height w; y is the result of concatenating the two extracted aggregated feature maps and then sending them to a shared 1×1 conventional transform function F; σ is a non-linear activation function; F1[z h ,z w ] is a series z h and z w And perform a 1×1 convolution transformation function; [z h ,z w [] is a connection operation along the spatial dimension, which is an intermediate feature mapping that encodes spatial information in the horizontal and vertical directions; g h δ(.) represents the horizontal attention magnitude; F represents the nonlinear activation function. h (.) represents the convolution kernel of (H,1); y is decomposed into yH,1 along the horizontal direction of the spatial dimension. h g w The magnitude of attention in the vertical direction; F w (.) represents the convolution kernel of (1, W); y is decomposed into yi along the vertical direction of the spatial dimension. w;Out represents the result of the bar attention mechanism, which is used as the output of the skip connection and combined with the previous decoder to serve as the feature map of the next decoder; p represents the learnable parameter; S222: A dilated pyramid module is constructed using the bar attention module and dilated convolutions. The dilated pyramid module is used to identify partially occluded road regions; The dilated pyramid module includes a first dilated convolution, a second dilated convolution, a third dilated convolution, a fourth dilated convolution, and a bar attention module. The dilation rate of the first dilated convolution is 1, the dilation rate of the second dilated convolution is 2, the dilation rate of the third dilated convolution is 4, and the dilation rate of the fourth dilated convolution is 8; The bar attention module is connected in series with the first dilated convolution, the second dilated convolution, the third dilated convolution, and the fourth dilated convolution, respectively, and the first dilated convolution, the second dilated convolution, the third dilated convolution, and the fourth dilated convolution are connected in parallel in sequence; S223: A dilated pyramid module is built after each encoder of the base model to obtain the first improved model;

[0064] Specifically, a dilated pyramid module is built after each encoder. Since the spectrum of the road is similar to that of the surrounding environment in occluded scenes, constructing a dilated pyramid module composed of dilated convolutions can effectively identify partially occluded road areas. Compared to regular convolution, dilated convolution enhances the receptive field by adjusting the spacing between the effective units of the convolution kernel. The equivalent receptive field of the nth unwound convolution is calculated as follows:

[0065]

[0066] Where, r n and r n-1 These are the receptive regions of the current layer and the previous layer, respectively; K is the size of the equivalent convolution kernel of the current layer, which can be calculated from the kernel size k and the dilation rate d; S i It is the stride of the i-th layer; when dilated convolution is viewed as a regular convolution with multiple "holes", it still follows the principles of convolution computation:

[0067]

[0068] Dilated convolutions enhance the receptive field, but features obtained from a single dilated convolution are discontinuous because the "holes" in the dilated convolution cannot be learned. Therefore, a dilated pyramid module is used, consisting of four dilated convolutions with different dilation rates and a strip attention mechanism to enhance the smoothness of road edges. This module employs a series-parallel combination structure, with dilated convolutions of different dilation rates connected in series and paralleled with the strip attention module. When feature maps enter the working range of the dilated pyramid module, a wider range of features can be detected and captured. The dilation rates of the four dilated convolutions are {1, 2, 4, 8}, and the kernel sizes are {3, 5, 9, 17}, generating a receptive field of {3, 7, 15, 31}, thus enabling the detection and capture of a wider range of features. To ensure that the feature maps extracted from each unrolled convolution in the dilated pyramid module can be integrated, padding is introduced during the unrolled convolution.

[0069]

[0070] Where I represents the input size; O represents the output size; k represents the kernel size; d represents the dilation rate; s represents the stride; and p represents the padding. When the padding size is the same as the dilation rate, it can be ensured that the output size of the feature map is the same as the input size.

[0071] The dilated pyramid consists of dilated convolutions with dilation rates of 1, 2, 4, and 8, and a bar attention mechanism module. The pyramid has two branches: one with dilated convolutions at different dilation rates, and the other with the bar attention mechanism module. Feature maps are fused after passing through these two branches. Increasing the dilation rate increases the network's receptive field, enhancing its ability to identify occluded road areas. The dilated convolution expands the receptive field without losing original information, allowing the network to capture more information locally. The pyramid adds the results of dilated convolutions with dilation rates of 1, 2, 4, and 8, preserving local spatial information while enhancing the receptive field, which is beneficial for extracting occluded road areas and retaining road edge details. It gradually expands the receptive field, mitigating the grid effect produced by traditional dilated convolutions. Furthermore, the "holes" in the pyramid do not have learning capabilities, resulting in higher parameter efficiency compared to methods that use large convolutions to expand the receptive field. The feature layers of the pyramid are connected through a special serial-parallel mechanism, reducing feature loss during data encoding and significantly eliminating the influence of road occlusion areas, thus effectively identifying partially occluded road areas.

[0072] Specifically, step S23 of the above-mentioned path extraction method based on hollow pyramids and bar attention includes the following steps: S231: Perform convolution, upsampling, max pooling operations on the first encoder, second encoder, third encoder, fourth encoder, and fifth encoder respectively, concatenate them, insert a bar attention module, and adjust it to the input size of the first decoder to obtain the first skip connection; Perform convolution, upsampling, and max pooling operations on the first encoder, second encoder, third encoder, fourth encoder, and fifth encoder respectively, concatenate them, insert a bar attention module, and adjust it to the input size of the second decoder to obtain the second skip connection; Separate the first encoder, second encoder, third encoder, fourth encoder, and fifth encoder... Perform convolution, upsampling, and max pooling operations on the first, second, third, fourth, and fifth encoders respectively, concatenate them, insert a bar attention module, and adjust it to the input size of the third decoder to obtain the third skip connection; perform convolution, upsampling, and max pooling operations on the first, second, third, fourth, and fifth encoders respectively, concatenate them, insert a bar attention module, and adjust it to the input size of the fourth decoder to obtain the fourth skip connection; S232: use the first skip connection to concatenate the first encoder and the first decoder, use the second skip connection to concatenate the second encoder and the second decoder, use the third skip connection to concatenate the third encoder and the third decoder, and use the fourth skip connection to concatenate the fourth encoder and the fourth decoder to obtain the second improved model;

[0073] Specifically, the encoder feature maps at different stages contain information at different levels. Low-level feature maps contain rich spatial information, providing overall road structure information; high-level feature maps contain accurate road semantic information, enhancing the model's ability to distinguish between roads and background. Combining feature maps from different stages can effectively supplement the decoder with sufficient road-level features, making the model's predicted road boundaries clearer. The network's encoder has five layers from shallow to high: E01, E2, E3, E4, and E5, with encoder sizes of 512×512×64, 256×256×64, and 128×128×64, respectively. 128, 64×64×256, 32×32×512; In this embodiment, there are 4 skip connections: skip connection from encoder E1 to decoder D1, skip connection from encoder E2 to decoder D2, skip connection from encoder E3 to decoder D3, and skip connection from encoder E4 to decoder D4; A conventional skip connection is a single mapping from encoder to decoder. In this embodiment, encoders E1, E2, E3, E4, and E5 are convolved respectively, and the 5 feature maps are combined after upsampling and max pooling operations. Finally, the input size of each skip connection is adjusted and used as the input at the skip connection.

[0074] Specifically, taking the skip connection from encoder E3 to decoder D3 as an example, in this embodiment, E1 is adjusted to have 128 channels using a 3×3 convolution operation, and then the image size is modulated to 128×128×128 using two max pooling operations; E2 is adjusted to have 128 channels using a 3×3 convolution operation, and then the image size is modulated to 128×128×128 using one max pooling operation; E4 is adjusted to have 128 channels using a 3×3 convolution operation, and then the image size is modulated to 128×128×128 using one upsampling operation; E5 is adjusted to have 128 channels using a 3×3 convolution operation, and then the image size is modulated to 128×128×128 using one upsampling operation; after adjusting all encoders to the input size of the skip connection from encoder E3 to decoder D3, E3 is combined as the input at the skip connection;

[0075] Specifically, step S24 of the above-mentioned path extraction method based on hollow pyramids and bar attention includes the following steps: S241: Constructing a central module, which includes a 3×3 convolutional branch, a 3×1 convolutional branch, a 1×3 convolutional branch, a horizontal pooling branch, a vertical pooling branch, a bar attention module, and a 1×1 convolution; the inputs of the 3×3 convolutional branch, the 3×1 convolutional branch, the 1×3 convolutional branch, the horizontal pooling branch, the vertical pooling branch, and the bar attention module are connected in parallel as the inputs of the central module, and the inputs of the 3×3 convolutional branch, the 3×1 convolutional branch, the 1×3 convolutional branch, the horizontal pooling branch, and the vertical pooling branch are connected in parallel as the inputs of the central module. The output ends are connected in the channel direction and then cascaded to the input end of the 1×1 convolution. The output end of the 1×1 convolution is connected to the output end of the bar attention module by adding matrix values, and then serves as the output end of the central module. The dilation rates of the 3×3 convolution branch, the 3×1 convolution branch, and the 1×3 convolution branch are {1, 2, 4, 8}. The horizontal pooling branch includes horizontal pooling, 1×1 convolution, and merging connected in series in sequence. The vertical pooling branch includes vertical pooling, 1×1 convolution, and merging connected in series in sequence in sequence. S242: According to the second improved model, the central module is connected in series between the 5th encoder and the 5th decoder of the second improved model to obtain the prediction model.

[0076] Specifically, this embodiment employs linear dilated convolution and global linear pooling layers in the central module. The pooling branch can preserve global road information in both vertical and horizontal directions. The concatenated dilated convolution and pooling branches combine the feature map outputs of different branches. Finally, combined with the strip attention mechanism module, learnable parameters are used after the central module to combine the encoder E5 with the fused feature map to obtain a feature map D5 with rich road background, effectively reducing the influence of occlusions and shadows, accelerating the convergence of the training network, and improving the network fitting performance.

[0077] Specifically, this embodiment incorporates strip-shaped dilated convolution and one-dimensional pooling algorithms into the central module. In remote sensing images, many roads are obscured by their surroundings. Dilated convolution can be used to grasp the relationship between roads and their environment, enriching the overall features of the roads and improving road connectivity. To address this issue, this embodiment designs a central module with strip-shaped dilated convolution and adds a dilated pyramid module to introduce rich road semantic information. It utilizes three branches: 3×3 convolution, 3×1 convolution, and 1×3 convolution, with dilation rates of {1, 2, 4, 8}, as well as two branches: horizontal pooling and vertical pooling. The convolution branches extract road features at different scales, while the pooling branches preserve global road information in both vertical and horizontal directions. The operation fuses feature maps from different receptive fields within the same branch. Then, concatenation and convolution operations combine the feature map outputs from different branches. Finally, the feature map from the strip-shaped attention module is combined with the fused feature map using learnable parameters to obtain a feature map D5 with accurate semantic road information.

[0078] In some embodiments, the above-described path extraction method based on hollow pyramids and bar attention can also be implemented in the following ways.

[0079] This embodiment aims to more accurately extract road areas by reducing the influence of occlusions and shadows in the complex context of road extraction. The following detailed description, in conjunction with the accompanying drawings, further illustrates this embodiment. Input data includes a 1024×1024×3 three-channel high-resolution remote sensing image and a 1024×1024×1 one-channel labeled image. Preprocessing is performed on the input data, and the hyperparameters of the network are adjusted. The preprocessed training set is then input into the proposed network for training. The preprocessed test set is input into the trained network to obtain prediction results. These prediction results are then compared with Ground Truth to obtain metrics such as recall, precision, F1 score, and IoU. Figure 2 As an example of the road extraction network structure of this embodiment, a hollow pyramid module is added after each encoder to form a structure with progressively increasing receptive fields. The high-level semantic features and low-level detail features of the five encoders are integrated at the jump connection. A strip attention module is added at the jump connection (module A in the figure) and the central module (module B in the figure). A strip hollow convolution is added at the central module B to further enhance the network's ability to identify occluded road areas. Figures 3 to 6 These are schematic diagrams of various modules in the network; this embodiment proposes a path extraction method based on hollow pyramids and bar attention, including the following steps:

[0080] Step 1: Preprocess the input data;

[0081] Step 2: Build the network architecture based on ResNet-34;

[0082] Step 3: Build a hollow pyramid module after each encoder;

[0083] Step 4: Unify and fuse all encoder sizes and use the result as the input for the skip connection;

[0084] Step 5: Build a strip-shaped attention mechanism module at the jump connection and the central module;

[0085] Step 6: Add striped dilated convolution and one-dimensional pooling algorithms to the central module;

[0086] Step 7: Input the preprocessed data into the built model for training;

[0087] Step 8: Input the remote sensing image data into the trained model for prediction.

[0088] This embodiment is based on ResNet34. The encoders of the network from shallow to high layers are: E1, E2, E3, E4, and E5, and the encoder sizes are: 512×512×64, 256×256×64, 128×128×128, 64×64×256, and 32×32×512, respectively.

[0089] Specifically, the input data in step 1 includes a 1024×1024×3 three-channel high-resolution remote sensing image and a 1024×1024×1 one-channel labeled image. The input data, including the remote sensing image and the labeled image, are rotated clockwise and counterclockwise by 15 degrees, 30 degrees and 45 degrees respectively, and then cropped. Data enhancement and other preprocessing operations are also performed.

[0090] Specifically, step 2 builds the network architecture based on ResNet-34, including the following process: The preprocessed data of size 1024×1024×3, E0, is input to the network. At this point, image E0 contains a large amount of detailed information as well as local interference information. First, E0 is subjected to a 7×7 convolution operation with a stride of 2 to expand the network channel features, outputting a 512×512×64 feature map. Since the road features in the occluded area are similar to the surrounding environment, in order to better learn the features of the road in the occluded area, this embodiment then uses a 3×3 convolution kernel with a stride of 2 to enhance the semantic expression of the occluded road area. A residual block is added after each encoder. The residual block's role is to mitigate the risk of gradient explosion and gradient vanishing in the network. The activation function after the convolution operation of the encoder is the ReLU function, the formula of which is as follows:

[0091]

[0092] Where x represents the input image data. Since the gradient of the ReLU activation function is constant in the non-negative interval, there is no gradient vanishing problem, allowing the model to converge stably and fit the training data. The ELU function is used as the activation function after the convolution operation of the decoder, and its formula is as follows:

[0093]

[0094] Where μ is a settable parameter, e x As an exponential function, the ELU activation function combines the advantages of the Sigmoid and ReLU activation functions, which can alleviate the gradient vanishing problem while accelerating convergence;

[0095] Specifically, step 3 involves building a dilated pyramid module after each encoder. Since the spectrum of the road is similar to the surrounding environment in occluded scenes, constructing a dilated pyramid module composed of dilated convolutions can effectively identify partially occluded road areas. Compared to regular convolution, dilated convolution enhances the receptive field by adjusting the spacing between the effective units of the convolution kernel. The equivalent receptive field calculation for the nth unrolled convolution is expressed as:

[0096]

[0097] Where, r n and r n-1 These are the receptive regions of the current layer and the previous layer, respectively; K is the size of the equivalent convolution kernel of the current layer, which can be calculated from the kernel size k and the dilation rate d; S i It is the stride of the i-th layer; when dilated convolution is viewed as a regular convolution with multiple "holes", it still follows the principles of convolution calculation:

[0098]

[0099] However, features obtained from a single dilated convolution are discontinuous because the "holes" in the dilated convolution cannot be learned. Therefore, this embodiment employs a dilated pyramid module composed of four dilated convolutions with different dilation rates, using a series-parallel combination structure. When the feature map enters the working range of the dilated pyramid module, the dilation rates of the four groups of dilated convolutions are {1, 2, 4, 8}, and the kernel sizes are {3, 5, 9, 17}, generating a receptive field of {3, 7, 15, 31}, thereby enabling the detection and capture of a wider range of features. To ensure that the feature maps extracted from each unrolled convolution in the dilated pyramid module can be integrated, padding is introduced during the unrolled convolution.

[0100]

[0101] Where I represents the input size; O represents the output size; k represents the kernel size; d represents the dilation rate; s represents the stride; and p represents the padding. When the padding size is the same as the dilation rate, it can be guaranteed that the output size of the feature map is the same as the input size.

[0102] The dilated pyramid consists of dilated convolutions with dilation rates of 1, 2, 4, and 8, and a bar-shaped attention mechanism module. The pyramid has two branches: one with dilated convolutions at different dilation rates, and the other with the bar-shaped attention mechanism module. Feature maps are fused after passing through these two branches. Increasing the dilation rate increases the network's receptive field, enhancing its ability to identify occluded road areas. The dilated convolution expands the receptive field without losing original information, allowing the network to capture more information locally. The dilated pyramid sums the results of dilated convolutions with dilation rates of 1, 2, 4, and 8. This method preserves local spatial information while enhancing the receptive field, which is beneficial for extracting partially obscured road areas and retaining detailed road edge information. It gradually expands the receptive field, mitigating the grid effect caused by traditional dilated convolution. Secondly, the "holes" in the dilated pyramid do not have learning capabilities, making it more parameter-efficient compared to methods that use large convolution operations to increase the receptive field. The feature layers of the dilated pyramid are connected by a special serial-parallel mechanism, reducing feature loss during data encoding and largely eliminating the influence of road obstruction areas, thus effectively identifying partially obscured road areas.

[0103] Specifically, step 4 unifies and fuses all encoder sizes as input for skip connections; encoder feature maps at different stages contain information at different levels; low-level feature maps contain rich spatial information, providing overall road structure information; high-level feature maps contain accurate road semantic information, enhancing the model's ability to distinguish between roads and background; combining feature maps from different stages effectively supplements the decoder with sufficient road-level features, making the model's predicted road boundaries clearer; the complete process is as follows: In this network, there are four skip connections: skip connection from encoder E1 to decoder D1, skip connection from encoder E2 to decoder D2, skip connection from encoder E3 to decoder D3, and skip connection from encoder E4 to decoder D4; a conventional skip connection is a single mapping from encoder to decoder. In this embodiment, encoders E1, E2, E3, E4, and E5 are convolved respectively, and After upsampling and max pooling operations, the five feature maps are combined. Taking the skip connection from encoder E3 to decoder D3 as an example, in this embodiment, E1 is adjusted to have 128 channels using a 3×3 convolution operation, and then the image size is modulated to 128×128×128 using two max pooling operations; E2 is adjusted to have 128 channels using a 3×3 convolution operation, and then the image size is modulated to 128×128×128 using one max pooling operation; E4 is adjusted to have 128 channels using a 3×3 convolution operation, and then the image size is modulated to 128×128×128 using one upsampling operation; E5 is adjusted to have 128 channels using a 3×3 convolution operation, and then the image size is modulated to 128×128×128 using one upsampling operation; after adjusting all encoders to the input size of the skip connection from encoder E3 to decoder D3, E3 is combined as the input at the skip connection.

[0104] Specifically, in step 5, the bar attention mechanism module is added to the skip connection module. Since road information has long connectivity and unique morphological features, this module replaces the two-dimensional global average pooling operation with two one-dimensional pooling operations. This effectively integrates information from the two independent horizontal and vertical directions while significantly reducing computational overhead. Specifically, first, two pairs of one-dimensional directional features are extracted from the given input. Then, pooling kernels of size (H,1) or (1,W) are used to encode each channel along the two one-dimensional directions of the horizontal and vertical coordinates, respectively. Therefore, the output of channel c with height h can be expressed as:

[0105]

[0106] Similarly, the output of the c channel with width w can be written as:

[0107]

[0108] Subsequently, this embodiment concatenates the two extracted aggregated feature maps and then sends them to a shared 1×1 conventional transformation function F to obtain...

[0109] y=σ(F1[z h ,z w ])

[0110] Among them, [z h ,z w [] represents a connection operation along the spatial dimension, where σ is a non-linear activation function, serving as an intermediate feature map that encodes spatial information in the horizontal and vertical directions. Then, a 1×1 convolutional pair controls the number of channels, reducing the information to a size of c / r×(H+W)×1, which is then decomposed along the spatial dimension into y. h ∈c / r×H and y w ∈c / r×W; then perform 1×1 convolution transformations on each, reducing them to the same tensor with c channels, resulting in:

[0111] gh=δ(F h (y h ))

[0112] g w =δ(F w (y w ))

[0113] Out = p[g h (i)g w (j)]

[0114] Where Out is the result of the bar attention mechanism, which is the output of the skip connection and will be combined with the previous layer decoder to serve as the feature map of the next decoder, where p is a learnable parameter;

[0115] Specifically, step 6 adds strip-shaped dilated convolution and one-dimensional pooling algorithms to the central module. In remote sensing images, many roads are obscured by their surroundings. Dilated convolution can be used to grasp the relationship between roads and their environment, enriching the overall features of the roads and improving road connectivity. To address this issue, this embodiment designs a central module with strip-shaped dilated convolution and adds a dilated pyramid module to introduce rich road semantic information. It utilizes three branches: 3×3 convolution, 3×1 convolution, and 1×3 convolution, with dilation rates of {1, 2, 4, 8}, as well as two branches: horizontal pooling and vertical pooling. The convolution branches extract road features at different scales, while the pooling branches preserve global road information in both vertical and horizontal directions. The operation fuses different receptive field feature maps from the same branch. Then, concatenation and convolution operations combine the feature map outputs from different branches. Finally, the feature map from the strip-shaped attention module is combined with the fused feature map using learnable parameters to obtain a feature map D5 with accurate semantic road information.

[0116] Specifically, step 7 inputs the preprocessed data into the built model for training, using the Adam optimizer. The Adam optimizer improves the gradient descent method by considering the moving averages of the first and second moments of the gradient, enabling it to intelligently adapt the learning rate to each parameter; its mathematical definition is:

[0117]

[0118] Among them, g t This represents the gradient at iteration step t. f represents the gradient of parameter θ. t (θ t-1 ) is the objective function to be optimized, θ t-1 These are the parameter values ​​evaluated in the previous iteration; the iteration step t and the initial first and second moment vectors are set to 0; the loss function uses an adaptive scaling loss function combining Dice Loss and Bce Loss.

[0119] Loss=α1L Dice +α2L Bce

[0120] Dice Loss is defined as follows:

[0121]

[0122] Here, the Dice coefficient is a set similarity measure function, and Dice Loss can reduce the risk of overfitting; where X is the prediction result output by the method, and Y is the ground truth. The definition of Bce Loss is:

[0123] L Bce = -YlogX - (1-Y)log(1-X)

[0124] Among them, Bce Loss avoids gradient vanishing to some extent because the gradient is no longer related to the Sigmoid function during backpropagation; the adaptive combination of Dice Loss and Bce Loss greatly reduces the risk of gradient vanishing and is more conducive to the network learning the characteristics of the path.

[0125] Specifically, in step 8, the remote sensing image to be predicted can be input into the trained network of this method. After the image to be predicted is processed by the perceptrons with parameters saved by this method, it is finally processed by the Sigmoid activation function to obtain a 1024×1024×1 predicted image. The definition of the Sigmoid activation function is as follows:

[0126]

[0127] The Sigmoid activation function is commonly used for binary classification tasks, classifying based on whether the value is greater than 0.5, and is located in the last layer of the model.

[0128] Figure 7 This is a comparison diagram of the method in this embodiment and other methods in the obscured area; experiments show that, under the complex background of road obstruction, this method can effectively identify road areas and improve the connectivity of roads in the obscured area.

[0129] This embodiment provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the aforementioned path extraction method based on void pyramids and bar attention. The storage medium may be a magnetic disk, optical disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk drive (HDD), or solid-state drive (SSD), etc.; the storage medium may also include combinations of the above types of memory.

[0130] This embodiment provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps of the aforementioned path extraction method based on hollow pyramids and bar attention. For example... Figure 8As shown, the computer device may include: at least one processor 121, such as a CPU (Central Processing Unit), at least one communication interface 123, memory 124, and at least one communication bus 122. The communication bus 122 is used to enable communication between these components. The communication interface 123 may include a display screen and a keyboard; optionally, the communication interface 123 may also include a standard wired interface or a wireless interface. The memory 124 may be high-speed RAM (Random Access Memory) or non-volatile memory, such as at least one disk drive. Optionally, the memory 124 may also be at least one storage device located remotely from the processor 121. The memory 124 stores application programs, and the processor 121 calls the program code stored in the memory 124 to execute any of the aforementioned method steps. The communication bus 122 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The communication bus 122 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 8The term 124 is represented by a single line, but this does not imply a single bus or a single type of bus. The memory 124 may include volatile memory, such as random-access memory (RAM); it may also include non-volatile memory, such as flash memory, hard disk drive (HDD), or solid-state drive (SSD); or it may include a combination of the above types of memory. The processor 121 may be a central processing unit (CPU), a network processor (NP), or a combination of a CPU and an NP. The processor 121 may further include a hardware chip. This hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The aforementioned PLD can be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof. Optionally, the memory 124 is also used to store program instructions. The processor 121 can call the program instructions to implement the path extraction method based on the void pyramid and bar attention structure as described in this embodiment.

[0131] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims. All of these forms are within the protection scope of the present invention.

Claims

1. A path extraction method based on hollow pyramids and strip attention, characterized in that, Includes the following steps: S1: Acquire remote sensing image data and corresponding labeled image data, and preprocess the remote sensing image data and corresponding labeled image data to obtain preprocessed data; S2: Improve the ResNet-34 network to obtain the network of this method; S3: Using the preprocessed data, train the network of this method to obtain a prediction model; S4: Input the remote sensing image to be predicted into the prediction model to obtain the prediction result; Step S2 includes the following steps: S21: Construct the basic model based on the ResNet-34 network; S22: Based on the aforementioned basic model, a first improved model is obtained by utilizing dilated convolution and bar attention modules; S23: Based on the first improved model, a skip connection is made between the encoder and decoder to obtain the second improved model; S24: Construct a central module, and obtain a prediction model based on the central module and the second improved model; Step S22 includes the following steps: S221: Based on the dual attention mechanism, construct a bar-shaped attention module, as shown in the formula: in, For use of size ( 1) When the pooling kernel encodes each channel along the one-dimensional direction of the horizontal coordinate... Passage and Height The output; Image width; In order to be at a high altitude Upper 1 pixel; To use a size of (1, When the pooling kernel encodes each channel along the one-dimensional direction of the vertical coordinate... Channel and width The output; Image height; For in width Upper 1 pixel; To concatenate two extracted aggregated feature maps and then send them to a shared 1 1. Conventional Transformation Function The results obtained; It is a non-linear activation function; For series and and perform 1 1. Transformation function of convolution; It is a connection operation along the spatial dimension, which is an intermediate feature mapping that encodes spatial information in the horizontal and vertical directions; The magnitude of attention in the horizontal direction; It is a non-linear activation function; for( The convolution kernel of ,1); Decomposed horizontally along the spatial dimension into ; The magnitude of attention in the vertical direction; For (1, The convolution kernel; Decomposed along the vertical direction of the spatial dimension into ; The result of the bar attention mechanism, as the output of the skip connection, will be combined with the previous layer decoder and used as the feature map of the next decoder; These are learnable parameters; S222: Using the strip attention module and dilated convolution, a dilated pyramid module is constructed. The dilated pyramid module is used to identify partially occluded road areas. The dilated pyramid module includes a first dilated convolution, a second dilated convolution, a third dilated convolution, a fourth dilated convolution, and a strip attention module. The dilation rate of the first dilated convolution is 1, the dilation rate of the second dilated convolution is 2, the dilation rate of the third dilated convolution is 4, and the dilation rate of the fourth dilated convolution is 8. The strip attention module is connected in series with the first, second, third, and fourth dilated convolutions, respectively, and the first, second, third, and fourth dilated convolutions are connected in parallel sequentially. S223: Build a hollow pyramid module after each encoder of the basic model to obtain the first improved model.

2. The road extraction method based on hollow pyramids and strip attention as described in claim 1, characterized in that, Step S21 includes the following steps: S211: Add 7 to the input of the network in this method. Seven convolutional operations with a stride of 2 are performed to expand the network channel features, and the output is 512. 512 64 feature maps; S212: Add 3 to the output of the convolution operation. 3 convolutional kernels with a stride of 2, which are used to enhance the semantic representation of the occluded road region; S213: Add a residual block after each encoder in the network of the present method. The residual block is used to mitigate the risk of gradient explosion and gradient vanishing in the network. S214: The activation function after the convolution operation of the encoder in the network of this method adopts... The activation function of the decoder in the network described in this method after the convolution operation is adopted. The function yields the basic model; the basic model includes a first encoder, a second encoder, a third encoder, a fourth encoder, a fifth encoder, a fifth decoder, a fourth decoder, a third decoder, a second decoder, and a first decoder connected in series.

3. The road extraction method based on hollow pyramids and strip attention as described in claim 2, characterized in that, Step S23 includes the following steps: S231: Perform convolution, upsampling, and max pooling operations on encoders 1, 2, 3, 4, and 5 respectively, concatenate them, insert them into the bar attention module, and adjust them to the input size of decoder 1 to obtain the first skip connection; perform convolution, upsampling, and max pooling operations on encoders 1, 2, 3, 4, and 5 respectively, concatenate them, insert them into the bar attention module, and adjust them to the input size of decoder 2 to obtain the second skip connection; perform convolution, upsampling, and max pooling operations on encoders 1, 2, 3, 4, and 5 respectively, concatenate them, insert them into the bar attention module, and adjust them to the input size of decoder 3 to obtain the third skip connection; perform convolution, upsampling, and max pooling operations on encoders 1, 2, 3, 4, and 5 respectively, concatenate them, insert them into the bar attention module, and adjust them to the input size of decoder 4 to obtain the fourth skip connection; S232: Connect the first encoder and the first decoder in series using the first jump connection, connect the second encoder and the second decoder in series using the second jump connection, connect the third encoder and the third decoder in series using the third jump connection, and connect the fourth encoder and the fourth decoder in series using the fourth jump connection to obtain the second improved model.

4. The road extraction method based on hollow pyramids and strip attention as described in claim 2, characterized in that, Step S24 includes the following steps: S241: Construct a central module, the central module comprising 3 3 convolution branches, 3 1 convolution branch, 1 3 convolutional branches, horizontal pooling branches, vertical pooling branches, bar attention modules, and 1 1 convolution; the 3 3 convolution branches, 3 1 convolution branch, 1 The inputs of the three convolutional branches, horizontal pooling branches, vertical pooling branches, and bar attention modules are connected in parallel to serve as the input of the central module. 3 convolution branches, 3 1 convolution branch, 1 The outputs of the three convolutional branches, horizontal pooling branches, and vertical pooling branches are connected in the channel direction and then connected to the output of the first branch. The inputs of a convolution are concatenated. The output of the convolution module is concatenated with the output of the bar attention module by adding matrix values, and then used as the output of the central module; the 3 3 convolution branches, the 3 1 convolutional branch and the 1 The dilation rate of the 3 convolutional branches is {1, 2, 4, 8}; the horizontal pooling branches include horizontal pooling, 1, and 2 convolutional branches connected in series.

1. Convolution and merging, the vertical pooling branch includes vertical pooling, 1.

1. Convolution and merging; S242: According to the second improved model, the central module is connected in series between the fifth encoder and the fifth decoder of the second improved model to obtain the prediction model.

5. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the path extraction method based on hollow pyramids and bar attention as described in any of claims 1-4.

6. A computer 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 steps of the road extraction method based on hollow pyramids and bar attention as described in any one of claims 1-4.