Method, device and equipment for extracting building base based on non-orthophoto remote sensing image
By introducing a multi-task neural network model of a multi-scale mask detection head and a cross-field detection head into the Mask-RCNN model, the problem of insufficient accuracy in extracting the shape of building bases in non-orthophoto remote sensing images is solved and a higher accuracy is achieved. Accurate extraction of building roof and base polygons.
Patent Information
- Application Number
- CN202410880305.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-02
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2044-07-02
AI Technical Summary
The existing technology has insufficient shape accuracy when extracting building bases from non-orthophoto remote sensing images. Especially when the roof and the base do not overlap, it is difficult for existing methods to effectively extract accurate polygonal shapes.
A multi-task neural network model based on the Mask-RCNN model is used to add a multi-scale mask detection head and a cross field detection head. Through multi-task learning and cross direction field auxiliary tasks, the building roof and offset are extracted, and the building is accurately predicted. Base polygon.
It improves the shape accuracy of building base extraction in non-orthophoto remote sensing images, enhances the generalization of image features and the accuracy of multi-scale roof extraction, and ensures the shape accuracy of building roof prediction.
Smart Images

Figure CN118470539B
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of remote sensing image analysis, and relates to a method, a device and equipment for extracting a building base based on a non-orthophoto remote sensing image. Background Art
[0002] Building polygon extraction refers to extracting the base polygons of each building from remote sensing images. One idea for building polygon extraction is to first use the mature and advanced semantic segmentation or instance segmentation neural network method in the field of machine vision to extract the building mask, and then use the extracted mask to obtain the building polygon through the contour extraction method. However, the mask extraction method focuses more on the accuracy of pixel extraction, and this polygon extraction method does not pay enough attention to the shape of the polygon, that is, the accuracy of the vertices and edges of the polygon. In order to extract more accurate building polygons, scholars have proposed a variety of effective methods. The Frame Field Learning method proposes a field for indicating the direction of the building edge, namely the "Frame Field", so as to effectively extract more accurate buildings. The HEAT (heat map) method encodes the vertices and edges of the building polygon and designs a transformer (attention model) to extract accurate vertices and edges. Another method proposes the Attraction Field Map (AFM) as an auxiliary task to help the network extract more accurate building polygons.
[0003] However, the above-mentioned existing methods have encountered difficulties when faced with non-orthophoto images. Non-orthophoto images refer to images that are not taken perpendicular to the ground plane, but are taken at a certain angle away from the vertical downward direction. In this type of remote sensing image, the roof of the building does not coincide with the base, which brings some challenges to the extraction of building polygons. In order to solve this problem, some existing methods use a multi-task network to simultaneously extract the roof and the distance of the roof relative to the base in non-orthophoto, and then translate the roof according to this distance to obtain the base prediction. This method achieves better results than the method of directly predicting the base. However, when facing the extraction of building bases in non-orthophoto images, the above-mentioned technologies still have the technical problem of insufficient accuracy of the extracted shape. Summary of the invention
[0004] In response to the problems existing in the above-mentioned traditional methods, the present invention proposes a method for extracting building bases based on non-orthophoto remote sensing images, a device for extracting building bases based on non-orthophoto remote sensing images, and a computer device, which can effectively improve the accuracy of building base extraction from non-orthophoto images.
[0005] In order to achieve the above objectives, the embodiments of the present invention adopt the following technical solutions:
[0006] On the one hand, a method for extracting building bases based on non-orthophoto remote sensing images is provided, comprising the steps of:
[0007] Obtain the non-orthophoto remote sensing image to be predicted and call the trained multi-task neural network model; the multi-task neural network model is trained using non-orthophoto remote sensing images after adding a multi-scale mask detection head based on the Mask-RCNN model, and the cross field detection head of the multi-task neural network model is a network in the form of a UNet decoder;
[0008] The non-orthophoto remote sensing image to be predicted is input into the multi-task neural network model for feature extraction to obtain the model output; the model output includes the building target frame, the building roof, the building offset and the encoded cross direction field prediction;
[0009] The building roof is vectorized by edge extraction algorithm to obtain the building roof polygon; the cross direction field prediction is used to predict the edge direction of the building roof polygon;
[0010] The building base polygon in the non-orthophoto remote sensing image to be predicted is obtained according to the building roof polygon and the building offset.
[0011] On the other hand, a device for extracting building bases based on non-orthophoto remote sensing images is also provided, comprising:
[0012] The data acquisition module is used to acquire the non-orthophoto remote sensing image to be predicted and call the trained multi-task neural network model; the multi-task neural network model is trained using non-orthophoto remote sensing images after adding a multi-scale mask detection head based on the Mask-RCNN model, and the cross field detection head of the multi-task neural network model is a network in the form of a UNet decoder;
[0013] The feature prediction module is used to input the non-orthophoto remote sensing image to be predicted into the multi-task neural network model for feature extraction to obtain the model output; the model output includes the building target frame, building roof, building offset and encoded cross direction field prediction;
[0014] The roof vector module is used to vectorize the building roof by extracting the edge algorithm to obtain the building roof polygon; the cross direction field prediction is used to predict the edge direction of the building roof polygon;
[0015] The base prediction module is used to obtain the building base polygon in the non-orthophoto remote sensing image to be predicted according to the building roof polygon and the building offset.
[0016] On the other hand, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of any one of the above-mentioned methods for extracting building bases based on non-orthophoto remote sensing images are implemented.
[0017] On the other hand, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the steps of any of the above-mentioned methods for extracting building bases based on non-orthophoto remote sensing images are implemented.
[0018] One of the above technical solutions has the following advantages and beneficial effects:
[0019] The above-mentioned method, device and equipment for extracting building bases based on non-orthophoto remote sensing images constructs a new multi-task neural network model by adding a multi-scale mask detection head based on the Mask-RCNN model to simultaneously extract building roofs and building offsets, and introduces multi-task learning, so that the same set of image features can be used to process multiple tasks related to remote sensing image buildings, enhancing the generalization of image features extracted by the backbone network, thereby improving the performance of each task. At the same time, the integration of the multi-scale mask detection head can customize the extracted mask size according to different target sizes to improve the accuracy of multi-scale roof extraction, and the cross-field detection head is used to introduce a cross-direction field auxiliary task to predict the edge direction of the building roof polygon and constrain it with the prediction of the building roof, ultimately improving the shape accuracy of the building roof prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the conventional technology, the drawings required for use in the embodiments or the conventional technology descriptions are 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 these drawings without paying any creative work.
[0021] Figure 1 A schematic diagram of a flow chart of a method for extracting building bases based on non-orthophoto remote sensing images in one embodiment;
[0022] Figure 2 A schematic diagram of a process for extracting building base polygons from non-orthophoto remote sensing images in one embodiment;
[0023] Figure 3 A schematic diagram of a training process of a neural network model in one embodiment;
[0024] Figure 4 A schematic diagram of the relationship between a cross-directional field and a building roof in one embodiment;
[0025] Figure 5 Schematic diagram of a multi-scale mask detection head structure in one embodiment;
[0026] Figure 6 Schematic diagram of building roof polygon and offset detection results in one embodiment, wherein (a), (b), (c) and (d) are respectively the prediction results of LoFT, the prediction results of CMRCNN+offset, the prediction results of the building base extraction method based on non-orthophoto remote sensing images and the true value labels of this row in the first row; (e), (f), (g) and (i) are respectively the prediction results of LoFT, the prediction results of CMRCNN+offset, the prediction results of the building base extraction method based on non-orthophoto remote sensing images and the true value labels of this row in the second row; (j), (k), (l) and (m) are respectively the prediction results of LoFT, the prediction results of CMRCNN+offset, the prediction results of the building base extraction method based on non-orthophoto remote sensing images and the true value labels of this row in the third row. The prediction results of LoFT, the prediction results of CMRCNN+offset, the prediction results of the building base extraction method based on non-orthophoto remote sensing images, and the true value labels of this row; (n), (o), (p) and (q) are the prediction results of LoFT, the prediction results of CMRCNN+offset, the prediction results of the building base extraction method based on non-orthophoto remote sensing images, and the true value labels of this row in the fourth row respectively; (s), (t), (u) and (v) are the prediction results of LoFT, the prediction results of CMRCNN+offset, the prediction results of the building base extraction method based on non-orthophoto remote sensing images, and the true value labels of this row in the fifth row respectively;
[0027] Figure 7 Schematic diagram of the module structure of a device for extracting building bases based on non-orthophoto remote sensing images in one embodiment. DETAILED DESCRIPTION
[0028] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0029] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention.
[0030] It should be noted that the reference to "embodiment" in this article means that the specific features, structures or characteristics described in conjunction with the embodiment may be included in at least one embodiment of the present invention. The presentation of this phrase at various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It will be appreciated by those skilled in the art that the embodiments described herein may be combined with other embodiments. The term "and / or" used in the specification of the present invention and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes these combinations.
[0031] The implementation modes of the present invention will be described in detail below with reference to the accompanying drawings in the embodiments of the present invention.
[0032] In one embodiment, Figure 1 As shown, a method for extracting building bases based on non-orthophoto remote sensing images is provided, which may include the following processing steps S10 to S16:
[0033] S10, obtain the non-orthophoto remote sensing image to be predicted and call the trained multi-task neural network model; the multi-task neural network model is trained using non-orthophoto remote sensing images after adding a multi-scale mask detection head based on the Mask-RCNN model, and the cross field detection head of the multi-task neural network model is a network in the form of a UNet decoder.
[0034] It can be understood that the non-orthophoto remote sensing image to be predicted is the non-orthophoto remote sensing image that currently needs to extract the building base polygon. It can be obtained by shooting with space-based remote sensing equipment or directly extracted from the database. Non-orthophoto remote sensing images refer to remote sensing images that are not shot vertically downward from the ground plane, but are shot at a certain angle deviating from the vertical downward direction. It is generally believed that remote sensing images with an orthophoto deviation angle between 25 and 40 degrees are non-orthophoto remote sensing images.
[0035] The Mask-RCNN (Mask Region-based Convolutional Neural Network) model is an existing instance segmentation algorithm model, which can complete multiple tasks such as target classification, target detection, semantic segmentation, instance segmentation and human posture recognition by adding different branches. In this embodiment, an improved multi-task neural network model is obtained by adding a multi-scale mask detection head based on the Mask-RCNN model and adopting a cross field detection head of a network in the form of a UNet decoder, and the constructed multi-task neural network model is iteratively trained in advance using multiple non-orthophoto remote sensing images, so that after convergence, it is a trained multi-task neural network model, which can be used for the analysis and processing of non-orthophoto remote sensing images to be predicted. The multi-scale mask detection head is a technology for improving the detection and segmentation accuracy of objects of different scales in instance segmentation tasks. In the Mask-RCNN model, the main function of the multi-scale mask detection head is to improve the segmentation effect of objects of different sizes by processing feature maps of different scales.
[0036] S12, inputting the non-orthophoto remote sensing image to be predicted into the multi-task neural network model for feature extraction to obtain a model output; the model output includes a building target frame, a building roof, a building offset, and an encoded cross direction field prediction;
[0037] S14, vectorizing the building roof by edge extraction algorithm to obtain the building roof polygon; the cross direction field prediction is used to predict the edge direction of the building roof polygon;
[0038] S16, obtaining a building base polygon in the non-orthophoto remote sensing image to be predicted according to the building roof polygon and the building offset.
[0039] The above-mentioned building base extraction method based on non-orthophoto remote sensing images constructs a new multi-task neural network model by adding a multi-scale mask detection head based on the Mask-RCNN model to simultaneously extract the building roof and building offset, and introduces multi-task learning, so that the same set of image features can be used to process multiple tasks related to remote sensing image buildings, enhancing the generalization of image features extracted by the backbone network, thereby improving the performance of each task. At the same time, the integration of the multi-scale mask detection head can customize the extracted mask size according to different target sizes to improve the accuracy of multi-scale roof extraction, and the cross-field detection head is used to introduce the cross-direction field auxiliary task to predict the edge direction of the building roof polygon and constrain it with the prediction of the building roof, ultimately improving the shape accuracy of the building roof prediction.
[0040] It should be noted that if Figure 2 As shown in the figure, it is a flowchart for extracting building base polygons from non-orthophoto remote sensing images. The design process of the entire method can be divided into the model training stage and the prediction stage. The FPN (Feature Pyramid Network) after the backbone model is a general existing feature extractor, and the RPN (Region Proposal Network) is an existing part of the network used to extract pre-selected boxes. Rol Align is an existing regional feature aggregation network in Mask-RCNN, and B-Boxes represents the target box from the target box detection head. Before introducing the other implementation steps of the above-mentioned method for extracting building bases based on non-orthophoto remote sensing images in more detail, in order to facilitate understanding, the construction of the multi-task neural network model and its training implementation process are first introduced here:
[0041] In one embodiment, Figure 3 As shown, the multi-task neural network model can be trained through the following steps S1 to S7:
[0042] S1, obtain non-orthophoto remote sensing images, building labels and cross-direction field labels for training; building labels include building roof labels, building offset labels and building target frame labels;
[0043] S3, inputting the non-orthophoto remote sensing image into the multi-task neural network model to obtain the model output results; the model output results include the building target box, the building roof, the building offset and the encoded cross direction field prediction;
[0044] S5, using the building labels and the model output results, calculates the loss function and then performs gradient back propagation according to the loss function to optimize the model parameters;
[0045] S7, returns to the step of obtaining non-orthophoto remote sensing images, building labels and cross-direction field labels for training, performs iterative training until the multi-task neural network model converges, and obtains a trained multi-task neural network model.
[0046] It can be understood that the process of the model training phase can be as follows:
[0047] Input: Non-orthophoto remote sensing image , building and cross direction field labels (i.e. true values) ; This tag includes the building target frame tag , Building offset label , Building roof tags and cross direction field labels .
[0048] Output: Trained multi-task neural network model .
[0049] Specifically, first according to the building roof label Constructing cross direction field labels , the construction process can be as follows Figure 4 As shown, at the edge of the building roof, two opposite directions of the cross are consistent with the direction of the building roof edge, and the other two directions are consistent with the normal direction of the building edge. At the vertex of the building roof, two perpendicular directions of the cross are consistent with the two side directions of the vertex.
[0050] Then build a multi-task neural network model , the processing flow can be as follows Figure 2 As shown in , the main parts (such as the backbone model, target box detection head, and offset detection head) are consistent with the existing MaskRCNN (ResNet50) network in the field of neural networks. The cross field detection head is a UNet (full name U-Net, a deep learning architecture) decoder network, and the structure of the multi-scale mask detection head can be shown as follows Figure 5 As shown in Figure 2, C represents the connection of features. The offset detection head usually contains a series of convolutional layers to process the features in each RoI (Region of Interest) candidate region. The feature map after convolution processing will be input into an offset regression branch, which outputs the offset of each pixel. The final mask generation will combine these offset information to make the boundary of the mask more accurate. Figure 5 The first column is the building targets of different scales, where the target box is the output from the target box detection head, and the second column is the multi-scale feature, which comes from the multi-scale feature output of the backbone model. The third column is the target feature, the fourth column is the multi-scale mask detection head of the UNet type, and the fifth column is the multi-scale mask prediction result. The output of this multi-scale mask detection head is the multi-scale mask prediction result corresponding to the target boxes of different sizes. The Bounding Box Detection Head is a key component in the Mask-RCNN network, which is used to predict the bounding box position and category of the building target in the image. It receives the feature map from the feature extraction network and outputs the target box coordinates and category label of each building target.
[0051] Next, the non-orthophoto remote sensing image Input multi-task neural network model , get the model output results , where the model output includes the building target box , building roofs and building offset , For the coded cross-directional field prediction:
[0052] ;
[0053] in, represents the predicted value of the direction angle, and Respectively express The imaginary number encoding.
[0054] In one embodiment, the loss function of the above model can be as follows: Calculate the loss function of the model output and the true value The loss function between :
[0055] ;
[0056] in, represents the cross entropy, Indicates the direction of gradient calculation, represents the building roof polygon mask, Representation calculation The gradient of Representation calculation The gradient of It means taking the mean value, represents the mean square error, represents the building target box loss, represents the calibration loss, represents the smoothing loss, represents the mask loss, Represents the loss of the building roof, represents the building offset loss, is the difference function:
[0057] ;
[0058] Among them, used to calculate the direction angle With direction encoding The difference between . are the weights of each mixed loss function.
[0059] Finally, according to the loss function Perform gradient backpropagation and adjust the multi-task neural network model Parameters of the optimization model:
[0060] ;
[0061] in, According to the loss function Backpropagating gradients to optimize multi-task neural network models Repeat the above training steps until the model converges to obtain a trained multi-task neural network model. .
[0062] It can be understood that the process of the above prediction stage can be as follows:
[0063] Input: Non-orthophoto remote sensing image to be predicted , trained multi-task neural network model .
[0064] Output: Building base polygons .
[0065] Specifically, firstly, the non-orthophoto remote sensing image to be predicted of the building base polygon to be extracted is Input the trained multi-task neural network model The reasoning and training process of the model is the same as the process of the model training phase mentioned above, and the model output is obtained .
[0066] Then the building roofs are vectorized using the edge extraction algorithm , and based on the obtained building roof polygons and building offset Get the building base polygon :
[0067] ;
[0068] Among them, the edge extraction algorithm can be, for example, an existing edge vectorization and polygon generation algorithm in the art, which can specifically first perform edge detection: such as applying an edge detection algorithm (such as the existing Canny edge detection) to accurately locate the edge of the building roof; then perform vectorization processing: convert the detected building roof edge into a vector form, that is, the vertex coordinates of the roof polygon; then perform polygon construction: generate a closed polygon based on the vectorized building roof edge to represent the outline of the building roof. Finally, a simplification process can be performed: such as simplifying the generated building roof polygon, removing redundant vertices, and maintaining the geometric shape of the building roof polygon.
[0069] In the above embodiment, the trained multi-task neural network model , can be named ONBuildingNet, which can extract both building roofs and building offsets. This neural network model By introducing multi-task learning, the same set of image features is used to process multiple tasks related to buildings in remote sensing images, which enhances the generalization of image features extracted by the backbone network and thus improves the performance of each task.
[0070] A novel multi-scale mask detection head is added to the ONBuildingNet in the previous paper. The multi-scale mask detection head customizes the extracted mask size according to different target sizes to improve the accuracy of multi-scale roof extraction. For the cross-direction field auxiliary task, a two-level encoding and deviation function calculation method for the cross-direction field suitable for neural networks is proposed (such as the loss function mentioned above). This cross-direction field auxiliary task can be added to the ONBuildingNet multi-task network mentioned above. The cross-direction field auxiliary task predicts the edge direction of the building roof polygon and constrains the prediction of the building roof. By adding this auxiliary task, the shape accuracy of the building roof prediction is improved.
[0071] like Figure 6 In the building roof polygon and offset detection result diagram shown, the red polygon is the roof polygon, and the small red arrow line on the left side of the roof polygon is the offset of the building's roof relative to its base. Figure 6The first two columns are the prediction results of the existing advanced methods LoFT and CMRCNN+offset for comparison, the third column is the prediction result of the above method of the present invention, and the last column is the true value label, wherein (a), (b), (c) and (d) are the prediction results of LoFT, the prediction results of CMRCNN+offset, the prediction results of the above method of the present invention and the true value label of this row in the first row respectively; (e), (f), (g) and (i) are the prediction results of LoFT, the prediction results of CMRCNN+offset, the prediction results of the above method of the present invention and the true value label of this row in the second row respectively; (j), (k), (l) and (m) are respectively the prediction results of LoFT, the prediction results of CMRCNN+offset, the prediction results of the above method of the present invention and the true value labels of this row in the third row; (n), (o), (p) and (q) are respectively the prediction results of LoFT, the prediction results of CMRCNN+offset, the prediction results of the above method of the present invention and the true value labels of this row in the fourth row; (s), (t), (u) and (v) are respectively the prediction results of LoFT, the prediction results of CMRCNN+offset, the prediction results of the above method of the present invention and the true value labels of this row in the fifth row. From the comparison results, the shape accuracy of the building roof prediction based on the non-orthophoto remote sensing image building base extraction method of the present invention is higher.
[0072] It should be understood that although the above process Figure 1 The steps in the flowchart are shown in the order indicated by the arrows, but the steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of the steps, and the steps can be executed in other orders. Figure 1 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequentially, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0073] In one embodiment, Figure 7As shown, a device 100 for extracting building bases based on non-orthophoto remote sensing images is also provided, comprising a data acquisition module 11, a feature prediction module 13, a roof vector module 15 and a base prediction module 17. Among them, the data acquisition module 11 is used to obtain the non-orthophoto remote sensing image to be predicted and call the trained multi-task neural network model; the multi-task neural network model is obtained by training with the non-orthophoto remote sensing image after adding a multi-scale mask detection head based on the Mask-RCNN model, and the cross field detection head of the multi-task neural network model is a network in the form of a UNet decoder. The feature prediction module 13 is used to input the non-orthophoto remote sensing image to be predicted into the multi-task neural network model for feature extraction to obtain the model output; the model output includes the building target frame, the building roof, the building offset and the encoded cross direction field prediction. The roof vector module 15 is used to vectorize the building roof by extracting the edge algorithm to obtain the building roof polygon; the cross direction field prediction is used to predict the edge direction of the building roof polygon. The base prediction module 17 is used to obtain the building base polygon in the non-orthophoto remote sensing image to be predicted according to the building roof polygon and the building offset.
[0074] The above-mentioned building base extraction device 100 based on non-orthophoto remote sensing images constructs a new multi-task neural network model by adding a multi-scale mask detection head based on the Mask-RCNN model to simultaneously extract the building roof and the building offset, and introduces multi-task learning, so that the same set of image features can be used to process multiple tasks related to remote sensing image buildings, and the generalization of the image features extracted by the backbone network is enhanced, thereby improving the performance of each task. At the same time, the integration of the multi-scale mask detection head can customize the extracted mask size according to different target sizes to improve the accuracy of multi-scale roof extraction, and the cross-field detection head is used to introduce a cross-direction field auxiliary task to predict the edge direction of the building roof polygon and constrain it with the prediction of the building roof, ultimately improving the shape accuracy of the building roof prediction.
[0075] In one embodiment, the above-mentioned building base extraction device 100 based on non-orthophoto remote sensing images can also include a model training module, which is used to obtain non-orthophoto remote sensing images, building labels and cross-direction field labels for training; the non-orthophoto remote sensing images are input into the multi-task neural network model to obtain the results of the model output; the loss function is calculated using the building labels and the results of the model output, and the model parameters are optimized by gradient back propagation according to the loss function, and then iterative training is performed until the multi-task neural network model converges to obtain a trained multi-task neural network model; wherein the building labels include building roof labels, building offset labels and building target frame labels, and the results of the model output include building target frames, building roofs, building offsets and encoded cross-direction field predictions.
[0076] In one embodiment, the loss function is:
[0077] ;
[0078] in, represents the cross entropy, Indicates the direction of gradient calculation, represents the building roof polygon mask, Representation calculation The gradient of Representation calculation The gradient of It means taking the mean value, represents the mean square error, represents the building target box loss, represents the calibration loss, represents the smoothing loss, represents the mask loss, Represents the loss of the building roof, represents the building offset loss, is the difference function used to calculate the direction angle With direction encoding The difference between are the weights of each mixed loss function.
[0079] It can be understood that, for the specific explanation of the device 100 for extracting the building base based on non-orthophoto remote sensing images, please refer to the corresponding explanation of each embodiment of the method for extracting the building base based on non-orthophoto remote sensing images in the above text, and no further details will be given here. Each module in the above-mentioned device 100 for extracting the building base based on non-orthophoto remote sensing images can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of a device with data processing functions in the form of hardware, or can be stored in the memory of the aforementioned device in the form of software, so that the processor can call and execute the operations corresponding to the above modules. The aforementioned device can be, but is not limited to, various types of image processing computer devices already available in the art.
[0080] In one embodiment, a computer device is also provided, including a memory and a processor, the memory stores a computer program, and the processor implements the following processing steps when executing the computer program: obtaining a non-orthophoto remote sensing image to be predicted and calling a trained multi-task neural network model; the multi-task neural network model is obtained by training with a non-orthophoto remote sensing image after adding a multi-scale mask detection head based on the Mask-RCNN model, and the cross field detection head of the multi-task neural network model is a network in the form of a UNet decoder; the non-orthophoto remote sensing image to be predicted is input into the multi-task neural network model for feature extraction to obtain a model output; the model output includes a building target frame, a building roof, a building offset and an encoded cross direction field prediction; the building roof is vectorized by an edge extraction algorithm to obtain a building roof polygon; the cross direction field prediction is used to predict the edge direction of the building roof polygon; the building base polygon in the non-orthophoto remote sensing image to be predicted is obtained according to the building roof polygon and the building offset.
[0081] It can be understood that in addition to the above-mentioned memory and processor, the above-mentioned computer device also includes other software and hardware components not listed in this specification, which can be determined according to the model of the specific image processing computer in different application scenarios, and this specification will not list them one by one in detail.
[0082] In one embodiment, when the processor executes the computer program, it can also implement the steps or sub-steps added in each embodiment of the above-mentioned method for extracting the building base based on non-orthophoto remote sensing images.
[0083] In one embodiment, a computer-readable storage medium is also provided, on which a computer program is stored. When the computer program is executed by a processor, the following processing steps are implemented: obtaining a non-orthophoto remote sensing image to be predicted and calling a trained multi-task neural network model; the multi-task neural network model is obtained by training with a non-orthophoto remote sensing image after adding a multi-scale mask detection head based on a Mask-RCNN model, and the cross field detection head of the multi-task neural network model is a network in the form of a UNet decoder; the non-orthophoto remote sensing image to be predicted is input into the multi-task neural network model for feature extraction to obtain a model output; the model output includes a building target frame, a building roof, a building offset, and an encoded cross direction field prediction; the building roof is vectorized by an edge extraction algorithm to obtain a building roof polygon; the cross direction field prediction is used to predict the edge direction of the building roof polygon; the building base polygon in the non-orthophoto remote sensing image to be predicted is obtained according to the building roof polygon and the building offset.
[0084] In one embodiment, when the computer program is executed by a processor, it can also implement the steps or sub-steps added in each embodiment of the above-mentioned method for extracting building bases based on non-orthophoto remote sensing images.
[0085] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus dynamic random access memory (RambusDRAM, referred to as RDRAM) and interface dynamic random access memory (DRDRAM).
[0086] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0087] The above embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in this field, several modifications and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
Claims
1. A method for extracting building bases based on non-orthophoto remote sensing images. It is characterized in that Includes steps: Obtain a non-orthophoto remote sensing image to be predicted and call a trained multi-task neural network model; the multi-task neural network model is obtained by training the non-orthophoto remote sensing image after adding a multi-scale mask detection head based on the Mask-RCNN model, and the cross field detection head of the multi-task neural network model is a network in the form of a UNet decoder; Inputting the non-orthophoto remote sensing image to be predicted into the multi-task neural network model for feature extraction to obtain a model output; the model output includes a building target frame, a building roof, a building offset, and an encoded cross direction field prediction; The building roof is vectorized by edge extraction algorithm to obtain the building roof polygon; the cross direction field prediction is used to predict the edge direction of the building roof polygon; The building base polygon in the non-orthophoto remote sensing image to be predicted is obtained according to the building roof polygon and the building offset; wherein the multi-task neural network model is trained by the following steps: Obtaining non-orthophoto remote sensing images, building labels and cross-direction field labels for training; the building labels include building roof labels, building offset labels and building target frame labels; Inputting the non-orthophoto remote sensing image into the multi-task neural network model to obtain the model output result; the model output result includes the building target frame, the building roof, the building offset and the encoded cross direction field prediction; Using the building labels and the results of the model output, a loss function is calculated and then gradient back propagation is performed according to the loss function to optimize model parameters; Return to the step of obtaining the non-orthophoto remote sensing image, building labels and cross-direction field labels for training, perform iterative training until the multi-task neural network model converges, and obtain the trained multi-task neural network model; the loss function is: in, CrossEntropy represents the cross entropy, dir () indicates the direction of gradient calculation, mask edge represents the building roof polygon mask, P roof Representation calculation P roof The gradient of P cross-field-encode Representation calculation P cross-field-encode The gradient of avg It means taking the mean value, MSE () represents the mean square error, L BBox represents the building target box loss, L align represents the calibration loss, L smooth represents the smoothing loss, L mask represents the mask loss, Represents the loss of the building roof, L offset represents the building offset loss, is the difference function used to calculate the direction angle θ With direction encoding P The difference between G BBox is the building target box label, G offset is the building offset label, G roof For building roof labels, P BBox is the building target frame, P roof For the roof of the building, P offset is the building offset, P cross-field-encode is the coded cross-directional field prediction, are the weights of each mixed loss function.
2. A building base extraction device based on non-orthophoto remote sensing images, It is characterized in that include: A data acquisition module is used to acquire the non-orthophoto remote sensing image to be predicted and call a trained multi-task neural network model; the multi-task neural network model is obtained by training the non-orthophoto remote sensing image after adding a multi-scale mask detection head based on the Mask-RCNN model, and the cross field detection head of the multi-task neural network model is a network in the form of a UNet decoder; A feature prediction module is used to input the non-orthophoto remote sensing image to be predicted into the multi-task neural network model for feature extraction to obtain a model output; the model output includes a building target frame, a building roof, a building offset and an encoded cross direction field prediction; A roof vector module is used to vectorize the building roof by extracting edge algorithm to obtain the building roof polygon; the cross direction field prediction is used to predict the edge direction of the building roof polygon; A base prediction module, used for obtaining a building base polygon in a non-orthophoto remote sensing image to be predicted according to the building roof polygon and the building offset; The device for extracting building bases based on non-orthophoto remote sensing images also includes a model training module for obtaining non-orthophoto remote sensing images, building labels and cross-direction field labels for training; inputting non-orthophoto remote sensing images into the multi-task neural network model to obtain the results of the model output; using the building labels and the results of the model output, performing loss function calculation, and then optimizing the model parameters by gradient back propagation according to the loss function, and then performing iterative training until the multi-task neural network model converges to obtain the trained multi-task neural network model; wherein the building labels include building roof labels, building offset labels and building target frame labels, and the results of the model output include building target frames, building roofs, building offsets and encoded cross-direction field predictions; the loss function is: in, CrossEntropy represents the cross entropy, dir () indicates the direction of gradient calculation, mask edge represents the building roof polygon mask, P roof Representation calculation P roof The gradient of P cross-field-encode Representation calculation P cross-field-encode The gradient of avg It means taking the mean value, MSE () represents the mean square error, L BBox represents the building target box loss, L align represents the calibration loss, L smooth represents the smoothing loss, L mask represents the mask loss, Represents the loss of the building roof, L offset represents the building offset loss, is the difference function used to calculate the direction angle θ With direction encoding P The difference between G BBox is the building target box label, G offset is the building offset label, G roof For building roof labels, P BBox is the building target frame, P roof For the roof of the building, P offset is the building offset, P cross-field-encode is the coded cross-directional field prediction, are the weights of each mixed loss function.
3. A computer device comprising a memory and a processor, It is characterized in that The memory stores a computer program, and when the processor executes the computer program, the steps of the method for extracting building bases based on non-orthophoto remote sensing images described in claim 1 are implemented.
Citation Information
Patent Citations
Remote sensing orthoimage dense building extraction method based on convolutional neural network
CN111553303A
Deep learning-based orthoimage high-rise building base vector extraction method
CN113139453A
Remote sensing image building extraction and contour optimization method based on deep learning
CN113516135A
Auto-normalization for machine learning
US11915419B1
System and Method for Correcting for Distortions of a Diagnostic Image
US20230013902A1
