Point cloud data processing method, device, storage medium and equipment
By dividing the surface according to the number of marked grids in the three-dimensional space, the problems of wasted computing resources and low prediction efficiency caused by the sparsity of point cloud data are solved, and more efficient three-dimensional space division and prediction efficiency are achieved.
Patent Information
- Application Number
- CN202410779806.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-17
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2044-06-17
AI Technical Summary
In three-dimensional vision tasks, due to the sparsity of point cloud data, computing resources are wasted and prediction efficiency is low. When the existing octree algorithm divides three-dimensional space, the efficiency of aggregating adjacent grid information is low.
By determining the marked grid in the three-dimensional space and dividing the surface according to the difference in the number of marked grids in the grid section, the three-dimensional space is divided to avoid invalid calculations in open areas and improve prediction efficiency. The specific method includes obtaining point cloud data, determining the number of marked grids in the three-dimensional grid section, determining the dividing plane according to the difference falling outside the preset range, and performing recursive division until the termination condition is met.
Effectively utilize the sparsity of point cloud data to avoid adjacent point cloud data being divided into different three-dimensional subspaces, improve prediction efficiency, and reduce waste of computing resources.
Smart Images

Figure CN118334278B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of three-dimensional data processing, and in particular to a point cloud data processing method, device, storage medium and equipment. Background Art
[0002] When performing 3D vision tasks, it is often necessary to predict the position of objects based on the collected point cloud data. For example, in autonomous driving, the position of objects in 3D space is predicted based on point cloud data to determine the position of obstacles. However, due to the sparsity of point cloud data, there are sparse areas in the point cloud distribution. If the computing resources are evenly distributed, invalid calculations will inevitably be performed on empty areas, reducing the prediction efficiency. Therefore, how to reasonably utilize the sparsity of point cloud data and avoid wasting computing resources is a key factor in improving prediction efficiency in 3D vision tasks.
[0003] At present, the octree algorithm is generally used to recursively divide the three-dimensional space into multiple levels of cube nodes. That is, the sparsity of point cloud data is used to perform local eight-equal divisions on the cube nodes in the densely distributed area of point cloud data, thereby avoiding invalid calculations in open areas by traversing the tree structure. However, due to the eight-equal recursive division method of the octree algorithm and the fact that neighboring grids in three-dimensional space are often in different cube nodes, the aggregation efficiency of neighboring information is low.
[0004] Based on this, this specification provides a point cloud data processing method, device, storage medium and equipment. Summary of the invention
[0005] This specification provides a point cloud data processing method, device, storage medium and equipment to partially solve the above-mentioned problems existing in the prior art.
[0006] This manual adopts the following technical solutions:
[0007] This specification provides a point cloud data processing method, the method comprising:
[0008] Acquire point cloud data, and determine a three-dimensional grid containing the point cloud in a three-dimensional grid of a three-dimensional space corresponding to the point cloud data as a marked grid;
[0009] For each dimension of the three-dimensional space, a plane formed by three-dimensional grids with consistent coordinates in the dimension is used as a grid section of the dimension, and the number of marked grids in each grid section is determined respectively;
[0010] According to the coordinate size of the dimension, for each grid section of the dimension, determine the difference between the number of marked grids in the grid section and the number of marked grids in the previous grid section;
[0011] When the difference falls outside the preset range, the plane between the grid section and the previous grid section is used as the dividing plane of the dimension;
[0012] Dividing the three-dimensional space according to the determined division planes of each dimension to obtain a division result of the three-dimensional space;
[0013] According to the point cloud data under the division result, the target prediction result is determined through the prediction model.
[0014] Optionally, according to the point cloud data under the segmentation result, a target prediction result is determined by a prediction model, specifically including:
[0015] Determine whether each three-dimensional subspace of the three-dimensional space under the division result satisfies a preset termination division condition;
[0016] If yes, determine the target prediction result through the prediction model according to the point cloud data under the division result;
[0017] If not, then for each three-dimensional subspace that does not meet the termination division condition, in the three-dimensional subspace, for each dimension, according to the coordinate size of the dimension, for each grid section of the dimension, determine the difference between the number of marked grids of the grid section in the three-dimensional subspace and the number of marked grids of the previous grid section in the three-dimensional subspace; when the difference falls outside the preset range, use the plane between the grid section and the previous grid section as the division surface of the dimension in the three-dimensional subspace; divide the three-dimensional subspace according to the division surfaces of each dimension, and update the division result of the three-dimensional space, until each three-dimensional subspace under the division result meets the termination division condition, stop updating, and obtain the target division result; determine the target prediction result through the prediction model according to the point cloud data under the target division result.
[0018] Optionally, before obtaining the division result of the three-dimensional space, the method further includes:
[0019] For each dimension of the three-dimensional space, in each grid section of the dimension, determine a grid section with a number of marked grids being zero as an empty section;
[0020] According to the coordinate size of the dimension, for each open section in turn, when there is a grid section with a non-zero number of marked grids in the adjacent grid sections of the open section, the grid section with a non-zero number of marked grids is taken as a boundary section;
[0021] The plane between the boundary section and the empty section is used as the dividing surface of this dimension.
[0022] Optionally, before determining, for each grid section of the dimension in sequence, the difference between the number of marked grids of the grid section in the three-dimensional subspace and the number of marked grids of a previous grid section in the three-dimensional subspace, the method specifically includes:
[0023] Determining a first resolution of the three-dimensional subspace according to a preset multiple based on the current resolution of the three-dimensional subspace;
[0024] At the first resolution, the three-dimensional grid containing the point cloud in the three-dimensional subspace is used as the marking grid.
[0025] Optionally, the target prediction result is determined through the prediction model, including:
[0026] Determine a division result of the three-dimensional space at the first resolution as a first division result of the three-dimensional space, and determine a first prediction probability through a prediction model according to the point cloud data of the first division result;
[0027] Using a resolution when the three-dimensional space is first divided as a second resolution, determining a division result of the three-dimensional space at the second resolution as a second division result of the three-dimensional space, and determining a second prediction probability through a prediction model according to point cloud data under the second division result;
[0028] A target prediction probability is determined based on the first prediction probability and the second prediction probability, and a target prediction result is determined based on the target prediction probability.
[0029] Optionally, the method further includes:
[0030] Determine a spatial index curve of the three-dimensional space, and map the point cloud data onto the spatial index curve to determine a mapping result;
[0031] According to the mapping result and the preset number of grids, the three-dimensional subspaces of the three-dimensional space under the division result are integrated and / or completed through the spatial index curve to obtain the three-dimensional subspaces composed of the three-dimensional grids of the number of grids.
[0032] Optionally, the prediction model includes an encoding module, a self-attention module, and a decoding module, and the prediction model is iteratively trained using the following method, wherein:
[0033] Collect point cloud data for several prediction tasks;
[0034] For each point cloud data, determine the division result of the three-dimensional space where the point cloud data is located, and use the point cloud data under the division result as training data, and determine the actual prediction result of the prediction task as the label of the training data;
[0035] Inputting the training data into the encoding module to obtain feature information output by the encoding module;
[0036] Inputting the feature information into the self-attention module to determine a third prediction probability of the training data;
[0037] Inputting the feature information into the decoding module, determining a fourth prediction probability of the training data, and determining a target prediction result according to the third prediction probability and the fourth prediction probability;
[0038] The prediction model is trained according to the loss between the target prediction result and the training data annotation.
[0039] This specification provides a point cloud data processing device, including:
[0040] An acquisition module, used for acquiring point cloud data, and determining a three-dimensional grid containing the point cloud in a three-dimensional grid of a three-dimensional space corresponding to the point cloud data as a marked grid;
[0041] A statistical module, for determining, for each dimension of the three-dimensional space, the number of marked grids in each grid section by taking a plane formed by three-dimensional grids with consistent coordinates in the dimension as a grid section of the dimension;
[0042] A first division module is used to determine, for each grid section of the dimension, in turn, according to the coordinate size of the dimension, the difference between the number of marked grids in the grid section and the number of marked grids in the previous grid section;
[0043] A second division module is used for, when the difference falls outside a preset range, using the plane between the grid section and the previous grid section as a division plane of the dimension;
[0044] A third division module is used to divide the three-dimensional space according to the determined division planes of each dimension, and obtain a division result of the three-dimensional space;
[0045] The prediction module is used to determine the target prediction result through the prediction model according to the point cloud data under the division result.
[0046] This specification provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, a point cloud data processing method is implemented.
[0047] The present specification provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements a point cloud data processing method when executing the program.
[0048] At least one of the above-mentioned technical solutions adopted in the present specification can achieve the following beneficial effects: in a point cloud data processing method provided in the present specification, in three-dimensional space, the marked grid where the point cloud data is located is determined, and for each dimension of the three-dimensional space, the plane formed by the three-dimensional grid with consistent coordinates in the dimension is used as a grid section of the dimension, and according to the coordinate size of the dimension, for each grid section of the dimension, the difference between the number of marked grids in the grid section and the number of marked grids in the previous grid section is determined, and when the difference falls outside a preset range, the plane between the grid section and the previous grid section is determined as the dividing surface of the dimension, and then based on the determined dividing surfaces of each dimension, the three-dimensional space is divided to obtain the division result of the three-dimensional space, and the target prediction result is determined through the prediction model according to the point cloud data under the division result.
[0049] It can be seen from the above method that according to the number of marked grids in each grid section, the division surface is determined by a preset threshold, and the three-dimensional space is divided based on each division surface to obtain the division result, that is, based on the distribution of the marked grids where the point cloud data is located, the division of the three-dimensional space is realized, which avoids the marked grids where adjacent point cloud data are located from being divided into different three-dimensional subspaces, thereby improving the prediction efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] The drawings described herein are used to provide a further understanding of this specification and constitute a part of this specification. The illustrative embodiments and descriptions of this specification are used to explain this specification and do not constitute an improper limitation on this specification. In the drawings:
[0051] Figure 1 A schematic diagram of a point cloud data processing method provided in this specification;
[0052] Figure 2 A schematic diagram of a three-dimensional space occupied by a marking grid provided in this specification;
[0053] Figure 3 A schematic diagram of a three-dimensional subspace under the division result provided in this specification;
[0054] Figure 4 A schematic diagram of determining a first resolution for a preset multiple provided in this specification;
[0055] Figure 5 A schematic diagram of determining a division result based on an open cross section provided in this specification;
[0056] Figure 6 A schematic diagram of the integrated three-dimensional subspace provided for this specification;
[0057] Figure 7 A schematic diagram of a structure for determining a target prediction result through a prediction model provided in this specification;
[0058] Figure 8 A schematic diagram of a point cloud data processing device provided in this specification;
[0059] Fig. 9 A schematic diagram of the electronic device structure corresponding to a point cloud data processing method provided in this specification. DETAILED DESCRIPTION
[0060] In order to make the purpose, technical solutions and advantages of this specification more clear, the technical solutions of this specification will be clearly and completely described below in combination with the specific embodiments of this specification and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of this specification, not all of them. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this specification.
[0061] The technical solutions provided by the embodiments of this specification are described in detail below in conjunction with the accompanying drawings.
[0062] Figure 1 A schematic diagram of a point cloud data processing method provided in this specification includes the following steps:
[0063] S100: Acquire point cloud data, and determine a three-dimensional grid containing the point cloud in a three-dimensional grid of a three-dimensional space corresponding to the point cloud data as a marked grid.
[0064] In one or more embodiments of this specification, it is not limited to which device is used to implement a point cloud data processing method, such as a personal computer, a mobile terminal, and a server. However, since the subsequent steps involve operations such as data processing, and such operations with high requirements for computing resources are generally performed by a server, this specification will also use a server to implement a point cloud data processing method as an example for description. Among them, the server can be a single device, or composed of multiple devices, such as a distributed server, and this specification does not limit this.
[0065] In one or more embodiments of the present specification, in order to determine the distribution of the three-dimensional grid in which the point cloud data is located in each grid section in the three-dimensional space in the subsequent steps, in this step, it is necessary to obtain the point cloud data to be analyzed and distinguish between the three-dimensional grids with and without point clouds in the three-dimensional space.
[0066] Specifically, the server can obtain point cloud data, and for each point in the point cloud data, determine the three-dimensional grid where the point is located in the three-dimensional space according to the three-dimensional coordinates of the point, and use the three-dimensional grid where the point is located as the marked grid. There is no restriction on the method of obtaining point cloud data, such as laser scanner, depth camera.
[0067] S102: For each dimension of the three-dimensional space, a plane formed by three-dimensional grids with consistent coordinates in the dimension is used as a grid section of the dimension, and the number of marked grids in each grid section is determined respectively.
[0068] In one or more embodiments of the present specification, in order to determine the division surface of each dimension in the three-dimensional space in the subsequent steps, in this step, for each dimension of the three-dimensional space, the number of marked grids in each grid section of the dimension is determined.
[0069] Specifically, for each dimension of the three-dimensional space, the server may treat a plane formed by three-dimensional grids with consistent coordinates in the dimension as a grid section of the dimension, and determine the number of marked grids in each grid section of the dimension. For example, for the x dimension of the three-dimensional space, a plane formed by three-dimensional grids with known coordinates in the x dimension is treated as a grid section of the x dimension, and the number of marked grids in each grid section of the x dimension is determined.
[0070] like Figure 2 As shown, the side length of the three-dimensional grid in the three-dimensional space is 1, and the marked grid occupies a cube space with a side length of 5 and a cube space with a side length of 3 in the three-dimensional space. According to the coordinate size of the x dimension, the number of marked grids in each grid section of the x dimension is 34, 34, 34, 25, 25, 0, ...; according to the coordinate size of the y dimension, the number of marked grids in each grid section of the y dimension is 25, 25, 25, 25, 25, 9, 9, 9, 0, ...; according to the coordinate size of the z dimension, the number of marked grids in each grid section of the z dimension is 34, 34, 34, 25, 25, 0, ....
[0071] S104: According to the coordinate size of the dimension, for each grid section of the dimension, determine the difference between the number of marked grids in the grid section and the number of marked grids in the previous grid section.
[0072] S106: when the difference falls outside a preset range, taking the plane between the grid section and the previous grid section as a dividing plane of the dimension;
[0073] In one or more embodiments of the present specification, in order to determine the division result of the three-dimensional space in subsequent steps, in S104 and S106, it is necessary to determine the division surface of each dimension based on the number of marked grids in each grid section of each dimension in S102.
[0074] Specifically, the server can determine, for each dimension of the three-dimensional space, according to the coordinate size of the dimension, and for each grid section of the dimension in turn, the difference between the number of marked grids in the grid section and the number of marked grids in the previous grid section; when the difference falls outside a preset range, the plane between the grid section and the previous grid section of the grid section is used as the dividing surface of the dimension.
[0075] Using the above example, assuming the preset range is -9~9, then based on the preset range, in the x-dimension, there are 0 marked grids in the grid section with coordinate 6, and the difference between it and the previous grid section with coordinate 5 is -25, that is, outside the preset range, the plane between the grid sections with coordinate 6 and 5 is used as a partition surface. Similarly, the plane between the grid sections with coordinate 1 and -1 is a partition surface. In the y-dimension, the plane between the grid sections with coordinate 1 and -1 is a partition surface, and the plane between the grid sections with coordinate 6 and 5 is a partition surface. In the z-dimension, the plane between the grid sections with coordinate 1 and -1 is a partition surface, and the plane between the grid sections with coordinate 6 and 5 is a partition surface.
[0076] S108: Divide the three-dimensional space according to the determined division planes of each dimension to obtain a division result of the three-dimensional space.
[0077] In one or more embodiments of the present specification, in order to analyze the point cloud data through the prediction model in the subsequent steps and obtain the target prediction results, in this step, the three-dimensional space needs to be divided according to the division surfaces of each dimension determined in S106 to obtain the division results of the three-dimensional space.
[0078] Specifically, the server may divide the three-dimensional space at each division plane according to the division planes of each dimension determined in S106 to obtain a division result of the three-dimensional space.
[0079] Using the above example, there are two partition planes in each dimension of the three-dimensional space, a total of six partition planes, then based on the partition planes of each dimension, the three-dimensional space is divided to obtain the partition result of the three-dimensional space. That is, the three-dimensional space is divided into 27 three-dimensional subspaces. Figure 3As shown, the marking grid provided for this specification occupies a cube space with a side length of 5 and a cube space with a side length of 3 in the three-dimensional space, which are schematic diagrams of the three-dimensional subspaces in which they are located respectively, wherein the cube and cuboid formed by dotted lines are the three-dimensional subspaces, and the maximum coordinate of the three-dimensional subspace where the cube space with a side length of 3 is located in the y dimension is the maximum coordinate of the three-dimensional space in the y dimension, which is only a schematic diagram.
[0080] S110: Determine a target prediction result through a prediction model according to the point cloud data under the division result.
[0081] In one or more embodiments of the present specification, in this step, under the division result determined in step S108, the point cloud data can be analyzed and processed by the prediction model in units of the three-dimensional subspace under the division result, and the target prediction result can be determined.
[0082] Specifically, the server can determine the point cloud data under the division result according to the division result in step S108, that is, for the point cloud data of each three-dimensional subspace, the point cloud data of the three-dimensional subspace is analyzed and processed through the prediction model, and then the target prediction result is determined. Among them, the point cloud data collected in step S100 can be pre-processed to improve the data quality of the point cloud data, and the specific method of pre-processing is not limited, such as interpolation conversion, filtering, etc. Interpolation conversion is used to smooth the point cloud data.
[0083] In the above method, for each dimension of the three-dimensional space, according to the coordinate size of the dimension, for each grid section of the dimension, the difference between the number of marked grids in the grid section and the number of marked grids in the previous grid section is determined, and the division surface of the dimension is determined through a preset range, and then based on the determined division surfaces, the division result of the three-dimensional space is obtained, that is, based on the distribution of the marked grids where the point cloud data is located, the division of the three-dimensional space is realized, and the marked grids where adjacent point cloud data are located are avoided from being divided into different three-dimensional subspaces, thereby improving the point cloud data based on the division result, and determining the prediction efficiency of the target prediction result through the prediction model.
[0084] In addition, this specification provides a method for dividing the three-dimensional space multiple times based on a preset termination division condition, as follows:
[0085] In the embodiment of the present specification, after dividing the three-dimensional space once, the server may determine whether each three-dimensional subspace under the division result of the first division of the three-dimensional space satisfies a preset termination division condition, thereby re-dividing the three-dimensional subspace that does not satisfy the termination division condition and updating the division result. The server may continue to make judgments based on the termination division condition until each three-dimensional subspace under the division result satisfies the termination division condition, and then stop updating the division result.
[0086] Specifically, the server can determine whether each three-dimensional subspace under the division result of the three-dimensional space satisfies the preset termination division condition. If each three-dimensional subspace satisfies the termination division condition, the target prediction result is determined through the prediction model according to the point cloud data under the division result. If each three-dimensional subspace does not satisfy the termination division condition, then for each three-dimensional subspace that does not satisfy the termination division condition, in the three-dimensional subspace, for each dimension, according to the coordinate size of the dimension, for each grid section of the dimension, the number of marked grids of the grid section in the three-dimensional subspace and the difference between the number of marked grids of the previous grid section in the three-dimensional subspace are determined. When the difference falls outside the preset range, the plane between the grid section and the previous grid section is used as the division surface of the dimension in the three-dimensional subspace. The three-dimensional subspace is divided according to each division surface, and the division result of the three-dimensional space is updated until each three-dimensional subspace under the division result satisfies the termination division condition, and the update is stopped to obtain the target division result. According to the point cloud data under the target division result, the target prediction result is determined through the prediction model. Among them, the conditions for terminating the division can be set according to needs, for example, "the proportion of marked grids in the three-dimensional subspace is greater than 70%" and / or "the minimum value of the difference between the number of marked grids in adjacent grid sections of the same dimension in the three-dimensional subspace is less than 2". Of course, this specification does not limit the number and specific content of the conditions for terminating the division, and it is only used as an example here.
[0087] In addition, dividing the three-dimensional space multiple times is a recursive division process. Then, by gradually improving the resolution of the three-dimensional subspace that needs to be divided again during the recursive division, the distribution of point cloud data in each three-dimensional subspace can be understood in more detail.
[0088] Specifically, the server may determine the first resolution of the three-dimensional subspace according to the current resolution of the three-dimensional subspace and the preset multiple for each three-dimensional subspace that does not meet the termination division condition, and then use the three-dimensional grid containing the point cloud in the three-dimensional subspace as the marked grid at the first resolution. Afterwards, in the three-dimensional subspace, for each dimension, according to the coordinate size of the dimension, for each grid section of the dimension, the number of marked grids in the three-dimensional subspace and the difference between the number of marked grids in the previous grid section in the three-dimensional subspace are determined. When the difference falls outside the preset range, the plane between the grid section and the previous grid section is used as the division surface of the dimension in the three-dimensional subspace, and then the three-dimensional subspace is divided according to the division surfaces of each dimension to determine the division result of the three-dimensional space, and the target prediction result is determined through the prediction model according to the point cloud data under the division result. Among them, the preset multiple represents the degree of encryption of the three-dimensional grid. Assuming that the current resolution of the three-dimensional subspace is 2*2*2, if the preset multiple is 2, then the first resolution of the three-dimensional subspace is 4*4*4, that is, the density of the three-dimensional grid in each dimension is expanded to twice the original.
[0089] It should be noted that when the resolution changes, the marker grid where the point cloud data is located will also change. Therefore, after determining the first resolution of each three-dimensional subspace, it is necessary to determine the distribution of the marker grid in each three-dimensional subspace at the first resolution.
[0090] like Figure 4 As shown, taking a two-dimensional space as an example, the two-dimensional grid filled with patterns in the figure is a marking grid in the two-dimensional space. Assuming R1 is the resolution when the two-dimensional space is first divided, the dimension of the two-dimensional space occupied by the marking grid at the R1 resolution is 3*3 plus 2*2. During multiple divisions, in the two-dimensional space, according to the preset multiple 2, the first resolution R2 is determined to be 6*6 and 4*4 respectively. Similarly, according to the R2 resolution, the dimension of the two-dimensional space occupied by the marking grid is 4*2 plus 4*2, so according to the preset multiple 2, the first resolution R3 is determined to be 8*4 plus 8*4.
[0091] In addition, the division result determined under the above-mentioned "gradually improving the resolution of the three-dimensional subspace that needs to be divided again by recursive division" is used as the first division result, and the first prediction probability is determined through the prediction model based on the point cloud data under the first division result. At the same time, the resolution when the three-dimensional space is first divided is used as the second resolution, and the division result determined after the three-dimensional space is divided once or multiple times based on the second resolution is used as the second division result, and the second prediction probability is determined through the prediction model based on the point cloud data under the second division result. Finally, the target prediction probability is determined based on the first prediction probability and the second prediction probability, and the target prediction result is obtained based on the target prediction probability.
[0092] It should be noted that the division result determined by performing one or more divisions based on a single resolution (second resolution) is more in line with the globality, while the division result determined by performing multiple divisions based on multiple resolutions (first resolution) is more detailed and more in line with the locality. Therefore, the target prediction probability obtained by combining the first prediction probability and the second prediction probability determines the target prediction result, which is more accurate.
[0093] In addition to the method of determining the division surface in steps S104 and S106, this specification provides a method of dividing the three-dimensional space based on the grid section without the marked grid, which is as follows:
[0094] In the embodiment of this specification, the grid section with zero number of marked grids, that is, the grid section without point cloud data, does not need to be analyzed and processed in the subsequent steps. Therefore, the server can use the grid section with zero number of marked grids as an empty section, and then divide the three-dimensional space through the empty section.
[0095] Specifically, for each dimension of the three-dimensional space, the server can determine the grid section with zero number of marked grids in each grid section of the dimension as an empty section, and according to the coordinate size of the dimension, for each empty section in turn, when there is a grid section with non-zero number of marked grids in the adjacent grid sections of the empty section, the grid section with non-zero number of marked grids is used as a boundary section, and then the plane between the boundary section and the empty section is used as the division surface of the dimension. There is no point cloud data that needs to be analyzed and processed in the empty section, so if there is a boundary section in the adjacent grid sections of the empty section, the plane between the boundary section and the empty section is used as the division surface.
[0096] It should be noted that whether it is determining the division surface based on whether the difference in the number of marked grids in adjacent grid sections falls outside the preset range in steps S104 to S106, or determining the division surface based on an empty section where the number of marked grids is zero and whether there is a boundary section in the empty section, both belong to a division rule. Therefore, when dividing the three-dimensional space based on the distribution of point cloud data, different division rules and the number of division rules can be set according to actual needs. For example, the server can determine the relative difference between the number of marked grids in the grid section and the number of marked grids in the previous grid section for each dimension of the three-dimensional space according to the coordinate size of the dimension, and if the relative difference is greater than the preset ratio, the plane between the grid section and the previous grid section is used as the division surface.
[0097] Continuing with the above example, if the current division rules include: the division rules based on steps S104 to S106 and the division rules for empty sections. Then there should be 3 division surfaces in the y dimension, namely, the plane between the grid sections with coordinates 1 and -1 is the division surface, the plane between the grid sections with coordinates 6 and 5 is the division surface, and the plane between the grid sections with coordinates 8 and 9 is the division surface. Then the number of division surfaces in each dimension is 7. Therefore, under the current division rules, according to the division surfaces in each dimension, there are 36 three-dimensional subspaces in the determined division result. Figure 5 As shown, the marking grid provided for this specification occupies a three-dimensional subspace of 5*5*5 dimensions where a cube space with a side length of 5 is located in the three-dimensional space, and a three-dimensional subspace of 5*3*5 dimensions where a cube space with a side length of 3 is located, wherein the cube / rectangle formed by dotted lines is the three-dimensional subspace, which is only a schematic diagram here.
[0098] The division surface determined based on "the empty section and the boundary section adjacent to the empty section", that is, the empty section in the three-dimensional subspace where the marked grid in S108 occupies a cube space with a side length of 3 in the three-dimensional space is divided out, thereby avoiding the retrieval of the empty section when analyzing and processing the point cloud data in the three-dimensional subspace, thereby improving efficiency.
[0099] In addition, the three-dimensional subspaces under the division results can be integrated through the spatial index curve to obtain three-dimensional subspaces with a fixed number of three-dimensional grids.
[0100] Specifically, the server may determine the spatial index curve of the three-dimensional space, and map the point cloud data obtained in step S100 onto the spatial index curve to determine the mapping result, and then according to the mapping result and the preset number of grids, the three-dimensional subspaces under the division result are integrated and / or completed through the spatial index curve to obtain each three-dimensional subspace composed of the three-dimensional grids of the number of grids. Among them, the spatial index curve may be a Z-order curve or a Hilbert curve, which is not limited in the present specification, and the number of grids may be set according to actual needs. Continuing with the above example, if the dimension is 5*5*5 and 125 is the preset number of grids, each three-dimensional subspace can be integrated into a dimension of 5*5*5, then a cube space with a side length of 5 occupied by the marked grid in the above is a three-dimensional subspace, and a 5*3*5 three-dimensional subspace where a cube space with a side length of 3 occupied by the marked grid is located is completed to obtain a three-dimensional subspace of 5*5*5 dimensions. Figure 6 As shown, assuming that there is a 5*2*5 three-dimensional subspace next to the 5*3*5 three-dimensional subspace, the 5*2*5 three-dimensional subspace and the 5*3*5 three-dimensional subspace can be integrated to obtain a 5*5*5 three-dimensional subspace.
[0101] It should be noted that the three-dimensional subspaces with different dimensions under the division results can be integrated into a three-dimensional subspace composed of a preset number of three-dimensional grids through the spatial index curve, that is, by unifying the dimensions of each three-dimensional subspace, the prediction model can perform batch analysis and processing on the point cloud data under each three-dimensional subspace.
[0102] Taking 3D visual segmentation as an example, the prediction model in step S110 includes an encoding module, a self-attention module, and a decoding module, and the prediction model is iteratively trained using the following method, which specifically includes:
[0103] First, point cloud data of several prediction tasks are collected, and for each point cloud data, the division result of the three-dimensional space where the point cloud data is located is determined, and the point cloud data under the division result is used as training data, and the actual prediction result of the prediction task is determined as the annotation of the training data.
[0104] Secondly, the training data is input into the encoding module of the prediction model to obtain the feature information output by the encoding module. The feature information is input into the self-attention module of the prediction model to obtain the third prediction probability, and the feature information is input into the decoding module of the prediction model to determine the fourth prediction probability, and the target prediction result is determined according to the third prediction probability and the fourth prediction probability. Among them, the feature information is input into the self-attention module as the input of "Key and Value" (key-value pair), and for the input of the query of the self-attention module, a set of fixed-length learnable parameters, that is, according to the input of the key-value pair (feature information), the third prediction probability is obtained by querying the learnable parameters, and then the third prediction probability is multiplied by the fourth prediction probability output by the decoding module to obtain the target prediction result.
[0105] Finally, the prediction model is trained based on the loss between the target prediction result obtained by the prediction model and the annotation of the training data.
[0106] like Figure 7 As shown in the figure, it is a schematic diagram of obtaining point cloud data of an object (seat), determining a division result based on the point cloud data, and then determining a target prediction result through a prediction model based on the point cloud data under the division result. In the encoding module, the resolution changes from high to low, and the features of the point cloud data are compressed to obtain feature information. Then, based on the decoding module, the dimension of the point cloud data features is restored to obtain the fourth prediction probability, which is then combined with the third prediction probability determined by the self-attention module to obtain the target prediction result.
[0107] The above is a point cloud data processing method provided in one or more embodiments of this specification. Based on the same idea, this specification also provides a corresponding point cloud data processing device, such as Figure 8 shown.
[0108] An acquisition module 500 acquires point cloud data, and determines a three-dimensional grid containing the point cloud in a three-dimensional grid of a three-dimensional space corresponding to the point cloud data as a marked grid;
[0109] The statistical module 501, for each dimension of the three-dimensional space, takes a plane formed by three-dimensional grids with consistent coordinates in the dimension as a grid section of the dimension, and determines the number of marked grids in each grid section;
[0110] A first division module 502 determines, for each grid section of the dimension, a difference between the number of marked grids in the grid section and the number of marked grids in the previous grid section according to the coordinate size of the dimension;
[0111] A second division module 503, when the difference falls outside a preset range, uses the plane between the grid section and the previous grid section as a division plane of the dimension;
[0112] A third division module 504 divides the three-dimensional space according to the determined division planes of each dimension, and obtains a division result of the three-dimensional space;
[0113] The prediction module 505 determines a target prediction result through a prediction model according to the point cloud data under the segmentation result.
[0114] Optionally, the prediction module 505 is specifically used to determine whether each three-dimensional subspace of the three-dimensional space under the division result satisfies a preset termination division condition; if so, a target prediction result is determined through a prediction model based on the point cloud data under the division result; if not, for each three-dimensional subspace that does not meet the termination division condition, in the three-dimensional subspace, for each dimension, according to the coordinate size of the dimension, for each grid section of the dimension, the number of marked grids of the grid section in the three-dimensional subspace and the difference between the number of marked grids of the previous grid section in the three-dimensional subspace; when the difference falls outside a preset range, the plane between the grid section and the previous grid section is used as the division surface of the dimension in the three-dimensional subspace; the three-dimensional subspace is divided according to the division surfaces of each dimension, and the division result of the three-dimensional space is updated until the updating is stopped when each three-dimensional subspace under the division result satisfies the termination division condition, and the target division result is obtained; the target prediction result is determined through a prediction model based on the point cloud data under the target division result.
[0115] Optionally, the second division module 503 is further used to determine, for each dimension of the three-dimensional space, in each grid section of the dimension, a grid section with a number of marked grids of zero as an open section; for each open section in turn according to the coordinate size of the dimension, when there is a grid section with a number of marked grids not zero in the adjacent grid sections of the open section, use the grid section with a number of marked grids not zero as a boundary section; and use the plane between the boundary section and the open section as the division surface of the dimension.
[0116] Optionally, the second division module 503 is also used to determine the first resolution of the three-dimensional subspace according to a preset multiple based on the current resolution of the three-dimensional subspace; at the first resolution, the three-dimensional grid containing the point cloud in the three-dimensional subspace is used as a marked grid.
[0117] Optionally, the prediction module 505 is also used to determine the division result of the three-dimensional space at the first resolution as the first division result of the three-dimensional space, and determine a first prediction probability through a prediction model based on the point cloud data under the first division result; use the resolution when the three-dimensional space is first divided as the second resolution, determine the division result of the three-dimensional space at the second resolution as the second division result of the three-dimensional space, and determine a second prediction probability through a prediction model based on the point cloud data under the second division result; determine the target prediction probability based on the first prediction probability and the second prediction probability, and determine the target prediction result based on the target prediction probability.
[0118] Optionally, the device also includes an integration module 506, which is specifically used to determine the spatial index curve of the three-dimensional space, and map the point cloud data onto the spatial index curve to determine the mapping result; according to the mapping result and a preset number of grids, the three-dimensional subspaces of the three-dimensional space under the division result are integrated and / or completed through the spatial index curve to obtain the three-dimensional subspaces composed of the three-dimensional grids of the number of grids.
[0119] This specification also provides a computer-readable storage medium, which stores a computer program, which can be used to execute the above Figure 1 A point cloud data processing method is provided.
[0120] This manual also provides Fig. 9 The schematic structure diagram of the electronic device shown in FIG. Fig. 9 As mentioned above, at the hardware level, the device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and may also include other hardware required for the business. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to achieve the above Figure 1 Of course, in addition to the software implementation, this specification does not exclude other implementations, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0121] In the 1990s, it was very clear whether the improvement of a technology was hardware improvement (for example, improvement of the circuit structure of diodes, transistors, switches, etc.) or software improvement (improvement of the method flow). However, with the development of technology, many improvements of the method flow today can be regarded as direct improvements of the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that the improvement of a method flow cannot be implemented with hardware entity modules. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask chip manufacturers to design and make dedicated integrated circuit chips. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one kind of HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.
[0122] The controller may be implemented in any suitable manner, for example, the controller may take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (e.g., software or firmware) executable by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include but are not limited to the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, and the memory controller may also be implemented as part of the control logic of the memory. It is also known to those skilled in the art that, in addition to implementing the controller in a purely computer-readable program code manner, the controller may be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, such a controller may be considered as a hardware component, and the devices for implementing various functions included therein may also be considered as structures within the hardware component. Or even, the devices for implementing various functions may be considered as both software modules for implementing the method and structures within the hardware component.
[0123] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0124] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0125] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0126] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0127] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0128] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0129] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0130] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0131] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0132] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0133] This specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0134] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0135] The above description is only an embodiment of the present specification and is not intended to limit the present specification. For those skilled in the art, the present specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification shall be included in the scope of the claims of the present specification.
Claims
1. A point cloud data processing method, characterized in that: include: Acquire point cloud data, and determine a three-dimensional grid containing the point cloud in a three-dimensional grid of a three-dimensional space corresponding to the point cloud data as a marked grid; For each dimension of the three-dimensional space, a plane formed by three-dimensional grids with consistent coordinates in the dimension is used as a grid section of the dimension, and the number of marked grids in each grid section is determined respectively; According to the coordinate size of the dimension, for each grid section of the dimension, determine the difference between the number of marked grids in the grid section and the number of marked grids in the previous grid section; When the difference falls outside the preset range, the plane between the grid section and the previous grid section is used as the dividing plane of the dimension; Dividing the three-dimensional space according to the determined division planes of each dimension to obtain a division result of the three-dimensional space, wherein the division result represents each three-dimensional subspace after the division; According to the point cloud data under the division result, the target prediction result is determined through the encoding module, self-attention module and decoding module in the prediction model.
2. The method according to claim 1, characterized in that: According to the point cloud data under the division result, the target prediction result is determined through the prediction model, specifically including: Determine whether each three-dimensional subspace of the three-dimensional space under the division result satisfies a preset termination division condition; If yes, determine the target prediction result through the prediction model according to the point cloud data under the division result; If not, then for each three-dimensional subspace that does not meet the termination division condition, in the three-dimensional subspace, for each dimension, according to the coordinate size of the dimension, for each grid section of the dimension, determine the difference between the number of marked grids of the grid section in the three-dimensional subspace and the number of marked grids of the previous grid section in the three-dimensional subspace; when the difference falls outside the preset range, use the plane between the grid section and the previous grid section as the division surface of the dimension in the three-dimensional subspace; divide the three-dimensional subspace according to the division surfaces of each dimension, and update the division result of the three-dimensional space, until each three-dimensional subspace under the division result meets the termination division condition, stop updating, and obtain the target division result; determine the target prediction result through the prediction model according to the point cloud data under the target division result.
3. The method according to claim 1 or 2, characterized in that: Before obtaining the division result of the three-dimensional space, the method further includes: For each dimension of the three-dimensional space, in each grid section of the dimension, determine a grid section with a number of marked grids being zero as an empty section; According to the coordinate size of the dimension, for each open section in turn, when there is a grid section with a non-zero number of marked grids in the adjacent grid sections of the open section, the grid section with a non-zero number of marked grids is taken as a boundary section; The plane between the boundary section and the empty section is used as the dividing surface of this dimension.
4. The method according to claim 2, characterized in that: Before determining, for each grid section of the dimension in sequence, the difference between the number of marked grids of the grid section in the three-dimensional subspace and the number of marked grids of the previous grid section in the three-dimensional subspace, the method specifically includes: Determining a first resolution of the three-dimensional subspace according to a preset multiple based on the current resolution of the three-dimensional subspace; At the first resolution, the three-dimensional grid containing the point cloud in the three-dimensional subspace is used as the marking grid.
5. The method according to claim 4, characterized in that: Through the prediction model, the target prediction results are determined, including: Determine a division result of the three-dimensional space at the first resolution as a first division result of the three-dimensional space, and determine a first prediction probability through a prediction model according to the point cloud data of the first division result; Using a resolution when the three-dimensional space is first divided as a second resolution, determining a division result of the three-dimensional space at the second resolution as a second division result of the three-dimensional space, and determining a second prediction probability through a prediction model according to point cloud data under the second division result; A target prediction probability is determined based on the first prediction probability and the second prediction probability, and a target prediction result is determined based on the target prediction probability.
6. The method according to claim 1, characterized in that: The method further comprises: Determine a spatial index curve of the three-dimensional space, and map the point cloud data onto the spatial index curve to determine a mapping result; According to the mapping result and the preset number of grids, the three-dimensional subspaces of the three-dimensional space under the division result are integrated and / or completed through the spatial index curve to obtain the three-dimensional subspaces composed of the three-dimensional grids of the number of grids.
7. The method according to claim 1, characterized in that: The prediction model includes an encoding module, a self-attention module and a decoding module, and the prediction model is iteratively trained using the following method, wherein: Collect point cloud data for several prediction tasks; For each point cloud data, determine the division result of the three-dimensional space where the point cloud data is located, and use the point cloud data under the division result as training data, and determine the actual prediction result of the prediction task as the label of the training data; Inputting the training data into the encoding module to obtain feature information output by the encoding module; Inputting the feature information into the self-attention module to determine a third prediction probability of the training data; Inputting the feature information into the decoding module, determining a fourth prediction probability of the training data, and determining a target prediction result according to the third prediction probability and the fourth prediction probability; The prediction model is trained according to the loss between the target prediction result and the training data annotation.
8. A point cloud data processing device, characterized in that: include: An acquisition module, used for acquiring point cloud data, and determining a three-dimensional grid containing the point cloud in a three-dimensional grid of a three-dimensional space corresponding to the point cloud data as a marked grid; A statistical module, for determining, for each dimension of the three-dimensional space, the number of marked grids in each grid section by taking a plane formed by three-dimensional grids with consistent coordinates in the dimension as a grid section of the dimension; A first division module is used to determine, for each grid section of the dimension, in turn, according to the coordinate size of the dimension, the difference between the number of marked grids in the grid section and the number of marked grids in the previous grid section; A second division module is used for, when the difference falls outside a preset range, using the plane between the grid section and the previous grid section as a division plane of the dimension; A third division module is used to divide the three-dimensional space according to the determined division planes of each dimension, and obtain a division result of the three-dimensional space, wherein the division result represents each three-dimensional subspace after the division; The prediction module is used to determine the target prediction result according to the point cloud data under the division result through the encoding module, the self-attention module and the decoding module in the prediction model.
9. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method described in any one of claims 1 to 7 is implemented.
10. An electronic device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the method according to any one of claims 1 to 7 is implemented when the processor executes the program.
