A method, system, device and medium for extracting roads in high-resolution remote sensing images based on a multi-head self-attention mechanism

CN116402690BActive Publication Date: 2026-08-28XIDIAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310435422.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-21
Publication Date
2026-08-28
Estimated Expiration
2043-04-21

AI Technical Summary

Technical Problem

[0006]1.现有的道路提取深度学习模型常常针对的是简单的且连通性好的道路,对于有建筑和树木遮挡的情况下,道路提取精度低

Benefits of technology

[0047] 1. This invention uses the Canny edge detection operator on the training set. By performing edge detection on the roads, more road information features are added, thus reducing the network's processing time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116402690B_ABST
    Figure CN116402690B_ABST
Patent Text Reader

Abstract

A kind of high-resolution remote sensing image road extraction method, system, equipment and medium based on multi-head self-attention mechanism, method includes: the high-resolution remote sensing image obtained from satellite is preprocessed, and high-resolution remote sensing image dataset D e High-resolution remote sensing image dataset D e Proportionally divided into training set verification set and test set design builds high-resolution remote sensing image road extraction network based on deep learning;Network loss is calculated;Network training parameter is set;Network training;Network test;Result evaluation;System, equipment and medium are used to realize a kind of high-resolution remote sensing image road extraction method based on multi-head self-attention mechanism;The present application utilizes Canny edge operator to pre-process road remote sensing image, obtains the edge feature of road in remote sensing image;Based on U-Net model, fuse multi-head self-attention mechanism module, solve the problem that the prior art parameter quantity is large, time-consuming is more, road extraction precision is low.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of road extraction technology, specifically relating to a method, system, device, and medium for road extraction from high-resolution remote sensing images based on a multi-head self-attention mechanism. Background Technology

[0002] As a fundamental part of national geographic information, roads play a vital role in modern society, serving as a necessary prerequisite for applications such as vehicle navigation, urban spatial planning, smart city construction, and geographic information system updates. With the rapid development of remote sensing technology, remote sensing imagery data exhibits high spatiotemporal resolution and continuously improving image quality, leading to its widespread application in research fields such as ground feature extraction. However, in high-resolution remote sensing images with highly detailed information, the automatic and accurate extraction of roads remains a significant challenge due to complex road backgrounds, varied topological structures, shadow occlusion, and the "different spectrums of the same object" problem.

[0003] In recent years, scholars both domestically and internationally have conducted extensive research on road extraction from high-resolution remote sensing images, proposing various methods for different application areas of road information. Traditional road extraction methods can be categorized into two types based on the extraction level: ① Feature-level methods, which utilize the spectral, textural, and geometric topological features of the road itself, extracting the road skeleton through template matching or knowledge-driven algorithms. The former yields good road extraction results but requires significant human intervention, involves numerous seed points, and has low automation; the latter has low human involvement but suffers from high computational complexity and inefficient operation. ② Object-level methods, which treat the road region as a whole, extracting road information from high-resolution images through algorithms such as image segmentation and clustering, support vector machines, and conditional random fields. However, these methods are complex, unstable, and susceptible to uneven pixel grayscale variations, resulting in problems such as fragmentation, misextraction, omissions, and missing information. The road extraction results are poor, and post-processing is time-consuming and laborious, making them unsuitable for large-scale road extraction. Therefore, a fast and accurate high-resolution remote sensing image road extraction method is urgently needed in complex scenarios.

[0004] Currently, computer vision and artificial intelligence are developing rapidly. Deep learning-based road extraction algorithms only require a small amount of manually labeled image data. After training a neural network model, they can extract road information from the images. Their excellent performance has attracted many researchers. However, this method also has limitations. For example, it is difficult to obtain labeled remote sensing images. When the amount of sample data is small, training a complex neural network can easily lead to overfitting, resulting in unsatisfactory accuracy of extracted road information. The emergence of transfer learning can effectively solve this limitation. Through transfer learning, the model weight parameters trained on large open-source datasets on the Internet can be transferred to new classification tasks. The new classification task does not need to be retrained. Only some parameters need to be trained to complete the training task more efficiently and accurately. This provides a carrier for the transfer of weight parameters in deep neural networks, enabling ideal training results to be achieved with a small amount of labeled data.

[0005] Defects and shortcomings of existing technology:

[0006] 1. Existing deep learning models for road extraction are often designed for simple roads with good connectivity. When there are buildings and trees blocking the road, the road extraction accuracy is low.

[0007] 2. Existing technologies are mainly designed for low-resolution remote sensing images.

[0008] Existing technologies often achieve high-precision flow path extraction by combining multiple sub-modules, resulting in a large number of model parameters, long training time, and high hardware requirements.

[0009] Patent application number [2022111592229] discloses a method for road extraction from high-resolution remote sensing images that integrates multiple attention mechanisms. The method's implementation steps are as follows: First, it extracts higher-dimensional road feature information based on a dilated residual collaborative attention network combined with a dilated convolution module. Second, it uses a lightweight self-attention module in the U-shaped skip connection part to capture long-distance dependencies of feature information. Third, it employs a channel-oriented cross-attention module to eliminate ambiguity between the self-attention mechanism module and the decoder features, improving the feature map reconstruction capability. Fourth, it uses training weights to predict unlabeled remote sensing images, calculates entropy values, and uses the high-entropy prediction results to label the unlabeled images, mixing them with the original labels and inputting them into the training network. This method achieves road extraction from remote sensing images. However, the method still has shortcomings: due to the integration of multiple sub-modules, the model has a large number of parameters, and the road extraction accuracy remains relatively low. Summary of the Invention

[0010] To overcome the shortcomings of the prior art, the present invention aims to provide a method, system, device, and medium for road extraction from high-resolution remote sensing images based on a multi-head self-attention mechanism. This method utilizes the Canny edge operator to preprocess road remote sensing images, obtaining edge features of roads within the images. Based on the U-Net model and incorporating a multi-head self-attention mechanism module, it can capture long-distance dependencies of feature information while reducing the number of model parameters, improving model efficiency and road extraction accuracy. This invention, through a deep learning remote sensing image road extraction method incorporating multi-head self-attention, effectively establishes long-distance channel and location information relationships for roads, improving the accuracy and efficiency of road extraction from remote sensing images in complex environments.

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

[0012] A method for road extraction from high-resolution remote sensing images based on a multi-head self-attention mechanism includes the following steps:

[0013] Step 1: Preprocess the high-resolution remote sensing images acquired from the satellite to obtain the high-resolution remote sensing image dataset D. e The high-resolution remote sensing image dataset D e Divide into training sets proportionally. Validation set and test set

[0014] Step 2: Design and build a high-resolution remote sensing image road extraction network based on deep learning;

[0015] Step 3, calculate network loss; construct the binary cross-entropy loss function Loss, and calculate the loss between the predicted result and the true label;

[0016] Step 4, set the network training parameters; the training parameters include the number of units in the hidden layer, batch size, number of learning epochs, and learning rate;

[0017] Step 5, Network Training; using the training set obtained in Step 1 The network built in step 2 is trained, and at the end of each training session, a corresponding weight file W is obtained. i Where i represents the current training epoch of the network; input the validation set from step 1. The Dice similarity coefficient was used as the evaluation criterion for the weighted file W. i The evaluation process concludes by saving the weighted file W with the highest Dice similarity coefficient value. t , where t < i;

[0018] Step 6, Network Testing; Use the test set obtained in Step 1. Input the data into the network built in step 2, and use the weight file W obtained in step 5. t Road extraction is performed to obtain a binary image dataset B containing road information;

[0019] Step 7, Result Evaluation; Calculate the binarized image dataset B and dataset B. The average intersection-to-union ratio (mIoU) is used to evaluate the performance of the network built in step 2.

[0020] The implementation method of step 1 includes:

[0021] Step 101: Dataset Acquisition; Acquire a high-resolution remote sensing image dataset N containing road information from satellites. Use Labelme software to delineate the roads contained in the high-resolution remote sensing image dataset N, and use all the delineated images as the ground truth label dataset S; Perform sliding cropping on each image in both the high-resolution remote sensing image dataset N and the ground truth label dataset S, with each cropped image having a size of 512×512, to obtain dataset N. c and S c Dataset N c and S c Composing a high-resolution remote sensing image dataset D = {N c ,S c};

[0022] Step 102: Dataset Augmentation; Perform mirroring and random rotation data augmentation operations on each image in the dataset D obtained in Step 101 to obtain the augmented dataset D. e ={N e ,S e}, where N e Represents dataset N c Augmented dataset, S e Represents dataset S c Enhanced dataset;

[0023] Step 103: Dataset partitioning; partition the dataset D obtained in step 102. e Divided into training set Validation set and test set

[0024] The implementation method of step 2 includes:

[0025] Step 201: Road edge information extraction; input the training set obtained in step 103. Use the Canny operator on the training set Perform edge detection to obtain the processed dataset.

[0026] Step 202: Calculate the weights; use a multi-head self-attention mechanism to calculate the weights of the outputs of different hidden layers;

[0027] Step 203: Construct the U-Net network; input the network with the dataset processed in step 201. The network output consists of extracted road information features.

[0028] The formula for calculating the binary cross-entropy loss function Loss in step 3 is as follows:

[0029]

[0030] Where y is the true label. This is the predicted result; when y is 0, the first part of the formula is 0. The value needs to be as close to 0 as possible to make the second half of the value smaller; when y is 1, the second half is 0. It needs to be as close to 1 as possible to make the value of the second half smaller, thus achieving the result of getting as close as possible to y.

[0031] In step 4: the training epoch is set to be greater than or equal to 200, the batch size is set to be greater than or equal to 8, and the learning rate is set to be less than or equal to 10. -4 The set loss threshold is less than or equal to 0.002.

[0032] The formula for calculating the Dice similarity coefficient in step 5 is as follows:

[0033]

[0034] Where |X| represents the number of elements in set X, |Y| represents the number of elements in set Y, and |X∩Y| represents the number of elements common to sets X and Y.

[0035] The formula for calculating the average intersection-union ratio (mIoU) in step 7 is as follows:

[0036]

[0037] In this context, TP represents true positive, FP represents false positive, and FN represents false negative.

[0038] This invention also provides a road extraction system for high-resolution remote sensing images based on a multi-head self-attention mechanism, comprising:

[0039] Dataset module: Used to acquire historical high-resolution satellite remote sensing images and preprocess them to build training datasets;

[0040] Network building module: used to integrate the multi-head self-attention mechanism module into the U-Net network and add the Canny edge measurement operator at the beginning of the U-Net network;

[0041] Network training module: used to calculate the Dice similarity coefficient and loss function of the network, input the training dataset into the network model, train the network according to the Dice similarity coefficient, and obtain the weight file with the maximum Dice value and the loss value less than a set threshold.

[0042] The present invention also provides a road extraction device for high-resolution remote sensing images based on a multi-head self-attention mechanism, comprising:

[0043] Memory, used to store computer programs;

[0044] A processor is used to implement the method for road extraction from high-resolution remote sensing images based on a multi-head self-attention mechanism when executing the computer program.

[0045] The present invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, enables a method for extracting roads from high-resolution remote sensing images based on a multi-head self-attention mechanism.

[0046] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0047] 1. This invention uses the Canny edge detection operator on the training set. By performing edge detection on the roads, more road information features are added, thus reducing the network's processing time.

[0048] 2. This invention employs a multi-head self-attention mechanism to calculate the weights of different hidden layer outputs, thereby reducing computational complexity and improving the accuracy of road extraction in complex environments.

[0049] 3. This invention uses the binary cross-entropy loss function Loss to calculate the loss between the predicted result and the true label, thus eliminating the uncertainty of the network model, accelerating the convergence speed of the model parameters, and reducing the processing time of the network.

[0050] In summary, this invention employs the Canny edge operator to preprocess road remote sensing images, obtaining the edge features of roads within the images. By integrating a lightweight multi-head self-attention mechanism module, it can capture long-range dependencies of feature information while reducing the number of model parameters, thus improving model efficiency and road extraction accuracy. This invention, through a deep learning-based road extraction method for remote sensing images incorporating lightweight multi-head self-attention, effectively establishes the relationship between long-range road channels and location information, improving the accuracy and efficiency of road extraction from remote sensing images. It solves the problems of large parameter count, high time consumption, and low road extraction accuracy in existing technologies. Attached Figure Description

[0051] Figure 1 This is a flowchart illustrating the principle of an embodiment of the present invention.

[0052] Figure 2 This is a network structure diagram of the road extraction model in an embodiment of the present invention.

[0053] Figure 3 This is a structural diagram of the multi-head self-attention module according to an embodiment of the present invention.

[0054] Figure 4 This is a diagram of the U-Net structure according to an embodiment of the present invention.

[0055] Figure 5 This is a simulation diagram of the present invention; wherein, Figure 5 (a) is the original remote sensing image. Figure 5 (b) is a real labeled image. Figure 5 (c) The image after road extraction of the original image 5(a) using the method of the present invention. Detailed Implementation

[0056] To make the technical problems solved by the present invention, the technical solutions, and the beneficial effects clearer, the following specific embodiments provide a further detailed description of the present invention. It should be understood that the specific embodiments described herein are merely illustrative and are not intended to limit the scope of the invention.

[0057] like Figure 1 As shown, a method for road extraction from high-resolution remote sensing images based on a multi-head self-attention mechanism includes the following steps:

[0058] Step 1: Preprocess the high-resolution remote sensing images acquired from the satellite to obtain the high-resolution remote sensing image dataset D. e The high-resolution remote sensing image dataset D e Divide into training sets proportionally. Validation set and test set

[0059] The implementation method of step 1 includes:

[0060] Step 101: Dataset Acquisition; Acquire a high-resolution remote sensing image dataset N containing road information from satellites, where N = {N1, N2, ..., N}. m}, m∈[1,50], where N m Let N represent the m-th image. m The size is 8192×4096; the roads contained in the high-resolution remote sensing image dataset N are delineated using Labelme software, and all the delineated images are used as the ground label dataset S, S={s1,s2,s3,……,s m ,},n∈[1,50], where,s m Let m be the m-th real-labeled image. For each image in the high-resolution remote sensing image dataset N and the real-labeled image dataset S, a sliding cropping process is performed, resulting in a 512×512 image of size. This yields dataset N. c and S c Dataset N c and S c Composing a high-resolution remote sensing image dataset D = {N c ,S c};

[0061] Step 102: Data Augmentation; Perform mirroring and random rotation data augmentation operations on each image in the dataset D obtained in Step 101 to obtain the data-augmented dataset D. e ={N e ,S e}, where N e Represents dataset N c Augmented dataset, S e Represents dataset S c The enhanced dataset includes left-right, top-bottom, and full mirror images, and rotations of 90° and 180°.

[0062] Step 103: Dataset partitioning; partition the dataset D obtained in step 102. e The training set was divided into two groups in a ratio of 7:2:1. Validation set and test set

[0063] Step 2: Design and build a high-resolution remote sensing image road extraction network based on deep learning;

[0064] The implementation method of step 2 includes:

[0065] Step 201: Road edge information extraction; input the training set obtained in step 103. Use the Canny operator on the training set Perform edge detection to obtain the processed dataset. The Canny operator is represented as:

[0066]

[0067] Among them, G x G represents the gradient value of pixels in the horizontal direction in an image. y This represents the gradient value of a pixel in the vertical direction of the image.

[0068] The Canny edge detection operator can smooth images, suppress noise to a certain extent, and selectively process gradient images, which is beneficial for locating and refining edges. Compared with other operators, the Canny operator has higher stability and signal-to-noise ratio. Using the Canny operator for preprocessing remote sensing images is beneficial for extracting road edge information from them.

[0069] like Figure 3 As shown, step 202: Calculate the weights; use a multi-head self-attention mechanism to calculate the weights of the outputs of different hidden layers. The multi-head self-attention mechanism is represented as follows:

[0070] head i =Self-Attention(QW) i Q ,KW i K VW i V )

[0071] MultiHead(Q,K,V)=Concat(head1,head2,…head i …,head h W Q

[0072] Among them, head i Let represent the i-th self-attention mechanism, Self-Attention(·) denote the self-attention mechanism function, Q, K, and V represent Query, Key, and Value, respectively, and W... Q W K and W V This represents three trainable parameter matrices. MultiHead(·) represents the multi-head self-attention mechanism, and Concat represents the connection between multiple objects (the beginning and end of vectors are connected).

[0073] Multi-head self-attention is an improvement on the self-attention mechanism. It can capture long-distance dependencies well and is fast and highly interpretable. Using multi-head self-attention can effectively extract more road information.

[0074] like Figure 4 As shown, step 203: Construct the U-Net network; the network input is the dataset processed in step 201. The network output consists of extracted road information features.

[0075] U-Net, a U-shaped symmetrical semantic segmentation model, mainly consists of a downsampling path and a symmetrical upsampling path. The downsampling path primarily acquires contextual semantic information, while the symmetrical upsampling path is mainly used to locate the target position. U-Net is trained using image patches, so the amount of training data is much larger than the number of training images, allowing the network to achieve invariance and robustness even with a small number of samples. Using U-Net as a baseline network, combined with a multi-head self-attention mechanism, can effectively improve the robustness of the network model and the accuracy of road extraction.

[0076] Step 3, calculate the network loss; construct the binary cross-entropy loss function Loss, and calculate the loss between the predicted result and the true label according to the following formula:

[0077]

[0078] Where y is the true label. This is the prediction result. The binary cross-entropy loss function is suitable for binary classification problems. When y is 0, the first part of the formula is 0. The value needs to be as close to 0 as possible to make the second half of the value smaller; when y is 1, the second half is 0. It needs to be as close to 1 as possible to make the value of the second half smaller, thus achieving the result of getting as close as possible to y.

[0079] Step 4, set network training parameters. Set the training epochs to 300, the batch size to 8, and the learning rate to 10. -4 The set loss threshold is 0.002.

[0080] Step 5, Network Training; using the training set obtained in Step 103 The network built in step 2 is trained, and at the end of each training session, a corresponding weight file W is obtained. i , where i represents the current training epoch of the network;

[0081] Input the validation set in step 103 The Dice similarity coefficient was used as the evaluation criterion for the weighted file W. i The evaluation process concludes by saving the weighted file W with the highest Dice similarity coefficient value. t , where t < i; where, the Dice similarity coefficient is a set similarity measure function used to measure the degree of overlap between two sample values. The measure value is between [0,1], and the larger the value, the better the prediction result. The calculation formula is as follows:

[0082]

[0083] Where |X| represents the number of elements in set X, |Y| represents the number of elements in set Y, and |X∩Y| represents the number of elements common to sets X and Y.

[0084] Step 6, Network Testing; The test set obtained in Step 103... The input is fed into the network in step 2, using the weight file W obtained in step 5. t Road extraction is performed to obtain a binary image dataset B containing road information;

[0085] Step 7, Result Evaluation; Calculate the binarized image dataset B and dataset B. The mean Intersection over Union (mIoU) metric is used to evaluate the performance of the network built in step 2. mIoU is a standard metric for semantic segmentation, calculated as the average of the intersections and unions of all categories. A higher mIoU value indicates a better result. The calculation formula is as follows:

[0086]

[0087] In this context, TP represents true positive, FP represents false positive, and FN represents false negative.

[0088] like Figure 2 As shown, the present invention also provides a road extraction system for high-resolution remote sensing images based on a multi-head self-attention mechanism, comprising:

[0089] Dataset module: Used to acquire historical high-resolution satellite remote sensing images of the city in step 1 and perform preprocessing to build a training dataset;

[0090] Network building module: used to integrate the multi-head self-attention mechanism module into the U-Net network in step 2, and add the Canny edge measurement operator at the beginning of the U-Net network;

[0091] Network training module: It is used to calculate the Dice similarity coefficient and loss function Loss of the network in steps 3, 4, 5, 6 and 7 respectively, input the training dataset into the network model, train the network according to the Dice similarity coefficient, and obtain the weight file with the maximum Dice value and the loss value less than the set threshold.

[0092] The present invention also provides a road extraction device for high-resolution remote sensing images based on a multi-head self-attention mechanism, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of a road extraction method for high-resolution remote sensing images based on a multi-head self-attention mechanism.

[0093] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of a road extraction method in high-resolution remote sensing images based on a multi-head self-attention mechanism.

[0094] The effects of this invention will be further illustrated below with simulation experiments:

[0095] 1. Simulation Experiment Conditions

[0096] The hardware platform for the simulation experiment of this invention is: Intel i5-10400F processor with a main frequency of 2.9GHz and 16G RAM.

[0097] The software platform of the simulation experiment platform of this invention is: Windows 11 operating system and PyCharm, PyTorch 1.11, CUDA 11.3.

[0098] 2. Simulation content and result analysis

[0099] The simulation experiment of this invention uses this invention to extract roads from a remote sensing image containing roads, and the results are as follows. Figure 5 As shown.

[0100] The following is combined with Figure 5 The simulation effects of the present invention will be further described.

[0101] Figure 5 (a) is the original remote sensing image. Figure 5 (b) is a real labeled image. Figure 5 (c) is the image after road extraction from the original image 5(a) using the method of the present invention.

[0102] Depend on Figure 5(c) It can be seen that the present invention can extract road information in complex background environments and the extracted roads have good connectivity; compared with the real labels, the Dice coefficient of the roads extracted by the present invention is 0.95, indicating higher restoration and higher road extraction accuracy.

[0103] In this embodiment of the invention, high-resolution satellite remote sensing imagery is used for preprocessing. Data augmentation is employed to partition the data and create a dataset. Subsequently, the Canny operator is used to extract road edge features, and a U-Net network with a multi-head self-attention mechanism is used to extract deep road features and calculate weights to obtain key factors. The constructed network is trained by setting a loss function and training parameters to extract roads.

Claims

1. A method for road extraction from high-resolution remote sensing images based on a multi-head self-attention mechanism, characterized in that: Includes the following steps: Step 1: Preprocess the high-resolution remote sensing images acquired from satellites to obtain a data-enhanced high-resolution remote sensing image dataset. High-resolution remote sensing image dataset with augmented data Divide into training sets proportionally. Validation set and test set ; in, This is the original high-resolution remote sensing image dataset. This is a real-world labeled dataset; Step 2: Design and build a high-resolution remote sensing image road extraction network based on deep learning; The implementation method of step 2 includes: Step 201: Road edge information extraction; Input training set Using the Canny operator on the training set Perform edge detection to obtain the processed dataset. ; Step 202: Calculate the weights; use a multi-head self-attention mechanism to calculate the weights of the outputs of different hidden layers; The multi-head self-attention mechanism is represented as: in, Indicates the first A self-attention mechanism, This represents the self-attention mechanism function. , and They represent Query, Key, and Value, respectively. , and This represents three trainable parameter matrices. This indicates a multi-head self-attention mechanism. It represents a connection between multiple objects, that is, the beginning and end of a vector are connected. Step 203: Construct the U-Net network; input the network with the dataset processed in step 201. The network output is the extracted road information features; Step 3: Calculate the network loss; construct the binary cross-entropy loss function. Calculate the loss between the predicted result and the true label; Step 4, set the network training parameters; the training parameters include the number of units in the hidden layer, batch size, number of learning epochs, and learning rate; Step 5, Network Training; using the training set obtained in Step 1 The network built in step 2 is trained, and a corresponding weight file is obtained at the end of each training session. ,in, Indicates the current training epoch of the network; input the validation set from step 1. The Dice similarity coefficient was used as the evaluation criterion for the weighted file. The evaluation process concludes by saving the weighted file with the highest Dice similarity coefficient value. ,in ; Step 6, Network Testing; Use the test set obtained in Step 1. Input the data into the network built in step 2, and use the weight file obtained in step 5. Road extraction is performed to obtain a binarized image dataset containing road information. ; Step 7, Result Evaluation; Calculate the binarized image dataset. and dataset The average crossover ratio (mIoU) is used to evaluate the performance of the network built in step 2.

2. The method for road extraction from high-resolution remote sensing images based on a multi-head self-attention mechanism according to claim 1, characterized in that: The implementation method of step 1 includes: Step 101: Dataset Acquisition; Acquire raw high-resolution remote sensing image datasets containing road information from satellites. The original high-resolution remote sensing image dataset was processed using Labelme software. The roads included are delineated, and all the delineated images are used as the ground truth label dataset. ; for the original high-resolution remote sensing image datasets respectively and real label dataset Each image in the image is cropped using a sliding mechanism, and the size of each cropped image is [size missing]. , obtain dataset and Dataset and Composition of high-resolution remote sensing image dataset ; Step 102: Dataset Augmentation; Augmenting the dataset obtained in Step 101. Each image in the dataset undergoes mirroring and random rotation data augmentation to obtain the augmented dataset. ,in, Represents the dataset Augmented dataset, Represents the dataset Enhanced dataset; Step 103: Dataset partitioning; partition the dataset obtained in step 102. Divided into training set Validation set and test set .

3. The method for road extraction from high-resolution remote sensing images based on a multi-head self-attention mechanism according to claim 1, characterized in that: The binary cross-entropy loss function in step 3 The calculation formula is: in, For real labels, For the predicted result; when When the value is 0, the first half of the formula is 0. It needs to be as close to 0 as possible to make the second half of the value smaller; when When the value is 1, the second half is 0. It needs to be as close to 1 as possible to make the value of the second half smaller, thus achieving the goal of making as close as possible The result.

4. The method for road extraction from high-resolution remote sensing images based on a multi-head self-attention mechanism according to claim 1, characterized in that: In step 4, the training epoch is set to be greater than or equal to 200, the batch size to be greater than or equal to 8, and the learning rate to be less than or equal to... The set loss threshold is less than or equal to 0.

002.

5. The method for road extraction from high-resolution remote sensing images based on a multi-head self-attention mechanism according to claim 1, characterized in that: The formula for calculating the Dice similarity coefficient in step 5 is as follows: in, Represents a set The number of elements in Represents a set The number of elements in Represents a set and The total number of elements.

6. A road extraction system based on a multi-head self-attention mechanism in high-resolution remote sensing images, used to implement the method of claim 1, characterized in that: include: Dataset module: Used to acquire historical high-resolution satellite remote sensing images and preprocess them to build training datasets; Network building module: used to integrate the multi-head self-attention mechanism module into the U-Net network and add the Canny edge detection operator at the beginning of the U-Net network; Network training module: used to calculate the Dice similarity coefficient and loss function of the network. The training dataset is input into the network, and the network is trained based on the Dice similarity coefficient to obtain the weight files with the maximum Dice value and the loss value less than a set threshold.

7. A road extraction device for high-resolution remote sensing images based on a multi-head self-attention mechanism, characterized in that: include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the road extraction method in high-resolution remote sensing images based on a multi-head self-attention mechanism as described in any one of claims 1-5.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program that, when executed by a processor, enables a method for extracting roads from high-resolution remote sensing images based on a multi-head self-attention mechanism as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Seismic facies automatic identification method based on combination of self-attention mechanism and U-shaped structure

    CN115081719A

  • Multi-attention fused high-resolution remote sensing image road extraction method

    CN115439751A