A remote sensing image road segmentation method and related device

By combining the RoadDPSSNet model with CNN-Transformer and visual state space branch, the problems of insufficient accuracy and stability in road segmentation of remote sensing images are solved, achieving efficient and accurate segmentation in high-resolution images, especially with stronger robustness and adaptability in complex backgrounds.

CN122391646APending Publication Date: 2026-07-14HAINAN UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HAINAN UNIV
Filing Date
2026-04-28
Publication Date
2026-07-14

AI Technical Summary

Technical Problem

Existing remote sensing image road segmentation methods suffer from insufficient accuracy and stability when dealing with high-resolution images and complex environments. In particular, the receptive field limitations of CNNs and the high computational complexity of Transformers make it difficult to effectively capture global semantic information. Traditional SS2D methods fail to fully consider directional and spatial context information.

Method used

The RoadDPSSNet model is adopted, which combines the CNN-Transformer branch and the visual state space branch. The perception of road boundaries is enhanced by the direction-aware selective scanning module and the channel attention mechanism. The segmentation results are optimized by post-processing through conditional random fields.

Benefits of technology

It significantly improves the accuracy and stability of road segmentation in remote sensing images, exhibits stronger robustness and adaptability in complex backgrounds and high-resolution images, reduces computational resource consumption, and improves the global consistency and boundary accuracy of segmentation results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122391646A_ABST
    Figure CN122391646A_ABST
Patent Text Reader

Abstract

The application discloses a remote sensing image road segmentation method and related devices. The method comprises the following steps: acquiring a remote sensing image to be processed; inputting the remote sensing image to be processed into a constructed RoadDPSSNet model to obtain a road segmentation result, wherein the RoadDPSSNet model adopts a U-Net architecture of a double-branch encoder and a decoder, and the double-branch encoder comprises a CNN-Transformer branch and a visual state space branch. The application can significantly improve the accuracy and stability of the road segmentation task in the remote sensing image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and in particular to a method and related apparatus for road segmentation of remote sensing images. Background Technology

[0002] Road segmentation is a crucial task in remote sensing image analysis, with significant applications in urban planning, traffic management, and road detection. With the rapid development of remote sensing technology, acquiring high-resolution remote sensing images has become increasingly common. However, due to the complexity and variability of roads in remote sensing images, accurate road segmentation still faces numerous challenges. These challenges mainly manifest in the ambiguity of boundaries against complex backgrounds, the high similarity between roads and backgrounds, and the structural diversity of roads. While traditional road segmentation methods have achieved good results in certain scenarios, they still possess considerable limitations, particularly in processing high-resolution images and complex environments, where accuracy and stability are insufficient.

[0003] Currently, the mainstream road segmentation methods mainly rely on convolutional neural networks (CNN) and Transformer models, but these methods also have certain limitations.

[0004] Receptive field limitations of CNNs:

[0005] Convolutional neural networks (CNNs) are widely used in image processing tasks, but their receptive field is usually limited by the size and depth of the convolutional layers. When processing high-resolution remote sensing images, CNNs may fail to capture long-range contextual information, especially in tasks requiring long-range dependency modeling. The locality of CNNs limits their ability to model global information. Although dilated convolutions and multi-scale convolutions can extend the receptive field to some extent, it is still difficult to effectively capture global semantic information without increasing computational cost.

[0006] Transformer has high time complexity:

[0007] Transformer models, especially their self-attention mechanism, excel at capturing long-range dependencies. They can enhance feature representation capabilities by modeling global information; however, the self-attention computation of Transformers has a quadratic time complexity, resulting in enormous computational and memory overhead when processing high-resolution remote sensing images. Particularly in large-scale remote sensing image processing and real-time applications, the high computational complexity of Transformers often becomes a bottleneck in their application.

[0008] The inherent disadvantages of state-space models:

[0009] State-space models (SSMs) are widely used in time series modeling, but they have inherent limitations when processing two-dimensional images. Traditional SS2D methods divide the image into sequences in four directions and then simply sum them, failing to adequately consider the relationship between directionality and spatial context. While this simple directional summation operation is computationally efficient, it often overlooks changes in spatial structure when dealing with complex image structures and details, leading to insufficient accuracy and consistency in the segmentation results. Summary of the Invention

[0010] To address the aforementioned technical problems, this invention proposes a road segmentation method and related apparatus for remote sensing images, which can significantly improve the accuracy and stability of road segmentation tasks in remote sensing images, and exhibits stronger robustness and adaptability than traditional methods, especially in complex backgrounds and high-resolution images.

[0011] To achieve the above objectives, the technical solution of the present invention is as follows:

[0012] A method for road segmentation in remote sensing images includes the following steps:

[0013] Acquire the remote sensing image to be processed;

[0014] The remote sensing image to be processed is input into the constructed RoadDPSSNet model to obtain road segmentation results. The RoadDPSSNet model adopts a U-Net architecture with a dual-branch encoder and decoder. The dual-branch encoder includes a CNN-Transformer branch and a visual state space branch.

[0015] Preferably, the processing procedure of the RoadDPSSNet model includes the following steps:

[0016] The remote sensing image to be processed is simultaneously input into the CNN-Transformer branch and the visual state space branch; the CNN-Transformer branch performs multi-scale local and global feature extraction, and the visual state space branch uses a direction-aware selective scanning module to enhance the perception of road boundaries and extract road features; the outputs of each stage of the CNN-Transformer branch and the visual state space branch are fused through skip connections using a channel attention mechanism to obtain multi-scale decoded features;

[0017] The multi-scale decoding features and the feature map that the decoder gradually upsamples to restore spatial resolution are fused through skip connections using a channel attention mechanism to obtain a pixel category probability map.

[0018] The pixel category probability map is input into a conditional random field and smoothed to obtain a segmentation prediction image.

[0019] Preferably, the CNN-Transformer branch includes several 3×3 convolutional modules and a Transformer network connected in sequence, and the Transformer network is composed of several Transformer Encoder layers stacked together.

[0020] Preferably, the visual state space branch includes a root module, a 3×3 convolution module, a direction-aware selective scanning module, a downsampling module, a 3×3 convolution module, a direction-aware selective scanning module, a downsampling module, a 3×3 convolution module, a direction-aware selective scanning module, a downsampling module, a 3×3 convolution module, and a direction-aware selective scanning module connected in sequence. The root module includes a 3×3 convolution, a batch normalization layer, a ReLU activation function, and a 3×3 convolution.

[0021] Preferably, the decoder includes a direction-aware selective scanning module, an upsampling module, a 3×3 convolution module, a direction-aware selective scanning module, an upsampling module, a 3×3 convolution module, a direction-aware selective scanning module, an upsampling module, a 3×3 convolution module, a direction-aware selective scanning module, and an upsampling module connected in sequence.

[0022] Preferably, the processing procedure of the direction-aware selective scanning module includes the following steps:

[0023]

[0024] Where G is the output feature map of the orientation-aware selective scanning module. The input feature map is the orientation-aware selective scanning module, LN represents layer normalization, and Linear represents a linear layer. For a direction-aware selective scanning mechanism, the This includes selective scanning branches and orientation-aware branches, where:

[0025] In the selective scanning branch, the input feature F is scanned in four directions (up, down, left, and right) to obtain four one-dimensional sequence features. ; 4 one-dimensional sequence features Four output features were obtained by processing them using a state-space model. ;

[0026] In the direction-aware branch, the input feature F is processed sequentially through a 1×1 convolutional layer, a BatchNorm layer, and a SiLU function to obtain a two-dimensional direction matrix. Then, L2 normalization is performed to obtain the direction matrix. Based on the direction matrix Calculate the weight matrices in four directions. The formula is as follows:

[0027]

[0028]

[0029] in is a hyperparameter. , Composition of direction matrix The first dimension

[0030] The confidence level m of each pixel is measured based on the amplitude of the orientation field, as shown in the following formula:

[0031]

[0032] in It is the amplitude of the directional field, that is ,in and Forming a two-dimensional direction matrix The first dimension It is a hyperparameter that controls the confidence sensitivity;

[0033] By using confidence-weighted calculations, the weights for each direction are adjusted to obtain the adjusted weights, as shown in the following formula:

[0034]

[0035] By adjusting the weights Output features of selective scan branches Perform weighted fusion to obtain The output characteristics.

[0036] Preferably, the channel attention mechanism includes the following processing steps:

[0037] For the input feature map Perform average pooling and max pooling operations to obtain two feature maps. and ;

[0038] For two feature maps and Perform dimensionality reduction and dimensionality increase convolution operations respectively to obtain features. and characteristics ;

[0039] Features and characteristics Perform fusion to obtain features The attention weights for each channel are calculated using the sigmoid function, and the input feature map is then processed based on these attention weights. Perform element-wise multiplication to obtain features .

[0040] Based on the above, the present invention also discloses a remote sensing image road segmentation device, comprising:

[0041] The acquisition module is used to acquire the remote sensing images to be processed.

[0042] The segmentation module is used to input the remote sensing image to be processed into the constructed RoadDPSSNet model to obtain road segmentation results. The RoadDPSSNet model adopts a U-Net architecture with a dual-branch encoder and decoder. The dual-branch encoder includes a CNN-Transformer branch and a visual state space branch.

[0043] Based on the foregoing, the present invention also discloses a computer device, comprising: a memory for storing a computer program; and a processor for executing the computer program to implement any of the methods described above.

[0044] Based on the above, the present invention also discloses a readable storage medium storing a computer program, which, when executed by a processor, implements any of the methods described above.

[0045] Based on the above technical solution, the beneficial effects of the present invention are:

[0046] 1) The RoadDPSSNet model of this invention adopts a dual-branch encoder architecture, including a convolutional-transformer branch for extracting local details and global semantic information; simultaneously, a visual state space (VSS) branch is used for long-distance dependency modeling. The VSS branch integrates a direction-aware selective scan module (DPSS Block), which introduces a novel direction-aware mechanism, DPSSM, which can adaptively weight multi-directional scan responses. This enables RoadDPSSNet to accurately segment roads in high-resolution remote sensing images without being affected by the receptive field limitations of traditional CNNs.

[0047] 2) The DPSS Block of this invention not only retains the advantages of long-distance dependency modeling of the traditional SS2D method, but also introduces an adaptive direction-aware weighting mechanism, dynamically adjusting the weighting coefficients of each direction according to the image content. In this way, the model can automatically select the most relevant directional features according to the structural changes in the image, avoiding information loss caused by simple summation, thereby enhancing the segmentation accuracy, especially in capturing complex boundaries and details.

[0048] 3) In the post-processing stage, the CRF+ module further optimizes the segmentation results by modeling the spatial dependencies between category labels. Unlike traditional CRF methods, the CRF+ module can be optimized during end-to-end training, while improving the fine-grained processing of boundaries, ensuring the global consistency of the segmentation results and the accuracy of the boundaries.

[0049] 4) By combining the DPSSM module and the Transformer model, RoadDPSSNet not only improves segmentation accuracy while maintaining computational efficiency, but also handles long-range dependencies in high-resolution remote sensing images. Through optimized network structure and innovative adaptive weighting mechanism, this invention effectively overcomes the computational complexity problem of traditional methods and reduces computational resource consumption while maintaining high accuracy. Attached Figure Description

[0050] Figure 1 This is a schematic diagram of the processing flow of the RoadDPSSNet model in one embodiment;

[0051] Figure 2 This is a schematic diagram of a remote sensing image road segmentation method in one embodiment. Detailed Implementation

[0052] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.

[0053] like Figure 1 , 2 As shown, this embodiment provides a road segmentation method for remote sensing images, including the following steps:

[0054] Step 1: Data acquisition and processing, preprocessing the input remote sensing image data.

[0055] 1.1 The length (H) and width (W) of the input image are processed to be multiples of 512, and any insufficient parts are padded with 0.

[0056] 1.2 Crop the image processed in 1.1 into several smaller images of 512×512 pixels.

[0057] Step 2: Input the image into the CNN-Transformer branch.

[0058] 2.1 The image is processed sequentially through a 3×3 convolution with a stride of 1, a batch normalization layer, a ReLU activation function, and a 3×3 convolution with a stride of 4 (the 3×3 convolution with a stride of 4 is used to reduce the feature map size), outputting a level 1 feature map. 128 represents the length and width, and 16 represents the number of channels.

[0059] 2.2 Level 1 Feature Map The process sequentially involves a 3×3 convolution with a stride of 1, a BatchNorm layer, a ReLU activation function, and a 3×3 convolution with a stride of 2 (the 3×3 convolution with a stride of 2 is used to reduce the feature map size), outputting a level 2 feature map. 64 represents the length and width, and 32 represents the number of channels.

[0060] 2.3 Repeat step 2.2 twice to obtain the three-level feature maps. 32 represents the length and width, and 64 represents the number of channels. Level 4 feature map. 16 represents the length and width, and 128 represents the number of channels.

[0061] 2.4 Obtain the level 4 feature map from 2.3 The shape is made of become .

[0062] 2.5 The 5-level feature map from 2.4 The input is fed into a Transformer network consisting of 12 standard Transformer Encoder layers, and the output is a global correlation feature map. , where 256 is the number of sequence elements and 128 is the number of channels.

[0063] 2.6 Restore the shape of the global correlation feature map from 2.5 back to its original shape. A new feature map is obtained. .

[0064] 2.7 Combine the feature maps generated in steps 2.1, 2.2, 2.3, and 2.5 , , , The feature maps are obtained by inputting them into the channel attention module (CA). , , , .

[0065] 2.7.1 In the channel attention module, the input feature map is first processed... Performing average pooling and max pooling operations yields two feature maps. and , representing the average feature and maximum feature of the channel, respectively.

[0066] 2.7.2 Then, these two feature maps are input into a dimension-reducing convolutional layer to obtain... and ,in The convolution kernel represents the dimensionality reduction operation, and RELU() is the RELU function.

[0067] 2.7.3 Next, the two feature maps are fed into an up-dimensional convolutional layer to obtain... and ,in It is a convolution kernel, representing the dimensionality increase operation.

[0068] 2.7.4 The two features after convolution are fused to obtain The attention weights for each channel are calculated using the sigmoid function: , This represents the sigmoid function.

[0069] 2.7.5 Finally, the attention weights for each channel are obtained. Then, input the feature map. The attention weights will be multiplied channel by channel: , This indicates the element-wise multiplication operation (Hadmard Product).

[0070] Step 3: Image input visual state space (VSS) branch

[0071] 3.1 Define a data input stem module (Stem), the input is the original image, and the output is... Here, 128 represents the length and width, and 16 represents the number of channels. The Stem module contains a 3×3 convolution computation with a stride of 1, a BatchNorm layer, a ReLU activation function, and a 3×3 convolution processing with a stride of 4 (the 3×3 convolution computation with a stride of 4 is used to reduce the feature map size).

[0072] 3.2 The feature map from step 2.7 Feature map of 3.1 Channel-level merging is performed, followed by 3×3 convolution and two-dimensional batch normalization (BatchNorm2d) to compress the number of channels. The fused feature map is as follows: .

[0073] 3.3 will The data is fed into the Direction Perception Selective Scan Block (DPSS Block) to obtain a feature map that incorporates more complex feature information. The core of the DPSS module is the Direction Perception Selective Scan Mechanism (DPSSM). After entering the module, the feature map passes through a main branch and a residual connection branch. The main branch processes the feature map through layer normalization, a linear projection layer, and the SiLU function before feeding it into the DPSSM. The residual connection branch processes the feature map through layer normalization, but only through a linear layer and the SiLU function, without feeding it into the DPSSM, thus extracting deeper feature information. The feature map processed by the DPSSM in the main branch is then normalized and fused with the residual connection branch. Finally, it is added to the original input feature map to produce the DPSS output G. The specific formula can be expressed as follows:

[0074]

[0075] Where G is the output feature map of the orientation-aware selective scanning module. The input feature map is the orientation-aware selective scanning module, LN is the layer normalization, and Linear is the linear layer.

[0076] In DPSSM, the feature map enters two branches: a selective scan branch and a orientation-aware branch. In the selective scan branch, the two-dimensional feature map... Four one-dimensional sequence features were obtained after scanning in four directions: up, down, left, and right. , Will Feeding four classic state-space model modules (SSMs) produces four outputs. Then After rearranging into two-dimensional feature maps Where H is the length, W is the width, and C is the number of channels. The other directional sensing branch aims to obtain the weights of each pixel in the feature map in four directions. Feature map A two-dimensional orientation field is obtained after 1×1 convolution, BatchNorm, and SiLU function. This refers to the field values ​​of each pixel in the vertical and horizontal directions. Then, the matrix... L2 normalization compresses the element values ​​to between -1 and 1, resulting in the direction matrix. Then The elements in the matrix are compared with the four directions respectively to obtain the four-directional weight matrix. , respectively represent The "preference" values ​​of the elements in the four directions reflect which direction they are more inclined towards and which they are less inclined towards; this is called direction perception. The specific calculation formula can be expressed as:

[0077]

[0078]

[0079] in is a hyperparameter used to control the sharpness of directional selectivity. , Composition of direction matrix The first dimension. We also consider that some regions in the image (such as uniform or texture-deficient regions) may cause instability in the model's orientation perception because the local orientation definition is weak in these regions, and the model may output noisy or inaccurate orientation responses. Directly normalizing these low-amplitude (low-energy) orientation vectors amplifies noise, leading to unreliable orientation weights. To address this issue, we propose an amplitude-based confidence term, which helps the model stabilize orientation estimation in uncertain regions. Specifically, the amplitude confidence term measures the confidence of a region by calculating the amplitude of the orientation field (i.e., the orientation intensity of each pixel). To stabilize orientation estimation, the amplitude of the orientation field is used to measure the confidence of each pixel:

[0080]

[0081] in It is the amplitude of the directional field (i.e. ),in and Composition matrix The first dimension This is a hyperparameter controlling the confidence sensitivity. Using the tanh function maps the amplitude to the (0, 1) interval, so that when the amplitude is large (i.e., the direction is clear), This indicates a high degree of confidence in the direction estimate. When the amplitude is small (i.e., the direction is uncertain or there is significant noise), This represents the uncertainty of the model in the direction estimation. The confidence level is calculated as follows. Next, we further stabilized the results by smoothing the direction-weighted average. Specifically, we adjusted the weights for each direction using confidence-aware weighting:

[0082]

[0083] When m is large (high confidence), the weighted direction weights are close to the original. When m is small (low confidence), the weighted direction weights tend to be evenly distributed at 0.25, thus avoiding the influence of noise and unstable directions on the results. Finally, the DPSSM (Direction-Aware Selective Scanning Module) performs gated fusion of the outputs from different directions. That is, it performs weighted fusion of the selective scan outputs from the four directions:

[0084]

[0085] in For Hadama accumulation.

[0086] 3.4 Define a downsampling module to downsample the feature map. Input, Output The downsampling module consists of a 3×3 convolution with a stride of 2, BatchNorm2d, and the GeLU function.

[0087] 3.5 Similar to step 3.2, the feature map from step 2.7 is... Compared with the feature map in step 3.4 Channel-level merging is performed, followed by 1×1 convolution and BatchNorm2d to compress the number of channels. The fused feature map is as follows. .

[0088] 3.6 Same as step 3.3, then... The image is fed into the same orientation-aware selective scanning module (DPSS) as in step 3.3 to obtain a feature map that incorporates more complex feature information. .

[0089] 3.7 The same downsampling module as step 3.4 generates the output. Then follow the same steps as in 3.2 to... The output of step 2.7 Channel-level merging is performed to generate output. .

[0090] 3.8 Same as step 3.3, then... The image is fed into a Direction-Aware Selective Scanning (DPSS) module to obtain a feature map that incorporates more complex feature information. .

[0091] 3.9 The same downsampling module as step 3.4 generates the output. Then follow the same steps as in 3.2 to... The output of step 2.7 Channel-level merging generates output out.

[0092] 3.10 Same as step 3.3, then... The image is fed into a Direction-Aware Selective Scanning (DPSS) module to obtain a feature map that incorporates more complex feature information. .

[0093] 3.11 Define the same channel attention module as in step 2.7, and process the feature maps output from steps 3.3, 3.6, 3.8, and 3.10. Input, output .

[0094] Step 4: Calculate the class probability for each pixel.

[0095] 4.1 Feature Map The image is fed into the same orientation-aware selective scanning module (DPSS) as in step 3.3 to obtain a feature map that incorporates more complex feature information. .

[0096] 4.2 Define an upsampling module to upsample the feature map. Input, get output The upsampling module performs upsampling using a bilinear interpolation algorithm, followed by a 1×1 convolution to change the number of channels and a batch normalization (BatchNorm) layer to accelerate training and stabilize the model.

[0097] 4.3 Perform the same operation as in 3.2 to convert the feature map. Output of step 3.11 Channel-level merging is performed to generate output. and will The image is fed into the same orientation-aware selective scanning module (DPSS) as in step 3.3 to obtain a feature map that incorporates more complex feature information. .

[0098] 4.4 Feature Map Input the same upsampling module as in step 4.2 to obtain the output. .

[0099] 4.5 Similar to step 4.3, transfer the feature map... Output of step 3.11 Channel-level merging is performed to generate output. and will The image is fed into the same orientation-aware selective scanning module (DPSS) as in step 3.3 to obtain a feature map that incorporates more complex feature information. .

[0100] 4.6 Feature Map Input the same upsampling module as in step 4.2 to obtain the output. .

[0101] 4.7 Similar to step 4.3, transfer the feature map... Output of step 3.11 Channel-level merging is performed to generate output. and will The image is fed into the same orientation-aware selective scanning module (DPSS) as in step 3.3 to obtain a feature map that incorporates more complex feature information. .

[0102] 4.8 Feature Map Input the same upsampling module as in step 4.2 to obtain the output. This refers to the pixel category probability map.

[0103] Step 5: Post-processing stage of Conditional Random Fields

[0104] Input the pixel category probability map Z into the conditional random field ( The module performs smoothing to obtain the final segmentation result. . The module flow is as follows:

[0105] 5.1 Perform a softmax operation on Z to obtain a preliminary class probability distribution (soft distribution). The formula is as follows:

[0106]

[0107] 5.2 Generate the spatial location (x and y coordinates) of each pixel in the original image, and construct a location tensor together with the batch size of each pixel. Then expand to ,in It's a function in the PyTorch library used to generate coordinate grids.

[0108] 5.3 Average pooling is used to smoothly extract spatial context information and obtain the spatial kernel. The formula is:

[0109]

[0110] in For average pooling operation, kernel_size is the kernel size, stride is the stride, and padding is the padding.

[0111] 5.4 Calculating Two-Sided Kernels Using Color and Spatial Differences The formula for smoothing image features is:

[0112]

[0113] Where image is the original image, and self._bilateral_filter is a bilateral filter calculated using color and spatial differences, which is a classic image processing algorithm and will not be elaborated here.

[0114] 5.5 Weighted fusion of the spatial kernel and the bilateral kernel yields a pairwise energy term, which is then used to update the energy level. .

[0115]

[0116]

[0117] in and All of these are pre-set weight parameters.

[0118] 5.6 Perform steps 5.3, 5.4, and 5.5 five times to obtain the optimized segmentation prediction image. .

[0119] Step 6: Visualize the results

[0120] 6.1 The category map of each pixel is obtained from the smoothed probability map output in step 5 using the Argmax() function, which returns the maximum value of the category number.

[0121] 6.2 The category map of each pixel is overlaid with the original remote sensing image and visualized.

[0122] It should be understood that although the steps in the flowchart above are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowchart above may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.

[0123] Based on the same inventive concept, this application also provides an apparatus for implementing the aforementioned remote sensing image road segmentation method. The solution provided by this apparatus is similar to the implementation described in the above method, and therefore will not be repeated here.

[0124] In one embodiment, a remote sensing image road segmentation device is also provided, comprising:

[0125] The acquisition module is used to acquire the remote sensing images to be processed.

[0126] The segmentation module is used to input the remote sensing image to be processed into the constructed RoadDPSSNet model to obtain road segmentation results. The RoadDPSSNet model adopts a U-Net architecture with a dual-branch encoder and decoder. The dual-branch encoder includes a CNN-Transformer branch and a visual state space branch.

[0127] In the above embodiments, each module of the remote sensing image road segmentation device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0128] In one embodiment, a computer device is also provided, comprising: a memory for storing a computer program; and a processor for executing the computer program to implement the steps as described in all the above method embodiments.

[0129] In one embodiment, a readable storage medium is also provided, on which a computer program is stored, which, when executed by a processor, implements the steps as described in all the above method embodiments.

[0130] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0131] The embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on its differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.

[0132] The above are merely preferred embodiments of the present application and are not intended to limit the embodiments of the present application. For those skilled in the art, the embodiments of the present application can have various modifications and variations. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the embodiments of the present application should be included within the protection scope of the embodiments of the present application.

Claims

1. A method for road segmentation in remote sensing images, characterized in that, Includes the following steps: Acquire the remote sensing image to be processed; The remote sensing image to be processed is input into the constructed RoadDPSSNet model to obtain road segmentation results. The RoadDPSSNet model adopts a U-Net architecture with a dual-branch encoder and decoder. The dual-branch encoder includes a CNN-Transformer branch and a visual state space branch.

2. The remote sensing image road segmentation method according to claim 1, characterized in that, The processing procedure of the RoadDPSSNet model includes the following steps: The remote sensing image to be processed is simultaneously input into the CNN-Transformer branch and the visual state space branch; the CNN-Transformer branch performs multi-scale local and global feature extraction, and the visual state space branch uses a direction-aware selective scanning module to enhance the perception of road boundaries and extract road features; the outputs of each stage of the CNN-Transformer branch and the visual state space branch are fused through skip connections using a channel attention mechanism to obtain multi-scale decoded features; The multi-scale decoding features and the feature map that the decoder gradually upsamples to restore spatial resolution are fused through skip connections using a channel attention mechanism to obtain a pixel category probability map. The pixel category probability map is input into a conditional random field and smoothed to obtain a segmentation prediction image.

3. The remote sensing image road segmentation method according to claim 1, characterized in that, The CNN-Transformer branch includes several 3×3 convolutional modules and a Transformer network connected in sequence. The Transformer network is composed of several Transformer Encoder layers stacked together.

4. The remote sensing image road segmentation method according to claim 1, characterized in that, The visual state space branch includes a root module, a 3×3 convolution module, a direction-aware selective scanning module, a downsampling module, a 3×3 convolution module, a direction-aware selective scanning module, a downsampling module, a 3×3 convolution module, a direction-aware selective scanning module, a downsampling module, a 3×3 convolution module, and a direction-aware selective scanning module connected in sequence. The root module includes a 3×3 convolution, a batch normalization layer, a ReLU activation function, and a 3×3 convolution.

5. The remote sensing image road segmentation method according to claim 1, characterized in that, The decoder includes a direction-aware selective scanning module, an upsampling module, a 3×3 convolution module, a direction-aware selective scanning module, an upsampling module, a 3×3 convolution module, a direction-aware selective scanning module, an upsampling module, a 3×3 convolution module, a direction-aware selective scanning module, and an upsampling module connected in sequence.

6. A method for road segmentation in remote sensing images according to claim 4 or 5, characterized in that, The processing procedure of the direction-aware selective scanning module includes the following steps: ; Where G is the output feature map of the orientation-aware selective scanning module. The input feature map is the orientation-aware selective scanning module, LN represents layer normalization, and Linear represents a linear layer. For a direction-aware selective scanning mechanism, the This includes selective scanning branches and orientation-aware branches, where: In the selective scanning branch, the input feature F is scanned in four directions (up, down, left, and right) to obtain four one-dimensional sequence features. ; 4 one-dimensional sequence features Four output features were obtained by processing them using a state-space model. ; In the direction-aware branch, the input feature F is processed sequentially through a 1×1 convolutional layer, a BatchNorm layer, and a SiLU function to obtain a two-dimensional direction matrix. Then, L2 normalization is performed to obtain the direction matrix. Based on the direction matrix Calculate the weight matrices in four directions. The formula is as follows: ; ; in is a hyperparameter. , Composition of direction matrix The first dimension The confidence level m of each pixel is measured based on the amplitude of the orientation field, as shown in the following formula: ; in It is the amplitude of the directional field, that is ,in and Forming a two-dimensional direction matrix The first dimension It is a hyperparameter that controls the confidence sensitivity; By using confidence-weighted calculations, the weights for each direction are adjusted to obtain the adjusted weights, as shown in the following formula: ; By adjusting the weights Output features of selective scan branches Perform weighted fusion to obtain The output characteristics.

7. A method for road segmentation in remote sensing images according to claim 2, characterized in that, The channel attention mechanism includes the following processing steps: For the input feature map Perform average pooling and max pooling operations to obtain two feature maps. and ; For two feature maps and Perform dimensionality reduction and dimensionality increase convolution operations respectively to obtain features. and characteristics ; Features and characteristics Perform fusion to obtain features The attention weights for each channel are calculated using the sigmoid function, and the input feature map is then processed based on these attention weights. Perform element-wise multiplication to obtain features .

8. A remote sensing image road segmentation device, characterized in that, include: The acquisition module is used to acquire the remote sensing images to be processed. The segmentation module is used to input the remote sensing image to be processed into the constructed RoadDPSSNet model to obtain road segmentation results. The RoadDPSSNet model adopts a U-Net architecture with a dual-branch encoder and decoder. The dual-branch encoder includes a CNN-Transformer branch and a visual state space branch.

9. A computer device, characterized in that, Includes: memory, used to store computer programs; A processor for executing the computer program to implement the method as described in any one of claims 1 to 7.

10. A readable storage medium, characterized in that, The readable storage medium stores a computer program that, when executed by a processor, implements the method as described in any one of claims 1 to 7.