Remote sensing image road extraction method based on feature consistency perception
By designing the initial road extraction network CRE-Net and the feature enhancement and consistency perception module FECP in remote sensing image road extraction, combined with multi-scale feature information, the problem of fragmentation and missing extraction of road extraction results in the deep learning method is solved, and the Higher road extraction accuracy and connectivity.
Patent Information
- Application Number
- CN202410671607.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-28
- Publication Date
- 2024-08-23
Smart Images

Figure CN118537733A
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of photogrammetry data processing, and in particular relates to a remote sensing image road extraction method based on feature consistency perception. Background Art
[0002] Extracting road information from remote sensing images is becoming increasingly important in areas such as urban design, lane detection, and updating geographic information databases. In remote sensing images, roads are affected by shadows, vegetation, and occlusion by buildings and vehicles. These problems lead to discontinuities and omissions of small roads when using deep learning methods for road extraction.
[0003] Commonly used classification algorithms, such as manual feature extraction methods, can be divided into threshold segmentation, edge detection, and machine learning. Among them, threshold segmentation determines the corresponding threshold based on different usage scenarios, and then uses the threshold to distinguish whether the pixel belongs to the road or the background, thereby achieving road extraction. Edge detection uses operators such as Canny, Sobel, and Roberts to identify road boundaries, thereby achieving road extraction. Machine learning methods are based on manually extracted features and use technologies such as maximum likelihood, support vector machines, and Markov random fields to achieve road extraction. Due to the spectral similarity between roads, buildings, and parking lots, these methods are inefficient when dealing with complex road scenes and cannot obtain satisfactory results.
[0004] Fully convolutional neural network (FCN) provides a new idea for road extraction. However, FCN loses feature information during downsampling and lacks a mechanism to take into account the consistency of global feature information. Therefore, the FCN method is affected by the complex background information of the road and cannot effectively utilize the feature information, resulting in fragmented road extraction results and omissions.
[0005] How to use deep learning technology to obtain more contextual information of roads and improve the consistency of road features, and improve the accuracy of road extraction by improving feature utilization, is a major challenge in the field of road extraction at this stage. Summary of the invention
[0006] The purpose of the present invention is to overcome the above-mentioned problems existing in traditional technologies and to provide a remote sensing image road extraction method based on feature consistency perception.
[0007] In order to achieve the above technical objectives and the above technical effects, the present invention is implemented through the following technical solutions:
[0008] The present invention provides a remote sensing image road extraction method based on feature consistency perception, comprising the following steps:
[0009] Step 1: Data set acquisition and sample set production;
[0010] Step 2: Initial road extraction network structure;
[0011] Step 3: Feature enhancement and feature consistency perception module;
[0012] Step 4: Loss function optimization model;
[0013] Step 5: Model result evaluation.
[0014] Furthermore, step one comprises the following sub-steps:
[0015] 1) Obtain the Massachusetts dataset, DeepGlobal dataset, and CHT dataset respectively;
[0016] 2) Use manual labeling to mark road labels on remote sensing images, and crop all remote sensing images and labels to a uniform size of 512×512;
[0017] 3) All data are divided into training sample set and validation sample set in a ratio of 4:1.
[0018] Furthermore, in step 2, the initial road extraction network, namely CRE-Net, was designed by combining the concept of residual structure and the idea of connecting feature layers of different scales; this extraction network performs feature extraction based on the encoder-decoder structure and combines multi-scale features in the encoding and decoding process to obtain richer semantic information and reduce feature loss.
[0019] Furthermore, in step 2, the encoding part consists of four residual stacking blocks, six convolutional layers and a densely connected dilated pyramid module, which is used to capture road context information; the encoding part converts the input image into feature information of size 16×16×512, reducing parameter calculation and increasing the receptive field; each convolutional layer contains a BN layer and a ReLU function; a residual stacking block structure is introduced to solve the gradient vanishing problem in deep learning networks, and a DenseASPP module is used to realize a network coding structure to obtain richer feature information. DenseASPP connects a group of convolutional layers in a densely connected manner, effectively generates dense spatial sampling, and increases the receptive field, so as to obtain multi-scale road feature information, reduce the loss of context information, and better preserve road features.
[0020] Furthermore, in step 2, the decoding part consists of four convolutional layers and five residual superposition blocks to obtain road segmentation results; the decoding structure converts the output features from the encoding structure into a feature map of size 512×512×16; in the upsampling process of the decoding part, feature information of different scales is fused, and the 16×16×512 features of the last layer of the decoding process are converted to a size of 256×256×32, and then this set of feature information is fused with the feature information of the same scale in the encoding process. This operation weakens the impact of information loss in the network, and at the same time integrates the spatial details of the road features into the semantic information, which is conducive to the extraction of road information in the image; CRE-Net is used to convert the input remote sensing image into feature information, capture more contextual information about the road, thereby realizing the preliminary extraction of road feature information, and preparing feature information of different scales for the subsequent FECP module.
[0021] Furthermore, in step 3, during the downsampling process of the initial road extraction network, feature information is lost, resulting in insufficient context information for road feature extraction. Therefore, when designing the road extraction network, the extraction of road context information is considered and information loss is minimized. In order to solve this problem, the present invention designs a network module of a feature enhancement and consistency perception module (FECP module); in the FECP module, in order to reduce the loss of feature information, the feature information of a size of 512×512×16 is first downsampled to 256×256×32, which is consistent with the size of the previous feature layer; then, the two sets of feature information are fused to obtain feature information of a size of 256×256×32, represented as p1; in order to include more spatial information in the feature information, p1 is merged with the downsampled feature information from CRE-Net to obtain a size of 128×128×64, represented as p2; p2 not only contains rich semantic information, but also contains spatial information of the road; in order to further enrich the semantic information in the feature, p2 is downsampled to 64×64×64 and convolved with the feature information of the same scale, and finally feature information of a size of 64×64×64 is obtained, represented as p3; finally, the fused multi-scale feature p3 is used as the output of the module, represented as pc, and finally the segmentation result of the road is obtained through pc.
[0022] Furthermore, in step 4, in order to solve the problem of insufficient road background information in high-resolution remote sensing images, the present invention adopts two different types of loss functions in the CRE-Net and FECP modules. The loss function used in the CRE-Net is called Loss1, and the loss function in the FECP module is called Loss2. These loss functions are composed of binary cross entropy, Dice coefficient and IoU loss. In the training process of FECP-Net, Loss1 and Loss2 are combined with different weights to highlight the characteristics of the road, enhance the consistency of the extracted road, repair the preliminary extraction results, and improve the integrity of the road extraction results. The specific operations are as follows:
[0023] Loss1=W1*BCE_loss+W2*DICE_loss+W3*iou_loss (1)
[0024] Loss2=W4*BCE_loss+W5*DICE_loss+W6*iou_loss (2)
[0025] Loss=Loss1+Loss2 (3)
[0026] BCE_loss(S P ,S L )=-W(S L *ln(S P )+(1-S L )*log(1-S P )) (4)
[0027]
[0028] Where S P represents the predicted value, S L Indicates the label, S i represents the intersection between the predicted value and the label, S U Represents the union of the predicted value and the label; in actual operation, W1=W2=0.4, W3=0.2, W4=W5=0.2, W6=0.6 are set. This way of allocating weights highlights the importance of road information in remote sensing images, improves the distinction between roads and backgrounds, and improves the model's ability to extract roads.
[0029] Furthermore, in step 5, three indicators, namely recall rate, IoU and F1 score, are selected to evaluate the performance of the model in the road extraction process; among them, recall rate and IoU are used to evaluate the quality of road extraction results, and the latter is mainly used to evaluate the shape and area of the road extracted by the model; recall rate represents the ratio of correctly predicted true pixels to actual true pixels; F1 score is defined as the harmonic mean of precision and recall rate; IoU represents the ratio of the intersection of the true value and the predicted value to their union; the road extraction task is a binary classification problem, and the prediction results are divided into road and background. The calculation formulas of these evaluation indicators are as follows:
[0030]
[0031] The beneficial effects of the present invention are:
[0032] 1. The present invention provides a method for extracting roads from remote sensing images based on feature consistency perception. The feature consistency perception network consists of two parts: an initial road extraction network (CRE-Net) and a feature enhancement and feature consistency perception module (FECP module). CRE-Net is used to obtain the initial information and features of the road, while the FECP module is used to combine the rough road information with the multi-scale road feature information, minimize the loss of feature information, and improve the road extraction performance of the network. FECP-Net enhances the consistency of road features, enriches the feature information of the road, improves the problem of road disconnection and fragmentation caused by building shadows or other ground objects, and enhances the connectivity and integrity of the road extraction results.
[0033] 2. The FECP module introduced in the present invention combines feature information of different scales, and by combining the initial road information with multi-scale feature information, it can better utilize the multi-scale information, reduce the loss of feature information, and improve network performance.
[0034] 3. The loss function designed by the present invention highlights the difference between road boundary information and background information, enabling the network to better identify road features. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for describing the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0036] Figure 1 It is a general model structure diagram of an embodiment of the present invention;
[0037] Figure 2 Result diagrams of road extraction of different models according to embodiments of the present invention. DETAILED DESCRIPTION
[0038] 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.
[0039] See also Figure 1-Figure 2 As shown, this embodiment provides a remote sensing image road extraction method based on feature consistency perception, comprising the following steps:
[0040] Step 1: Data set acquisition and sample set production;
[0041] Step 2: Initial road extraction network structure;
[0042] Step 3: Feature enhancement and feature consistency perception module;
[0043] Step 4: Loss function optimization model;
[0044] Step 5: Model result evaluation.
[0045] Step 1 specifically includes the following:
[0046] 1) Obtain the Massachusetts dataset, DeepGlobal dataset, and CHT dataset respectively;
[0047] 2) Use manual labeling to mark road labels on remote sensing images, and crop all remote sensing images and labels to a uniform size of 512×512;
[0048] 3) All data are divided into training sample set and validation sample set in a ratio of 4:1.
[0049] Step 2 specifically includes the following:
[0050] This embodiment combines the concept of residual structure and the idea of connecting feature layers of different scales to design an initial road extraction network, namely CRE-Net. The extraction network performs feature extraction based on the encoder-decoder structure and combines multi-scale features in the encoding and decoding process to obtain richer semantic information and reduce feature loss.
[0051] The encoding part consists of four residual stacking blocks, six convolutional layers, and a densely connected dilated pyramid module to capture road context information. The encoding part converts the input image into feature information of size 16×16×512, reducing parameter calculation and increasing the receptive field. Each convolutional layer contains a BN layer and a ReLU function. In addition, a residual stacking block structure is introduced to solve the gradient vanishing problem in deep learning networks. In order to enable the network coding structure to obtain richer feature information, the DenseASPP module is also used. DenseASPP connects a set of convolutional layers in a densely connected manner, effectively generating dense spatial sampling and increasing the receptive field, thereby obtaining multi-scale road feature information, reducing the loss of context information, and better preserving road features.
[0052] The decoding part consists of four convolutional layers and five residual stacking blocks, aiming to obtain road segmentation results. The decoding structure converts the output features from the encoding structure into a feature map of size 512×512×16. During the upsampling process of the decoding part, feature information of different scales is fused. For example, the 16×16×512 features of the last layer of the decoding process are converted to a size of 256×256×32, and then this set of feature information is fused with the feature information of the same scale in the encoding process. This operation weakens the impact of information loss in the network, and at the same time integrates the spatial details of road features into semantic information, which is conducive to the extraction of road information in the image. The purpose of CRE-Net is to convert the input remote sensing image into feature information, capture more contextual information about the road, so as to achieve preliminary extraction of road feature information and prepare feature information of different scales for the subsequent FECP module.
[0053] Step 3 specifically includes the following:
[0054] During the downsampling process of the initial road extraction network, there is a loss of feature information, resulting in insufficient contextual information for road feature extraction. Therefore, when designing the road extraction network, the extraction of road context information is considered and the information loss is minimized. In order to solve this problem, this embodiment designs a network module of a feature enhancement and consistency perception module (FECP module). In the FECP module, in order to reduce the loss of feature information, the feature information of size 512×512×16 is first downsampled to 256×256×32, which is consistent with the size of the previous feature layer. Then, the two sets of feature information are fused to obtain feature information of size 256×256×32, denoted as p1. In order to include more spatial information in the feature information, p1 is merged with the downsampled feature information from CRE-Net to obtain a size of 128×128×64, denoted as p2. p2 contains not only rich semantic information, but also spatial information of the road. In order to further enrich the semantic information in the features, p2 is downsampled to 64×64×64 and convolved with the feature information of the same scale to finally obtain feature information of size 64×64×64, denoted as p3. Finally, the fused multi-scale feature p3 is used as the output of the module, denoted as pc, and the road segmentation result is finally obtained through pc.
[0055] Step 4 specifically includes the following:
[0056] In order to solve the problem of insufficient road background information in high-resolution remote sensing images, this embodiment uses two different types of loss functions in the CRE-Net and FECP modules. The loss function used in CRE-Net is called Loss1, and the loss function in the FECP module is called Loss2. These loss functions are composed of binary cross entropy, Dice coefficient, and IoU loss. During the training process of FECP-Net, Loss1 and Loss2 are combined with different weights to highlight the characteristics of the road, enhance the consistency of the extracted roads, repair the preliminary extraction results, and improve the integrity of the road extraction results. The specific operations are as follows:
[0057] Loss1=W1*BCE_loss+W2*DICE_loss+W3*iou_loss (1)
[0058] Loss2=W4*BCE_loss+W5*DICE_loss+W6*iou_loss (2)
[0059] Loss=Loss1+Loss2 (3)
[0060] BCE_loss(S P ,S L )=-W(SL *ln(S P )+(1-S L )*log(1-S P )) (4)
[0061]
[0062] Where S P represents the predicted value, S L Indicates the label, S i represents the intersection between the predicted value and the label, S U Represents the union of the predicted value and the label. In actual operation, W1=W2=0.4, W3=0.2, W4=W5=0.2, W6=0.6 are set. This way of allocating weights highlights the importance of road information in remote sensing images, improves the distinction between roads and backgrounds, and improves the ability of model road extraction.
[0063] Step 5 specifically includes the following:
[0064] The recall rate, IoU and F1 score are selected to evaluate the performance of the model in the road extraction process. Among them, the recall rate and IoU are used to evaluate the quality of the road extraction results, and the latter is mainly used to evaluate the shape and area of the road extracted by the model. The recall rate represents the ratio of correctly predicted true pixels to the actual true pixels. The F1 score is defined as the harmonic mean of precision and recall. IoU represents the ratio of the intersection of the true value and the predicted value to their union. The road extraction task in this embodiment is a binary classification problem, and the prediction results are divided into roads and backgrounds. The calculation formulas of these evaluation indicators are as follows:
[0065]
[0066] A specific application of this embodiment is:
[0067] The Massachusetts dataset, DeepGlobal dataset, and CHT dataset were obtained, manually annotated, and cropped to obtain 10854, 24904, and 12908 sample sets of 512×512 in size, respectively. All samples were divided into training sample sets and validation sample sets in a ratio of 4:1. TensorFlow1.13 was used as the deep learning framework, the development platform was JetBrains PyCharm2020, and the programming language was Python 3.6. All models were run on computers equipped with Intel Xeon Gold 6148 CPU and NVIDIA Tesla V100-PCIE graphics cards. FECP-Net used Adam as an adaptive network optimizer, input images of 512×512 size, batch size was 4, the number of training rounds was 80, 3000 iterations per round, and the initial learning rate was set to 1e-3. During the model training process, the learning rate will automatically decrease as the number of learning rounds increases to help the model converge faster.
[0068] The comparison of the accuracy verification results of different models is shown in Table 1:
[0069] Table 1 Comparison of accuracy verification results of different models
[0070]
[0071]
[0072] Compared with other networks, the IoU of this embodiment method is improved by 14.82%, 11.31% and 11.08% respectively. The recall rate is improved by 9.76%, 7.38% and 7.20% respectively. The F1 score is improved by 8.12%, 8.56% and 5.10% respectively. Figure 2 From the above, we can see that although DGRN, D-LinkNet and U-net can extract the basic contours of the road, FECP-net can produce smoother, more complete and closer to the actual surface extraction results. In addition, compared with other methods, FECP-Net has also improved in various accuracy indicators, further verifying the feasibility and superiority of FECP-Net for road extraction tasks.
[0073] The preferred embodiments of the present invention disclosed above are only used to help explain the present invention. The preferred embodiments do not describe all the details in detail, nor do they limit the invention to specific implementation methods. Obviously, many modifications and changes can be made according to the content of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present invention, so that those skilled in the art can understand and use the present invention well. The present invention is limited only by the claims and their full scope and equivalents.
Claims
1. A remote sensing image road extraction method based on feature consistency perception, characterized in that: The following steps are involved: Step 1: Data set acquisition and sample set production; Step 2: Initial road extraction network structure; Step 3: Feature enhancement and feature consistency perception module; Step 4: Loss function optimization model; Step 5: Model result evaluation.
2. The method for extracting roads from remote sensing images based on feature consistency perception according to claim 1, characterized in that: Step 1 includes the following steps: 1) Obtain the Massachusetts dataset, DeepGlobal dataset, and CHT dataset respectively; 2) Use manual labeling to mark road labels on remote sensing images, and crop all remote sensing images and labels to a uniform size of 512×512; 3) All data are divided into training sample set and validation sample set in a ratio of 4:
1.
3. The method for extracting roads from remote sensing images based on feature consistency perception according to claim 2, characterized in that: In step 2, the initial road extraction network, namely CRE-Net, was designed by combining the concept of residual structure and the idea of connecting feature layers of different scales. This extraction network performs feature extraction based on the encoder-decoder structure and combines multi-scale features in the encoding and decoding process to obtain richer semantic information and reduce feature loss.
4. The method for extracting roads from remote sensing images based on feature consistency perception according to claim 3 is characterized in that: In step 2, the encoding part consists of four residual stacking blocks, six convolutional layers and a densely connected dilated pyramid module to capture road context information; the encoding part converts the input image into feature information of size 16×16×512, reducing parameter calculation and increasing the receptive field; each convolutional layer contains a BN layer and a ReLU function; a residual stacking block structure is introduced to solve the gradient vanishing problem in deep learning networks, and a DenseASPP module is used to implement a network coding structure to obtain richer feature information. DenseASPP connects a group of convolutional layers in a densely connected manner, effectively generating dense spatial sampling and increasing the receptive field, thereby obtaining multi-scale road feature information, reducing the loss of context information, and better preserving road features.
5. The method for extracting roads from remote sensing images based on feature consistency perception according to claim 4, characterized in that: In step 2, the decoding part consists of four convolutional layers and five residual superposition blocks to obtain road segmentation results; the decoding structure converts the output features from the encoding structure into a feature map of size 512×512×16; in the upsampling process of the decoding part, feature information of different scales is fused, and the 16×16×512 features of the last layer of the decoding process are converted to a size of 256×256×32, and then this set of feature information is fused with the feature information of the same scale in the encoding process. This operation weakens the impact of information loss in the network, and at the same time integrates the spatial details of the road features into the semantic information, which is conducive to the extraction of road information in the image; CRE-Net is used to convert the input remote sensing image into feature information, capture more contextual information about the road, thereby realizing the preliminary extraction of road feature information and preparing feature information of different scales for the subsequent FECP module.
6. The method for extracting roads from remote sensing images based on feature consistency perception according to claim 5, characterized in that: In step three, the network modules of feature enhancement and consistency perception modules are designed; in the FECP module, in order to reduce the loss of feature information, the feature information of size 512×512×16 is first downsampled to 256×256×32, which is consistent with the size of the previous feature layer; then, the two sets of feature information are fused to obtain feature information of size 256×256×32, denoted as p1; in order to include more spatial information in the feature information, p1 is merged with the downsampled feature information from CRE-Net to obtain a size of 128×128×64, denoted as p2; p2 not only contains rich semantic information, but also contains spatial information of the road; in order to further enrich the semantic information in the feature, p2 is downsampled to 64×64×64 and convolved with the feature information of the same scale, and finally the feature information of size 64×64×64 is obtained, denoted as p3; finally, the fused multi-scale feature p3 is used as the output of the module, denoted as pc, and finally the segmentation result of the road is obtained through pc.
7. The method for extracting roads from remote sensing images based on feature consistency perception according to claim 6, characterized in that: In step 4, two different types of loss functions are used in the CRE-Net and FECP modules. The loss function used in CRE-Net is called Loss1, and the loss function in the FECP module is called Loss2. These loss functions are composed of binary cross entropy, Dice coefficient and IoU loss. During the training process of FECP-Net, Loss1 and Loss2 are combined with different weights to highlight the characteristics of the road, enhance the consistency of the extracted roads, repair the preliminary extraction results, and improve the integrity of the road extraction results. The specific operations are as follows: Loss1=W1*BCE_loss+W2*DICE_loss+W3*iou_loss (1) Loss2=W4*BCE_loss+W5*DICE_loss+W6*iou_loss (2) Loss=Loss1+Loss2 (3) BCE_loss(S P ,S L )=-W(S L *ln(S P )+(1-S L )*log(1-S P )) (4) Where S P represents the predicted value, S L Indicates the label, S i represents the intersection between the predicted value and the label, S U Represents the union of the predicted value and the label; in actual operation, W1=W2=0.4, W3=0.2, W4=W5=0.2, W6=0.6 are set. This way of allocating weights highlights the importance of road information in remote sensing images, improves the distinction between roads and backgrounds, and improves the model's ability to extract roads.
8. The method for extracting roads from remote sensing images based on feature consistency perception according to claim 7, characterized in that: In step 5, three indicators, namely recall rate, IoU and F1 score, are selected to evaluate the performance of the model in the road extraction process; among them, recall rate and IoU are used to evaluate the quality of road extraction results, and the latter is mainly used to evaluate the shape and area of the road extracted by the model; recall rate represents the ratio of correctly predicted true pixels to actual true pixels; F1 score is defined as the harmonic mean of precision and recall rate; IoU represents the ratio of the intersection of the true value and the predicted value to their union; the road extraction task is a binary classification problem, and the prediction results are divided into road and background. The calculation formulas of these evaluation indicators are as follows:
Citation Information
Cited By
Forest region road network model construction method and device considering terrain constraint and crown shielding
CN119863711A
Forest road network model construction method and device considering terrain constraint and tree crown shelter
CN119863711B
Image segmentation method based on lightweight feature extraction and multi-receptive-field feature interaction
CN120495654A
