Realization method of remote sensing image road extraction task based on Swift-SegEdgeNet
Through the dual-branch convolution module and edge detection task of Swift-SegEdgeNet, the problems of large calculation amount and difficulty in directional feature extraction in road extraction from remote sensing images are solved, and high-precision road extraction is achieved, surpassing the performance of traditional networks.
Patent Information
- Application Number
- CN202410747936.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-11
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2044-06-11
AI Technical Summary
The existing remote sensing image road extraction method based on the Transformer series has a large amount of calculation and slow training speed. It is difficult to accurately extract the directional characteristics and complex edge information of the road, resulting in low extraction accuracy and high error rate, especially when processing large spans, narrow spans, and continuous distributions. Performs poorly on roads.
A method based on Swift-SegEdgeNet is proposed, which combines dual-branch convolution modules and edge detection tasks, optimizes the network structure through multi-task learning, extracts road direction features and complex edge information, and improves the accuracy of road extraction in remote sensing images.
It significantly improves the segmentation accuracy of road extraction in remote sensing images, surpassing traditional FCN, UNet and other networks, improves the continuity and accuracy of road extraction, and reduces the error rate.
Smart Images

Figure CN118736434A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a remote sensing image road extraction method based on Swift-SegEdgeNet, belonging to the field of computer vision. The present invention has strong innovation and feasibility, and can be used to extract directional features and complex edges of roads in remote sensing images, thereby improving the extraction accuracy of remote sensing image roads. Background Art
[0002] With the development of aerospace technology, researchers can easily collect a large number of high-resolution remote sensing images and analyze them. Learning the knowledge contained in these images and effectively screening the information of interest is of great significance to the fields of earth science, environmental monitoring, urban planning, agricultural management, and disaster emergency response. As an important part of daily transportation, roads are one of the most important information in high-resolution remote sensing images. Road extraction has important applications in urban planning, traffic management, disaster emergency response, and environmental protection. Extracting roads from remote sensing images is a critical and challenging topic.
[0003] In recent years, deep learning-based image algorithms have become a hot topic in computer science. In order to improve the accuracy of road extraction in remote sensing images, many researchers have applied deep learning methods to road extraction in remote sensing images, using convolutional neural networks and Transformer networks to extract roads in remote sensing images. Convolution-based neural network models can improve the road extraction effect to a certain extent, but convolution operations are good at extracting local features and have certain limitations in capturing global feature representations. In order to better extract global features of remote sensing images, many studies have applied Transformer-based methods to road extraction in remote sensing images. For example, Dosovitskiy et al. proposed VisionTransformer, which applied Transformer to the field of computer vision for the first time, laying the foundation for many subsequent studies. Zheng et al. proposed SETR, which replaced the encoder based on stacked convolutional layers with a pure Transformer, gradually reducing the spatial resolution, thereby producing a new segmentation model. This Transformer encoder without convolution treats the input image as a sequence of image patches represented by learned patch embeddings and transforms the sequence using a global self-attention model for discriminative feature representation learning. Liu et al. proposed Swin-Transformer, which reduces the amount of computation by dividing the image into non-overlapping local windows and performing self-attention calculations within the windows. At the same time, it also allows cross-window connections after shifting. J. Chen et al. proposed TransUNet, which uses a hybrid CNN-Transformer structure to make full use of the detailed high-resolution spatial information from CNN features and the global context information from Transformer, but this method does not fully utilize the advantages of Transformer. Hu et al. proposed Swin-UNet, which is a U-shaped network built with pure Swin-Transformer modules. By inputting the patch sequence into the encoding-decoding structure based on the Swin-Transformer module, local and global semantic features are learned through jump connections. Xie et al. proposed SegFormer, which contains a new hierarchical Transformer encoder that can output multi-scale features. The algorithm does not require position encoding, avoiding the problem of performance degradation caused by interpolating the position code when the test resolution is different from the training resolution; in addition, SegFormer avoids a complex decoder, and the proposed MLP decoder aggregates information from different layers, thereby combining local attention and global attention to present a powerful representation. Dong et al. proposed CSWinTransformer, which proposed a cross-shaped window self-attention mechanism, computing self-attention in parallel horizontal and vertical strips that form a cross-shaped window.Although the segmentation methods based on the Transformer series can improve the accuracy of road extraction in remote sensing images to a certain extent, the segmentation methods based on the Transformer series generally have the following problems: 1. The segmentation methods based on the Transformer series generally have problems such as large amount of calculation and slow training speed; 2. The current road extraction methods based on deep learning in remote sensing images use the backbone network to extract road information, and rarely use edge information to improve the accuracy of road extraction, resulting in poor continuity of the extracted roads and high error rate; 3. In remote sensing images, there are some roads with large spans, narrowness, continuous distribution, and different directions. Such special shapes bring challenges to the road extraction task. It is difficult for current methods to accurately extract the directional features of these roads, which can lead to a high extraction error rate.
[0004] In order to solve the above problems, the present invention proposes a remote sensing image road extraction method based on Swift-SegEdgeNet. Firstly, a dual-branch convolution module is proposed to extract the directional features of roads in remote sensing images. Secondly, an edge detection task is added on the basis of the semantic segmentation task to extract complex edge information, and a better remote sensing image road extraction effect is obtained. Summary of the invention
[0005] The purpose of the present invention is to further improve the segmentation accuracy of the road extraction task of remote sensing images. On the basis of the semantic segmentation task, an edge detection task is added, and the network structure is optimized using the idea of multi-task learning, thereby improving the accuracy of road extraction from remote sensing images. Secondly, a dual-branch convolution module that can extract road direction features is proposed, and strip convolutions in four different directions extract the directional features of the road, further improving the accuracy of road extraction from remote sensing images. To achieve the above purpose, the present invention adopts the following technical solutions:
[0006] A method for implementing a remote sensing image road extraction task based on Swift-SegEdgeNet includes the following steps:
[0007] Step 1: Preprocess the Massachusetts road dataset and DeepGlobe 2018 road dataset and make edge labels.
[0008] Step 1.1: Split the dataset. Crop the Massachusetts road dataset and DeepGlobe 2018 road dataset into 512×512 images;
[0009] Step 1.2: Delete incorrect data. Analyze the cropped images, delete the images with incorrect annotations, and divide the dataset into training set, validation set, and test set;
[0010] Step 1.3: Make edge labels. First, convert the original segmentation labels into One-Hot encoding form to generate a three-dimensional array in which each channel represents a category. Then, according to the specified radius parameter, calculate the distance from each pixel to its nearest category, and mark the pixels within the radius as edges. In this way, a binary edge map is finally generated to obtain the edge information of the road. Finally, the generated binary edge map is converted into a PyTorch tensor type for training and use in the model.
[0011] Step 2: Build the Swift-SegEdgeNet model.
[0012] Step 2.1: Feature extraction. The input image first passes through the encoder containing the Patch Embedding layer, SwiftFormer module and dual-branch convolution module to extract features;
[0013] Step 2.1.1: Construct the Patch Embedding layer. The Patch Embedding layer contains two convolutional layers with a stride of 2 (including BN and RELU);
[0014] Step 2.1.2: Build the SwiftFormer module. The SwiftFormer module consists of two parts: the Conv Encoder module and the SwiftFormer Encoder module;
[0015] Step 2.1.3: Construct a dual-branch convolution module. The dual-branch convolution module contains a normal convolution branch and a strip convolution branch;
[0016] Step 2.2: Construct a semantic segmentation decoder. The semantic segmentation decoder first sends the features extracted by the last layer of the encoder to the pyramid pooling module. Then, the high-level semantic information is gradually integrated into the middle and low layers through top-down branches and lateral connections. Finally, the obtained features are integrated to obtain the final semantic segmentation map;
[0017] Step 2.3: Construct an edge detection decoder. The edge detection decoder aggregates the features obtained at each stage of the encoder in two paths, from low to high and from high to low, and concatenates the aggregated features to obtain the final edge map;
[0018] Step 2.4: Fusion of semantic segmentation results and edge detection results. The semantic segmentation results obtained by the semantic segmentation decoder and the edge detection results obtained by the edge detection decoder are added together to obtain the final output result.
[0019] Step 3: Put the preprocessed and edge-labeled Massachusetts road dataset and DeepGlobe2018 road dataset into Swift-SegEdgeNet for training.
[0020] Step 4: Use mIOU, mDC, Recall, and F1-score to evaluate the road extraction results.
[0021] Compared with the prior art, the present invention optimizes the network structure by using the multi-task concept and proposes a dual-branch convolution module to extract road direction features. In the task of extracting roads from remote sensing images, the segmentation accuracy exceeds that of FCN, UNet, SegNet, ResUNet, AttUNet, DUNet, LinkNet34, DinkNet34, UNet++, UNet2++, TransUNet, Cswin, Segformer, Swin-ResUNet, Swin-ResUNet+ and other networks. This has great practical significance for the automatic extraction of roads from remote sensing images. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 A sample graph of Massachusetts road data after adding edge labels.
[0023] Figure 2 A sample image of DeepGlobe 2018 road data after adding edge labels.
[0024] Figure 3 This is the network structure diagram of Swift-SegEdgeNet.
[0025] Figure 4 This is the structural diagram of the Conv Encoder module.
[0026] Figure 5 This is the SwiftFormer Encoder module structure diagram.
[0027] Figure 6 This is the structure diagram of the efficient additive attention module.
[0028] Figure 7 This is the structure diagram of the dual-branch convolution module.
[0029] Figure 8 This is the structure diagram of the semantic segmentation decoder.
[0030] Fig. 9 This is the structure diagram of the edge detection decoder.
[0031] Fig.10 It is a flow chart for implementing the method of the present invention. DETAILED DESCRIPTION
[0032] The present invention relates to a remote sensing image road extraction method based on Swift-SegEdgeNet, and the present invention is explained and described below in conjunction with the relevant drawings:
[0033] The Massachusetts road dataset and DeepGlobe 2018 road dataset used in the present invention cover almost all types of road types. The Swift-SegEdgeNet structure includes an encoder, a semantic segmentation decoder, and an edge detection decoder. After the encoder obtains feature maps of different scales in four stages, they are sent to the semantic segmentation decoder and the edge detection decoder respectively. The semantic segmentation result obtained by the semantic segmentation decoder and the edge detection result obtained by the edge detection decoder are added to obtain the final output result. The specific implementation scheme of the example of the present invention is:
[0034] Step 1: Preprocess the Massachusetts road dataset and DeepGlobe 2018 road dataset and make edge labels.
[0035] Step 1.1: Split the dataset. Crop the Massachusetts road dataset and DeepGlobe 2018 road dataset into 512×512 images;
[0036] Step 1.2: Delete incorrect data. Analyze the cropped images, delete the images with incorrect annotations, and divide the dataset into training set, validation set, and test set;
[0037] Step 1.3: Make edge labels. First, convert the original segmentation labels into One-Hot encoding form to generate a three-dimensional array in which each channel represents a category. Then, according to the specified radius parameter, calculate the distance from each pixel to its nearest category, and mark the pixels within the radius as edges. In this way, a binary edge map is finally generated to obtain the edge information of the road. Finally, the generated binary edge map is converted to a PyTorch tensor type for training and use in the model. The sample images of the Massachusetts road dataset and the DeepGlobe2018 road dataset after adding edge labels are shown below. Figure 1 and Figure 2 shown.
[0038] Step 2: Build the Swift-SegEdgeNet model. The structure of the Swift-SegEdgeNet model is as follows Figure 3 shown.
[0039] Step 2.1: Feature extraction. The input image first passes through the encoder containing the Patch Embedding layer, SwiftFormer module and dual-branch convolution module to extract features;
[0040] Step 2.1.1: Construct the Patch Embedding layer. The Patch Embedding layer contains two convolutional layers with a stride of 2 (including BN and RELU), which converts the input image of H×W×3 resolution into a feature map of size H / 4×W / 4×C and serves as the input of the SwiftFormer module;
[0041] Step 2.1.2: Build the SwiftFormer module. The SwiftFormer module consists of two parts: the Conv Encoder module and the SwiftFormer Encoder module;
[0042] The Conv Encoder module structure is as follows Figure 4 As shown in the figure, the feature map first passes through the depth convolution layer and the batch normalization layer. Then, the obtained feature map passes through the point-by-point convolution layer, the GeLU activation layer and the point-by-point convolution layer in sequence. Finally, the obtained feature map and the original feature map are added to obtain the output result of the Conv Encoder module. The specific calculation process of the Conv Encoder module is shown in formulas (1) to (4):
[0043] x res =x (1)
[0044] x1=BN(DWConv(x)) (2)
[0045] x2=Conv(GeLU(Conv(x1))) (3)
[0046] x output =x2+x res (4)
[0047] The SwiftFormer Encoder module learns rich local-global information at each stage of the encoder. Figure 5As shown in Figure 1, the SwiftFormer Encoder module contains a local representation module, an efficient additive attention module, and a linear layer. The local representation module consists of a 3×3 depthwise convolution and a pointwise convolution, which enables the module to learn spatial information and encode local information. The resulting feature map is then sent to the efficient additive attention module, which is designed to learn the contextual information of the feature map. Finally, the output feature map is sent to a linear block, which consists of two 1×1 pointwise convolution layers, a batch normalization layer, and a GeLU activation layer to generate nonlinear features. The calculation process of the SwiftFormer Encoder module is shown in formulas (5) to (7):
[0048] x1=Conv(DWConv(x)) (5)
[0049] x2=Efficient Additive Attention(x1) (6)
[0050] x output =Linear(x2) (7)
[0051] Among them, Efficient Additive Attention refers to the efficient additive attention module. Figure 6 As shown, using two matrices W q , W k Transform the input matrix x into a Query matrix (Q) and a Key (K) matrix, where Q, K∈R n×d , W q , W k ∈R d×d , n is the token length, d is the dimension of the vector. Next, each column of the Query matrix is multiplied by the learnable parameter vector w a ∈R d To learn the attention weights, thus generating the global attention weight a∈R n Then, the attention weights are multiplied by each column of the Query matrix and summed to produce a single global Query vector q∈R d , then multiply q by the Key matrix and pass through a linear layer to obtain the global context information. Finally, add the normalized Query matrix to the global context information and pass through a linear layer to obtain the final output result. The specific calculation process is shown in formulas (8) to (10):
[0052]
[0053]
[0054] x=Linear(Norm(Q)+Linear(K×q)) (10)
[0055] Step 2.1.3: Construct a dual-branch convolution module. Figure 7 As shown in Figure 1, the dual-branch convolution module contains a normal convolution branch and a strip convolution branch. The normal convolution branch is used to extract image features and downsample the feature map. The strip convolution branch first uses 1×1 convolution to reduce the dimension of the input feature map, and then uses 9×3 strip convolutions in four different directions: horizontal, vertical, left diagonal, and right diagonal to capture long-distance context information. The output feature maps of the four strip convolutions are concatenated, and then downsampled and 1×1 convolved to obtain the output of the strip convolution branch. Finally, the feature maps output by the normal convolution branch and the strip convolution branch are added to obtain the final output result of the dual-branch convolution module. The specific calculation process is shown in formulas (11) to (14):
[0056] x conv =ReLu(BN(Conv 1×1 (x))) (11)
[0057] x i =D i (x conv ),i=1,2,3,4 (12)
[0058] x concat =Concat(x1,x2,x3,x4) (13)
[0059] x output =Linear(Norm(Q)+Linear(K×q)) (14)
[0060] Step 2.2: Construct a semantic segmentation decoder. The semantic segmentation decoder is shown in Figure 8. The features extracted by the last layer of the encoder are first sent to the pyramid pooling module. Then, the high-level semantic information is gradually integrated into the middle and low layers through top-down branches and lateral connections. Finally, the obtained features are integrated to obtain the final semantic segmentation map. The specific calculation process is shown in formulas (15) to (19):
[0061] x1,x2,x3,x4=Encoder(x input ) (15)
[0062] y4=PPM(x4) (16)
[0063] y i =y i+1 +x i ,i=1,2,3 (17)
[0064] x=Concat(y1,y2,y3,y4) (18)
[0065] x output =Conv(Conv(Conv(x)))# (19)
[0066] Among them, x input is the input remote sensing image, x1, x2, x3, x4 are the feature maps obtained by the four stages of the encoder, y1, y2, y3, y4 are the feature maps obtained by the four stages of the semantic segmentation decoder, x output It is the semantic segmentation result map obtained, and PPM is the pyramid pooling module.
[0067] Step 2.3: Construct an edge detection decoder. The edge detection decoder structure is as follows Fig. 9 As shown, the features obtained at each stage of the encoder are aggregated according to two paths, from low to high and from high to low, and the aggregated features are concatenated to obtain the final edge map. The specific calculation process is shown in formulas (20) to (27):
[0068] x1,x2,x3,x4=Encoder(x input ) (20)
[0069] x i =Conv 1×1 (Reshape(x i )),i=1,2,3,4 (21)
[0070] y i =Conv 3×3 (x i +x i+1 ),i=1,2,3 (22)
[0071] y4=Conv 3×3 (x4) (23)
[0072] z i =Conv 3×3 (x i +x i-1 ),i=2,3,4 (24)
[0073] z1=Conv 3×3 (x1) (25)
[0074] x=Concat(y1,y2,y3,y4,z1,z2,z3,z4) (26)
[0075]
[0076] Among them, xinput is the input remote sensing image, x1, x2, x3, x4 are the feature maps obtained by the four stages of the encoder, y1, y2, y3, y4 are the feature maps obtained by aggregating features from high to low, z1, z2, z3, z4 are the feature maps obtained by aggregating features from low to high, σ represents three 3×3 convolutional layers (including BN and RELU), Represents a 1×1 convolutional layer (including BN and RELU), and x_output is the edge detection result image of the final output.
[0077] Step 2.4: Fusion of semantic segmentation results and edge detection results. The semantic segmentation results obtained by the semantic segmentation decoder and the edge detection results obtained by the edge detection decoder are added together to obtain the final output result.
[0078] Step 3: Put the preprocessed and edge-labeled Massachusetts road dataset and DeepGlobe2018 road dataset into Swift-SegEdgeNet for training.
[0079] Step 4: Use mIOU, mDC, Recall, and F1-score to evaluate the road extraction results.
[0080] The implementation details of mIOU are shown in formula (28):
[0081]
[0082] Where k represents the number of categories to be classified in the semantic segmentation task, and p ii Indicates the number of pixels whose true category is i and whose predicted category is also i, p ij Indicates the number of pixels whose true category is i and predicted category is j, p ji Indicates the number of pixels whose true category is j and predicted category is i.
[0083] The implementation details of the average Dice coefficient are shown in formula (29):
[0084]
[0085] in It indicates that the model predicts the segmentation result of the pth image. Represents the true label of the corresponding p-th image, and N represents the number of test samples.
[0086] The recall rate is calculated as shown in formula (30):
[0087]
[0088] Among them, TP is the number of samples that are actually positive and predicted as positive, FN is the number of samples that are actually positive but predicted as negative, and TN is the number of samples that are actually negative and also predicted as negative.
[0089] The implementation details of F1-score are shown in formula (31):
[0090]
[0091] Among them, Recall refers to the recall rate and Precision refers to the accuracy rate.
[0092] Table 1 Results of different models on the Massachusetts road dataset
[0093]
[0094] Table 2 Results of different models on DeepGlobe 2018 road dataset
[0095]
[0096]
[0097] The above examples are only used to describe the present invention, rather than to limit the technical solutions described in the present invention. Therefore, all technical solutions and improvements that do not depart from the spirit and scope of the present invention should be included in the scope of the claims of the present invention.
Claims
1. A method for implementing the remote sensing image road extraction task based on Swift-SegEdgeNet, characterized in that: The following steps are involved: Step 1: Preprocess the Massachusetts road dataset and DeepGlobe 2018 road dataset and create edge labels; Step 1.1: Split the dataset; crop the Massachusetts road dataset and DeepGlobe 2018 road dataset into 512×512 images; Step 1.2: Delete the wrong data; analyze the cropped images, delete the images with wrong annotations and divide the dataset into training set, validation set and test set; Step 1.3: Make edge labels; First, convert the original segmentation labels into One-Hot encoding form to generate a three-dimensional array in which each channel represents a category; then calculate the distance from each pixel to its nearest category according to the specified radius parameter, and mark the pixels within the radius as edges; in this way, a binary edge map is finally generated to obtain the edge information of the road; finally, the generated binary edge map is converted into a PyTorch tensor type for training and use in the model; Step 2: Build the Swift-SegEdgeNet model; Step 2.1: Extract features; The input image first passes through the encoder consisting of the Patch Embedding layer, SwiftFormer module, and dual-branch convolution module to extract features; Step 2.1.1: Construct the Patch Embedding layer; the Patch Embedding layer contains two convolutional layers with a stride of 2, including BN and RELU; Step 2.1.2: Build the SwiftFormer module; the SwiftFormer module consists of two parts: the Conv Encoder module and the SwiftFormer Encoder module; Step 2.1.3: Construct a dual-branch convolution module; the dual-branch convolution module includes a normal convolution branch and a strip convolution branch; Step 2.2: Construct a semantic segmentation decoder; the semantic segmentation decoder first sends the features extracted by the last layer of the encoder to the pyramid pooling module; then gradually integrates the high-level semantic information into the middle and low layers through top-down branches and lateral connections; the obtained features are integrated to obtain the final semantic segmentation map; Step 2.3: Construct an edge detection decoder. The edge detection decoder aggregates the features obtained at each stage of the encoder in two paths, from low to high and from high to low, and concatenates the aggregated features to obtain the final edge map. Step 2.4: Fusing the semantic segmentation results and edge detection results; adding the semantic segmentation results obtained by the semantic segmentation decoder and the edge detection results obtained by the edge detection decoder to obtain the final output result; Step 3: Put the preprocessed and edge-labeled Massachusetts road dataset and DeepGlobe 2018 road dataset into Swift-SegEdgeNet for training; Step 4: Use mIOU, mDC, Recall, and F1-score to evaluate the road extraction results.
2. The method for implementing a remote sensing image road extraction task based on Swift-SegEdgeNet according to claim 1, characterized in that: In the Conv Encoder module, the feature map first passes through the deep convolution layer and the batch normalization layer; then, the obtained feature map passes through the point-by-point convolution layer, the GeLU activation layer and the point-by-point convolution layer in sequence; finally, the obtained feature map and the original feature map are added to obtain the output result of the Conv Encoder module; the specific calculation process of the Conv Encoder module is shown in formulas (1) to (4): x res =x (1) x1=BN(DWConv(x)) (2) x2=Conv((GeLU(Conv(x1))) (3) x output =x2+x res (4) 3. The method for implementing a remote sensing image road extraction task based on Swift-SegEdgeNet according to claim 1, characterized in that: The SwiftFormer Encoder module learns rich local-global information at each stage of the encoder. The SwiftFormer Encoder module contains a local representation module, an efficient additive attention module, and a linear layer; the local representation module consists of a 3×3 depth convolution and a point-by-point convolution, which enables the module to learn spatial information and encode local information; then, the resulting feature map is sent to the efficient additive attention module; finally, the output feature map is sent to the linear block, which consists of two 1×1 point-by-point convolution layers, a batch normalization layer, and a GeLU activation layer to generate nonlinear features; The calculation process of the SwiftFormer Encoder module is shown in formulas (5) to (7): x1=Conv(DWConv(x)) (5) x2=Efficient Additive Attention(x1) (6) x output =Linear(x2) (7) Among them, Efficient Additive Attention refers to the efficient additive attention module; the input matrix x is transformed into the Query matrix (Q) and the Key (K) matrix using two matrices Wq and Wk, where Q, K∈R n×d , W q , W k ∈R d×d , n is the token length, d is the dimension of the vector; each column of the Query matrix is multiplied by the learnable parameter vector w a ∈R d To learn the attention weights, thus generating the global attention weight a∈R n ; Then, the attention weights are multiplied by each column of the Query matrix and summed to produce a single global Query vector q∈R d , then multiply q by the Key matrix and pass through a linear layer to obtain the global context information; finally, add the normalized Query matrix to the global context information and pass through a linear layer to obtain the final output result; the specific calculation process is shown in formulas (8) to (10): x=Linear(Norm(Q)+Linear(K×q)) (10) 4. The method for implementing a remote sensing image road extraction task based on Swift-SegEdgeNet according to claim 1, characterized in that: The dual-branch convolution module includes a normal convolution branch and a strip convolution branch. The normal convolution branch is used to extract image features and downsample the feature map. The strip convolution branch first reduces the dimension of the input feature map using 1×1 convolution, and then uses 9×3 strip convolutions in four different directions: horizontal, vertical, left diagonal, and right diagonal to capture long-distance context information. The output feature maps of the four strip convolutions are concatenated, and then downsampled and 1×1 convolved to obtain the output of the strip convolution branch. Finally, the feature maps output by the normal convolution branch and the strip convolution branch are added to obtain the final output result of the dual-branch convolution module. The specific calculation process is shown in formulas (11) to (14): x conv =ReLu(BN(Conv 1×1 (x))) (11) x i =D i (x conv ),i=1,2,3,4 (12) x concat =Concat(x1,x2,x3,x4) (13) x output =Linear(Norm(Q)+Linear(K×q)) (14) 5. The method for implementing a remote sensing image road extraction task based on Swift-SegEdgeNet according to claim 1, characterized in that: The semantic segmentation decoder first sends the features extracted by the last layer of the encoder to the pyramid pooling module; then the high-level semantic information is gradually integrated into the middle and low layers through top-down branches and lateral connections; finally, the obtained features are integrated to obtain the final semantic segmentation map. The specific calculation process is shown in formulas (15) to (19): x1,x2,x3,x4=Encoder(x input ) (15) y4=PPM(x4) (16) and i =and i+1 +x i ,i=1,2,3 (17) x=Concat(y1,y2,y3,y4) (18) x outpu t=Conv(Conv(Conv(x))) (19) Among them, x input is the input remote sensing image, x1, x2, x3, x4 are the feature maps obtained by the four stages of the encoder, y1, y2, y3, y4 are the feature maps obtained by the four stages of the semantic segmentation decoder, x output It is the semantic segmentation result map obtained, and PPM is the pyramid pooling module.
6. The method for implementing a remote sensing image road extraction task based on Swift-SegEdgeNet according to claim 1, characterized in that: The edge detection decoder structure aggregates the features obtained at each stage of the encoder according to two paths, from low to high and from high to low, and concatenates the aggregated features to obtain the final edge map. The specific calculation process is shown in formulas (20) to (27): x1,x2,x3,x4=Encoder(x input ) (20) x i =Conv 1×1 (Reshape(x i )),i=1,2,3,4 (21) y i =Conv 3×3 (x i +x i+1 ),i=1,2,3 (22) y4=Conv 3×3 (x4) (23) z i =Conv 3×3 (x i +x i-1 ),i=2,3,4 (24) z1=Conv 3×3 (x1) (25) x=Concat(y1,y2,y3,y4,z1,z2,z3,z4) (26) Among them, x input is the input remote sensing image, x1, x2, x3, x4 are the feature maps obtained by the four stages of the encoder, y1, y2, y3, y4 are the feature maps obtained by aggregating features from high to low, z1, z2, z3, z4 are the feature maps obtained by aggregating features from low to high, σ represents three 3×3 convolutional layers, including BN and RELU; Represents a 1×1 convolutional layer, including BN and RELU; x_output is the edge detection result image of the final output.
7. The method for implementing a remote sensing image road extraction task based on Swift-SegEdgeNet according to claim 1, characterized in that: Use mIOU, mDC, Recall and F1-score to evaluate the road extraction results; The implementation details of mIOU are shown in formula (28): Where k represents the number of categories to be classified in the semantic segmentation task, and p ii Indicates the number of pixels whose true category is i and whose predicted category is also i, p ij Indicates the number of pixels whose true category is i and predicted category is j, p ji Indicates the number of pixels whose true category is j and predicted category is i; The implementation details of the average Dice coefficient are shown in formula (29): in It indicates that the model predicts the segmentation result of the pth image. represents the true label of the corresponding p-th image, and N represents the number of test samples; The recall rate is calculated as shown in formula (30): Among them, TP is the number of samples that are actually positive and predicted as positive, FN is the number of samples that are actually positive but predicted as negative, and TN is the number of samples that are actually negative and also predicted as negative; The implementation details of F1-score are shown in formula (31): Among them, Recall refers to the recall rate and Precision refers to the accuracy rate.
Citation Information
Patent Citations
Remote sensing image road segmentation method based on convolutional neural network weak supervised learning
CN112070779A
Remote sensing image road segmentation method based on contextual information and multi-scale feature fusion
CN113850825A
Single-body planar building detection method based on SegFormer
CN116486276A
Boundary-optimized remote sensing image semantic segmentation method and apparatus, and device and medium
WO2023077816A1
Cited By
Human body posture feature extraction model, method and system and posture estimation network, method and system
CN120299061A
Image segmentation method based on deep learning remote sensing image
CN120580436A
Image segmentation method based on deep learning remote sensing image
CN120580436B
