Implementation method of geometric feature sampling and mixed sensing point cloud feature encoder
Through a point cloud feature encoder based on geometric feature sampling and hybrid perception, the problem of insufficient local feature perception and high computational complexity in point cloud completion is solved, and efficient feature encoding and accurate point cloud completion are achieved.
Patent Information
- Application Number
- CN202410253492.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-06
- Publication Date
- 2024-08-30
AI Technical Summary
The existing technology has insufficient local feature perception capabilities in point cloud completion, resulting in reduced network performance. In addition, the computational complexity is high when processing large-scale point clouds, making it difficult to retain three-dimensional structural information.
A point cloud feature encoder based on geometric feature sampling and hybrid perception is used, through normal space downsampling and multi-thread programming acceleration, combined with a hybrid multi-layer perceptron to realize the splicing of multi-level feature vectors, and the quadratic surface fitting method is used for calculation. Vectors, uniform random sampling and hybrid pooling are performed to extract combined latent features.
It improves the performance in point cloud completion tasks, retains the fusion of local and global features, reduces computational complexity, improves the efficiency and accuracy of feature encoding, and is suitable for large-scale point cloud processing.
Smart Images

Figure CN118570318A
Abstract
Description
Technical Field
[0001] The present invention belongs to computer vision and deep learning, and provides a method for implementing a point cloud feature encoder for geometric feature sampling and hybrid perception. Background Art
[0002] Three-dimensional point cloud data has a wide range of applications in autonomous driving, robot navigation, object pose estimation and other fields. However, due to factors such as occlusion, viewing angle and surface material properties, the original point cloud obtained by single-side scanning is often incomplete, resulting in the loss of the structure of the object shape. This brings difficulties to the perception and decision-making of scenes such as industrial picking and industrial robot vision. Therefore, improving the ability to estimate the unseen part of the target will help improve the semantic understanding and path planning capabilities of industrial robots, and have a positive impact on tasks such as workpiece grasping and obstacle avoidance.
[0003] Existing point cloud completion methods mainly rely on complex encoder and decoder architectures. For example, L-GAN proposed a point cloud autoencoder that uses PointNet for feature extraction and then decodes through a fully connected multi-layer perceptron (MLP). FoldingNet and AtlasNet regard the mapping of two-dimensional surfaces to three-dimensional shapes as the main function of the decoder. PCN introduces a two-level decoder to generate point clouds from coarse to fine. TopNet designs the decoder as a hierarchical root tree to facilitate layer-by-layer refinement. The PF-Net network proposed in Reference 0 combines multi-scale encoders and decoders to predict the missing parts of the input residual point cloud, but there is a problem that the sampling method is greatly affected by the input point cloud.
[0004] Although local features have been shown to effectively improve the performance of classification, segmentation, and detection networks, existing completion methods only have encoders with global feature awareness. A baseline model in PCN attempts to use an encoder with local awareness, but it actually reduces network performance. Analysis shows that the reason for this is that the sampling method used by the above encoders is Farthest Point Sampling (FPS). The local area obtained by this method changes in each calculation, so the perceived local features are fluctuating and uncertain. For many generative networks that predict high-dimensional fine outputs from low-dimensional feature vector embedding, this uncertainty may lead to output deviations or even completely wrong features; on the contrary, the dimensionality reduction process in the discriminative network is more robust to feature changes, so the local awareness module shows higher performance in it. Reference [2] proposes to use CRA-Net to fully utilize the advantages of the local awareness module and alleviate the potential instability in the process of generating high-quality dense point clouds, but does not consider the impact of the pooling layer on feature extraction. As mentioned in the literature [3], local perception ability can make the network more sensitive to the features of shape details, which is of great significance for completing point clouds. It can be achieved by adopting a stable sampling method to obtain local point clouds, and then fusing multiple layers of feature perception layers to combine local features with global features. However, in the process of completing incomplete stalactite point clouds, it only realizes the splicing of high-dimensional convolution results and low-dimensional results after maximum pooling, ignoring the influence of background information, and cannot guarantee that the extracted feature vectors remain invariant to different arrangements of point cloud data.
[0005] Three-dimensional point cloud data is irregular, disordered and unstructured. For large-scale point cloud processing, direct feature extraction of point clouds can better preserve the three-dimensional structural information, but it requires a high computational cost when searching the neighborhood, which brings greater processing complexity to feature extraction and subsequent deep learning networks such as completion, classification, and segmentation. Therefore, it is necessary to first pre-process the native point cloud by downsampling (also called "downsampling"), and convert the operations on all point clouds to the key points obtained by downsampling, so as to achieve the purpose of reducing the amount of calculation.
[0006] Introduction to conventional point cloud downsampling methods in the prior art:
[0007] Downsampling should achieve a balance between reducing the amount of data and retaining the main features. The current mainstream downsampling methods are as follows.
[0008] 1) Grid downsampling
[0009] The principle of grid downsampling is to first grid the point cloud space, also known as voxelization. Each grid after gridding is called a voxel, which contains some points in these extremely small grids, and then these points are averaged or weighted averaged to get a point to replace all the points in the original grid. Obviously, the larger the grid selection, the fewer point clouds after sampling, and the faster the processing speed, but it will over-blur the original point cloud. The smaller the grid selection, the opposite effect.
[0010] The characteristics of grid downsampling are high efficiency, relatively uniform distribution of sampling points, and the point spacing can be controlled by controlling the grid size, but the number of sampling points cannot be precisely controlled.
[0011] 2) Downsampling FPS at the farthest point
[0012] The farthest point downsampling means that each time a sample is taken, the point farthest from the k-1 points sampled previously is selected. FPS can better ensure that the sampled points have a good coverage rate, so it is widely used in the field of point cloud segmentation, such as PointNet++, PointCNN, PointConv, PointWeb and other mainstream point cloud processing networks.
[0013] However, the amount of computation of FPS is quadratically related to the number of points in the input point cloud, which shows that FPS is not suitable for processing large-scale point clouds. For example, when a point cloud with millions of points is input, it takes about 200 seconds to downsample it to 10% of the original scale using FPS.
[0014] 3) Random downsampling
[0015] The principle of random downsampling is very simple. First, specify the number of points to be downsampled, and then perform random point removal for sampling. The number of point clouds after sampling is a parameter that needs to be adjusted according to the specific application scenario and data characteristics. Usually, a suitable value needs to be determined through experiments or experience.
[0016] The characteristic of random downsampling is that it can control the number of output point clouds, but the randomness is too large and may eliminate key data of the point cloud.
[0017] 4) Geometric downsampling
[0018] The principle of geometric downsampling is to use the geometric shape features of the point cloud as the sampling basis, such as curvature. There is a surface at any point in the point cloud. The curvature represents the degree of curvature of the surface. The greater the curvature, the greater the curvature of the surface at this point, and the more points are sampled. Therefore, this method is suitable for point cloud data with irregular surfaces and rich surface features.
[0019] Introduction to point cloud feature extraction and learning methods in existing technologies:
[0020] Algorithms for extracting useful features from point clouds have gone through a process from traditional pattern recognition to deep learning in recent years. Early descriptors, such as the PFH series, attempted to describe the local geometry of point clouds using normal vectors and distances between them. Although their calculation process is intuitive, interpretable, and unsupervised, the limited number of features is insufficient to generate complex three-dimensional shapes, while deep learning-based methods can extract high-dimensional features through deep neural networks. Early learning methods attempted to embed point sets into appropriate Euclidean structures, such as voxels or depth images, and then apply convolutional neural networks (CNNs) to them for feature extraction. However, these data all have high memory usage, and their outputs are always limited by resolution. The PointNet series successfully applied neural networks to unordered point sets by introducing shared one-dimensional convolutions and point-wise symmetric functions. The backbone of the network is effective in many point cloud analysis tasks such as classification, registration, segmentation, and detection. However, PointNet uses a transformation matrix to align point cloud data, and then inputs it into a neural network to perform convolution operations directly on the data. It integrates the features extracted by MLP with the global features extracted by max-pooling and outputs the results of semantic segmentation. This network can only process smaller-scale point cloud data, and only focuses on the global features of the point cloud, while ignoring the local features, resulting in the network's limited ability to process fine features of the point cloud.
[0021] In order to obtain the global and local features of the point cloud at the same time, the low-dimensional local features of the front layer and the high-dimensional global features of the back layer can be combined in the result vector of each convolution layer, so that the vector obtained after convolution contains both local feature information and global feature information. At the same time, since the maximum pooling strategy selects the set of feature vectors with the largest feature value of the current layer for splicing each time, and ignores the influence of other secondary feature vectors on the overall features, consider increasing the influence weight of the secondary feature vectors through mixed pooling.
[0022] The upgraded version of the PointNet series, PointNet++, takes into account the local features of the point cloud. In the process of encoding local information, in order to better obtain the relationship between points, the relative positions between the three-dimensional points in the neighborhood are used instead of the coordinates of the original three-dimensional points for processing. This method can extract the geometric and structural information of the local space of the point cloud. However, in the encoding process, it is obviously not enough to simply use the coordinate difference between the point and the center point as the geometric information of the local space. In addition, PointNet++ directly encodes the additional features and geometric information of the three-dimensional point cloud together, which makes the additional features of the point cloud not fully utilized.
[0023] Introduction to conventional 3D shape generation and completion methods in the prior art:
[0024] In recent years, many shape completion methods based on deep images or point clouds have been proposed. The output of these methods is either voxel grids or point clouds. Voxels take up a lot of memory space when representing three-dimensional shapes, which is not friendly to deep learning processing. The main focus is on methods that directly generate point clouds. A three-dimensional point cloud completion method based on a bidirectional pyramid structure with a hybrid attention mechanism is proposed. Point cloud average pooling and channel average pooling are used in the feature extraction process. Although the variance of the predicted value is reduced, the texture features of mechanical parts and such fine point clouds cannot be extracted well. L-GAN studies different types of generative models that recover point clouds from embedded features encoded by PointNet-based network layers. FoldingNet introduces a folding-based decoder that simulates a two-step deformation from a standard 2D grid to the underlying 3D surface of a point cloud. Similarly, AtlasNet abstracts the surface shape as a set of parameter elements and learns the mapping relationship between a set of squares and these surfaces. PCN proposes a two-stage point cloud completion pipeline, which first generates a low-resolution complete point cloud through an MLP with a fully connected layer, and then upsamples it using a folding-based layer. TopNet proposed a soft-constrained decoder following a multi-layer tree to predict the structural topology of the target shape. RL-GAN-Net uses reinforcement learning (RL) to quickly and robustly control the point cloud completion process. The network focuses on real-time prediction rather than improving accuracy. PF-Net proposed a multi-scale network based on feature points to predict the missing parts of three-dimensional shapes and generate dense point sets, but it can only complete sparse point clouds of large stereoscopic objects and cannot complete large point clouds with fine surface features well.
[0025] Most of the above methods use chamfer distance (CD) and earth movement distance (EMD) as indicators to monitor and evaluate the effect of point cloud completion.
[0026] Related background introduction for the technical problem to be solved by the present invention:
[0027] The shapes of various solids, especially artificial solids, are often related to each other, such as the common axisymmetric and central symmetric relationships. These simple and intuitive geometric characteristics can be directly obtained by humans and used for point cloud repair. But in more cases, the relationship between the various parts of the point cloud cannot be directly obtained in Euclidean space. There are more complex, high-dimensional hidden patterns and laws between a large number of discrete points in the point cloud, which are difficult to directly obtain using traditional geometric and mathematical methods, so it is impossible to use these relationships to repair some missing point clouds.
[0028] Existing documents that help understand the concept of the present invention:
[0029] [1]Huang Z, Yu Y, Xu J, et a1.Pf-net: Point fractal network for 3d pointcloud completion[C] / / Proceedings of the IEEE / CVF conference on computervision and pattem recognition.2020: 7662-7670;
[0030] [2]Wu H, Miao Y, Fu R.Point cloud completion using multiscale featurefusion and cross-regional attention[J].Image and Vision Computing, 2021, 111: 104193;
[0031] [3] Xia Yonghua, Huang De, Yang Minglong, Liu Haoran, Zhu Qi, Pan Yirong. A shape restoration method for incomplete stalactite point cloud based on deep learning. CN113538261A.2021.10.22.
[0032] [4] Li Yang, Xiao Yao, Gang Jialin, Yu Qingjun. A three-dimensional point cloud completion method with bidirectional pyramid structure based on hybrid attention mechanism. CN115994977A.2023.04.21; Summary of the invention
[0033] The purpose of the present invention is to develop a point cloud feature encoder by combining geometric feature sampling and hybrid perception technology to improve the performance of deep learning networks in fine point cloud completion tasks, especially in preserving the fusion of local features and global features to solve the problems of incompleteness and structure loss of single-sided scanning point clouds.
[0034] In order to achieve the above object, the present invention adopts the following technical solutions:
[0035] The present invention provides a method for implementing a point cloud feature encoder based on geometric feature sampling and hybrid perception, comprising the following steps:
[0036] Step 1. The original point cloud P is processed by downsampling based on the normal space to obtain the uniformly randomly sampled target point cloud M. This process uses a multi-threaded programming method to achieve point cloud acceleration processing;
[0037] Step 2. For the sampled point cloud data M, the multi-level feature vectors are concatenated by hybrid multi-layer perceptron to obtain the combined potential feature vector F.
[0038] In the above technical solution, step 1 includes the following steps:
[0039] Step 1.1. Input the original point cloud P and the number of sampled target points N set by the user;
[0040] Step 1.2. Determine whether the number of target points N input by the user satisfies the condition that it is greater than 0 and less than the number of points P in the original point cloud P. If not, go to step 1.1 and re-enter N. If it is satisfied, go to step 1.3;
[0041] Step 1.3. Through normal space segmentation, point cloud preprocessing and Kd tree construction, the disordered point cloud P is reorganized into an ordered point cloud P, and is prepared for the subsequent local surface fitting and feature extraction of the three-dimensional point cloud;
[0042] Step 1.4. Take the point p with index i from the ordered point cloud P i (x i ,y i , z i ), use the quadratic surface fitting method to calculate point p i (x i ,y i , z i ) Normal vector Vi, i is initially 1;
[0043] Step 1.5. Determine whether the normal vector Vi is a null vector. If so, update the index to i=i
[0044] +1, go to step 1.4 to process the next point, otherwise go to step 1.6;
[0045] Step 1.6. Calculate the Euclidean norm of the normal vector Vi and determine whether it is a unit vector. If so, go to step 1.7. Otherwise, skip the current point, update the index to i=i+1 and go to step 1.40 to process the next point.
[0046] Step 1.7. Calculate the index values ix, iy, iz of the normal space to which the normal vector belongs. The calculation formula is:
[0047] ix=0.5*(binX-1)*(v ix +1)
[0048] iy=0.5*(binY-1)*(V iy +1)
[0049] iz=0.5*(binZ-1)*(V iz +1)
[0050] Among them, ix∈[0,binX-1], iy∈[0,binY-1], iz∈[0,binZ-1], the three components of the index value are mapped to one dimension as the index value binNum of the normal space to which the normal vector Vi belongs. The calculation formula is:
[0051] binNum=ix*(binY*binZ)+iy*binZ+iz
[0052] Among them, binNum∈[0, binX*binY*binZ-1], the index value of the point corresponding to the vector Vi is saved in the corresponding normal space binj, where j is the rounded value of binNum;
[0053] Step 1.8. Determine whether all points have been traversed. If so, create a new set M to save the final sampling points and go to step 1.9. Otherwise, go to step 1.4 to continue processing the next point.
[0054] Step 1.9. Get the number X of sampled points in the result set M, and determine whether the target number of sampling points N is reached. If so, uniform random sampling in the normal space is completed. The sampled points cover different directions and shapes of the surface, retain the geometric diversity of the three-dimensional surface points, and capture drastic shape changes. The algorithm ends here. Otherwise, go to step 1.10;
[0055] Step 1.10. Select the normal space binj corresponding to the specified index j (j=0, 1, 2, ..., binX*binY*binZ-1);
[0056] Step 1.11. Determine whether the number of points stored in the current normal space binj is greater than 0. If so, go to step 1.12; otherwise, skip the current normal space and update the index to j=j+1 and go to step 1.10 to determine the next sub-normal space;
[0057] Step 1.12. Randomly select a point in the current normal space, add the three-dimensional coordinates of the point corresponding to its index to the result set M, mark the point as sampled, and go to step 1.9.
[0058] In the above technical solution, the above step 1.3 includes the following steps:
[0059] Step 1.3.1. Normal space segmentation: The user sets three positive integer thresholds binX, binY, and binZ to segment the three-dimensional normal space into bmX*binY*binZ subspaces, and each subspace is numbered in ascending order of X, Y, and Z coordinate values;
[0060] Step 1.3.2. Point cloud preprocessing: Randomly select a point from the point cloud P as the starting point, numbered as 1, and then use the nearest point algorithm to number all the remaining points, so as to convert the original point cloud P into an ordered point cloud P = {pi|i = 1, 2, 3, ..., P.size};
[0061] Step 1.3.3. Construct Kd tree: Construct Kd tree based on the ordered point cloud P. This is a data structure used to organize point cloud data and can efficiently perform spatial search and neighborhood query.
[0062] Step 1.3.4. Setting the number of points for fitting a local surface: The user sets an integer C, which represents the minimum number of points required to fit a local surface.
[0063] In the above technical solution, in the above step 1.4, the quadratic surface fitting method is used to calculate the point p i The normal vector Vi includes the following steps:
[0064] Step 1.4.1. Search point p i The K nearest neighbor points of i , let the number of points in the neighborhood point set n = C i .size;
[0065] Step 1.4.2. Determine whether the number of points in the neighborhood point set meets the minimum number of points C required to fit a local surface. If so, go to step 1.4.3; otherwise, set the normal vector V of the current point i Set to empty, the algorithm ends;
[0066] Step 1.4.3. For the neighborhood point set C i n points in , construct the quadratic surface fitting equation, and solve the coefficient vector X;
[0067] Step 1.4.4. Determine whether X has a solution. If so, proceed to step 1.4.5. Otherwise, set the normal vector V of the current point i Set to null, the algorithm ends;
[0068] Step 1.4.5. Calculate point p i The partial derivative at point p i The normal direction Rx i and Ry i ;
[0069] Step 1.4.6. Calculate point p i Normal vector V i , vector V i Through Rx i and Ry i Take the cross product and normalize it to get the calculation formula:
[0070]
[0071] So far, the current point p i The processing is finished.
[0072] In the above technical solution, step 2 includes the following steps:
[0073] Step 2.1. Encode each point into 5 dimensions: 64, 128, 256, 512, 1024;
[0074] Step 2.2. Perform mixed pooling on the four dimensions of the last four layers, 128, 256, 512, and 1024, to obtain the feature vectors fi of the corresponding dimensions;
[0075] Step 2.3. Connect the four fi obtained in step 2.2 to obtain a 1920-dimensional combined latent feature vector F.
[0076] In the above technical solution, in the above step 2.2, hybrid pooling is used to obtain the feature vector fi of each layer, including the following steps:
[0077] Step 2.2.1. For each feature vector layer, perform maximum pooling to obtain Mi and average pooling to obtain Ai;
[0078] Step 2.2.2. Calculate the difference between the maximum pooling result Mi and the average pooling result Ai, and apply the Sigmod interpolation method;
[0079] Step 2.2.3. Multiply the Sigmod interpolation result by the maximum pooling result to obtain the mixed pooling result fi, that is, the calculation formula of the mixed pooling feature vector fi is:
[0080]
[0081] Where a is an adjustment parameter with a value between 0 and 1, and e is the natural logarithm.
[0082] The present invention also provides a point cloud feature encoder implementation device based on geometric feature sampling and hybrid perception, comprising the following modules:
[0083] The downsampling processing unit obtains the uniformly randomly sampled target point cloud M by downsampling the original point cloud P based on the normal space. This process uses a multi-threaded programming method to achieve point cloud acceleration processing;
[0084] The feature vector concatenation unit concatenates multi-level feature vectors of the sampled point cloud data M through a hybrid multi-layer perceptron to obtain a combined potential feature vector F.
[0085] In the above device, the downsampling processing unit is implemented by the following steps:
[0086] Step 1.1. Receive the original point cloud P and the number of sampled target points N set by the user;
[0087] Step 1.2. Determine whether the number of target points N input by the user satisfies the condition that it is greater than 0 and less than the number of points P in the original point cloud P. If not, go to step 1.1 and re-enter N. If it is satisfied, go to step 1.3;
[0088] Step 1.3. Through normal space segmentation, point cloud preprocessing and Kd tree construction, the disordered point cloud P is reorganized into an ordered point cloud P, and is prepared for the subsequent local surface fitting and feature extraction of the three-dimensional point cloud;
[0089] Step 1.4. Take the point p with index i from the ordered point cloud P i (x i ,y i , z i ), use the quadratic surface fitting method to calculate point p i (x i ,y i , z i ) Normal vector Vi, i is initially 1;
[0090] Step 1.5. Determine whether the normal vector Vi is a null vector. If so, update the index to i=i
[0091] +1, go to step 1.4 to process the next point, otherwise go to step 1.6;
[0092] Step 1.6. Calculate the Euclidean norm of the normal vector Vi and determine whether it is a unit vector. If so, go to step 1.7. Otherwise, skip the current point, update the index to i=i+1 and go to step 1.40 to process the next point.
[0093] Step 1.7. Calculate the index values ix, iy, iz of the normal space to which the normal vector belongs. The calculation formula is:
[0094] ix=0.5*(binX-1)*(V ix +1)
[0095] iy=0.5*(binY-1)*(V iy +1)
[0096] iz=0.5*(binZ-1)*(V iz +1)
[0097] Among them, ix∈[0,binX-1], iy∈[0,binY-1], iz∈[0,binZ-1], the three components of the index value are mapped to one dimension as the index value binNum of the normal space to which the normal vector Vi belongs. The calculation formula is:
[0098] binNum=ix*(binY*binZ)+iy*binZ+iz
[0099] Among them, binNum∈[0, binX*binY*binZ-1], the index value of the point corresponding to the vector Vi is saved in the corresponding normal space binj, where j is the rounded value of binNum;
[0100] Step 1.8. Determine whether all points have been traversed. If so, create a new set M to save the final sampling points and go to step 1.9. Otherwise, go to step 1.4 to continue processing the next point.
[0101] Step 1.9. Get the number X of sampled points in the result set M, and determine whether the target number of sampling points N is reached. If so, uniform random sampling in the normal space is completed. The sampled points cover different directions and shapes of the surface, retain the geometric diversity of the three-dimensional surface points, and capture drastic shape changes. The algorithm ends here. Otherwise, go to step 1.10;
[0102] Step 1.10. Select the normal space binj corresponding to the specified index j (j=0, 1, 2, ..., binX*binY*binZ-1);
[0103] Step 1.11. Determine whether the number of points stored in the current normal space binj is greater than 0. If so, go to step 1.12; otherwise, skip the current normal space and update the index to j=j+1 and go to step 1.10 to determine the next sub-normal space;
[0104] Step 1.12. Randomly select a point in the current normal space, add the three-dimensional coordinates of the point corresponding to its index to the result set M, mark the point as sampled, and go to step 1.9.
[0105] Step 1.3 of the implementation steps of the above device includes the following steps:
[0106] Step 1.3.1. Normal space segmentation: The user sets three positive integer thresholds binX, binY, and binZ to segment the three-dimensional normal space into binX*binY*binZ subspaces, and each subspace is numbered in ascending order of X, Y, and Z coordinate values;
[0107] Step 1.3.2. Point cloud preprocessing: Randomly select a point from the point cloud P as the starting point, numbered as 1, and then use the nearest point algorithm to number all the remaining points, so as to convert the original point cloud P into an ordered point cloud P = {pi|i = 1, 2, 3, ..., P.size};
[0108] Step 1.3.3. Construct Kd tree: Construct Kd tree based on the ordered point cloud P. This is a data structure used to organize point cloud data and can efficiently perform spatial search and neighborhood query.
[0109] Step 1.3.4. Local surface fitting: The user sets an integer C, which represents the minimum number of points required to fit a local surface.
[0110] In step 1.4 of the implementation steps of the above device, the quadratic surface fitting method is used to calculate the point p i The normal vector Vi includes the following steps:
[0111] Step 1.4.1. Search point p i The K nearest neighbor points of i , let the number of points in the neighborhood point set n = C i .size;
[0112] Step 1.4.2. Determine whether the number of points in the neighborhood point set meets the minimum number of points required to fit a local surface. If so, go to step 1.43; otherwise, set the normal vector V of the current point i Set to null, the algorithm ends;
[0113] Step 1.4.3. For the neighborhood point set C i n points in , construct the quadratic surface fitting equation, and solve the coefficient vector X;
[0114] Step 1.4.4. Determine whether X has a solution. If so, proceed to step 1.4.5. Otherwise, set the normal vector V of the current point i Set to null, the algorithm ends;
[0115] Step 1.4.5. Calculate point p i The partial derivative at point p i The normal direction Rx i and Ry i ;
[0116] Step 1.4.6. Calculate point p i Normal vector V i , vector V i Through Rx i and Ry i Take the cross product and normalize it to get the calculation formula:
[0117]
[0118] So far, the current point p i The processing is finished.
[0119] In the implementation steps of the above device, the feature vector concatenation unit is implemented through the following steps:
[0120] Step 2.1: Encode each point into five dimensions: 64, 128, 256, 512, 1024;
[0121] Step 2.2: Mix and pool the four dimensions of the last four layers, 128, 256, 512, and 1024, to obtain the feature vectors fi of the corresponding dimensions;
[0122] Step 2.3: Concatenate the four fi obtained in step 2.2 to obtain a 1920-dimensional combined latent feature vector F.
[0123] Because the present invention adopts the above technical solution, it has the following beneficial effects:
[0124] 1. Adopting a point cloud downsampling method based on geometric features: This method retains the geometric diversity of point cloud data through uniform random sampling based on normal space, while capturing the drastic shape changes of the three-dimensional surface, solving the computational complexity and feature retention problems in large-scale point cloud processing.
[0125] 2. Multi-threaded programming acceleration processing: CUDA is used to generate multiple threads in the GPU and execute programs in parallel, which greatly improves the computational efficiency of the sampling process and reduces the computational time complexity.
[0126] 3. Hybrid Multi-layer Perceptron (MMLP) feature extraction: Combining the hybrid pooling method of maximum pooling and average pooling, MMLP not only retains the texture characteristics of point cloud data, but also reduces information loss, realizes the effective splicing of feature vectors of different levels of depth, and improves network performance.
[0127] 4. Calculation of normal vector by quadratic surface fitting method: Compared with the principal component analysis method, this method reduces the amount of calculation when calculating the normal vector of a point in the point cloud, improves the accuracy of solving the normal vector for the surface point, and enhances the practicality of the algorithm.
[0128] In summary, this technical solution not only improves the efficiency and accuracy of point cloud feature encoding through innovative point cloud downsampling methods, multi-threaded acceleration processing, hybrid multi-layer perceptron feature extraction, and quadratic surface fitting method to calculate normal vectors, but also provides richer and more stable features for subsequent point cloud completion, classification and other tasks, thus achieving significant technological progress in the fields of computer vision and three-dimensional point cloud processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0129] Figure 1 :Point cloud feature encoder network structure
[0130] The network structure of the proposed point cloud feature encoder is demonstrated, including the multi-threaded accelerated normal space sampling layer, the hybrid multi-layer perceptron (MMLP), and the generation part of feature vectors and feature maps.
[0131] Figure 2 :Normal space sampling algorithm flow chart
[0132] The generation process from raw point cloud data to target point cloud is described in detail, including user-set parameters, point cloud ordering, Kd tree construction, normal vector calculation, normal space partitioning, and uniform random sampling.
[0133] Figure 3 :The process of calculating the normal vector of a point in a point cloud using the quadratic surface fitting method
[0134] It shows the detailed process of how to select neighboring points from the point cloud, construct the quadratic surface fitting equation, solve the coefficient vector, calculate the partial derivatives, and finally obtain the normal vector.
[0135] Figure 4 : Quadratic surface fitting solution normal vector effect
[0136] The normal vectors calculated by the quadratic surface fitting method are visualized, demonstrating the effect of applying this method to point clouds.
[0137] Figure 5 : Multi-threaded acceleration of the sampling process
[0138] It describes how multithreaded programming is applied to the normal space downsampling process of point clouds, as well as the organization of thread execution and data processing in the GPU.
[0139] Figure 6 : Hybrid multi-layer perceptron feature extraction and splicing
[0140] It shows how the hybrid multi-layer perceptron (MMLP) extracts and concatenates feature vectors at different levels, including the dimension of the feature vector, the calculation formula of hybrid pooling, and the comparison with maximum pooling and average pooling.
[0141] Figure 7 : Comparison between the FPS method with downsampling to 1024 points and the method in this paper
[0142] The comparative effects of the FPS (Furthest Point Sampling) method and the point cloud feature encoder method based on geometric feature sampling and hybrid perception proposed in this paper are demonstrated when downsampling to 1024 points.
[0143] Figure 8 : Comparison between the FPS method with downsampling to 512 points and the method in this paper
[0144] The comparison between the FPS method and the method proposed in this paper is shown when the sampling is downsampled to 512 points.
[0145] Fig. 9 :Comparison of the original PF-Net network completion results and the improved completion results in this paper
[0146] The comparison between the original incomplete point cloud, the point cloud completed using the PF-Net network, and the point cloud completed using the improved method proposed in this paper is shown, proving the superiority of the method proposed in this paper in the point cloud completion task. DETAILED DESCRIPTION
[0147] The following is a detailed description of the embodiments of the present invention. Although the present invention will be described and illustrated in conjunction with some specific embodiments, it should be noted that the present invention is not limited to these embodiments. On the contrary, modifications or equivalent substitutions made to the present invention should all be included in the scope of the claims of the present invention.
[0148] In addition, in order to better illustrate the present invention, numerous specific details are given in the following specific embodiments. It will be understood by those skilled in the art that the present invention can also be implemented without these specific details.
[0149] This application proposes a point cloud feature encoder, whose network structure is as follows Figure 1 The main methods include: multi-threaded accelerated normal space sampling, Mixed Multi-Layer Perception (MMLP), and the generation and concatenation of feature vectors and feature maps.
[0150] The present invention provides a method for implementing a point cloud feature encoder based on geometric feature sampling and hybrid perception, comprising the following steps:
[0151] Step 1: The original point cloud P is subjected to downsampling processing based on the normal space to obtain a uniformly randomly sampled target point cloud M. This process uses a multi-threaded programming method to achieve point cloud acceleration processing;
[0152] Step 2: For the sampled point cloud data M, the multi-level feature vectors are concatenated by hybrid multi-layer perceptron to obtain the combined potential feature vector F.
[0153] In order to facilitate those skilled in the art to better understand the concept of the present invention, step 1 is further explained as follows:
[0154] The point cloud feature encoder pre-input layer used in this application uses the normal space geometric features proposed in this paper to complete the downsampling process. This process obtains point cloud data of three different scales, which can better preserve the local features of fine point clouds. The specific process of the normal space sampling algorithm is as follows: Figure 2 shown.
[0155] Normal space downsampling process:
[0156] Step 1.1, input the original point cloud P, and the user sets the number of target points N after sampling;
[0157] Step 1.2, determine whether the N input by the user satisfies the requirement of being greater than 0 (N>0) and less than the number of points P in the original point cloud (N<P.size). If not, go to step 1.1 and re-enter N. If satisfied, go to step 1.3;
[0158] Step 1.3, the user sets the three-dimensional thresholds binX, binY, and binZ for normal space segmentation, which are all positive integers, and divides the normal space into binX*binY*binZ sub-normal spaces, and numbers these sub-normal spaces from 0 to binX*binY*binZ-1 in the order of increasing X, Y, and Z coordinate values. A point is randomly selected in the point cloud P as the starting point, that is, the point numbered 1, and all remaining points are numbered using the nearest point algorithm, that is, the original point cloud P is sorted into an ordered point cloud P = {pi|i = 1, 2, 3, ..., P.size}; a Kd tree is constructed based on the point cloud P; the user sets the minimum number of points C required to fit a local surface;
[0159] Step 1.4: Take the point p with index i (i is initially 1) from the point cloud P i (x i ,y i , z i ), use the quadratic surface fitting method to calculate its normal vector Vi. The specific process of this method is shown in Figure 3 ;
[0160] Step 1.5, determine whether Vi is an empty vector, if so, update the index to i=i+1, and go to step 1.4 to process the next point; otherwise, go to step 1.6;
[0161] Step 1.6, calculate the Euclidean norm of Vi, the calculation formula is:
[0162]
[0163] V ix 、V iy 、V iz V iis the normal component in the x, y, z directions, and its value range is [-1, 1]. Determine whether Li is a unit vector (Li = 1). If so, go to step 1.7; otherwise, skip the current point, update the index to i = i + 1, and go to step 1.40 to process the next point;
[0164] Step 1.7, calculate the index values ix, iy, iz used to determine the normal space to which the current normal vector belongs. The calculation formula is:
[0165] ix=0.5*(binX-1)*(V ix +1)
[0166] iy=0.5*(binY-1)*(V iy +1)
[0167] iz=0.5*(binZ-1)*(V iz +1)
[0168] From the above calculation formula, we can know that ix∈[0, binX-1], iy∈[0, binY-1], iz∈[0, binZ-1]. The three components of the index value are mapped to one dimension as the index value binNum of the normal space to which the normal vector Vi belongs. The calculation formula is:
[0169] binNum=ix*(binY*binZ)+iy*binZ+iz
[0170] From the above formula, we can know that binNum∈[0, binX*binY*binZ-1]. The index value of the point corresponding to the vector Vi is saved in the corresponding normal space binj, where j is the rounded value of binNum.
[0171] Step 1.8: Determine whether all points in the point cloud P have been traversed (i = P.size); if yes, go to step 1.9; otherwise, update the index to i = i + 1 and go to step 1.4 to process the next point;
[0172] Step 1.9, obtain the number X of currently sampled points in the result set M, and determine whether the current number X of sampled points has reached the target number N (X=N); if yes, go to step 1.13, and the algorithm ends; otherwise, go to step 1.10;
[0173] Step 1.10, select the normal space binj corresponding to the specified index j (j=0, 1, 2, ..., binX*binY*binZ-1);
[0174] Step 1.11, determine whether the number of points stored in the current sub-normal space is greater than 0 (binj.size>0), if so, go to step 1.12; otherwise, skip the current normal space and update the index to j=j+1 and go to step 1.10 to determine the next sub-normal space;
[0175] Step 1.12, randomly select a point in the current normal space, add the three-dimensional coordinates of the point corresponding to its index to the result set M, mark the point as sampled, and go to step 1.9;
[0176] After steps 1.9-1.12, uniform random sampling in the normal space is achieved: first, all points in each sub-normal space can be sampled, retaining the geometric diversity of the entire three-dimensional surface points; second, in this process, points in areas with large feature changes will be adopted as much as possible. This is because the points in areas with large feature changes also have large changes in their normal vectors, and these points will be scattered in different sub-normal spaces. The normal vectors of points in relatively smooth areas do not change much and will be concentrated in a few sub-normal spaces; in this way, the points in the sub-normal space with fewer points are easier to be selected during uniform random sampling, that is, the points in areas where the geometric structure changes significantly will be sampled as much as possible. Therefore, the sampling method of the present application ensures that the sampled points cover different directions and shapes of the surface, and can better capture the drastic shape changes of the three-dimensional surface.
[0177] Step 1.13, the algorithm ends.
[0178] In step 1.4 above, calculate point p i The commonly used method to calculate the normal vector Vi is principal component analysis (PCA), the basic idea of which is to find the main direction in the data set, thereby obtaining a model that describes the data distribution. This method has the disadvantages of large amount of calculation, large error in solving the normal vector of the point on the surface, and the need to determine the number of principal components in advance. Therefore, this application proposes a quadratic surface fitting method to calculate the normal vector of the point. Its main process is as follows Figure 3 shown.
[0179] The specific process is:
[0180] Step 1.4.1. Search point p i The K nearest neighbor points (K is set by the user) of i , let n = C i .size:
[0181] Step 1.4.2: Determine whether the number of points in the neighborhood point set meets the minimum number of points required to fit a local surface (n>C,); if yes, go to step 1.4.3, otherwise, replace the normal vector V of the current point with iSet to empty and go to step 1.4.7 to end the algorithm;
[0182] Step 1.4.3: For the neighborhood point set C i The n points in , construct the quadratic surface fitting equation as follows:
[0183]
[0184] Among them, the 6×n matrix The matrix obtained by multiplying the x-coordinates and y-coordinates of n points, a 6-dimensional column vector is the coefficient vector of the quadratic surface fitting equation, is a column vector consisting of the z coordinates of n points. n ,y n The meaning is point p n ; a, b, c, d, e, f are the coefficients in the quadratic surface fitting equation, which fit the specific shape of the quadratic surface.
[0185] Step 1.4.4, solve the coefficient vector of the quadratic surface fitting equation and obtain:
[0186]
[0187] Step 1.4.5: Determine whether X has a solution (X≠null). If so, go to step 1.4.6. Otherwise, set the normal vector V of the current point i Set to empty, go to step 1.4.7, and the algorithm ends;
[0188] Step 1.4.6, partial derivatives describe the rate of change of a function at a certain point. For a quadratic surface model, its partial derivative at a certain point can be calculated to obtain the normal direction at that point. The calculation formula is:
[0189]
[0190]
[0191] in represents the sign of partial derivative, a, b, c are coefficients;
[0192] Point p i The normal vector V i Through Rx i and Ry i Take the cross product and normalize it to get the calculation formula:
[0193]
[0194] Step 1.4.7, the algorithm ends.
[0195] Through the above steps, each point p can be visualized in the point cloud programmatically. i The normal vector V i , its effect is as follows Figure 4 shown.
[0196] In order to solve the problem of high time complexity of geometric sampling calculations, this application uses multi-threaded programming to accelerate the sampling process. CUDA (compute unified device architecture) can generate multiple threads in the GPU to solve most of the complicated repetitive computing problems. After these threads are activated, they execute programs in parallel in the GPU to achieve the purpose of high-performance computing. When decomposing complex repetitive problems, the scale of the problem should be reduced while the solution process remains unchanged, so that the return value after each thread ends is part of the solution to the entire problem. After the entire parallel calculation is completed, the set of solutions of all threads is the solution to the entire problem. Since the point cloud data of each mechanical part is independent of each other, it can be used as input data to directly decompose the computing task according to a single part. In the GPU, each thread executes the same kernel function, which is responsible for processing the point cloud data of the corresponding part, realizing the normal space downsampling process of the point cloud, and returning the processed feature point cloud data on the part. The multi-threaded acceleration organizational structure designed by this application is as follows: Figure 5 shown.
[0197] In order to facilitate those skilled in the art to better understand the technical concept of the present invention, step 2 is described in detail as follows:
[0198] Step 2: Use Mixed pooling MultiLayer Perception (MMLP) to concatenate multi-level feature vectors.
[0199] Common pooling methods are mainly divided into maximum pooling and average pooling. PF-Net proposed to use maximum pooling in its CMLP (Combined Multi-Layer Perception) module to extract and concatenate feature vectors at different levels. This is because the maximum pooling method can effectively solve the problem of disorder of point cloud data. No matter how the point cloud data is arranged, the largest eigenvalue can always be selected to obtain a feature vector of the same size. Although maximum pooling can better retain the texture features of the data, it discards all points except the point with the maximum eigenvalue of this dimension, and loses a lot of other information. Average pooling can effectively reduce the variance of the predicted value, and at the same time ensure that the extracted feature vector remains invariant to different arrangements of point cloud data.
[0200] This application proposes a hybrid pooling method to extract feature vectors at different levels, such as Figure 6 shown.
[0201] This application proposes a hybrid multi-layer perceptron (MMLP), which first encodes each point into five dimensions, namely 64, 128, 256, 512, and 1024. Unlike MLP, which only performs a maximum pooling operation on the last layer, MMLP performs a mixed pooling operation on the last four layers to obtain a feature vector fi of the corresponding dimension. Corresponding to the dimensions of the last four layers, the feature vectors fi obtained are 128, 256, 512, and 1024 dimensions (i = 1, 2, 3, 4), respectively.
[0202] Different from MLP which directly forms the global latent feature vector F from the 1024 dimensions of the last layer through Max pooling, and also different from CMLP which concatenates the results of the last four layers of Max pooling as the latent feature vector, the MMLP proposed in this application connects the four fi to obtain a 1920-dimensional combined latent feature vector F, which contains both low-dimensional and high-dimensional feature information and is not affected by the dimension of a single pooling layer.
[0203] The mixed pool used in MMLP combines the maximum pooling and average pooling methods through Sigmod interpolation, which not only ensures the invariance of point cloud data or point cloud feature arrangement, but also increases the amount of feature information to obtain feature vectors containing more point cloud data information, avoiding the serious information loss problem caused by using maximum pooling alone in the PF-Net network. The calculation formula is:
[0204]
[0205] Mixed pooling results pooling It combines the advantages of maximum pooling and average pooling. M is the result of maximum pooling of the feature vector of this layer, A is the result of average pooling of the feature vector of this layer, and a is an adjustment parameter with a value between 0 and 1. Maximum pooling selects the maximum value in the local area as the output. Since the output value is not a linear combination of the input, this is a nonlinear operation. Average pooling calculates the average value in the local area, which is also a nonlinear operation. The Sigmod interpolation method is a commonly used nonlinear interpolation method. It is mainly used to map the input value to a range between 0 and 1, and finally multiply it by the maximum pooling result to obtain the final pooling result.
[0206] In summary, the present invention provides the possibility of obtaining "hidden patterns and laws" through deep learning methods. These implicit relationships may not be intuitive to humans, but they can be extracted by deep learning networks. This application intends to design a feature encoder that can effectively map input from Euclidean space to feature space and autonomously learn the relationship between various features through training. The feature encoder is an improved deep neural network based on an existing deep learning network. The relationship between different features of the point cloud learned and extracted can be used for subsequent completion of the residual point cloud.
[0207] In order to fully utilize the advantages of the local perception module and alleviate the potential instability in the process of generating high-quality dense point clouds, this paper proposes a cross-dimensional point cloud feature encoder based on the PF-Net point cloud completion deep learning network. Specifically, a point cloud downsampling method based on geometric features is adopted to optimize the processing scale of point cloud data while retaining local point clouds with obvious geometric features as much as possible; at the same time, in the process of extracting features through convolution operations, the multi-dimensional feature extraction method is changed, and a hybrid pooling connection is used to merge local area features with global features to improve the performance of the network.
[0208] This application proposes an encoder for feature extraction of original point clouds based on a new downsampling method and a hybrid pooling method. Compared with the existing feature extraction encoder, it can retain the feature points of the point cloud to the greatest extent and adaptively implement non-uniform sampling, thereby providing rich features for subsequent decoding, completion, classification and other processes.
[0209] This application proposes a normal space downsampling method based on multi-threading and quadratic surface fitting. Different from the farthest point downsampling process adopted by most networks, the proposed method can obtain point cloud geometric features stably, quickly and adaptively.
[0210] The present application proposes a multi-layer perceptron based on maximum pooling and average pooling mixed by a sigmoid function, which realizes the splicing of feature vectors of different depths and shallownesses in the feature perception process, avoiding the serious problem of information loss caused by using maximum pooling or average pooling alone.
Claims
1. A method for implementing a point cloud feature encoder based on geometric feature sampling and hybrid perception, characterized in that: The following steps are involved: Step 1. The original point cloud P is processed by downsampling based on the normal space to obtain the uniformly randomly sampled target point cloud M. This process uses a multi-threaded programming method to achieve point cloud acceleration processing; Step 2. For the sampled point cloud data M, the multi-level feature vectors are concatenated by hybrid multi-layer perceptron to obtain the combined potential feature vector F.
2. A method for implementing a point cloud feature encoder based on geometric feature sampling and hybrid perception according to claim 1, characterized in that: Step 1 includes the following steps: Step 1.
1. Input the original point cloud P and the number of sampled target points N set by the user; Step 1.
2. Determine whether the number of target points N input by the user satisfies the condition that it is greater than 0 and less than the number of points P in the original point cloud P. If not, go to step 1.1 and re-enter N. If it is satisfied, go to step 1.3; Step 1.
3. Through normal space segmentation, point cloud preprocessing and Kd tree construction, the disordered point cloud P is reorganized into an ordered point cloud P, and is prepared for the subsequent local surface fitting and feature extraction of the three-dimensional point cloud; Step 1.
4. Take the point p with index i from the ordered point cloud P i (x i ,y i ,z i ), use the quadratic surface fitting method to calculate point p i (x i ,y i ,z i ) Normal vector Vi, i is initially 1; Step 1.
5. Determine whether the normal vector Vi is a null vector. If so, update the index to i=i+1 and go to step 1.4 to process the next point. Otherwise, go to step 1.6; Step 1.
6. Calculate the Euclidean norm of the normal vector Vi and determine whether it is a unit vector. If so, go to step 1.
7. Otherwise, skip the current point, update the index to i=i+1 and go to step 1.4 to process the next point. Step 1.
7. Calculate the index values ix, iy, iz of the normal space to which the normal vector belongs. The calculation formula is: ix=0.5*(binX–1)*(V ix +1) iy=0.5*(binY–1)*(V iy +1) iz=0.5*(binZ–1)*(V iz +1) Among them, ix∈[0,binX–1], iy∈[0,binY–1], iz∈[0,binZ–1], the three components of the index value are mapped to one dimension as the index value binNum of the normal space to which the normal vector Vi belongs. The calculation formula is: binNum=ix*(binY*binZ)+iy*binZ+iz Among them, binNum∈[0,binX*binY*binZ–1], the index value of the point corresponding to the vector Vi is saved in the corresponding normal space binj, where j is the rounded value of binNum; Step 1.
8. Determine whether all points have been traversed. If so, create a new set M to save the final sampling points and go to step 1.
9. Otherwise, go to step 1.4 to continue processing the next point. Step 1.
9. Get the number X of sampled points in the result set M, and determine whether the target number of sampling points N is reached. If so, uniform random sampling in the normal space is completed. The sampled points cover different directions and shapes of the surface, retain the geometric diversity of the three-dimensional surface points, and capture drastic shape changes. The algorithm ends here. Otherwise, go to step 1.10; Step 1.
10. Select the normal space binj corresponding to the specified index j (j=0, 1, 2, ..., binX*binY*binZ-1); Step 1.
11. Determine whether the number of points stored in the current normal space binj is greater than 0. If so, go to step 1.12; otherwise, skip the current normal space and update the index to j=j+1 and go to step 1.10 to determine the next sub-normal space; Step 1.
12. Randomly select a point in the current normal space, add the three-dimensional coordinates of the point corresponding to its index to the result set M, mark the point as sampled, and go to step 1.
9.
3. The method for implementing a point cloud feature encoder based on geometric feature sampling and hybrid perception according to claim 2, characterized in that: The above step 1.3 includes the following steps: Step 1.3.
1. Normal space segmentation: The user sets three positive integer thresholds binX, binY, and binZ to segment the three-dimensional normal space into binX*binY*binZ subspaces, and each subspace is numbered in ascending order of X, Y, and Z coordinate values; Step 1.3.
2. Point cloud preprocessing: Randomly select a point from the point cloud P as the starting point, numbered as 1, and then use the nearest point algorithm to number all the remaining points, so as to convert the original point cloud P into an ordered point cloud P = {pi|i = 1, 2, 3, ..., P.size}; Step 1.3.
3. Construct Kd tree: Construct Kd tree based on the ordered point cloud P. This is a data structure used to organize point cloud data and can efficiently perform spatial search and neighborhood query. Step 1.3.
4. Setting the number of points for fitting a local surface: The user sets an integer C, which represents the minimum number of points required to fit a local surface.
4. The method for implementing a point cloud feature encoder based on geometric feature sampling and hybrid perception according to claim 2, characterized in that: In step 1.4 above, the quadratic surface fitting method is used to calculate point p i The normal vector Vi includes the following steps: Step 1.4.
1. Search point p i The K nearest neighbor points of i , let the number of points in the neighborhood point set n = C i .size; Step 1.4.
2. Determine whether the number of points in the neighborhood point set meets the minimum number of points C required to fit a local surface. If so, go to step 1.4.3; otherwise, set the normal vector V of the current point i Set to null, the algorithm ends; Step 1.4.
3. For the neighborhood point set C i n points in , construct the quadratic surface fitting equation, and solve the coefficient vector X; Step 1.4.
4. Determine whether X has a solution. If so, proceed to step 1.4.
5. Otherwise, set the normal vector V of the current point i Set to null, the algorithm ends; Step 1.4.
5. Calculate point p i The partial derivative at point p i The normal direction Rx i and Ry i ; Step 1.4.
6. Calculate point p i Normal vector V i , vector V i Through Rx i and Ry i Take the cross product and normalize it to get the calculation formula: So far, the current point p i The processing is finished.
5. The method for implementing a point cloud feature encoder based on geometric feature sampling and hybrid perception according to claim 1, characterized in that: Step 2 includes the following steps: Step 2.
1. Encode each point into 5 dimensions: 64, 128, 256, 512, 1024; Step 2.
2. Perform mixed pooling on the four dimensions of the last four layers, 128, 256, 512, and 1024, to obtain the feature vectors fi of the corresponding dimensions; Step 2.
3. Connect the four fi obtained in step 2.2 to obtain a 1920-dimensional combined latent feature vector F.
6. The method for implementing a point cloud feature encoder based on geometric feature sampling and hybrid perception according to claim 5, characterized in that: In the above step 2.2, hybrid pooling is used to obtain the feature vector fi of each layer, including the following steps: Step 2.2.
1. For each feature vector layer, perform maximum pooling to obtain Mi and average pooling to obtain Ai; Step 2.2.
2. Calculate the difference between the maximum pooling result Mi and the average pooling result Ai, and apply the Sigmod interpolation method; Step 2.2.
3. Multiply the Sigmod interpolation result by the maximum pooling result to obtain the mixed pooling result fi, that is, the calculation formula of the mixed pooling feature vector fi is: Where a is an adjustment parameter with a value between 0 and 1, and e is the natural logarithm.
7. A point cloud feature encoder implementation device based on geometric feature sampling and hybrid perception, characterized in that: Includes the following modules: The downsampling processing unit obtains the uniformly randomly sampled target point cloud M by downsampling the original point cloud P based on the normal space. This process uses a multi-threaded programming method to achieve point cloud acceleration processing; The feature vector concatenation unit concatenates multi-level feature vectors of the sampled point cloud data M through a hybrid multi-layer perceptron to obtain a combined potential feature vector F.
8. The device for implementing a point cloud feature encoder based on geometric feature sampling and hybrid perception according to claim 7, characterized in that: The downsampling processing unit is implemented by the following steps: Step 1.
1. Input the original point cloud P and the number of sampled target points N set by the user; Step 1.
2. Determine whether the number of target points N input by the user satisfies the condition that it is greater than 0 and less than the number of points P in the original point cloud P. If not, go to step 1.1 and re-enter N. If it is satisfied, go to step 1.3; Step 1.
3. Through normal space segmentation, point cloud preprocessing and Kd tree construction, the disordered point cloud P is reorganized into an ordered point cloud P, and is prepared for the subsequent local surface fitting and feature extraction of the three-dimensional point cloud; Step 1.
4. Take the point p with index i from the ordered point cloud P i (x i ,y i ,z i ), use the quadratic surface fitting method to calculate point p i (x i ,y i ,z i ) Normal vector Vi, i is initially 1; Step 1.
5. Determine whether the normal vector Vi is a null vector. If so, update the index to i=i+1 and go to step 1.4 to process the next point. Otherwise, go to step 1.6; Step 1.
6. Calculate the Euclidean norm of the normal vector Vi and determine whether it is a unit vector. If so, go to step 1.
7. Otherwise, skip the current point, update the index to i=i+1 and go to step 1.4 to process the next point. Step 1.
7. Calculate the index values ix, iy, iz of the normal space to which the normal vector belongs. The calculation formula is: ix=0.5*(binX–1)*(V ix +1) iy=0.5*(binY–1)*(V iy +1) iz=0.5*(binZ–1)*(V iz +1) Among them, ix∈[0,binX–1], iy∈[0,binY–1], iz∈[0,binZ–1], the three components of the index value are mapped to one dimension as the index value binNum of the normal space to which the normal vector Vi belongs. The calculation formula is: binNum=ix*(binY*binZ)+iy*binZ+iz Among them, binNum∈[0,binX*binY*binZ–1], the index value of the point corresponding to the vector Vi is saved in the corresponding normal space binj, where j is the rounded value of binNum; Step 1.
8. Determine whether all points have been traversed. If so, create a new set M to save the final sampling points and go to step 1.
9. Otherwise, go to step 1.4 to continue processing the next point. Step 1.
9. Get the number X of sampled points in the result set M, and determine whether the target number of sampling points N is reached. If so, uniform random sampling in the normal space is completed. The sampled points cover different directions and shapes of the surface, retain the geometric diversity of the three-dimensional surface points, and capture drastic shape changes. The algorithm ends here. Otherwise, go to step 1.10; Step 1.
10. Select the normal space binj corresponding to the specified index j (j=0, 1, 2, ..., binX*binY*binZ-1); Step 1.
11. Determine whether the number of points stored in the current normal space binj is greater than 0. If so, go to step 1.12; otherwise, skip the current normal space and update the index to j=j+1 and go to step 1.10 to determine the next sub-normal space; Step 1.
12. Randomly select a point in the current normal space, add the three-dimensional coordinates of the point corresponding to its index to the result set M, mark the point as sampled, and go to step 1.
9.
9. The device for implementing a point cloud feature encoder based on geometric feature sampling and hybrid perception according to claim 8, characterized in that: Step 1.3 includes the following steps: Step 1.3.
1. Normal space segmentation: The user sets three positive integer thresholds binX, binY, and binZ to segment the three-dimensional normal space into binX*binY*binZ subspaces, and each subspace is numbered in ascending order of X, Y, and Z coordinate values; Step 1.3.
2. Point cloud preprocessing: Randomly select a point from the point cloud P as the starting point, numbered as 1, and then use the nearest point algorithm to number all the remaining points, so as to convert the original point cloud P into an ordered point cloud P = {pi|i = 1, 2, 3, ..., P.size}; Step 1.3.
3. Construct Kd tree: Construct Kd tree based on the ordered point cloud P. This is a data structure used to organize point cloud data and can efficiently perform spatial search and neighborhood query. Step 1.3.
4. Setting the number of points for fitting a local surface: The user sets an integer C, which represents the minimum number of points required to fit a local surface.
10. The device for implementing a point cloud feature encoder based on geometric feature sampling and hybrid perception according to claim 8, characterized in that: In the above step 1.4, the normal vector Vi of point pi is calculated using the quadratic surface fitting method, including the following steps: Step 1.4.
1. Search point p i The K nearest neighbor points of i , let the number of points in the neighborhood point set n = C i .size; Step 1.4.
2. Determine whether the number of points in the neighborhood point set meets the minimum number of points C required to fit a local surface. If so, go to step 1.4.3; otherwise, set the normal vector V of the current point i Set to null, the algorithm ends; Step 1.4.
3. For the neighborhood point set C i n points in , construct the quadratic surface fitting equation, and solve the coefficient vector X; Step 1.4.
4. Determine whether X has a solution. If so, proceed to step 1.4.
5. Otherwise, set the normal vector V of the current point i Set to null, the algorithm ends; Step 1.4.
5. Calculate point p i The partial derivative at point p i The normal direction Rx i and Ry i ; Step 1.4.
6. Calculate point p i Normal vector V i , vector V i Through Rx i and Ry i Take the cross product and normalize it to get the calculation formula: So far, the current point p i The processing is finished; The feature vector concatenation unit is implemented through the following steps: Step 2.
1. Encode each point into 5 dimensions: 64, 128, 256, 512, 1024; Step 2.
2. Perform mixed pooling on the four dimensions of the last four layers, 128, 256, 512, and 1024, to obtain the feature vectors fi of the corresponding dimensions; Step 2.2.
1. For each feature vector layer, perform maximum pooling to obtain Mi and average pooling to obtain Ai; Step 2.2.
2. Calculate the difference between the maximum pooling result Mi and the average pooling result Ai, and apply the Sigmod interpolation method; Step 2.2.
3. Multiply the Sigmod interpolation result by the maximum pooling result to obtain the mixed pooling result fi, that is, the calculation formula of the mixed pooling feature vector fi is: Where a is an adjustment parameter with a value between 0 and 1, and e is the natural logarithm. Step 2.
3. Connect the four fi obtained in step 2.2 to obtain a 1920-dimensional combined latent feature vector F.
