A road segmentation method for remote sensing images based on adaptive self-attention feature enhancement

Through the adaptive self-attention feature enhancement module combined with local and global features, the problem of low accuracy and efficiency in remote sensing image road segmentation is solved, and high-precision segmentation and efficient calculations are realized in complex environments.

CN119992102BActive Publication Date: 2025-09-02耕宇牧星(北京)空间科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510176936.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-18
Publication Date
2025-09-02
Estimated Expiration
2045-02-18

AI Technical Summary

Technical Problem

The existing remote sensing image road segmentation methods have problems such as low segmentation accuracy and low computing efficiency in complex processing environments, especially traditional convolution operations are difficult to capture long-range dependencies, and the self-attention mechanism is computationally expensive in remote sensing image processing.

Method used

Adaptive self-attention feature enhancement module is adopted, combining batch normalization, linear transformation, multi-head self-attention and depth separation convolution, fusing local and global features, and optimizing the model through the composite loss function to improve segmentation accuracy and robustness.

Benefits of technology

It significantly improves the accuracy and robustness of remote sensing images, and can better handle road features in complex environments, reduce calculation amounts, and improve processing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119992102B_ABST
    Figure CN119992102B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for remote sensing image road segmentation based on adaptive self-attention feature enhancement, which is characterized by comprising the following steps: obtaining a remote sensing image to be segmented and performing preprocessing, and extracting an abstract feature map layer by layer through convolution and pooling operations; constructing an adaptive self-attention feature enhancement module, and processing the abstract feature map through batch normalization, linear transformation, multi-head self-attention, convolution operations, and depthwise separable convolution, combining local and global features to obtain an enhanced feature map; decoding the enhanced feature map, fusing multiple layers of features through upsampling, skip connections, and convolution operations, and outputting a road segmentation result using softmax and argmax functions. The present invention constructs a feature enhancement module based on the adaptive self-attention mechanism and combines depthwise separable convolution and global average pooling operations to effectively improve the performance of road segmentation tasks in remote sensing images.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of remote sensing image processing, and more particularly to a remote sensing image road segmentation method based on adaptive self-attention feature enhancement. Background Art

[0002] The road segmentation task of remote sensing images has always been an important research direction in the field of computer vision, especially in applications such as autonomous driving, urban planning, and disaster monitoring.

[0003] With the advancement of remote sensing technology, image resolution continues to increase, leading to more complex challenges in segmentation tasks. The features of remote sensing images, especially roads in urban environments, often exhibit diversity and uncertainty due to factors such as lighting variations, shadows, occlusions, and changes in road morphology. Therefore, achieving accurate road segmentation in these complex environments is a current challenge in remote sensing image processing.

[0004] Most existing road segmentation methods use traditional pixel-based classification methods or deep learning-based methods. Deep learning-based image segmentation methods, such as U-Net and FCN, are widely used in remote sensing image segmentation due to their powerful feature extraction capabilities. These methods extract the spatial features of the image through convolutional neural networks (CNN) and partially restore the spatial resolution of the image through a decoder to achieve image segmentation. However, traditional convolution operations still have some shortcomings when processing complex road features in remote sensing images. For example, the choice of convolution kernel size and network depth directly affects the feature extraction effect, and convolution operations are difficult to effectively capture long-range dependencies in the image. Especially in complex environments, such as when the boundary between the road and the surrounding background is blurred, traditional convolution methods may miss some key road features, resulting in low segmentation accuracy.

[0005] To overcome these limitations, researchers have recently proposed image segmentation methods based on the self-attention mechanism. The self-attention mechanism calculates the similarity between input features and assigns a weight to each position, thereby capturing global contextual information. This effectively addresses the problem of convolution operations failing to capture long-range dependencies. The multi-head self-attention mechanism further improves the model's performance by computing attention weights in parallel across multiple subspaces.

[0006] However, when applied to remote sensing images, the existing self-attention mechanism usually has problems such as low processing efficiency and large model computation. Especially when faced with large-scale remote sensing images, additional optimization is often required.

[0007] Therefore, further improving the accuracy and robustness of remote sensing image segmentation is an urgent problem that needs to be solved by those skilled in the art. Summary of the Invention

[0008] In view of this, the present invention provides a remote sensing image road segmentation method based on adaptive self-attention feature enhancement, which aims to effectively combine local features and global context information through an adaptive self-attention feature enhancement module to improve the accuracy and robustness of remote sensing image road segmentation.

[0009] In order to achieve the above object, the present invention adopts the following technical solutions:

[0010] The present invention provides a remote sensing image road segmentation method based on adaptive self-attention feature enhancement, comprising the following steps:

[0011] S1. Obtain the remote sensing image to be segmented for preprocessing, and extract abstract feature maps layer by layer through convolution and pooling operations;

[0012] S2. Construct an adaptive self-attention feature enhancement module to process the abstract feature map by combining local and global features through batch normalization, linear transformation, multi-head self-attention, convolution operation and depth-wise separable convolution to obtain an enhanced feature map;

[0013] S3. Decode the enhanced feature map, fuse multi-layer features through upsampling, skip connection and convolution operations, and use Softmax and argmax functions to output the road segmentation result.

[0014] Furthermore, it also includes:

[0015] S4. Use a composite loss function to train the model, which includes cross entropy loss and Dice loss; optimize road segmentation performance.

[0016] Furthermore, the step S1 includes:

[0017] S11, obtaining a remote sensing image to be segmented and performing normalization processing;

[0018] S12. Input the normalized image into a U-Net encoder, perform a convolution operation, and extract a preliminary feature map layer by layer; the preliminary feature map includes the edge, color, and texture of the road;

[0019] S13. Perform a pooling operation on the preliminary feature map to reduce the spatial resolution and obtain an abstract feature map; the abstract feature map includes the structure and layout of the road.

[0020] Furthermore, the step S2 includes:

[0021] S21, input the abstract feature map F into the adaptive self-attention feature enhancement module, and obtain f through the batch normalization layer;

[0022] S22. Perform a linear transformation on the f using a weight matrix to obtain Q, K, and V spaces;

[0023] S23, using a multi-head self-attention mechanism, split the Q, K and V spaces into multiple heads; calculate the attention weight of each head, and perform feature fusion through a linear transformation layer to obtain f A ;

[0024] S24, the f A Apply convolution layer, activation function, convolution layer and activation function in sequence to get the weight W A ;

[0025] S25, perform depth-wise separable convolution on the f to obtain f DW ; said f DW and weight W A By element multiplication, we get the local feature f DWA ;

[0026] S26, the f DW Apply the global average pooling layer, convolution layer, activation function, convolution layer and activation function in sequence to get the weight W DW ; said f A and weight W DW By element multiplication, we get the global feature f ADW ;

[0027] S27, the local feature f DWA and the global feature f ADW The enhanced feature map is obtained by fusion.

[0028] Furthermore, the step S23 includes:

[0029] S231, using a multi-head self-attention mechanism, split the Q, K and V space into multiple head Q h , K h and V h ; where h is the number of heads;

[0030] S232. For each head, calculate Q h and K h The dot product of V is used to calculate the attention weights using the softmax function. h Perform weighted summation;

[0031] S233, splice the output features of all heads together, and perform feature fusion through the linear transformation layer to obtain f A .

[0032] Furthermore, step S3 includes:

[0033] S31, inputting the enhanced feature map into a U-Net decoder, performing upsampling, and obtaining an upsampled feature map;

[0034] S32, performing skip connection and convolution operations on the upsampled feature map and the corresponding abstract feature map until the resolution of the fusion result is restored to be consistent with the image input to the U-Net encoder;

[0035] S33. Apply convolution operation, Softmax and argmax functions to predict the fused feature map and output the road segmentation result.

[0036] Furthermore, the composite loss function is:

[0037] L=α·L CE +β·L Dice

[0038] Among them, α, β are weight coefficients, L Dice represents the Dice loss, L CE represents the cross entropy loss.

[0039] As can be seen from the above technical solution, compared with the prior art, the present invention discloses a remote sensing image road segmentation method based on adaptive self-attention feature enhancement, which has the following technical advantages:

[0040] 1) Introducing an adaptive self-attention mechanism to dynamically adjust the weights of image features according to different parts of the input image, thereby more effectively capturing long-range dependencies; introducing a multi-head self-attention mechanism to parallelly compute feature representations of different subspaces, capturing richer contextual information, thereby accelerating the training and inference process.

[0041] 2) By combining depthwise separable convolution with global average pooling, local details and global information are integrated, which not only ensures computational efficiency but also greatly improves segmentation accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0043] Figure 1 Flowchart of a method for remote sensing image road segmentation based on adaptive self-attention feature enhancement provided by an embodiment of the present invention.

[0044] Figure 2A structural diagram of the adaptive self-attention feature enhancement module provided in an embodiment of the present invention.

[0045] Figure 3 This is an architectural diagram of the overall model provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0046] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0047] Reference Figure 1 As shown, the embodiment of the present invention discloses a remote sensing image road segmentation method based on adaptive self-attention feature enhancement, comprising the following steps:

[0048] S1. Obtain the remote sensing image to be segmented for preprocessing, and extract abstract feature maps layer by layer through convolution and pooling operations;

[0049] S2. Construct an adaptive self-attention feature enhancement module to process the abstract feature map by combining local and global features through batch normalization, linear transformation, multi-head self-attention, convolution operation and depth-wise separable convolution to obtain an enhanced feature map;

[0050] S3. Decode the enhanced feature map, fuse multi-layer features through upsampling, skip connection and convolution operations, and use Softmax and argmax functions to output the road segmentation result.

[0051] In this embodiment of the present invention, the remote sensing image is first normalized and data augmented according to the above steps. This ensures the standardization of the input data and enhances data diversity, laying the foundation for subsequent feature extraction. Secondly, an adaptive self-attention feature enhancement module is constructed. Through operations such as batch normalization, linear transformation, multi-head self-attention, and depthwise separable convolution, it effectively fuses local features with global contextual information, significantly enhancing the model's ability to extract road features from remote sensing images.

[0052] This paper proposes a feature enhancement module based on an adaptive self-attention mechanism, combined with depthwise separable convolution and global average pooling, to effectively improve the performance of road segmentation tasks in remote sensing images. Compared with traditional convolutional methods, this method can more accurately identify road and non-road areas in complex environments, especially when the road is blurred or obscured.

[0053] The following are the details of each of the above steps:

[0054] Step 1: Image preprocessing and preliminary feature extraction: First, the remote sensing image is normalized and data augmented. The processed image is then input into the U-Net encoder, which extracts layer-by-layer abstract features through convolution and pooling operations, gradually reducing the spatial resolution to capture a larger receptive field.

[0055] Step 2: Construct an adaptive self-attention feature enhancement module; through batch normalization, linear transformation, multi-head self-attention, convolution operations, and depth-wise separable convolution techniques, combine local and global features to enhance the subtle differences between roads and backgrounds in remote sensing images, improving segmentation accuracy and robustness.

[0056] Step 3: The enhanced feature map is input into the U-Net decoder. Upsampling, skip connections, and convolution operations gradually restore the resolution and fuse multi-layer features. Softmax and argmax are used to generate pixel-level segmentation results for the road. Finally, a comprehensive loss function combining cross-entropy loss and Dice loss is used to optimize the model to improve segmentation accuracy.

[0057] Among them, step one specifically includes:

[0058] Step 1.1: For the road segmentation task in remote sensing images, first, normalize the remote sensing image. This normalizes the input image so that the pixel values ​​fall within a suitable range (e.g., [0, 1] or [-1, 1]). Next, perform data augmentation on the remote sensing image. This involves rotating, scaling, and cropping the input image to increase data diversity and improve the model's generalization capabilities.

[0059] Step 1.2: Feed the image obtained in Step 1.1 into the U-Net encoder. The encoder portion of the U-Net is responsible for extracting features from the input image, including basic information such as edges, color, and texture. The encoder consists of a series of convolutional and pooling layers, which gradually reduce the spatial resolution of the input image to smaller scales, extracting increasingly abstract features at each layer.

[0060] Each layer extracts local features through convolution operations. The size and number of convolution kernels determine the complexity of the extracted features. In the remote sensing image of this embodiment, preliminary features such as road boundaries and color differences of different ground objects (such as buildings and vegetation) are involved.

[0061] The formula for the preliminary feature map of the jth layer is expressed as:

[0062]

[0063] in, represents the feature map of the jth layer, T jRepresents the convolution kernel of the jth layer, j represents the number of convolution layers, j = {1, 2, 3, ...}.

[0064] Step 1.3: Perform pooling operation. Applying pooling layers (usually maximum pooling) is used to reduce the spatial resolution, thereby reducing the amount of computation and avoiding overfitting, while maintaining important features. The pooling layer outputs more compact and abstract features. The abstract feature map obtained in this embodiment includes the structure and layout of the road.

[0065] Through these convolution and pooling operations, the U-Net encoder gradually reduces the spatial resolution of the input image while extracting increasingly abstract features. This partially downsampling the features, progressively mapping the image from low-level features to higher-level, more abstract representations. This downsampling process helps capture a larger receptive field, enabling a better understanding of the overall structure of the image.

[0066] Step 2, refer to Figure 2 As shown, specifically including:

[0067] Step 2.1: Set the feature map of a layer obtained in step 1 to Perform batch normalization on it to obtain It is used to stabilize and accelerate the training of deep learning models. In the road segmentation task of remote sensing images, this means that road features under different lighting and environmental conditions can be processed more effectively.

[0068] Among them, H represents the dimension of the tensor in the height direction, that is, the number of rows contained in the tensor; W represents the dimension of the tensor in the width direction, that is, the number of columns contained in the tensor; C represents the number of channels.

[0069] Step 2.2: Apply a linear transformation layer. Q 、W K and W V Features obtained from input features Perform a linear transformation to obtain the Q, K, and V matrices. These weight matrices are learnable parameters that map the input features to the Q, K, and V spaces, and the formula is expressed as:

[0070] Q=fW Q , K=fW K , V=fW V

[0071] in, are weight matrices that map the number of channels of the input features from C to C, allowing the model to learn complex relationships between input features. In remote sensing image segmentation, this helps identify subtle differences between road and non-road areas.

[0072] Step 2.3: In multi-head self-attention, the Q, K, and V matrices are split into multiple heads. Each head processes a portion of the features, so that representations of different subspaces can be learned in parallel:

[0073] Q=[Q1,Q2,...,Q h ],K=[K1,K2,...,K h ],V=[V1,V2,...,V h ]

[0074] Where h represents the number of heads, and the dimension of each head is C / h. For each head, the dot product of Q and K is calculated, and then the softmax function is applied to obtain the attention weights. Finally, these weights are used to perform a weighted summation on V. The formula is expressed as:

[0075]

[0076] Where d = C / h is the dimension of each head; i is the value of the head, i = {1, 2, ..., h}.

[0077] The output features of all heads are concatenated together and fused through a linear transformation layer:

[0078]

[0079] in, is the linear transformation matrix used to fuse features. Multi-head self-attention allows the model to learn representations of multiple subspaces in parallel, with each head focusing on a different subset of features. This approach can capture richer contextual information and is particularly important for road segmentation in remote sensing images, as road features may vary at different scales and directions.

[0080] Step 2.4: Apply convolution layer, activation function, convolution layer and activation function in sequence to get weights

[0081]

[0082] in, GELU represents the GELU activation function, Conv represents the convolution operation, and Sigmoid represents the Sigmoid activation function.

[0083] Step 2.5: For step 2.1 Applying depthwise separable convolution, we get Combined with step 2.4, Perform element multiplication, the formula is expressed as:

[0084]

[0085] Where ⊙ represents element-wise multiplication. Depthwise separable convolution is an efficient convolution operation that can capture local features while adaptive weights The combination of the two allows the use of both local features and global contextual information, which is crucial for the task of road segmentation in remote sensing images, as road recognition requires not only local details but also global contextual information to distinguish roads from other similar structures.

[0086] Step 2.6: Apply global average pooling layer, convolution layer, activation function, convolution layer and activation function in sequence to get weights

[0087]

[0088] Among them, GAP represents the global average pooling operation.

[0089] Then, and Perform element-wise multiplication:

[0090]

[0091] Here, ⊙ represents element-wise multiplication.

[0092] Step 2.7: Create the and generated in step 2.6 to integrate.

[0093] This fusion operation combines local features and global features In the task of remote sensing image road segmentation, this feature fusion operation is crucial because it allows the model to simultaneously utilize local detail information and global context information to improve the accuracy and robustness of segmentation.

[0094]

[0095] in, Indicates feature addition.

[0096] It adds corresponding elements of two feature maps to combine feature information. This approach increases the expressive power of features and enables the model to consider both local and global information. In remote sensing image segmentation, this helps the model better handle complex scenes, such as the interface between roads and surroundings, or roads under varying lighting and weather conditions.

[0097] The adaptive self-attention feature enhancement module constructed in this embodiment; on the one hand, the adaptive self-attention mechanism is used to enhance the feature extraction capability, and the recognition capability of road features in remote sensing images is significantly improved by combining multi-head self-attention and depthwise separable convolution with global context information. This module can capture fine-grained features at different scales and directions, and effectively distinguish subtle differences between roads and non-road areas in complex environments. On the other hand, the fusion of local and global features enhances segmentation accuracy; by combining local features and global context information (for example, feature fusion and global average pooling in step two), the segmentation accuracy and robustness of the model are improved. This operation enables the model to not only recognize local details, but also understand the context of the entire scene, thereby showing better segmentation effects in complex scenes (such as roads under different lighting and weather conditions).

[0098] Reference Figure 3 The overall model architecture shown in the figure, this embodiment refers to step 1 to divide the remote sensing image to be segmented into four layers of feature maps, and adopts four adaptive self-attention feature enhancement modules. The enhanced feature map corresponding to this layer will be obtained Then, according to step 3, the enhanced feature map obtained in each layer is decoded to output the segmentation result and the loss function is calculated.

[0099] Step three specifically includes:

[0100] Step 3.1: Enhance the feature map obtained in step 2 of each layer The input is fed into the U-Net decoder for feature decoding. The decoder is responsible for gradually upsampling the features and fusing the features of the corresponding layers in the encoder to restore the high-resolution feature map. In this embodiment, the decoder consists of a series of upsampling operations (such as deconvolution or bilinear interpolation) and convolution operations. The upsampling operation gradually increases the spatial resolution of the feature map, thereby gradually restoring it to the original resolution of the input image:

[0101]

[0102] in, It represents the feature map of the j-th layer after upsampling, and UpSample represents the upsampling operation.

[0103] Step 3.2: Skip connections are performed on the upsampled features and fused with the features of the corresponding layers of the encoder. Skip connections allow the model to directly utilize the low-level features of the encoder, combining high-level semantic information with low-level detail information.

[0104] The fused feature map is then subjected to convolution and activation function processing to further extract features and reduce the number of channels, resulting in:

[0105]

[0106] in, Represents the feature map of the corresponding layer of the encoder, Conv represents the convolution operation, Concat represents the splicing operation on the channel dimension, and ReLU is the activation function. Repeat the process of upsampling, skip connection and convolution operation until the resolution of the feature map is restored to the same as the input image. The final output feature map φ out Contains the spatial resolution of the original image and high-level semantic information.

[0107] Step 3.3: First, apply the convolution operation to the feature map φ out The pixel position generates a score belonging to the category. Next, the probability of each category is calculated using Softmax activation. Finally, the classification decision is made, and the category with the highest probability is selected as the final classification result of the pixel through the argmax operation:

[0108]

[0109] in, represents the final predicted category (i.e., segmentation result) of pixel position (i, j), It means finding the index n in category n (from 1 to N) that maximizes the value in the brackets. exp() represents the exponential function, which is used in softmax calculation to ensure that the predicted value is a positive number and forms a probability distribution during subsequent normalization. N is the total number of categories.

[0110] Step 3.4: The segmentation loss function of the present invention is a combination of cross entropy loss and Dice Loss. The total loss function is as follows:

[0111] L=α·L CE +β·L Dice

[0112] Among them, α, β are weight coefficients, L Dice is the Dice loss, L CE Represents the cross entropy loss. Through this comprehensive loss function, the model can be effectively guided to optimize the feature map, thereby generating more accurate segmentation results.

[0113] The present invention introduces a feature enhancement module that combines an adaptive self-attention mechanism with deep separable convolution. Compared with traditional convolutional neural networks, the present invention has the following significant advantages: on the one hand, through the adaptive self-attention mechanism, the model can dynamically adjust the weights of features according to different parts of the input image, thereby more effectively capturing long-range dependencies; on the other hand, the combination of deep separable convolution and global average pooling enables the model to fuse local details and global information while maintaining computational efficiency, greatly improving segmentation accuracy. Compared with traditional convolution-based image segmentation methods, the present invention can better handle the diversity and complexity of road features in remote sensing images, especially in complex road environments, and can improve the accuracy and robustness of segmentation results.

[0114] Furthermore, this invention effectively addresses the computationally intensive and inefficient problems of existing methods when processing large-scale remote sensing images. By introducing a multi-head self-attention mechanism, feature representations of different subspaces can be computed in parallel, accelerating the model's training and inference processes, further improving the method's application efficiency.

[0115] This invention has significant innovative significance in the field of road segmentation in remote sensing images. It not only improves the model's ability to recognize complex road features, but also enhances its application potential in large-scale remote sensing images by optimizing computational efficiency.

[0116] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Reference can be made to the common and similar parts between the various embodiments. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method description.

[0117] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not limited to the embodiments shown herein but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A remote sensing image road segmentation method based on adaptive self-attention feature enhancement, characterized in that: The following steps are involved: S1. Obtain the remote sensing image to be segmented for preprocessing, and extract abstract feature maps layer by layer through convolution and pooling operations; S2. Construct an adaptive self-attention feature enhancement module to process the abstract feature map by combining local and global features through batch normalization, linear transformation, multi-head self-attention, convolution operation and depth-wise separable convolution to obtain an enhanced feature map; S3. Decode the enhanced feature map, fuse multiple layers of features through upsampling, skip connection and convolution operations, and use Softmax and argmax functions to output the road segmentation result; Wherein, step S2 includes: S21, input the abstract feature map F into the adaptive self-attention feature enhancement module, and obtain f through the batch normalization layer; S22. Perform a linear transformation on the f using a weight matrix to obtain Q, K, and V spaces; S23, using a multi-head self-attention mechanism, split the Q, K and V spaces into multiple heads; calculate the attention weight of each head, and perform feature fusion through a linear transformation layer to obtain f A ; S24, the f A Apply convolution layer, activation function, convolution layer and activation function in sequence to get the weight W A ; S25, perform depth-wise separable convolution on the f to obtain f DW ; said f DW and weight W A By element multiplication, we get the local feature f DWA ; S26, the f DW Apply the global average pooling layer, convolution layer, activation function, convolution layer and activation function in sequence to get the weight W DW ; said f A and weight W DW By element multiplication, we get the global feature f ADW ; S27, the local feature f DWA and the global feature f ADW The enhanced feature map is obtained by fusion.

2. The method for remote sensing image road segmentation based on adaptive self-attention feature enhancement according to claim 1, characterized in that: Also includes: S4. Use a composite loss function to train the model, which includes cross entropy loss and Dice loss; optimize road segmentation performance.

3. The method for remote sensing image road segmentation based on adaptive self-attention feature enhancement according to claim 1, characterized in that: The step S1 comprises: S11, obtaining a remote sensing image to be segmented and performing normalization processing; S12. Input the normalized image into a U-Net encoder, perform a convolution operation, and extract a preliminary feature map layer by layer; the preliminary feature map includes the edge, color, and texture of the road; S13. Perform a pooling operation on the preliminary feature map to reduce the spatial resolution and obtain an abstract feature map; the abstract feature map includes the structure and layout of the road.

4. The method for remote sensing image road segmentation based on adaptive self-attention feature enhancement according to claim 1, characterized in that: The step S23 includes: S231, using a multi-head self-attention mechanism, split the Q, K and V space into multiple head Q h , K h and V h ; where h is the number of heads; S232. For each head, calculate Q h and K h The dot product of V is used to calculate the attention weights using the softmax function. h Perform weighted summation; S233, splice the output features of all heads together, and perform feature fusion through the linear transformation layer to obtain f A .

5. The method for remote sensing image road segmentation based on adaptive self-attention feature enhancement according to claim 1, characterized in that: The step S3 comprises: S31, inputting the enhanced feature map into a U-Net decoder, performing upsampling, and obtaining an upsampled feature map; S32, performing skip connection and convolution operations on the upsampled feature map and the corresponding abstract feature map until the resolution of the fusion result is restored to be consistent with the image input to the U-Net encoder; S33. Apply convolution operation, Softmax and argmax functions to predict the fused feature map and output the road segmentation result.

6. The method for remote sensing image road segmentation based on adaptive self-attention feature enhancement according to claim 2, characterized in that: The composite loss function is: L=α·L CE +β·L Dice Among them, α, β are weight coefficients, L Dice represents the Dice loss, L CE represents the cross entropy loss.

Citation Information

Patent Citations

  • Remote sensing image road segmentation method fusing multi-scale features and double attention mechanism

    CN117078943A

  • Remote sensing image segmentation method based on dual-branch multi-scale feature fusion

    CN118314353A