Method, device and equipment for segmenting building monomers for three-dimensional real-life dense models

By obtaining the three-dimensional data and color data of the building area and inputting the segmentation model, the problem of inaccurate traditional building single segmentation methods is solved, and more accurate building single segmentation is achieved.

CN118657915BActive Publication Date: 2024-12-17GUANGDONG LAB OF ARTIFICIAL INTELLIGENCE & DIGITAL ECONOMY (SZ) +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411141728.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-20
Publication Date
2024-12-17
Estimated Expiration
2044-08-20

AI Technical Summary

Technical Problem

The traditional architectural monomer segmentation method is based on architectural image segmentation, and the results are inaccurate, making it difficult to accurately extract building monomers.

Method used

By obtaining the three-dimensional data of the target building area, determining its elevation data and color data, inputting the target single segmentation model, obtaining the building contour line, and segmenting the three-dimensional data based on the building contour line, improving the accuracy of the building single data.

Benefits of technology

By comprehensively utilizing the elevation and color characteristics in three-dimensional data, the accuracy of building contour lines is improved, thereby improving the accuracy of building single segmentation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118657915B_ABST
    Figure CN118657915B_ABST
Patent Text Reader

Abstract

The present application relates to a method, device and equipment for segmenting building units for three-dimensional real-life models. The method comprises: obtaining three-dimensional data of a target building area; determining elevation data and color data corresponding to the three-dimensional data; inputting the elevation data and the color data into a target unit segmentation model to obtain a building contour line of the target building area; segmenting the three-dimensional data according to the building contour line to obtain segmented building unit data. The method can improve the accuracy of building unit segmentation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer application technology, and in particular to a method, device, computer equipment, computer-readable storage medium and computer program product for segmenting building monomers for three-dimensional real-life dense models. Background Art

[0002] With the large-scale application of drones and lidar in the field of surveying and mapping, a large number of dense 3D grid models of urban scenes have been produced. After obtaining the 3D model of the scene, the building monomer segmentation can be performed based on the 3D model. Building monomer segmentation is to extract a single building from the scene so that the single building can be managed separately, such as information statistics, additional attributes or on-demand display.

[0003] Traditional building unit segmentation methods are often based on the captured building images, and the results of building unit segmentation are inaccurate. Summary of the invention

[0004] Based on this, it is necessary to provide a method, device, computer equipment, computer-readable storage medium and computer program product for three-dimensional real-life dense modeling of building units that can improve the accuracy of building unit segmentation in response to the above technical problems.

[0005] In a first aspect, the present application provides a method for segmenting a building monomer for a three-dimensional real-life dense model, comprising:

[0006] Acquire three-dimensional data of the target building area;

[0007] Determining elevation data and color data corresponding to the three-dimensional data;

[0008] Inputting the elevation data and the color data into a target monomer segmentation model to obtain a building outline of the target building area;

[0009] The three-dimensional data is segmented according to the building outline to obtain segmented building monomer data.

[0010] In one embodiment, determining elevation data corresponding to the three-dimensional data includes:

[0011] Obtaining orthographic projection data obtained by projecting the three-dimensional data onto a horizontal surface of the ground;

[0012] Gridding the orthographic projection data to obtain a grid point set;

[0013] The elevation data of the target building area is obtained according to the grid point set and the three-dimensional data.

[0014] In one embodiment, obtaining the elevation data of the target building area according to the grid point set and the three-dimensional data includes:

[0015] Positionally aligning the grid point set with the three-dimensional data on the ground surface horizontal plane;

[0016] Obtaining a height value of a target intersection point farthest from the target grid among intersection points of the normal line of the aligned target grid and the three-dimensional data, and using the height value of the target intersection point as elevation data of the target grid;

[0017] The elevation data of the target building area is obtained according to the elevation data of the target grid.

[0018] In one embodiment, the step of inputting the elevation data and the color data into a target monomer segmentation model to obtain a building outline of the target building area includes:

[0019] Dividing the elevation data into blocks to obtain a plurality of elevation data blocks, and dividing the color data into blocks to obtain a plurality of color data blocks;

[0020] Inputting the elevation data block and the color data block at the same position into the target monomer segmentation model to obtain the building contour line of the building block at the position;

[0021] The building outline of the target building area is obtained according to the building outline of the building block.

[0022] In one embodiment, the training method of the target monomer segmentation model includes:

[0023] Acquire sample three-dimensional data of the building sample;

[0024] Determine sample elevation data and sample color data corresponding to the sample three-dimensional data;

[0025] Acquire contour marking data obtained by performing contour line marking based on the sample color data;

[0026] The initial monomer segmentation model is trained based on the sample elevation data, the sample color data and the contour annotation data to obtain the target monomer segmentation model.

[0027] In one embodiment, the initial monomer segmentation model is trained based on the sample elevation data, the sample color data and the contour annotation data to obtain the target monomer segmentation model, including:

[0028] Inputting the sample elevation data and the sample color data into the initial monomer segmentation model to obtain a predicted building outline;

[0029] The initial monomer segmentation model is trained according to the difference between the predicted building outline and the building outline in the outline annotation data to obtain the target monomer segmentation model.

[0030] In a second aspect, the present application also provides a building monomer segmentation device for a three-dimensional real-life dense model, comprising:

[0031] A three-dimensional data acquisition module is used to acquire three-dimensional data of a target building area;

[0032] A dimension data determination module, used to determine elevation data and color data corresponding to the three-dimensional data;

[0033] A contour line obtaining module, used for inputting the elevation data and the color data into a target monomer segmentation model to obtain a building contour line of the target building area;

[0034] The building unit segmentation module is used to segment the three-dimensional data according to the building outline to obtain segmented building unit data.

[0035] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0036] Acquire three-dimensional data of the target building area;

[0037] Determining elevation data and color data corresponding to the three-dimensional data;

[0038] Inputting the elevation data and the color data into a target monomer segmentation model to obtain a building outline of the target building area;

[0039] The three-dimensional data is segmented according to the building outline to obtain segmented building monomer data.

[0040] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:

[0041] Acquire three-dimensional data of the target building area;

[0042] Determining elevation data and color data corresponding to the three-dimensional data;

[0043] Inputting the elevation data and the color data into a target monomer segmentation model to obtain a building outline of the target building area;

[0044] The three-dimensional data is segmented according to the building outline to obtain segmented building monomer data.

[0045] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0046] Acquire three-dimensional data of the target building area;

[0047] Determining elevation data and color data corresponding to the three-dimensional data;

[0048] Inputting the elevation data and the color data into a target monomer segmentation model to obtain a building outline of the target building area;

[0049] The three-dimensional data is segmented according to the building outline to obtain segmented building monomer data.

[0050] The above-mentioned building monomer segmentation method, device, computer equipment, computer-readable storage medium and computer program product for three-dimensional real-life dense modeling obtain the three-dimensional data of the target building area, determine the elevation data and color data corresponding to the three-dimensional data, input the elevation data and color data into the target monomer segmentation model, obtain the building contour line of the target building area, segment the three-dimensional data according to the building contour line, obtain the segmented building monomer data, and realize the building contour line based on the elevation data and color data in the three-dimensional data of the target building area. The building contour line obtained by more building features is more accurate, thereby improving the accuracy of the building monomer data obtained by segmenting the three-dimensional data according to the building contour line. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0052] Figure 1 1. It is an application environment diagram of a building monomer segmentation method for a three-dimensional real scene dense model in one embodiment;

[0053] Figure 2 A schematic diagram of a process of segmenting a building unit for a three-dimensional real-life dense model in one embodiment;

[0054] Figure 3 is a schematic diagram of a three-dimensional real scene dense model in one embodiment;

[0055] Figure 4 A schematic diagram of color data in one embodiment;

[0056] Figure 5 A schematic diagram of building monomer data after segmentation in one embodiment;

[0057] Figure 6 A schematic diagram of elevation data of a target building area in one embodiment;

[0058] Figure 7 A schematic diagram of a building outline in one embodiment;

[0059] Figure 8 Schematic diagram of the training process of a target monomer segmentation model in one embodiment;

[0060] Fig. 9 A schematic diagram of the training process of a target monomer segmentation model in another embodiment;

[0061] Fig.10 It is a structural block diagram of a building monomer segmentation device for a three-dimensional real scene dense model in one embodiment;

[0062] Fig.11 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0063] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application 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 application and are not used to limit the present application.

[0064] The building monomer segmentation method for three-dimensional real scene dense model provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The server 104 can obtain the three-dimensional data of the target building area sent by the terminal 102, determine the elevation data and color data corresponding to the three-dimensional data, input the elevation data and color data into the target monomer segmentation model, obtain the building contour line of the target building area, and segment the three-dimensional data according to the building contour line to obtain the segmented building monomer data.

[0065] The terminal 102 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, IoT devices, and portable wearable devices. The IoT devices may be smart speakers, smart TVs, smart air conditioners, smart car devices, projection devices, etc. Portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. Head-mounted devices may be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. The server 104 may be an independent physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server that provides cloud computing services.

[0066] In an exemplary embodiment, Figure 2 As shown, a method for segmenting building monomers for three-dimensional real-life dense models is provided. Figure 1 The server in the example is used to illustrate, including the following steps 202 to 208. Among them:

[0067] Step 202, obtaining three-dimensional data of the target building area.

[0068] Three-dimensional data refers to data used to represent the three-dimensional information of the target building area.

[0069] The three-dimensional data of the target building area can be the three-dimensional real scene model data of the target building area, or the three-dimensional model data obtained by transforming the three-dimensional real scene model according to a preset ratio. It can be understood that the target building area includes a single building or a group of buildings, and the target building area can also include the area between buildings. The target building area can be selected as needed. The three-dimensional data includes the three-dimensional real scene dense model data. In an example, the three-dimensional real scene dense model is as follows: Figure 3 shown.

[0070] In actual application scenarios, the three-dimensional data of the target building area can be obtained through oblique photography technology, or the laser point cloud data can be obtained as the three-dimensional data of the target building area by using the principle of laser ranging. Among them, oblique photography technology uses multiple sensors on the same flight platform to collect images from five different angles, including one vertical and four oblique angles, to obtain rich high-resolution textures of the top and side views of the building. Compared with orthophotos, oblique images allow users to observe objects from multiple angles and more realistically reflect the actual situation of the objects.

[0071] Step 204, determining the elevation data and color data corresponding to the three-dimensional data.

[0072] Based on the three-dimensional data of the target building area, the server determines the elevation data and color data corresponding to the three-dimensional data. The elevation data is used to characterize the height of the target building area, and the color data is used to characterize the color of the target building area. It can be understood that the heights corresponding to different positions of the target building area may be different, and the colors corresponding to different positions may also be different. The color data can be represented by RGB (red, green, and blue), HSV (hue, saturation, and brightness), or CMYK (cyan, magenta, yellow, and black).

[0073] Optionally, the three-dimensional data may be projected on a horizontal surface to obtain orthographic projection data, and the elevation data corresponding to the three-dimensional data may be obtained based on the orthographic projection data and the three-dimensional data. For example, the three-dimensional data may be projected on a horizontal surface to obtain orthographic projection data, and the orthographic projection data may be gridded to obtain a grid point set composed of multiple grids. The orthographic projection data and the three-dimensional data are aligned, a normal line is drawn from each grid of the orthographic projection data, and the height value of the intersection point farthest from the grid among the intersection points of the normal line and the three-dimensional data is used as the elevation data corresponding to the corresponding grid, and the elevation data corresponding to each grid in the grid point set are combined to obtain the elevation data of the target building area.

[0074] The color data corresponding to the three-dimensional data can compare the color of the target building area with the standard color, and use the color data corresponding to the standard color that matches the color of the target building area as the color data of the target building area. The standard color can be represented by a color card. It can be understood that after obtaining the three-dimensional data of the target building area, the color data corresponding to the three-dimensional data can also be obtained according to tools such as python and OpenCV. Optionally, the color data corresponding to the target building area can be obtained through the orthographic projection data. The color data corresponding to the three-dimensional data can be obtained by identifying the color data corresponding to each grid in the orthographic projection data, and according to the color data corresponding to each grid in the grid point set. For example, the color data corresponding to each grid is spliced ​​to obtain the color data corresponding to the three-dimensional data, that is, the color data corresponding to the target building area. In an example, the color data is as follows: Figure 4 As shown, from Figure 4 It can be seen that the color data corresponding to grids at different positions may be the same or different.

[0075] Step 206: input the elevation data and color data into the target monomer segmentation model to obtain the building contour lines of the target building area.

[0076] The target monomer segmentation model is a model used to identify the building contours of the target building area. The target monomer segmentation model can be an existing model, or a model trained by an existing model. For example, the target monomer segmentation model can be yolov8, or a model trained based on yolov8.

[0077] It can be understood that the building outline refers to the outer outline of the building in the target building area.

[0078] Step 208, segment the three-dimensional data according to the building outline to obtain segmented building monomer data.

[0079] The building outline represents the external outline of the building, and the overlapping and separation relationship between buildings can be distinguished through the building outline. In this embodiment, the server segments the three-dimensional data according to the building outline to obtain segmented building monomer data.

[0080] In one example, the three-dimensional data is data corresponding to a three-dimensional real-life dense model. The three-dimensional real-life dense model includes multiple triangular facets. The vertex coordinates of the triangular facets can be used to determine whether it belongs to a building unit corresponding to the building outline. Each triangular facet includes three vertices. The coordinates of each vertex correspond to (x, y, z). After each triangular facet is projected onto the horizontal surface, the corresponding two-dimensional coordinates of the vertex are (x′, y′). It is determined whether the two-dimensional coordinates of each triangular facet vertex belong to the target building outline. If all three vertices of the triangular facet are within the target building outline, the triangular facet belongs to the building unit corresponding to the target building outline. If only one vertex or two vertices are within the target building outline, the triangular facet is segmented by the target building outline, and the segmented part that belongs to the target building outline is assigned to the corresponding building unit. The segmented building unit data is as follows: Figure 5 shown.

[0081] In the above-mentioned building monomer segmentation method, by acquiring the three-dimensional data of the target building area, determining the elevation data and color data corresponding to the three-dimensional data, inputting the elevation data and color data into the target monomer segmentation model, obtaining the building contour line of the target building area, segmenting the three-dimensional data according to the building contour line, obtaining the segmented building monomer data, and realizing the building contour line based on the elevation data and color data in the three-dimensional data of the target building area. The building contour line obtained by more building features is more accurate, thereby improving the accuracy of the building monomer data obtained by segmenting the three-dimensional data according to the building contour line.

[0082] In some embodiments, determining elevation data corresponding to the three-dimensional data in step 204 includes:

[0083] Obtain orthographic projection data obtained by projecting the three-dimensional data on the horizontal surface; grid the orthographic projection data to obtain a grid point set; and obtain elevation data of the target building area based on the grid point set and the three-dimensional data.

[0084] In this embodiment, the three-dimensional data is projected on the horizontal plane of the surface to obtain the orthographic projection data on the horizontal plane of the surface. The orthographic projection data is two-dimensional data. It can be understood that the two-dimensional orthographic projection data can be saved in an image format. The orthographic projection data is gridded according to a preset size to obtain a grid point set. The grid sizes in the grid point set can be the same or different. For example, the grid can be divided according to the size of 0.1 meter * 0.1 meter, 0.5 meter * 0.5 meter or 1 meter * 1 meter to obtain a grid point set. According to the grid point set and the three-dimensional data, the elevation data corresponding to each grid can be obtained. According to the elevation data corresponding to each grid, the elevation data of the three-dimensional data is obtained, that is, the elevation data of the target building area is obtained.

[0085] Optionally, the grid point set and the three-dimensional data can be aligned, and for the target grid in the grid point set, the height data in the three-dimensional data at the position corresponding to the target grid is obtained, and the height data is used as the elevation data corresponding to the target grid. Then, the elevation data of the target building area is obtained based on the elevation data corresponding to each grid in the grid point set.

[0086] In this embodiment, the orthographic projection data obtained by projecting the three-dimensional data on the horizontal surface is obtained, the orthographic projection data is gridded to obtain a grid point set, and the elevation data of the target building area is obtained based on the grid point set and the three-dimensional data, which can improve the accuracy of the obtained elevation data.

[0087] In an exemplary embodiment, obtaining elevation data of a target building area according to a grid point set and three-dimensional data includes:

[0088] The grid point set is aligned with the three-dimensional data on the horizontal surface; the height value of the target intersection point farthest from the target grid among the intersection points of the normal of the aligned target grid and the three-dimensional data is obtained, and the height value of the target intersection point is used as the elevation data of the target grid; based on the elevation data of the target grid, the elevation data of the target building area is obtained.

[0089] In this embodiment, the grid point set is aligned with the three-dimensional data on the horizontal surface, that is, each grid in the three-dimensional data is aligned with the corresponding position in the three-dimensional data. Each grid has at least one corresponding normal line, and the normal line intersects with the aligned three-dimensional data starting from the horizontal surface to generate at least one intersection point. The intersection point with the largest height value among the intersection points is taken as the target intersection point, and the height value of the target intersection point is taken as the elevation data of the corresponding grid. In one example, the grid point set is aligned with the three-dimensional data on the horizontal surface. For the target grid in the grid point set, the target grid can be any grid in the grid point set. The intersection point farthest from the target grid among the intersection points of the normal line at the center position of the target grid and the aligned three-dimensional data, that is, the intersection point farthest from the horizontal surface, is obtained, and the intersection point is taken as the target intersection point. The height value of the target intersection point is obtained, and the height value of the target intersection point is taken as the elevation data of the target grid. By analogy, the elevation data of each grid in the grid point set can be obtained, and the elevation data of each grid in the grid point set are spliced ​​to obtain the elevation data of the target building area. In one example, the elevation data of the target building area is as follows: Figure 6 shown.

[0090] It can be understood that in the aligned target grid and the three-dimensional data, the height of the intersection of the normal of the target grid and the three-dimensional data can be calculated by the corresponding relationship between the shooting coordinate system and the world coordinate system and the shooting angle if the three-dimensional data is obtained by oblique photography technology. The calculation method of the height value of the target intersection point varies according to the different methods for obtaining the three-dimensional data. In this embodiment, the calculation method of the height value of the target intersection point is not specifically limited.

[0091] In this embodiment, by aligning the grid point set with the three-dimensional data on the horizontal plane of the surface, the elevation data of the target grid is obtained according to the height value of the intersection of the normal of the aligned target grid and the three-dimensional data, thereby obtaining the elevation data of the target building area, and subdividing the target building area into a grid. The elevation data of the building is obtained according to the elevation data of the grid, and the elevation data of the target building area is refined, thereby improving the accuracy of the elevation data of the target building area.

[0092] In some embodiments, step 206 of inputting elevation data and color data into the target monomer segmentation model to obtain the building contour line of the target building area includes:

[0093] The elevation data is divided into blocks to obtain a plurality of elevation data blocks, and the color data is divided into blocks to obtain a plurality of color data blocks; the elevation data blocks and the color data blocks at the same position are input into the target monomer segmentation model to obtain the building outline of the building block at the position; and the building outline of the target building area is obtained according to the building outline of the building block.

[0094] In this embodiment, the elevation data can be divided into blocks according to the position to obtain a plurality of elevation data blocks, and the color data can be divided into blocks to obtain a plurality of color data blocks. The size of each elevation data block and the size of each color data block can be the same. Then, the elevation data block and the color data block at the same position are input into the target monomer segmentation model to obtain the building outline of the building block at the position. By analogy, the building outline of the target building area can be obtained based on the building outlines of all building blocks. Optionally, the building outlines of all building blocks can be spliced ​​to obtain the building outline of the target building area. In one example, the building outline is as follows: Figure 7 shown.

[0095] Optionally, in the process of block division, the grid may be used as the smallest single block division unit, for example, the block division may be performed according to a 1024*1024 grid, or according to a 512*512 grid, etc. Adjacent blocks are overlapped according to a preset overlap rate, for example, at a preset overlap rate of 20% or 50%.

[0096] In this embodiment, by inputting the elevation data block and color data block at the same location into the target monomer segmentation model, the building block contour line at that location is obtained, and then the building contour line of the target building area can be obtained, which can improve the accuracy of the building contour line of the target building area.

[0097] It can be understood that before inputting the elevation data and color data corresponding to the target building area into the target monomer segmentation model to obtain the building contour line of the target building area, it is necessary to train the initial monomer segmentation model to obtain the target monomer segmentation model.

[0098] In one embodiment, Figure 8 As shown, the training method of the target monomer segmentation model includes the following steps 802 to 808. Among them:

[0099] Step 802, obtaining sample three-dimensional data of the building area sample.

[0100] Sample 3D data refers to data used to represent 3D information of building area samples. Building area samples refer to areas containing buildings used for training.

[0101] The sample three-dimensional data may be three-dimensional real scene model data containing the building sample, or three-dimensional model data obtained by transforming the three-dimensional real scene model containing the building sample according to a certain ratio.

[0102] Step 804, determining the sample elevation data and the sample color data corresponding to the sample three-dimensional data.

[0103] The sample elevation data is data representing the height of the area sample containing the building, and the sample color data is data representing the color of the area sample containing the building. The sample color data may be, for example, RGB color data corresponding to the area sample containing the building.

[0104] Optionally, the sample three-dimensional data may be projected on a horizontal surface to obtain orthographic projection data, and the sample elevation data corresponding to the sample three-dimensional data may be obtained based on the orthographic projection data and the sample three-dimensional data. For example, the orthographic projection data may be gridded to obtain a grid point set formed by a plurality of grids, the grid point set and the sample three-dimensional data may be aligned, at least one normal line may be derived from each grid, each normal line may have at least one intersection with the sample three-dimensional data, the height value of the intersection point farthest from the grid may be obtained as the sample elevation data of the grid, the elevation data of all grids may be spliced, and the sample elevation data corresponding to the building sample may be obtained.

[0105] It is understandable that the sample color data can be obtained based on the forward projection data. Optionally, the sample color data of each grid obtained by meshing based on the forward projection data can be identified, and the sample color data corresponding to the sample three-dimensional data can be obtained according to the sample color data corresponding to each grid.

[0106] Step 806, obtaining contour marking data obtained by performing contour line marking based on the sample color data.

[0107] The sample color data includes a boundary line formed by different color regions, and the boundary line is the corresponding contour line. In this embodiment, contour marking data can be obtained by manually marking contours based on color data, and the server obtains contour marking data obtained by marking contours based on color data.

[0108] Step 808 , training the initial monomer segmentation model based on the sample elevation data, the sample color data and the contour annotation data to obtain a target monomer segmentation model.

[0109] The target monomer segmentation model is a model used to identify building contours. The sample elevation data and sample color data can be used as input, and the contours annotated in the contour annotation data guide the model output. The initial monomer segmentation model is trained to obtain the target monomer segmentation model.

[0110] Optionally, the sample elevation data and the sample color data are input into the initial monomer segmentation model to obtain the predicted building contour line. The initial monomer segmentation model is trained according to the difference between the predicted building contour line and the contour line marked in the contour annotation data until the difference between the predicted building contour line and the contour line marked in the contour annotation data meets the preset conditions, thereby obtaining the target monomer segmentation model.

[0111] Optionally, the initial monomer segmentation model is trained based on the sample elevation data, the sample color data and the contour annotation data until the training conditions are met to obtain a target monomer segmentation model. The training conditions may be reaching a preset number of training times or the training loss reaching a preset loss value. For example, the sample elevation data and the sample color data are input into the initial monomer segmentation model to obtain a predicted building contour line, until the difference between the predicted contour line and the contour line annotated by the contour annotation data summary is less than a preset loss value, then the target monomer segmentation model is obtained.

[0112] In an optional embodiment, the sample elevation data and sample color data are enhanced by flipping, cropping, splicing, etc. to obtain enhanced sample elevation data and sample color data. The initial monomer segmentation model is trained based on the enhanced sample elevation data and sample color data and the corresponding contour annotation data to obtain a target monomer segmentation model.

[0113] In an optional embodiment, the sample elevation data and sample color data corresponding to the sample three-dimensional data are processed in blocks to obtain sample elevation data blocks and sample color data blocks, respectively, and the contour annotation data is processed in blocks to obtain contour annotation data blocks. The initial monomer segmentation model is trained based on the sample elevation data blocks, sample color data blocks and contour annotation data blocks at the same position to obtain the target monomer segmentation model. It can be understood that the size of the data block corresponding to the block processing in this embodiment can be selected according to the actual application scenario. In one example, the block processing can be performed according to the data block size of 1024*1024 grids. For example, if the grid size corresponding to the grid division is 0.1 meters * 0.1 meters, then the corresponding data block size is 102.4 meters * 102.4 meters. In the process of block processing, adjacent blocks are overlapped according to a preset overlap rate.

[0114] In this embodiment, the initial monomer segmentation model is trained using the sample elevation data, sample color data, and contour annotation data corresponding to the sample three-dimensional data to obtain a target monomer segmentation model. Training the initial monomer segmentation model using both the sample elevation data and the sample color data can make the obtained target monomer segmentation model more accurate. In addition, compared to training only with color data, a target monomer segmentation model of the same quality can be obtained with less annotation data and less training data, thereby improving the model training efficiency.

[0115] In an exemplary embodiment, the initial monomer segmentation model is trained based on the sample elevation data, the sample color data and the contour annotation data to obtain the target monomer segmentation model, including:

[0116] The sample elevation data and the sample color data are input into the initial monomer segmentation model to obtain the predicted building contour line; according to the difference between the predicted building contour line and the building contour line in the contour annotation data, the initial monomer segmentation model is trained to obtain the target monomer segmentation model.

[0117] In this embodiment, the server inputs the sample elevation data and the sample color data into the initial monomer segmentation model to obtain the predicted building contour line, calculates the difference between the predicted building contour line and the building contour line in the contour annotation data, and trains the initial monomer segmentation model according to the difference until the difference is less than the difference threshold, thereby obtaining the target monomer segmentation model.

[0118] In one example, the server inputs sample elevation data and sample color data into an initial monomer segmentation model to obtain a predicted building outline, calculates the difference between the predicted building outline and the building outline in the outline annotation data, and determines whether the difference is less than a difference threshold. If the difference is less than the difference threshold, the current initial monomer segmentation model is used as the target monomer segmentation model. If the difference is not less than the difference threshold, the model parameter value of the initial monomer segmentation model is adjusted according to the difference, and the server returns to execute the step of inputting the sample elevation data and the sample color data into the initial monomer segmentation model to obtain the predicted building outline until the difference is less than the difference threshold.

[0119] In this embodiment, by inputting sample elevation data and sample color data into the initial monomer segmentation model, the predicted building contour is obtained, and the initial monomer segmentation model is trained according to the difference between the predicted building contour and the building contour in the contour annotation data to obtain the target monomer segmentation model. This enables the target monomer segmentation model to quickly learn the ability to output the correct building contour, thereby improving the convergence speed of model training.

[0120] In one embodiment, Fig. 9 As shown, the training method of the target monomer segmentation model includes the following steps 902 to 910.

[0121] Step 902, obtaining sample three-dimensional data of the building area sample.

[0122] Step 904: determine the sample elevation data and sample color data corresponding to the sample three-dimensional data.

[0123] Step 906 , obtaining contour marking data obtained by performing contour marking based on the sample color data, or obtaining contour marking data obtained by performing contour marking based on the sample three-dimensional data.

[0124] Step 908: Input the sample elevation data and the sample color data into the initial monomer segmentation model to obtain the predicted building outline.

[0125] Step 910, training the initial monomer segmentation model according to the difference between the predicted building contour and the building contour in the contour annotation data until the difference between the predicted building contour and the building contour in the contour annotation data is less than a difference threshold, thereby obtaining a target monomer segmentation model.

[0126] In one example, the training process of the building monomer segmentation model includes: obtaining the two-dimensional range of the three-dimensional real-life dense model of the target building area on the horizontal plane of the surface; if the two-dimensional range is represented by x-coordinates and y-coordinates, the two-dimensional range is gridded according to the size of 0.1 meters * 0.1 meters to obtain a grid point set; for each grid in the grid point set, the height value of the target intersection point farthest from the target grid among the intersection points of the normal of the target grid and the three-dimensional real-life dense model is obtained, and the height value of the target intersection point is used as the elevation data corresponding to the target grid, and so on, the height value of each grid in the grid point set is obtained. The corresponding elevation data is obtained, and the color data of each grid is obtained at the same time; the color data is contour-marked to obtain contour-marked data; the elevation data and color data are divided into blocks according to 1024*1024 grids, and the adjacent blocks are divided into blocks according to a 50% overlap rate to obtain sample elevation data blocks and sample color data blocks; the contour-marked data are divided into blocks according to the same blocking method to obtain contour-marked data blocks; the yolov8 network is trained based on the sample elevation data blocks, sample color data blocks and contour-marked data blocks at the same position to obtain the target monomer segmentation model.

[0127] During the model application stage, the elevation data block and color data block at the same position corresponding to the three-dimensional real-life dense model are input into the target monomer segmentation model to obtain the building contour line of the building block at that position, and the building contour lines of the building blocks at each position are overlapped and merged to obtain the two-dimensional building contour line. The three-dimensional real-life dense model is segmented according to the two-dimensional building contour line to obtain the segmented building monomer.

[0128] In the above embodiment, by simultaneously inputting the elevation data and the color data into the monomer segmentation model, the characteristics of the change of the building edge elevation data can be better utilized to improve the accuracy of the building monomer segmentation.

[0129] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0130] Based on the same inventive concept, the embodiment of the present application also provides a three-dimensional real-scene thick model-oriented building monomer segmentation device for implementing the above-mentioned three-dimensional real-scene thick model-oriented building monomer segmentation method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above-mentioned method, so the specific limitations in one or more embodiments of the three-dimensional real-scene thick model-oriented building monomer segmentation device provided below can refer to the above-mentioned limitations on the three-dimensional real-scene thick model-oriented building monomer segmentation method, which will not be repeated here.

[0131] In an exemplary embodiment, Fig.10 As shown, a building monomer segmentation device for a three-dimensional real scene model is provided, comprising: a three-dimensional data acquisition module 1002, a dimension data determination module 1004, a contour line acquisition module 1006 and a building monomer segmentation module 1008, wherein:

[0132] A three-dimensional data acquisition module 1002 is used to acquire three-dimensional data of a target building area;

[0133] Dimensional data determination module 1004, used to determine elevation data and color data corresponding to the three-dimensional data;

[0134] The contour line obtaining module 1006 is used to input the elevation data and the color data into the target monomer segmentation model to obtain the building contour line of the target building area;

[0135] The building unit segmentation module 1008 is used to segment the three-dimensional data according to the building outline to obtain segmented building unit data.

[0136] In one embodiment, the dimensional data determination module 1004 is also used to obtain the orthographic projection data obtained by projecting the three-dimensional data on the horizontal plane of the surface; grid the orthographic projection data to obtain a grid point set; and obtain the elevation data of the target building area based on the grid point set and the three-dimensional data.

[0137] In one embodiment, the dimensional data determination module 1004 is also used to align the grid point set with the three-dimensional data on the horizontal plane of the surface; obtain the height value of the target intersection point farthest from the target grid among the intersection points of the normal of the aligned target grid and the three-dimensional data, and use the height value of the target intersection point as the elevation data of the target grid; and obtain the elevation data of the target building area based on the elevation data of the target grid.

[0138] In one embodiment, the contour line obtaining module 1006 is also used to divide the elevation data into blocks to obtain multiple elevation data blocks, and to divide the color data into blocks to obtain multiple color data blocks; the elevation data blocks and color data blocks at the same position are input into the target monomer segmentation model to obtain the building contour line of the building block at the position; based on the building contour line of the building block, the building contour line of the target building area is obtained.

[0139] In one embodiment, the building monomer segmentation device for three-dimensional real-scene dense model also includes a segmentation model training module, which is used to obtain sample three-dimensional data of building area samples; determine sample elevation data and sample color data corresponding to the sample three-dimensional data; obtain contour annotation data obtained by contour line annotation based on the sample color data; train the initial monomer segmentation model based on the sample elevation data, sample color data and contour annotation data to obtain a target monomer segmentation model.

[0140] In one embodiment, the segmentation model training module is also used to input sample elevation data and sample color data into the initial monomer segmentation model to obtain a predicted building contour line; based on the difference between the predicted building contour line and the building contour line in the contour annotation data, the initial monomer segmentation model is trained to obtain a target monomer segmentation model.

[0141] Each module in the above-mentioned building monomer segmentation device for three-dimensional real-life dense model can be fully or partially implemented by software, hardware and their combination. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the corresponding operations of the above modules.

[0142] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Fig.11As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for segmenting a building monomer for a three-dimensional real scene dense model is implemented.

[0143] Those skilled in the art will understand that Fig.11 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0144] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the steps of the building monomer segmentation method for three-dimensional real-scene dense model in the above-mentioned embodiment are implemented.

[0145] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the building monomer segmentation method for three-dimensional real-scene dense model in the above embodiment are implemented.

[0146] In one embodiment, a computer program product is provided, including a computer program, which, when executed by a processor, implements the steps of the building monomer segmentation method for three-dimensional real-scene dense model in the above-mentioned embodiment.

[0147] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0148] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method 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 the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0149] 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 application.

[0150] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for segmenting building monomers for three-dimensional real-life dense models, characterized in that: The method comprises: Acquire three-dimensional data of the target building area; Determining color data corresponding to the three-dimensional data; Obtaining orthographic projection data obtained by projecting the three-dimensional data onto a horizontal surface of the ground; Gridding the orthographic projection data to obtain a grid point set; Positionally aligning the grid point set with the three-dimensional data on the ground surface horizontal plane; Obtaining a height value of a target intersection point farthest from the target grid among intersection points of the normal line of the aligned target grid and the three-dimensional data, and using the height value of the target intersection point as elevation data of the target grid; Obtaining elevation data of the target building area according to the elevation data of the target grid; Dividing the elevation data into blocks to obtain a plurality of elevation data blocks, and dividing the color data into blocks to obtain a plurality of color data blocks; Inputting the elevation data block and the color data block at the same position into the target monomer segmentation model to obtain the building contour line of the building block at the position; The building outline of the target building area is obtained according to the building outline of the building block; the three-dimensional data is segmented according to the building outline to obtain segmented building monomer data.

2. The method according to claim 1, characterized in that: The training method of the target monomer segmentation model includes: Obtaining sample three-dimensional data of a sample of a building area; Determine sample elevation data and sample color data corresponding to the sample three-dimensional data; Acquire contour marking data obtained by performing contour line marking based on the sample color data; The initial monomer segmentation model is trained based on the sample elevation data, the sample color data and the contour annotation data to obtain the target monomer segmentation model.

3. The method according to claim 2, characterized in that The initial monomer segmentation model is trained based on the sample elevation data, the sample color data and the contour annotation data to obtain the target monomer segmentation model, including: Inputting the sample elevation data and the sample color data into the initial monomer segmentation model to obtain a predicted building outline; The initial monomer segmentation model is trained according to the difference between the predicted building outline and the building outline in the outline annotation data to obtain the target monomer segmentation model.

4. The method according to claim 2, characterized in that: The initial monomer segmentation model is trained based on the sample elevation data, the sample color data and the contour annotation data to obtain the target monomer segmentation model, including: The sample elevation data and the sample color data are processed in blocks to obtain corresponding sample elevation data blocks and sample color data blocks; the contour marking data are processed in blocks to obtain contour marking data blocks; The initial monomer segmentation model is trained based on the sample elevation data block, the sample color data block and the contour annotation data block at the same position to obtain the target monomer segmentation model.

5. A building monomer segmentation device for three-dimensional real-life dense model, characterized in that: The device comprises: A three-dimensional data acquisition module is used to acquire three-dimensional data of a target building area; A dimension data determination module is used to determine the color data corresponding to the three-dimensional data; obtain the orthographic projection data obtained by projecting the three-dimensional data on the horizontal surface; grid the orthographic projection data to obtain a grid point set; align the grid point set with the three-dimensional data on the horizontal surface; obtain the height value of the target intersection point farthest from the target grid among the intersection points of the normal line of the aligned target grid and the three-dimensional data, and use the height value of the target intersection point as the elevation data of the target grid; obtain the elevation data of the target building area according to the elevation data of the target grid; The contour line obtaining module is used to divide the elevation data into blocks to obtain a plurality of elevation data blocks, and to divide the color data into blocks to obtain a plurality of color data blocks; input the elevation data block and the color data block at the same position into the target monomer segmentation model to obtain the building contour line of the building block at the position; and obtain the building contour line of the target building area according to the building contour line of the building block; The building unit segmentation module is used to segment the three-dimensional data according to the building outline to obtain segmented building unit data.

6. The device according to claim 5, characterized in that The device also includes a segmentation model training module, which is used to obtain sample three-dimensional data of building area samples; determine sample elevation data and sample color data corresponding to the sample three-dimensional data; and obtain contour annotation data obtained by performing contour line annotation based on the sample color data; The initial monomer segmentation model is trained based on the sample elevation data, the sample color data and the contour annotation data to obtain the target monomer segmentation model.

7. The device according to claim 6, characterized in that The segmentation model training module is also used to input the sample elevation data and the sample color data into the initial monomer segmentation model to obtain a predicted building outline; and train the initial monomer segmentation model according to the difference between the predicted building outline and the building outline in the outline annotation data to obtain the target monomer segmentation model.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Real scene three-dimensional model reconstruction method and device

    CN117274536A

  • Building extraction device, method, and program

    JP2013088999A