Remote sensing image road segmentation method based on adaptive self-attention feature enhancement

By introducing an adaptive self-attention feature enhancement module in the remote sensing image road segmentation, combining multi-head self-attention and depth separation convolution, the problems of insufficient feature extraction and low computing efficiency in the prior art are solved, and higher segmentation accuracy and robustness are achieved.

CN119992102AActive Publication Date: 2025-05-13耕宇牧星(北京)空间科技有限公司

Patent Information

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

AI Technical Summary

Technical Problem

When the existing remote sensing image road segmentation method deals with road features in complex environments, there are problems such as insufficient feature extraction, difficulty in capturing long-range dependency relationships, and low computing efficiency.

Method used

Using an adaptive self-attention feature enhancement method, the adaptive self-attention mechanism and the multi-head self-attention mechanism combine local and global features, uses depth-separable convolution and global average pooling operations to improve feature extraction capabilities and segmentation accuracy.

Benefits of technology

Effectively capture long-range dependencies, improve segmentation accuracy and robustness, reduce calculation amount, and improve processing efficiency, especially in complex environments to identify roads and non-road areas more accurately.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119992102A_ABST
    Figure CN119992102A_ABST
Patent Text Reader

Abstract

The invention discloses a remote sensing image road segmentation method based on adaptive self-attention feature enhancement, and the method is characterized in that the method comprises the following steps: obtaining a to-be-segmented remote sensing image, carrying out the preprocessing of the remote sensing image, and extracting abstract feature maps layer by layer through convolution and pooling operation; constructing a self-adaptive self-attention feature enhancement module, and processing the abstract feature map through batch normalization, linear transformation, multi-head self-attention, convolution operation and depth separable convolution in combination with local and global features to obtain an enhanced feature map; and decoding the enhanced feature map, fusing multi-layer features through up-sampling, jump connection and convolution operation, and outputting a road segmentation result by using Softmax and argmax functions. According to the method, a feature enhancement module based on an adaptive self-attention mechanism is constructed, depth separable convolution and global average pooling operation are combined, and the performance of a road segmentation task in a remote sensing image is effectively improved.
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 specifically 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 development of remote sensing technology, image resolution continues to improve, resulting in more complex challenges for segmentation tasks. In remote sensing images, especially roads in urban environments, their features often present diversity and uncertainty due to lighting changes, shadows, occlusions, road morphology changes, etc. Therefore, how to achieve accurate road segmentation in these complex environments is a difficult problem in current remote sensing image processing.

[0004] Most of the 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 a convolutional neural network (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 dealing with 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 the convolution operation is difficult to effectively capture the long-range dependencies in the image, especially in complex environments, such as when the boundary between the road and the surrounding background is blurred, the traditional convolution method may miss some key road features, resulting in low segmentation accuracy.

[0005] In order to overcome these limitations, researchers have proposed image segmentation methods based on the self-attention mechanism in recent years. The self-attention mechanism calculates the similarity between input features and assigns a weight to each position, thereby capturing global context information. This can effectively solve the problem that convolution operations cannot capture long-range dependencies. The multi-head self-attention mechanism further calculates the attention weights in parallel across multiple subspaces, improving the performance of the model.

[0006] However, when applied to remote sensing images, the existing self-attention mechanism usually has problems such as low processing efficiency and large model calculation amount. Especially when facing 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 issue that technical personnel in this field urgently need to solve. 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 solution:

[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 the abstract feature map layer by layer through convolution and pooling operations;

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

[0013] 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.

[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, inputting the normalized image into a U-Net encoder, performing a convolution operation, and extracting a preliminary feature map layer by layer; the preliminary feature map includes the edge, color, and texture of the road;

[0019] S13. Performing 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, inputting the abstract feature map F into the adaptive self-attention feature enhancement module, and obtaining f through the batch normalization layer;

[0022] S22, performing a linear transformation on the f through 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, for the f A Apply convolution layer, activation function, convolution layer and activation function in sequence to get the weight W A ;

[0025] S25, perform a 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, for 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 fusion is performed to obtain an enhanced feature map.

[0028] Further, the step S23 includes:

[0029] S231, using a multi-head self-attention mechanism, the Q, K and V spaces are divided 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 calculated by applying the softmax function, and V h Perform weighted summation;

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

[0032] Furthermore, the 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] It can be seen from the above technical solutions that, 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) Introduce an adaptive self-attention mechanism to dynamically adjust the weights of image features according to different parts of the input image, so as to more effectively capture long-range dependencies; introduce a multi-head self-attention mechanism to parallelly calculate feature representations of different subspaces to capture richer contextual information, thereby accelerating the training and inference process.

[0041] 2) Through the combination of depthwise separable convolution and 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 drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

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

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

[0045] Figure 3 An architectural diagram of the overall model provided for an embodiment of the present invention. DETAILED DESCRIPTION

[0046] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. 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 creative work 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 the abstract feature map layer by layer through convolution and pooling operations;

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

[0050] 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.

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

[0052] This paper proposes a feature enhancement module based on an adaptive self-attention mechanism, and combines deep separable convolution with global average pooling operations to effectively improve the performance of road segmentation tasks in remote sensing images. Compared with traditional convolution methods, this paper can more accurately identify roads and non-road areas in complex environments, especially when the road shape is blurred or there is occlusion, it can still effectively segment the road area.

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

[0054] Step 1: Image preprocessing and preliminary feature extraction: First, the remote sensing image is normalized and data enhanced, and then the processed image is input into the U-Net encoder to extract 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 operation and depth-wise separable convolution and other technologies, combine local and global features to enhance the subtle differences between roads and backgrounds in remote sensing images and improve segmentation accuracy and robustness.

[0056] Step 3: Input the enhanced feature map into the U-Net decoder. After upsampling, skip connection and convolution operations, the resolution is gradually restored and multi-layer features are fused. Softmax and argmax are used to generate pixel-level segmentation results of the road. Finally, the model is optimized through a comprehensive loss function combining cross entropy loss and Dice loss to improve segmentation accuracy.

[0057] Among them, step one specifically includes:

[0058] Step 1.1: In the road segmentation task of remote sensing images, first, normalize the remote sensing images. Standardize the input image so that the pixel values ​​fall within a suitable range (such as [0,1] or [-1,1]). Secondly, perform data enhancement on the remote sensing images. Rotate, scale, crop, and other operations on the input image to increase the diversity of the data and improve the generalization ability of the model.

[0059] Step 1.2: Input the image obtained in step 1.1 into the U-Net encoder. The encoder part of U-Net is responsible for extracting features from the input image, including basic information such as edges, colors, and textures; the encoder consists of a series of convolutional layers and pooling layers, which gradually reduce the spatial resolution of the input image to a smaller scale and extract more and more abstract features at each layer.

[0060] Each layer extracts local features through convolution operation, and 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 objects (such as buildings and vegetation) are involved.

[0061] The preliminary feature map formula 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 a pooling layer (usually a maximum pooling layer) 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. In this way, the encoder partially completes the downsampling of features and gradually maps the image from low-level features to higher-level, more abstract representations. This downsampling process helps capture a larger receptive field, thereby better understanding 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 Used to stabilize and accelerate the training of deep learning models. In the task of road segmentation in 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. Through the weight matrix W 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 part of the features, so that representations of different subspaces can be learned in parallel:

[0073] Q=[Q 1 ,Q 2 , ..., Q h ],K=[K 1 ,K 2 , ..., K h ],V=[V 1 , V 2 , ..., V h ]

[0074] Among them, 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 get the attention weights, and finally these weights are used to perform weighted summation on V, which is expressed as:

[0075]

[0076] Among them, 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, which 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 GELU activation function, Conv represents convolution operation, and Sigmoid represents Sigmoid activation function.

[0083] Step 2.5: For step 2.1 Applying depthwise separable convolution, we get Combined with step 2.4, we get 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 can utilize both local features and global context information, which is crucial for the task of road segmentation in remote sensing images, because road recognition requires not only local detail information, but also global context 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 the one generated in step 2.6 To merge.

[0093] This fusion operation combines local features and global features This feature fusion operation is crucial in the task of remote sensing image road segmentation 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 the corresponding elements of the two feature maps to merge the feature information. This method can increase the expressiveness of the features and enable 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 junction of roads and the surrounding environment, or roads under different 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 deep separable convolution with global context information. This module can capture fine-grained features at different scales and directions, and effectively distinguish the 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 FIG. 1 is as follows. In this embodiment, the remote sensing image to be segmented is divided into four layers of feature maps with reference to step 1. Four adaptive self-attention feature enhancement modules are used. For each layer of feature maps input to the module, 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 sent to the decoder of U-Net 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 will gradually increase 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: The upsampled features are skip-connected and fused with the features of the corresponding layer of the encoder. Skip connections allow the model to directly use the low-level features of the encoder, combining high-level semantic information with low-level detail information.

[0104] Then the fused feature map is 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 concatenation 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 and high-level semantic information of the original image.

[0107] Step 3.3: First, apply the convolution operation to the feature map φ out The pixel position generates the 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 the pixel position (i, j), It means finding the index n in category n (from 1 to N) that makes the value in the brackets the largest. 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] In addition, the present invention also effectively solves the problem of large amount of calculation and low efficiency of existing methods in processing large-scale remote sensing images. By introducing a multi-head self-attention mechanism, feature representations of different subspaces can be calculated in parallel, thereby accelerating the training and reasoning process of the model and further improving the application efficiency of the method.

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

[0116] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0117] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be 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 will not be limited to the embodiments shown herein, but rather 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 the abstract feature map layer by layer through convolution and pooling operations; S2. construct an adaptive self-attention feature enhancement module, and process the abstract feature map by combining local and global features through batch normalization, linear transformation, multi-head self-attention, convolution operation and depth-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.

2. The method for remote sensing image road segmentation based on adaptive self-attention feature enhancement as claimed in 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 as claimed in claim 1, characterized in that: The step S1 comprises: S11, obtaining a remote sensing image to be segmented and performing normalization processing; S12, inputting the normalized image into a U-Net encoder, performing a convolution operation, and extracting a preliminary feature map layer by layer; the preliminary feature map includes the edge, color, and texture of the road; S13. Performing 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 as claimed in claim 1, characterized in that: The step S2 comprises: S21, inputting the abstract feature map F into the adaptive self-attention feature enhancement module, and obtaining f through the batch normalization layer; S22, performing a linear transformation on the f through 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, for the f A Apply convolution layer, activation function, convolution layer and activation function in sequence to get the weight W A ; S25, perform a 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, for 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 fusion is performed to obtain an enhanced feature map.

5. The method for remote sensing image road segmentation based on adaptive self-attention feature enhancement as claimed in claim 4, characterized in that: The step S23 comprises: S231, using a multi-head self-attention mechanism, the Q, K and V spaces are divided 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 calculated by applying the softmax function, and V h Perform weighted summation; S233, concatenate the output features of all heads together, and perform feature fusion through the linear transformation layer to obtain f A .

6. The method for remote sensing image road segmentation based on adaptive self-attention feature enhancement as claimed in claim 4, 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.

7. The method for remote sensing image road segmentation based on adaptive self-attention feature enhancement as claimed in 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

  • Detection method using fusion network based on attention mechanism, and terminal device

    US11222217B1

Cited By

  • Three-dimensional bronchial image generation device

    CN120526063A