Remote sensing image road extraction method and system based on VMama and channel attention
By adopting the MambaDeepLab model based on VMamba and channel attention in remote sensing image road extraction, the diversity and accuracy of road extraction in remote sensing images are solved, and efficient and accurate road extraction and vector image generation are achieved.
Patent Information
- Application Number
- CN202411766404.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2044-12-04
AI Technical Summary
The prior art has the diversity of shape, size, distribution and texture, occlusion and shadow influence, and resolution and quality limitations on accuracy in remote sensing image road extraction, making it difficult to effectively extract global context information and multi-scale features.
Using a remote sensing image road extraction method based on VMamba and channel attention, the MambaDeepLab model is constructed. This model combines the DeepLabV3+ architecture and VMamba module to use VMamba's linear long sequence modeling capabilities and channel attention refinement capabilities to extract multi-scale features and global context information of the road.
The accuracy and speed of remote sensing image road extraction are improved, and high-quality road vector maps are generated, avoiding the local receptive field limitation based on CNN and the high computing burden based on Transformer.
Smart Images

Figure CN119762499A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a remote sensing image road extraction method and system based on VMamba and channel attention, belonging to the technical field of remote sensing images and artificial intelligence. Background Art
[0002] Road extraction from remote sensing images is a basic task in remote sensing image processing, and has important practical application value in many fields such as urban planning, traffic navigation, environmental monitoring, disaster assessment, etc. With the continuous development of remote sensing technology, the acquisition cycle of high-resolution remote sensing images is getting shorter and shorter, providing rich data sets. Therefore, extracting roads from these high-resolution remote sensing images has become a research hotspot.
[0003] Although road extraction from remote sensing images has attracted widespread attention, this task still faces challenges. The main challenges include: 1) Remote sensing images usually show roads of different shapes, sizes, distributions, and textures, which brings challenges to road extraction; 2) Occlusions and shadows caused by buildings, trees, and vehicles can also affect the integrity of road extraction; 3) The resolution and quality of remote sensing images can directly affect the accuracy of road extraction. To address these challenges, effectively extracting global context information and multi-scale feature representation from remote sensing images is an important topic. The former helps the model understand the overall structure and layout of the image, thereby better distinguishing roads from other background elements. The latter can retain local details and global information, enabling the model to more accurately extract roads of different sizes.
[0004] Traditional road extraction methods rely on the inherent morphological features of the input image and manual features developed by professionals for classification. These methods are often not suitable for large-scale remote sensing images containing complex, multi-scale road networks. In this case, manual feature extraction not only requires specialized knowledge, but is also very time-consuming and labor-intensive.
[0005] Compared with traditional methods, deep learning-based methods are superior in the automatic and robust extraction of semantic features. As the initial representative of deep learning, convolutional neural networks (CNNs) have been widely used in the task of road extraction from remote sensing images. Fully convolutional networks (FCNs) generate pixel-by-pixel classification results by replacing fully connected layers with convolutional layers. However, the downsampling process of these models continuously reduces the spatial resolution of the image, ultimately leading to the loss of global context information. Later, the famous U-Net work solved this problem by fusing deep and shallow feature information through skip connections, and variants of U-Net were also proposed for road extraction from remote sensing images; however, the limited local receptive field of the UNet structure limits its ability to capture multi-scale information. In order to improve the multi-scale information extraction ability of the model, the famous DeepLab work proposed subspace pyramid pooling (ASPP) to obtain multi-scale feature representation; however, the multi-scale features generated by ASPP cannot avoid containing repeated or redundant spatial information. The introduction of the attention mechanism can effectively highlight important features and suppress redundant or irrelevant information, thereby reducing the impact of information redundancy. SE-DeepLab combines DeepLabv3+ with the SE attention module to enhance the weight of effective information, suppress weak information in the image, and improve the completeness of road extraction in the prediction process; RAANet embeds the attention module and residual structure into ASPP, constructs a new residual ASPP, and improves the accuracy of road extraction from high-resolution remote sensing images; although the current CNN-based models can extract global context information and multi-scale features relatively effectively, they have inherent limitations in processing global context information due to the characteristics of the local receptive field of convolution operations.
[0006] Compared with CNN, Transformer can directly focus each position of the input image on other positions through the self-attention mechanism, effectively capturing global context information. On this basis, a series of road extraction models combined with Transformer have emerged, such as CMTFNet, a fusion network based on CNN and multi-scale Transformer, which extracts and fuses local information and multi-scale global context information from high-resolution remote sensing images; however, due to the quadratic complexity of the self-attention mechanism, these improvements are also accompanied by increased computational requirements.
[0007] At present, the state space model Mamba provides an innovative solution to these problems due to its powerful modeling ability of remote context information and maintaining linear computational complexity. The cross scanning module (CSM) introduced in VMamba further improves the applicability of Mamba in computer vision tasks. Therefore, how to make full use of Mamba's linear long sequence modeling ability and combine it with the classic segmentation framework to further improve the road extraction effect of remote sensing images has become an important issue. Summary of the invention
[0008] In view of this, the present invention provides a remote sensing image road extraction method, system, computer equipment and storage medium based on VMamba and channel attention, which can meet the accuracy, speed and wide application requirements of complex road extraction in the field of high-resolution remote sensing.
[0009] The first object of the present invention is to provide a remote sensing image road extraction method based on VMamba and channel attention.
[0010] The second object of the present invention is to provide a remote sensing image road extraction system based on VMamba and channel attention.
[0011] A third object of the present invention is to provide a computer device.
[0012] A fourth object of the present invention is to provide a computer-readable storage medium.
[0013] The first object of the present invention can be achieved by adopting the following technical solutions:
[0014] A remote sensing image road extraction method based on VMamba and channel attention, the method comprising:
[0015] Obtain remote sensing image datasets;
[0016] Preprocess the remote sensing images in the remote sensing image dataset;
[0017] Based on the DeepLabV3+ architecture, a MambaDeepLab model is built in combination with the VMamba module;
[0018] The MambaDeepLab model is trained using the preprocessed remote sensing image dataset to obtain a trained segmentation model.
[0019] Using the trained segmentation model, the roads in the remote sensing images of the segmented scenes can be extracted.
[0020] Connected component analysis is used to perform post-processing of disconnection and reconnection on the extracted road results;
[0021] The road results after disconnection and reconnection are converted from raster to vector to generate a road vector map.
[0022] Furthermore, the MambaDeepLab model is an asymmetric encoder-decoder structure network model based on the VMamba module and the channel attention module, including a block embedding layer, an encoder, a spatial pyramid pool, a channel attention module and a decoder;
[0023] The block embedding layer is used to embed the input image to obtain a processed image;
[0024] The encoder is used to construct hierarchical features to extract global context information for the processed image;
[0025] The spatial pyramid pool is used to extract multi-scale information from deep features in the hierarchical features;
[0026] The channel attention module is used to refine the multi-scale information;
[0027] The decoder is used to fuse the shallow features in the hierarchical features and the refined multi-scale information and upsample to generate a segmentation map.
[0028] Furthermore, embedding the input image to obtain a processed image specifically includes:
[0029] Divide the input image into non-overlapping blocks of size N×N;
[0030] Perform dimension mapping on the divided image to obtain a mapped image;
[0031] The mapped image is normalized to obtain a processed image.
[0032] Further, the encoder includes three cascaded VSSLayer layers, the first two VSSLayer layers each include two VSSblock blocks and one PatchMerging block, and the third VSSLayer layer includes six VSSblock blocks and one PatchMerging block;
[0033] Each VSSblock includes two layer normalization layers, a convolutional layer, two linear layers, two SiLU activation layers and an SS2D module, wherein the SS2D module includes a Cross-Scan module and a pure Mamba module; the PatchMerging block includes a linear layer and a layer normalization layer connected sequentially.
[0034] Furthermore, the spatial pyramid pool includes four segmentation windows of different sizes and four corresponding VSSblock blocks, four linear layers and a final linear layer;
[0035] Each VSSblock includes two layer normalization layers, a convolutional layer, two linear layers, two SiLU activation layers and an SS2D module, and the SS2D module includes a Cross-Scan module and a pure Mamba module.
[0036] Furthermore, the channel attention module includes a global average pooling layer, a ReLU activation layer, a Sigmoid activation layer and two fully connected layers.
[0037] Further, the decoder includes three cascaded VSSLayer_up layers and a final projection layer, each VSSLayer_up layer includes two VSSblock blocks and a PatchExpaning block, and the final projection layer includes a linear layer, a normalization layer and a convolution layer;
[0038] Each VSSblock includes two layer normalization layers, a convolutional layer, two linear layers, two SiLU activation layers and an SS2D module, wherein the SS2D module includes a Cross-Scan module and a pure Mamba module; the PatchExpaning block includes a linear layer and a layer normalization layer connected sequentially.
[0039] The second object of the present invention can be achieved by adopting the following technical solutions:
[0040] A remote sensing image road extraction system based on VMamba and channel attention, the system comprising:
[0041] A data acquisition unit, used for acquiring remote sensing image data sets;
[0042] A data preprocessing unit, used for preprocessing remote sensing images in a remote sensing image data set;
[0043] The model building unit is used to build a MambaDeepLab model based on the DeepLabV3+ architecture and combined with the VMamba module;
[0044] The model training unit is used to train the MambaDeepLab model using the preprocessed remote sensing image dataset to obtain a trained segmentation model;
[0045] A road extraction unit, used to extract roads from the remote sensing image using a trained segmentation model;
[0046] A disconnection reconnection post-processing unit, used for performing disconnection reconnection post-processing on the extracted road results using connected component analysis;
[0047] The road vector diagram production unit is used to convert the road results processed after disconnection and reconnection into vectors to generate a road vector diagram.
[0048] The third object of the present invention can be achieved by adopting the following technical solutions:
[0049] A computer device comprises a processor and a memory for storing a program executable by the processor. When the processor executes the program stored in the memory, the above-mentioned remote sensing image road extraction method is implemented.
[0050] The fourth object of the present invention can be achieved by adopting the following technical solutions:
[0051] A computer-readable storage medium stores a program, and when the program is executed by a processor, the above-mentioned remote sensing image road extraction method is implemented.
[0052] The present invention has the following beneficial effects compared with the prior art:
[0053] The present invention introduces VMamba (VSS) blocks as basic blocks to construct the DeepLabV3+ structure, which captures long-sequence global context information and multi-scale information while maintaining linear computational complexity, avoiding the limitation of local receptive field in CNN-based models, resulting in the lack of ability to capture remote information, and the high computational burden caused by the quadratic complexity of the self-attention mechanism in Transformer-based models. The channel attention mechanism is introduced to refine multi-scale information, improve the model's accuracy in extracting roads, and use connected component analysis to post-process the extracted road results and generate high-quality road vector maps. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] 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 some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying creative work.
[0055] Figure 1 This is a flowchart of a remote sensing image road extraction method based on VMamba and channel attention according to Example 1 of the present invention.
[0056] Figure 2 It is a schematic diagram of a remote sensing image according to Embodiment 1 of the present invention.
[0057] Figure 3 This is a structural diagram of the MambaDeepLab model of Example 1 of the present invention.
[0058] Figure 4 This is a structural diagram of the block embedding layer of Example 1 of the present invention.
[0059] Figure 5 This is a structural diagram of the spatial pyramid pool according to Embodiment 1 of the present invention.
[0060] Figure 6 This is a structural diagram of the channel attention module of Example 1 of the present invention.
[0061] Figure 7 This is a schematic diagram of the connected components analysis before merging according to Example 1 of the present invention.
[0062] Figure 8 This is a schematic diagram of the analysis and merging of connected components according to Example 1 of the present invention.
[0063] Fig. 9 This is a flow chart of the connected component analysis method of embodiment 1 of the present invention.
[0064] Fig.10 Schematic diagram of a road vector diagram according to Embodiment 1 of the present invention.
[0065] Fig.11 This is a structural block diagram of a remote sensing image road extraction device based on VMamba and channel attention according to embodiment 2 of the present invention.
[0066] Fig.12 This is a structural block diagram of a computer device according to Embodiment 3 of the present invention. DETAILED DESCRIPTION
[0067] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0068] Embodiment 1:
[0069] like Figure 1 As shown, this embodiment provides a remote sensing image road extraction method based on VMamba and channel attention, the method comprising the following steps:
[0070] S101. Obtain a remote sensing image dataset.
[0071] In this embodiment, the remote sensing image and its corresponding ground object real marking map, the remote sensing image is as follows: Figure 2As shown in Figure 1, the real labeled map of the road is used to provide a reference for the model's prediction results to calculate the loss function to optimize the model; the model performance can also be evaluated by comparing it with the model's prediction results.
[0072] S102: pre-processing the remote sensing images in the remote sensing image dataset.
[0073] This embodiment performs preprocessing such as standardization, denoising, and enhancement on the remote sensing images in the remote sensing image data set, specifically including: first, standardization uses the Z-score method to scale the data to a mean of 0 and a variance of 1, so that the features have the same dimension, which is convenient for model training. Secondly, Gaussian filtering is used to reduce the noise in the data and improve the data quality; in addition, data enhancement generates transformed samples by random rotation, flipping, adjusting brightness and contrast, etc., and the remote sensing images are segmented into several data slices of size 512×512, which are divided into training sets and verification sets according to the ratio of 8:2; wherein the training set includes training images and training labels, and the verification set includes verification images and verification labels, and finally the data set required for MambaDeepLab network model training and verification is obtained.
[0074] S103. Based on the DeepLabV3+ architecture, a MambaDeepLab model is built in combination with the VMamba module.
[0075] like Figure 3 As shown in the figure, the MambaDeepLab model is an asymmetric encoder-decoder structure network model based on the VMamba module and the channel attention module. The VMamba (VSS) block is introduced as the basic block to extend the DeepLabV3+ structure. The VMamba-based encoder captures global context information, while the VMamba-based spatial pyramid pool (Mamba-SPP) captures multi-scale feature information. The MambaDeepLab model includes a block embedding layer, an encoder, a spatial pyramid pool, a channel attention module and a decoder.
[0076] like Figure 4 As shown, the block embedding layer of the MambaDeepLab model, i.e., the input layer, has three feature mapping channels for input sample feature data, and the output feature generated is x∈R H×W×3 ; Wherein, H represents the height of the image; W represents the width of the image; the block embedding layer is used to embed the input image to obtain a processed image. The specific embedding process includes: dividing the input image into non-overlapping blocks of size N×N, in this embodiment, N=4, that is, dividing it into non-overlapping patches of size 4×4; performing dimension mapping on the divided image to obtain a mapped image; normalizing the mapped image to obtain a processed image.
[0077] The encoder includes three cascaded VSSLayer layers, the first two VSSLayer layers each include two VSSblock blocks and one PatchMerging block, the third VSSLayer layer includes six VSSblock blocks and one PatchMerging block, and the three VSSLayer layers in this embodiment are the first VSSLayer layer, the second VSSLayer layer and the third VSSLayer layer respectively; in this embodiment, each VSSLayer layer of the encoder corresponds to a stage, and a block merging operation is used at the end of each stage to reduce the height and width of the input features while increasing the number of channels.
[0078] like Figure 5 As shown, the spatial pyramid pool is a VMamba-based spatial pyramid pool (Mamba-SPP), which includes four segmentation window layers of different sizes (2, 4, 8 and 16) and four corresponding VSSblock blocks, four linear layers and a final linear layer. The smaller window is used to capture local details, while the larger window is used to collect global context information. The four segmentation window layers in this embodiment are respectively the first segmentation window layer, the second segmentation window layer, the third segmentation window layer, and the fourth segmentation window layer.
[0079] like Figure 6 As shown in the figure, the channel attention module is used to refine multi-scale information, which includes a global average pooling layer, a ReLU activation layer, a Sigmoid activation layer and two fully connected layers; first, the input feature map is subjected to global average pooling to compress the spatial information of each channel into a scalar to generate a channel descriptor. The channel descriptor is processed using two fully connected layers to learn the relationship between channels. The first fully connected layer reduces the dimension (using the ReLU activation function), and the second fully connected layer restores the dimension and generates channel weights (using the Sigmoid activation function). Finally, the learned channel weights are multiplied with the input feature map to re-weight the feature map.
[0080] The decoder is used to fuse the shallow features in the hierarchical features and the refined multi-scale information and upsample to generate a segmentation map. It includes three cascaded VSSLayer_up layers and a final projection layer. Each VSSLayer_up layer includes two VSSblock blocks and a PatchExpaning block. The three VSSLayer_up layers in this embodiment are the first VSSLayer_up layer, the second VSSLayer_up layer and the third VSSLayer_up layer, respectively. The final projection layer includes a linear layer, a normalization layer and a convolutional layer. In this embodiment, each VSSLayer_up layer of the decoder corresponds to a stage, and a block expansion operation is used at the beginning of each stage to reduce the number of feature channels and increase the height and width.
[0081] In this embodiment, each VSSblock includes two layer normalization layers, a convolutional layer, two linear layers, two SiLU activation layers and an SS2D module, the SS2D module includes a Cross-Scan module and a pure Mamba module; the PatchMerging block includes a linear layer and a layer normalization layer connected sequentially; the PatchExpaning block includes a linear layer and a layer normalization layer connected sequentially.
[0082] S104. Use the preprocessed remote sensing image data set to train the MambaDeepLab model to obtain a trained segmentation model.
[0083] Step S104 of this embodiment specifically includes:
[0084] First, the training set batch is input to the block embedding layer; the input image is divided into non-overlapping patches of size 4×4, and the dimension of the image is mapped to C. In this embodiment, the number of feature mapping channels is 96, that is, C is 96, and an embedded image is generated and a feature matrix is generated as the first skip connection layer; specifically, the block embedding layer converts the input image x∈R H×W×3 The image is divided into non-overlapping blocks of size 4×4 through a convolutional layer, and the dimension of the image is mapped to C (C is 96 in this embodiment). The embedded image is obtained through this process Next, this embodiment uses the layer normalization layer to normalize x′ and converts the resulting feature matrix
[0085] Afterwards, the block embedding layer is input into the encoder for hierarchical feature extraction; specifically, the feature matrix generated by the block embedding layer is The first hierarchical feature matrix is obtained by extracting features through the two VSSblock blocks of the first VSSLayer layer and performing downsampling operations on the PatchMerging block. The second hierarchical feature matrix is obtained by extracting features through the two VSSblock blocks of the second VSSLayer layer and performing downsampling operations on the PatchMerging block. The third hierarchical feature matrix is obtained by extracting features through the six VSSblock blocks of the third VSSLayer layer and performing downsampling operations through the PatchMerging block.
[0086]
[0087] Next, advanced features Multi-scale features are generated through VMamba-based spatial pyramid pooling (Mamba-SPP); specifically, high-level features Input to the first window layer, extract features through the VSSblock block with a 2×2 split window and the corresponding linear layer to transform the feature dimension (here the transformation dimension is 256) to obtain the first scale feature Input to the second window layer, extract features through the VSSblock block with a 4×4 split window and the corresponding linear layer to transform the feature dimension to obtain the second scale feature Input to the third window layer, extract features through the VSSblock block with an 8×8 segmentation window and the corresponding linear layer to transform the feature dimension to obtain the third scale feature Input to the fourth window layer, extract features through the VSSblock block with a 16×16 segmentation window and the corresponding linear layer to transform the feature dimension to obtain the fourth scale feature Then, the four scale features are concatenated and transformed through the final linear layer to obtain the final multi-scale feature.
[0088] The multi-scale features are then input into the channel attention module to learn the relationship between channels and dynamically adjust the importance of each channel. Specifically, the multi-scale features A channel descriptor w1∈R is generated by first compressing the spatial information of each channel into a scalar through a global average pooling. 1×1×C The channel descriptor is then processed through two fully connected layers to learn the relationship between channels and obtain the channel weight w2∈R 1×1×C Multiply the learned channel weights by the input multi-scale features to obtain the re-weighted feature multi-scale features
[0089] The shallow features in the hierarchical features generated by the encoder and the refined multi-scale information are input into the decoder for fusion and up-sampling to generate a segmentation map; specifically, the multi-scale features After upsampling by four times Splice to get the fused features The fused features are sampled through the first VSSLayer_up layer to obtain features The features are obtained by upsampling the second VSSLayer_up layer The feature x9∈R is obtained by upsampling the third VSSLayer_up layer H×W×64 .
[0090] Finally, the final projection layer produces the final output y∈R H×W×numclass , where numclass is the number of categories that need to be split.
[0091] After the training is completed, the trained segmentation model is obtained in this embodiment, and the validation set is input into the trained segmentation model to complete the extraction of roads in the remote sensing image and evaluate the results of the model method according to the intersection over union (IoU). The definition of IoU is as follows:
[0092]
[0093] Among them, TP stands for True Positive, which means true positive: the prediction is positive and the actual result is also positive; FP stands for False Positive, which means false positive: the prediction is positive and the actual result is negative; FN stands for False Negative, which means false negative: the prediction is negative and the actual result is positive; TN stands for True Negative, which means true negative: the prediction is negative and the actual result is also negative; the larger the IoU result, the closer the predicted image is to the true label provided.
[0094] S105. Using the trained segmentation model, roads are extracted from the remote sensing image of the scene to be segmented.
[0095] In this embodiment, the scene to be segmented can be the extraction of land objects in a natural scene or the regional planning of a city; the remote sensing image of the scene to be segmented is obtained, preprocessed, and then input into the trained segmentation model to complete the extraction of the remote sensing image road.
[0096] S106, using connected component analysis to perform disconnection and reconnection post-processing on the extracted road results.
[0097] like Figure 7-Figure 8 As shown in the red box area, by analyzing the characteristics of connected components (such as area, shape, etc.), noise and small false detections can be filtered out, and disconnected road segments can be identified and reconnected to ensure the continuity and integrity of the road network.
[0098] like Fig. 9 As shown, step S106 specifically includes:
[0099] Reading and binarization: Read the semantic segmentation result image and perform binarization.
[0100] Connected component detection and filtering: Use OpenCV’s connectedComponentsWithStats() function to detect connected components and filter out components with smaller areas.
[0101] Disconnection and reconnection: Use expansion operation to reconnect after disconnection.
[0102] S107, converting the road result processed after the disconnection and reconnection into a vector to generate a road vector map.
[0103] like Fig.10 As shown, the Polygonize() function in the GDAL library in Python is used to convert raster to vector to generate a road vector map, which is convenient for further analysis and application.
[0104] It should be noted that although the above method operations are described in a particular order in the accompanying drawings, this does not require or imply that these operations must be performed in this particular order, or that all of the operations shown must be performed to achieve the desired results. On the contrary, the steps depicted may be performed in a different order. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.
[0105] Embodiment 2:
[0106] like Fig.11 As shown, this embodiment provides a remote sensing image road extraction system based on VMamba and channel attention, which includes a data acquisition unit 1101, a data preprocessing unit 1102, a model building unit 1103, a model training unit 1104, a road extraction unit 1105, a disconnection reconnection post-processing unit 1106 and a road vector diagram production unit 1107. The specific functions of each unit are as follows:
[0107] The data acquisition unit 1101 is used to acquire a remote sensing image data set;
[0108] A data preprocessing unit 1102 is used to preprocess the remote sensing images in the remote sensing image data set;
[0109] A model building unit 1103 is used to build a MambaDeepLab model based on the DeepLabV3+ architecture and in combination with the VMamba module;
[0110] A model training unit 1104 is used to train the MambaDeepLab model using the preprocessed remote sensing image data set to obtain a trained segmentation model;
[0111] A road extraction unit 1105 is used to extract roads from the remote sensing image using the trained segmentation model;
[0112] A disconnection reconnection post-processing unit 1106, configured to perform disconnection reconnection post-processing on the extracted road results using connected component analysis;
[0113] The road vector diagram production unit 1107 is used to convert the road result processed after the disconnection and reconnection into a vector to generate a road vector diagram.
[0114] The specific implementation of each unit in this embodiment can refer to the above-mentioned embodiment 1, and will not be described one by one here; it should be noted that the system provided in this embodiment is only illustrated by the division of the above-mentioned functional units. In actual applications, the above-mentioned functions can be assigned to different functional units as needed, that is, the internal structure can be divided into different functional units to complete all or part of the functions described above.
[0115] Embodiment 3:
[0116] This embodiment provides a computer device, such as Fig.12 As shown, it includes a processor 1202, a memory, an input device 1203, a display device 1204 and a network interface 1205 connected through a device bus 1201. The processor is used to provide computing and control capabilities. The memory includes a non-volatile storage medium 1206 and an internal memory 1207. The non-volatile storage medium 1206 stores an operating device, a computer program and a database. The internal memory 1207 provides an environment for the operation of the operating device and the computer program in the non-volatile storage medium. When the processor 1202 executes the computer program stored in the memory, the remote sensing image road extraction method of the above-mentioned embodiment 1 is implemented as follows:
[0117] Acquire a remote sensing image dataset; preprocess the remote sensing images in the remote sensing image dataset; build a MambaDeepLab model based on the DeepLabV3+ architecture and the VMamba module; use the preprocessed remote sensing image dataset to train the MambaDeepLab model to obtain a trained segmentation model; use the trained segmentation model to extract roads from the remote sensing images of the segmented scene; use connected component analysis to post-process the extracted road results by disconnection and reconnection; convert the road results after disconnection and reconnection from raster to vector to generate a road vector map.
[0118] Embodiment 4:
[0119] This embodiment provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the remote sensing image road extraction method of the above embodiment 1 is implemented as follows:
[0120] Acquire a remote sensing image dataset; preprocess the remote sensing images in the remote sensing image dataset; build a MambaDeepLab model based on the DeepLabV3+ architecture and the VMamba module; use the preprocessed remote sensing image dataset to train the MambaDeepLab model to obtain a trained segmentation model; use the trained segmentation model to extract roads from the remote sensing images of the segmented scene; use connected component analysis to post-process the extracted road results by disconnection and reconnection; convert the road results after disconnection and reconnection from raster to vector to generate a road vector map.
[0121] It should be noted that the computer-readable storage medium of the present embodiment may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0122] In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, device or device. In this embodiment, the computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium may also be any computer-readable storage medium other than a computer-readable storage medium, which may send, propagate, or transmit a program used by or in combination with an instruction execution system, device or device. The computer program contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0123] The computer readable storage medium can be written in one or more programming languages or a combination thereof to execute the computer program of the present embodiment, and the programming language includes an object-oriented programming language, such as Java, Python, C++, and a conventional procedural programming language, such as C or a similar programming language. The program can be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., using an Internet service provider to connect through the Internet).
[0124] In summary, the present invention introduces VMamba (VSS) blocks as basic blocks to construct the DeepLabV3+ structure, which captures long-sequence global context information and multi-scale information while maintaining linear computational complexity, avoiding the limitation of local receptive field in CNN-based models, resulting in the lack of ability to capture remote information, and the high computational burden caused by the quadratic complexity of the self-attention mechanism in Transformer-based models. The channel attention mechanism is introduced to refine multi-scale information, improve the model's accuracy in extracting roads, and use connected component analysis to post-process the extracted road results and generate high-quality road vector maps.
[0125] The above is only a preferred embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical solution and inventive concept of the present invention within the scope disclosed by the present invention, which shall fall within the protection scope of the present invention.
Claims
1. A road extraction method for remote sensing images based on VMamba and channel attention, characterized in that: The method comprises: Obtain remote sensing image datasets; Preprocess the remote sensing images in the remote sensing image dataset; Based on the DeepLabV3+ architecture, a MambaDeepLab model is built in combination with the VMamba module; The MambaDeepLab model is trained using the preprocessed remote sensing image dataset to obtain a trained segmentation model. Using the trained segmentation model, the roads in the remote sensing images of the segmented scenes can be extracted. Connected component analysis is used to perform post-processing of disconnection and reconnection on the extracted road results; The road results after disconnection and reconnection are converted from raster to vector to generate a road vector map.
2. The method for extracting roads from remote sensing images according to claim 1, characterized in that: The MambaDeepLab model is an asymmetric encoder-decoder structure network model based on the VMamba module and the channel attention module, including a block embedding layer, an encoder, a spatial pyramid pool, a channel attention module and a decoder; The block embedding layer is used to embed the input image to obtain a processed image; The encoder is used to construct hierarchical features to extract global context information for the processed image; The spatial pyramid pool is used to extract multi-scale information from deep features in the hierarchical features; The channel attention module is used to refine the multi-scale information; The decoder is used to fuse the shallow features in the hierarchical features and the refined multi-scale information and upsample to generate a segmentation map.
3. The remote sensing image road extraction method according to claim 2, characterized in that: The embedding process of the input image to obtain the processed image specifically includes: Divide the input image into non-overlapping blocks of size N×N; Perform dimension mapping on the divided image to obtain a mapped image; The mapped image is normalized to obtain a processed image.
4. The remote sensing image road extraction method according to claim 2, characterized in that: The encoder includes three cascaded VSSLayer layers, the first two VSSLayer layers each include two VSSblock blocks and one PatchMerging block, and the third VSSLayer layer includes six VSSblock blocks and one PatchMerging block; Each VSSblock includes two layer normalization layers, a convolutional layer, two linear layers, two SiLU activation layers and an SS2D module, wherein the SS2D module includes a Cross-Scan module and a pure Mamba module; the PatchMerging block includes a linear layer and a layer normalization layer connected sequentially.
5. The remote sensing image road extraction method according to claim 2, characterized in that: The spatial pyramid pool includes four segmentation windows of different sizes and four corresponding VSSblock blocks, four linear layers and a final linear layer; Each VSSblock includes two layer normalization layers, a convolutional layer, two linear layers, two SiLU activation layers and an SS2D module, and the SS2D module includes a Cross-Scan module and a pure Mamba module.
6. The method for extracting roads from remote sensing images according to claim 2, characterized in that: The channel attention module includes a global average pooling layer, a ReLU activation layer, a Sigmoid activation layer and two fully connected layers.
7. The method for extracting roads from remote sensing images according to claim 2, characterized in that: The decoder includes three cascaded VSSLayer_up layers and a final projection layer, each VSSLayer_up layer includes two VSSblock blocks and a PatchExpaning block, and the final projection layer includes a linear layer, a normalization layer and a convolution layer; Each VSSblock includes two layer normalization layers, a convolutional layer, two linear layers, two SiLU activation layers and an SS2D module, wherein the SS2D module includes a Cross-Scan module and a pure Mamba module; the PatchExpaning block includes a linear layer and a layer normalization layer connected sequentially.
8. A remote sensing image road extraction system based on VMamba and channel attention, characterized in that: The system comprises: A data acquisition unit, used for acquiring remote sensing image data sets; A data preprocessing unit, used for preprocessing remote sensing images in a remote sensing image data set; The model building unit is used to build a MambaDeepLab model based on the DeepLabV3+ architecture and combined with the VMamba module; The model training unit is used to train the MambaDeepLab model using the preprocessed remote sensing image dataset to obtain a trained segmentation model; A road extraction unit, used to extract roads from the remote sensing image using a trained segmentation model; A disconnection reconnection post-processing unit, used for performing disconnection reconnection post-processing on the extracted road results using connected component analysis; The road vector diagram production unit is used to convert the road results processed after disconnection and reconnection into vectors to generate a road vector diagram.
9. A computer device comprising a processor and a memory for storing a program executable by the processor, characterized in that: When the processor executes the program stored in the memory, the remote sensing image road extraction method described in any one of claims 1-7 is implemented.
10. A computer-readable storage medium storing a program, characterized in that: When the program is executed by a processor, the remote sensing image road extraction method described in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Optical remote sensing image segmentation method based on VMama model
CN118365882A
Method and system of extraction of impervious surface of remote sensing image
US20200026953A1
Cited By
Mangrove forest super-resolution mapping method for deep extraction of space-time spectrum features
CN120450957A
Non-uniformity correction method and system based on spatial domain and frequency domain characteristics
CN120580403A