A point cloud parameterization edge curve detection method based on hough voting
Patent Information
- Application Number
- CN202410327760.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-21
- Publication Date
- 2026-09-11
- Estimated Expiration
- 2044-03-21
AI Technical Summary
文献9:Cherenkova,Kseniya,Elona Dupont,Anis Kacem,Ilya Arzhannikov,Gleb Gusev and Djamila Aouada.“SepicNet:SharpEdges Recovery by Parametric Inference of Curves in 3D Shapes.”2023IEEE/CVFConference on Computer Vision and Pattern Recognition Workshops(CVPRW)(2023):2727-2735.首先对点进行分类,然后使用聚类方法分割出表示边缘的曲线集,最终通过传统优化方式获得点云的边缘重建结果,文献10:Matveev,Albert,Alexey Artemov,DenisZorin and Evgeny Burnaev.“3D Parametric Wireframe Extraction Based onDistance Fields.”Proceedings of the 2021 4th International Conference onArtificial Intelligence and Pattern Recognition(2021):n.pag.提出一种方法,通过预测距离场的方式检测边角点,并将点分割成单独的曲线集,最终通过预测拓扑图获取参数化线框,但这些方法强依赖于原始点云的分割结果,需要网络有较强的几何特征提取能力,所获得的参数化曲线集也是通过离线优化方式进行提取,会受到点云噪声的影响,并且所使用的重建的损失函数无法很好地指导网络去调整对应的曲线参数
[0068] Beneficial Effects: The method of this invention addresses the problem of extracting parameterized edge curves from point clouds. First, a CurveNet classification network is used to classify the point cloud. Then, PointNet++ is used to extract point features. Key points are found through Hough voting, and preliminary prediction results are obtained by combining feature aggregation methods and a Transformer encoder. A backtracking strategy is then used to find features within the same cluster and perform local feature fusion to obtain the final optimal features. Throughout the process, this method proposes a Hough voting-based detection approach. By introducing Hough voting, it abandons the direct use of neural networks to segment the point cloud, thus focusing more directly on edge curve modeling. Through Hough voting feature aggregation, this invention can effectively combine information from the point cloud to better capture the global features of edge curves. An attention mechanism is used to learn the positional relationships between points and curves, improving edge detection accuracy. A two-stage backtracking strategy is used to finely adjust the geometric curve parameters predicted by the network. This coarse-to-fine strategy optimizes the model at both the global and local levels, improving its robustness and adaptability.
Smart Images

Figure CN118212253B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a point cloud parameterized edge curve detection method based on Hough voting. Background Technology
[0002] In the fields of computer vision and 3D shape processing, a deep understanding of 3D scenes and objects is crucial. Edge detection, as a key task, aims to identify and locate the edge structures of objects, providing critical geometric information for practical applications. 3D edge detection has wide applications in many fields, such as computer-aided design (CAD), 3D reconstruction, and virtual reality, and is often used as input for various downstream tasks to aid model understanding.
[0003] Edge detection on point clouds helps extract geometric information about object surfaces, especially in point cloud representations, enabling the capture of object shape and structure. Parametric reconstruction of edges allows for more efficient representation of point cloud shapes using mathematical models and can reconstruct more regular point cloud edges. However, point clouds are typically acquired through 3D scanning or other methods and may contain noise, sparsity, and irregularities, posing challenges to the accurate localization and detection of edges in 3D point clouds. Traditional methods typically identify edges by calculating gradients in 3D data and relying on significant changes in depth intensity, as in Reference 1: Rusu, Radu Bogdan, and Steve B. Cousins. “3D is here: Point Cloud Library (PCL).” 2011 IEEE International Conference on Robotics and Automation (2011): 1-4. Curvature is also used for identification, as in Reference 2: Hackel, Timo, Jan Dirk Wegner, and Konrad Schindler. “Contour Detection in Unstructured 3D Point Clouds.” 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR) (2016): 1610-1618. Alternatively, normals can be used, as in Reference 3: Weber, Christopher, Stefanie Hahmann, and Hans Hagen. “Sharp feature detection in point clouds.” 2010 Shape Modeling International Conference (2010): 175-186. Therefore, issues such as the accuracy of scanning equipment and occlusion during the scanning process often lead to unclear object boundaries in point clouds, complicating parametric edge detection and affecting the accuracy of the detection algorithm. To mitigate the problems caused by the irregularity of point clouds, researchers have used various neural networks for parametric edge detection of 3D point clouds. However, many problems remain. For objects with complex shapes, changes in local shape place high demands on the neural network. Furthermore, point cloud annotation requires significant human resources. Therefore, under limited training data conditions, the generalization ability of the neural network becomes a crucial issue.
[0004] In recent years, the field of point cloud parameterized edge detection has flourished. Many methods use advanced neural networks to improve detection accuracy and speed, and can be broadly divided into two categories: point classification-based methods and point segmentation-based methods.
[0005] One approach, based on point classification, transforms point cloud data into point classification models. It then employs a series of deep learning models to address edge detection, training these models with a large amount of labeled data to accurately capture edge information in practical applications. Reference 4: Himeur, Chems-Eddine, Thibault Lejemble, Thomas Pellegrini, Mathias Paulin. Barthe and Nicolas Mellado. “PCEDNet: A Lightweight Neural Network for Fast and Interactive Edge Detection in 3D Point Clouds.” ACM Transactions on Graphics (TOG) 41 (2020): 1-21. By introducing a novel parametric technique, SSM, differential information about the shape of the surrounding region is added to each point in the point cloud, thereby enabling efficient edge detection of the point cloud. Reference 5: Yu, Lequan, Xianzhi Li, Chi-Wing Fu, Daniel Cohen-Or and Pheng-Ann Heng. "EC-Net: an Edge-aware Point set Consolidation Network." European Conference on Computer Vision (2018). This paper describes how point cloud surfaces are reconstructed by identifying edge points. Reference 6: Wang, Xiaogang, Yuelang Xu, Kai Xu, Andrea Tagliasacchi, Bin Zhou, Ali Mahdavi-Amiri and Hao Zhang. "PIE-NET: Parametric Inference of Point Cloud Edges." ArXiv abs / 2007.04883(2020):n.pag. This paper describes how point cloud edges are reconstructed by classifying points to filter out corner points and then proposing candidate curves. Reference 7: Liu, Yujia, Stefano D'aronco, Konrad Schindler and Jan Dirk Wegner. "PC2WF: 3D Wireframe Reconstruction from Raw Point Clouds." ArXiv abs / 2103.02766(2021):n.pag. First, the features of each point are extracted, and then the points are divided and the candidate set is constructed based on the point features to form the final set of edge points.Reference 8: Matveev, Albert, Alexey Artemov, Ruslan Rakhimov, Gleb Bobrovskikh, Daniele Panozzo, Denis Zorin and Evgeny Burnaev. “DEF: Deep Estimation of Sharp Geometric Features in 3DShapes.” ArXiv abs / 2011.15081(2020):n.pag. This paper proposes a learning-based framework for predicting sharp geometric features in sampled 3D shapes and applying it to the process of extracting parameterized wireframes from densely sampled point clouds. Corner detection is achieved by processing a scalar distance field representing the proximity to the nearest sharp feature curve. Curves are constructed, and then a topological graph corresponding to the wireframe is built, generating parameterized spline curves that can be arbitrarily edited and sampled. However, these methods are highly dependent on classification results and the corresponding dataset, and the fitting of parameterized curves is easily affected by the position of detected edge points, limiting the robustness and accuracy of the model for point cloud edge detection.
[0006] Point segmentation-based methods divide point clouds into local regions with semantic information, and then perform edge detection in these regions to better capture the geometry and edges of objects. This type of method can retain attention to local geometry while considering semantic information. Reference 9: Cherenkova, Kseniya, Elona Dupont, Anis Kacem, Ilya Arzhannikov, Gleb Gusev and Djamila Aouada. “SepicNet: SharpEdges Recovery by Parametric Inference of Curves in 3D Shapes.” 2023 IEEE / CVFConference on Computer Vision and Pattern Recognition Workshops (CVPRW) (2023): 2727-2735. First, points are classified, then clustering methods are used to segment the curve set representing edges, and finally, the edge reconstruction results of the point cloud are obtained through traditional optimization methods. Reference 10: Matveev, Albert, Alexey Artemov, Denis Zorin and Evgeny Burnaev. “3D Parametric Wireframe Extraction Based on Distance Fields.” Proceedings of the 2021 4th International Conference on Artificial Intelligence and Pattern Recognition (2021): n.pag. proposed a method to detect corner points by predicting the distance field and segment the points into separate curve sets. Finally, parameterized wireframes are obtained by predicting the topology map. However, these methods rely heavily on the segmentation results of the original point cloud and require the network to have strong geometric feature extraction capabilities. The obtained parameterized curve sets are also extracted through offline optimization, which is affected by point cloud noise. Furthermore, the loss function used for reconstruction cannot effectively guide the network to adjust the corresponding curve parameters.
[0007] The Hough transform is a commonly used method for point cloud segmentation, used to extract specific features from complex point cloud data. The Hough transform involves the following steps: First, a parameter space is defined based on the geometric characteristics of the model; then, each point in the point cloud is mapped to this parameter space, and the mapping result of each point can be regarded as a vote in the parameter space; next, by analyzing the distribution of votes in the parameter space, significant vote clustering regions are identified, and these regions correspond to specific geometric shapes existing in the original point cloud data; finally, these parameter regions are mapped back to the original space through inverse transform, thereby achieving point cloud segmentation and shape recognition. Reference 11: Qi, C., Or Litany, Kaiming He and Leonidas J. Guibas. “Deep Hough Voting for 3D Object Detection in Point Clouds.” 2019 IEEE / CVF International Conference on Computer Vision (ICCV) (2019): 9276-9285. This paper integrates deep learning and Hough transform to directly learn the geometric and spatial distribution features of objects from the original point cloud, and predicts the bounding box of the object by learning the key points (i.e., votes) in the point cloud. Summary of the Invention
[0008] Purpose of the invention: The technical problem to be solved by the present invention is to address the shortcomings of the existing technology by providing a point cloud parameterized edge curve detection method based on Hough voting, comprising the following steps:
[0009] Step 1: Collect point cloud and edge curve parameters representing the CAD (Computer-Aided Design) model;
[0010] Step 2: Use the CurveNet network (Reference: Xiang, Tiange, Chaoyi Zhang, Yang Song, Jianhui Yu and Weidong (Tom) Cai. "Walk in the Cloud: Learning Curves for PointClouds Shape Analysis." 2021 IEEE / CVF International Conference on ComputerVision (ICCV) (2021): 895-904.) to classify the points in the point cloud, thereby obtaining the edge point set of the point cloud;
[0011] Step 3: Perform convolution operations on the edge point set using PointNet++ (Reference: Qi, C., L. Yi, Hao Su and Leonidas J. Guibas. "PointNet++: Deep Hierarchical Feature Learning on Point Sets in a MetricSpace." Neural Information Processing Systems (2017).) to obtain point features that fuse local and global features;
[0012] Step 4: Using the point features obtained in Step 3, each edge point votes for the curve center to which it belongs, obtaining the voting point set (Reference: Hough Voting, Reference: Qi, C., Or Litany, Kaiming He and Leonidas J. Guibas. “Deep Hough Voting for 3D Object Detection in Point Clouds.” 2019 IEEE / CVF International Conference on Computer Vision (ICCV) (2019): 9276-9285.).
[0013] Step 5: Using the voting point corresponding to each edge point as the center, find the set of voting points near it, perform local feature aggregation, and obtain the local features of each edge point;
[0014] Step 6: The voting points obtained in Step 4 are encoded at their positions. The positional encoding is then concatenated with the local features obtained in Step 5 to form a new local feature, which is then input into a Transformer encoder based on a multi-head attention mechanism (Reference: Vaswani, Ashish, Noam M. Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser and Illia Polosukhin. “Attention is All you Need.” Neural Information Processing Systems (2017).) to obtain the final curve feature information.
[0015] Step 7: Input the final feature information obtained in Step 6 into the curve parameter prediction network to obtain the predicted curve parameters, curve type, and curve confidence.
[0016] Step 8: Use the curve parameters from Step 7 to sample the curve, and perform NMS operation on the curve confidence obtained in Step 7 (Reference: Neubeck, Alexander and Luc Van Gool. "Efficient Non-Maximum Suppression." 18th International Conference on Pattern Recognition (ICPR'06) 3 (2006): 850-855.) to filter a reasonable set of curves;
[0017] Step 9: Sample the curve set obtained in Step 8 and find the edge point closest to each sampling point. Merge the edge point position, the edge point feature obtained in Step 3, the voting point position obtained in Step 4, and the curve feature information obtained in Step 5 to generate the final curve feature.
[0018] Step 10: Using the final curve features obtained in Step 9, obtain the final set of curve parameters through the curve parameter prediction network.
[0019] In this invention, step 1 includes the following steps:
[0020] Step 1-1: Obtain the CAD dataset D from the ABC dataset (an official 3D model dataset containing one million CAD models; reference: Koch, Sebastian, Albert Matveev, Zhongshi Jiang, Francis Williams, Alexey Artemov, Evgeny Burnaev, Marc Alexa, Denis Zorin and Daniele Panozzo. “ABC: A BigCAD Model Dataset for Geometric Deep Learning.” 2019 IEEE / CVF Conference on Computer Vision and Pattern Recognition (CVPR) (2018): 9593-9603.).
[0021] Steps 1-2: Generate the corresponding point cloud data, curve parameter data, and classification label data from the CAD dataset D, and save them into the corresponding h5 file.
[0022] Steps 1-2 include the following steps:
[0023] Step 1-2-1: Read the obj file provided by the ABC dataset to obtain the point cloud of the original model;
[0024] Step 1-2-2: Read the YAML file provided by the ABC dataset to obtain the curve sampling point index and curve type. Use computer graphics methods to fit the sampling points to obtain the corresponding curve parameters. For a straight line, use the coordinates of its two endpoints. The parameters of the straight line are represented as follows: x and y are the coordinates of the two endpoints, respectively; for a circle, it is represented by the center c, the normal n, and the radius r. The parameters of the circle are expressed as follows: For a circular arc, the parameters of the circle are used, with two additional parameters α and β representing the starting and ending radians of the arc. The local coordinate system for calculating the radians is fixed, and the parameters of the arc are expressed as follows: A B-spline is represented using four control points p1, p2, p3, p4, and the order of the B-spline curve is fixed at 3. The parameters of the B-spline curve are expressed as follows: References: Wang, Xiaogang, Yuelang Xu, Kai Xu, Andrea Tagliasacchi, Bin Zhou, Ali Mahdavi-Amiri and Hao Zhang. "PIE-NET: Parametric Inference of Point Cloud Edges." ArXiv abs / 2007.04883(2020):n.pag.
[0025] After obtaining the curve parameters in steps 1-2-3, sample X1 (with a value of 64) points for each curve, and then save the curve parameters, curve type, and point cloud of the original model obtained in steps 1-1-2 in an h5 file.
[0026] In this invention, step 2 includes the following steps:
[0027] Step 2-1, input the CAD dataset D = {D Train D Test} Divide into training set D Train ={d1,d2,…d i ,…,d N} and test set D Test ={d N+1 ,d N+2 ,…,d N+j ,…,d N+M}, where d i Let d represent the i-th model in the training set. n+j Let i represent the j-th model in the test set, M represent the number of training sets, M represent the number of test sets, i takes values from 1 to N, and j takes values from 1 to M.
[0028] Step 2-2, for training set DTrain Obtain its 3D point cloud model P Train ={P1,P2,…P i ,…,P N The data is then normalized and fed into the CurveNet classification network for training, resulting in a trained point cloud classification network. Simultaneously, the edge point set C = {C1, C2, ..., C} corresponding to each 3D point cloud model is obtained. i ,…,C N}, where P i This refers to the training set D. Train The i-th model d in i The original point cloud model, C i It refers to P i The corresponding set of edge points.
[0029] Step 3 includes the following steps:
[0030] The edge point set C obtained in step 2 i ={c1,c2,…,c n The input is fed into the PointNet++ network, where c n Given the coordinates of the nth edge point in the edge point set, after sampling, grouping, feature extraction, interpolation, and upsampling, an n×128 dimensional feature vector is obtained as the point feature F. i ={f1,f2,…,f n}, where n represents the number of points in the edge point set, and n takes the value 1024, f n This refers to the point feature corresponding to the i-th edge point.
[0031] Step 4 includes the following steps:
[0032] Combine the point features obtained in step 3 with the point coordinates c obtained in step 2. n The input is fed into a convolutional neural network to predict the distance difference Δc. n This generates the voting point set Y. i ={y1,y2,…,y n},y n =c n +Δc n , y n This represents the voting point position corresponding to the nth edge point.
[0033] Step 5 includes the following steps:
[0034] Step 5-1, convert the point set C from step 2 to... i The input is fed into a positional coding network to obtain an n×128 dimensional positional coding feature G. i ={g1,g2,…,g n}, where gn This refers to the edge point set C i The positional encoding feature corresponding to the coordinates of the nth edge point in the middle;
[0035] Step 5-2, G i and the point features F obtained in step 3 i By concatenating the features, we obtain n×256-dimensional feature information H. i ={h1,h2,…,h n}, where h n This refers to the edge point set C i The j-th edge point corresponds to the splicing of g. n and f n Features;
[0036] Step 5-3: Using the ball query method, the voting points y obtained in step 4 are... i Find the k closest points by distance. For the corresponding features Perform max pooling to obtain a new feature vector Z for each edge point. i ={z1,z2,…,z n}, k = 32, where z n This refers to the edge point set C i The new feature corresponding to the nth edge point.
[0037] Step 6 includes the following steps:
[0038] Step 6-1, take the voting point set Y obtained in step 4. i The input is fed into a location coding network to obtain n×128-dimensional location coding features;
[0039] Step 6-2: Combine the positional encoding features with the feature vector Z obtained in step 5. i The input is fed into a Transformer encoder based on a multi-head attention mechanism to obtain curve feature information O. i ={o1,o2,…,o n}, where o n This refers to the edge point set C i The curve feature corresponding to the nth edge point.
[0040] Step 7 includes the following steps:
[0041] The curve feature O obtained in step 6 i Perform a convolution operation to obtain the predicted curve parameters. Curve Category and confidence level Θ i ={θ1,θ2,…,θ n}, where t n rn θ n Representing the boundary point set C respectively i The curve features of the nth edge point predict the curve parameters, category, and confidence level to which the edge point belongs.
[0042] Step 8 includes the following steps:
[0043] Step 8-1, based on the curve parameters obtained in Step 7 And curve category Υ i The curves are sampled, with num = 64 points sampled for each curve;
[0044] Step 8-2, use the curve confidence level Θ obtained in step 7. i Perform NMS operation on the curves to filter out a reasonable set of curves E. i ={e1,e2,…,e n}, e n Indicates based on the edge point set C i The curve information to which the nth edge point belongs includes the sampling point, parameters, and category;
[0045] Step 8-3: Calculate the loss value, including the point classification loss. Using the cross-entropy loss function and the voting point location loss function. and the predicted curve parameter loss function Using the L2 loss function, the predicted curve type loss function Reconstruct the loss function using the focal loss function. Calculated using the chamfer distance, which measures the similarity between the reconstructed edge point cloud and the ground truth edge point cloud:
[0046]
[0047]
[0048]
[0049]
[0050]
[0051]
[0052]
[0053] Where N is the number of points in the input point cloud, N = 8096, p i Let i be the predicted class probability of the i-th point in the original point cloud predicted by the network. The number of points in the edge point cloud. p ij Let k be the probability that the i-th edge point predicted by the network belongs to the j-th curve type. i This refers to the voting point location of the i-th edge point in the network's predicted edge point set, v i This refers to the curve parameter predicted based on the features of the i-th edge point in the edge point set, l i , Let α be the true value corresponding to the i-th edge point. ij The hyperparameter refers to the weight value of the curve type label j predicted by the i-th curve, A refers to the sample point set of the true edge curve, B refers to the sample point set of the predicted edge curve, size(*) refers to the number of points in the point set, and a and b refer to the points in A and B respectively.
[0054] Step 8-4: Perform backpropagation to obtain the trained parameterized edge curve prediction network;
[0055] Step 9 includes the following steps:
[0056] Step 9-1: Find the edge point set C for the curve sampling points obtained in Step 8. i Find the nearest point and obtain its corresponding point feature f. i ;
[0057] Step 9-2: Concatenate the point positions and point features of the edge points corresponding to each curve, and input them into the PointNet++ network (Reference: Qi, C., Hao Su, Kaichun Mo and Leonidas J. Guibas. "PointNet: Deep Learning on Point Sets for 3D Classification and Segmentation." 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR) (2016): 77-85.), to obtain the global features of the m×1×128-dimensional curves, where m represents the number of curves after filtering in step 8;
[0058] Step 10 includes the following steps:
[0059] Step 10-1: Combine the obtained 1×128 dimensional global curve features with the features obtained in step 6. i The parameters are then concatenated and convolutional to obtain the final set of curve parameters.
[0060] Step 10-2, calculate the loss value:
[0061]
[0062]
[0063]
[0064]
[0065]
[0066] in The number of curves input. For the corresponding true value;
[0067] Step 10-3: Perform backpropagation and obtain the final set of curve parameters through the trained curve parameter prediction network.
[0068] Beneficial Effects: The method of this invention addresses the problem of extracting parameterized edge curves from point clouds. First, a CurveNet classification network is used to classify the point cloud. Then, PointNet++ is used to extract point features. Key points are found through Hough voting, and preliminary prediction results are obtained by combining feature aggregation methods and a Transformer encoder. A backtracking strategy is then used to find features within the same cluster and perform local feature fusion to obtain the final optimal features. Throughout the process, this method proposes a Hough voting-based detection approach. By introducing Hough voting, it abandons the direct use of neural networks to segment the point cloud, thus focusing more directly on edge curve modeling. Through Hough voting feature aggregation, this invention can effectively combine information from the point cloud to better capture the global features of edge curves. An attention mechanism is used to learn the positional relationships between points and curves, improving edge detection accuracy. A two-stage backtracking strategy is used to finely adjust the geometric curve parameters predicted by the network. This coarse-to-fine strategy optimizes the model at both the global and local levels, improving its robustness and adaptability. Attached Figure Description
[0069] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments, and the advantages of the present invention in the above and / or other aspects will become clearer.
[0070] Figure 1 This is a flowchart of the present invention.
[0071] Figure 2 This is a schematic diagram of an input model example.
[0072] Figure 3 This is a schematic diagram of the parameterized edges of a single model in this invention.
[0073] Figure 4 This is a schematic diagram of the results after edge detection.
[0074] Figure 5 This is a system framework diagram of the method of the present invention.
[0075] Figure 6 This is a schematic diagram comparing the detection results of the method of the present invention with those of other methods. Detailed Implementation
[0076] like Figure 1 As shown, this invention discloses a point cloud parameterized edge detection method based on Hough voting. This invention uses point clouds as a representation of a 3D model and simultaneously obtains the parameterized edge curve information contained in the model as ground truth. The sampled point cloud of the original model is input into a CurveNet network for classification to obtain the edge point set of the point cloud. The edge point set is then input into PointNet++ to extract edge point features that fuse local and global features. Linear layers are used to encode the position of the edge point coordinates. The center of the curve to which each edge point votes is obtained to acquire a voting point set. Using the voting points as the center, feature aggregation is performed on the position encoding and edge point features to obtain new edge point features. The voting points are then used to perform feature aggregation. Points are input into a location encoding network to obtain corresponding location features; the location features of voting points and edge points are input into a Transformer encoder to obtain curve features, and these features are used to predict the parameters and confidence of the curve to which each edge point belongs; the confidence is used to perform NMS on the curve to obtain the filtered curve; the filtered curve is sampled to find the corresponding edge point features; the edge point features are input into PointNet to obtain the global curve features; the global curve features and the original curve features are concatenated and input into the curve parameter prediction network to predict the final parameters; after obtaining the curve parameters, the curve is sampled to obtain the final parameterized edge result. For a given dataset D = {D Train D Test The dataset is randomly divided into training set D at a ratio of 9:1. Train ={d1,d2,…d i ,…,d n} and test set D Test ={d n+1 ,d n+2 ,…,d n+j ,…,d n+m}, where d i Let d represent the i-th model in the training set. n+j Let D represent the j-th model in the test set, n represent the number of training models, and m represent the number of test models. This invention completes the testing of the test set D through the following steps. Test Parametric edge curve detection, the target task is as follows Figure 4 As shown, the flowchart is as follows Figure 1 and Figure 5 As shown, Figure 5 In the diagram, Edge Points represents the set of edge points, Vote Points represents the set of vote points, curve features represents curve features, and Back-tracking represents the process of finding the subordinate points of the original point cloud using curve parameters.
[0077] Specifically, the following steps are included:
[0078] Step 1: Collect point cloud model and edge curve parameters;
[0079] Step 2: Use the CurveNet network to classify the points in the point cloud and obtain the edge point set of the point cloud;
[0080] Step 3: Use PointNet++ to perform convolution operations on the edge point set to obtain point features that fuse local and global features;
[0081] Step 4: Using point features, each edge point votes for the curve center to which it belongs, thus obtaining the set of voting points;
[0082] Step 5: Using the voting point corresponding to each edge point as the center, find the set of voting points near it, perform local feature aggregation, and obtain the local features of each edge point;
[0083] Step 6: Encode the position of the voting points, concatenate the position codes with local features to form new local features, and input them into the Transformer encoder based on the multi-head attention mechanism to obtain the final curve feature information.
[0084] Step 7: Input the final feature information into the curve parameter prediction network to obtain the predicted curve parameters, curve type, and curve confidence.
[0085] Step 8: Use curve parameters to sample curves and perform NMS operation on them using curve confidence to filter a reasonable set of curves;
[0086] Step 9: Sample the curve set and find the edge point closest to each sampling point. Fuse the edge point position, edge point features, voting point position and curve feature information to generate the final curve feature.
[0087] Step 10: For the final curve features, obtain the final set of curve parameters through the curve parameter prediction network;
[0088] Step 11: Sample the curve parameters to generate the parametric edge reconstruction result of the 3D model.
[0089] Step 1 includes the following steps:
[0090] Step 1-1: Obtain CAD dataset D from the ABC dataset (including a file storing the model in .obj format and a file storing the model metadata in .yaml format);
[0091] Steps 1-2: Generate the corresponding point cloud data, curve parameter data, and classification label data from the 3D dataset D, and save them into the corresponding h5 file.
[0092] Steps 1-2 include the following steps:
[0093] Step 1-2-1: Read the original 3D model o (format: .obj, recording the point and face information of the 3D model), obtain the coordinates of the 3D points contained in the model, and sample N = 15000 points using the farthest point sampling method;
[0094] Step 1-2-2: Read the model metadata file y (in .yaml format, recording the parameters and types of line, surface, and volume primitives contained in the 3D model, as well as the sampling point index in the original 3D model o corresponding to each primitive), obtain the curve sampling point index and curve type, and use computer graphics methods to fit the sampling points to obtain the corresponding curve parameters. For straight lines, use the coordinates of the sampling points at the two endpoints of the line. For a circle, the center, normal, and radius of the circle are used as representations in the metadata. For circular arcs, we use the parameters included in the metadata and calculate two additional parameters α and β using the starting point of the sampling points, representing the starting and ending radians of the arc. Here, we fix the local coordinate system for calculating the radians. We use the four control points provided in the metadata to represent B-splines, and fix the order of the B-spline curve to 3.
[0095] After obtaining the curve parameters in steps 1-2-3, we sample 64 points at equal intervals for each curve and calculate the centroid of each curve. At the same time, we find the point in the original model that is closest to the curve sampling point, thus obtaining the edge point model of the original model. We record the binary labels of the points: the label of the point in the edge point model is 1, and the label of the point outside the edge point model is 0. Then, we save the curve parameters, curve type and original point cloud sampling points in an h5 file.
[0096] Step 2 includes the following steps:
[0097] Step 2-1, input the CAD dataset D = {D Train D Test} Divide into training set D Train ={d1,d2,…d i ,…,d N} and test set DTest ={d N+1 ,d N+2 ,…,d N+j ,…,d N+M}, where d i Let d represent the i-th model in the training set. n+j Let i represent the j-th model in the test set, M represent the number of training sets, M represent the number of test sets, i takes values from 1 to N, and j takes values from 1 to M.
[0098] Step 2-2, for training set D Train Obtain its 3D point cloud model P Train ={P1,P2,…P i ,…,P N The data is then normalized and fed into the CurveNet classification network for training, resulting in a trained point cloud classification network. Simultaneously, the edge point set C = {C1, C2, ..., C} corresponding to each 3D point cloud model is obtained. i ,…,c N}, where P i This refers to the training set D. Train The i-th model d in i The original point cloud model, C i It refers to P i The corresponding set of edge points.
[0099] Step 3 includes the following steps:
[0100] The edge point set C obtained in step 2 i ={c1,c2,…,c n The input is fed into the PointNet++ network, where c n Given the coordinates of the nth edge point in the edge point set, after sampling, grouping, feature extraction, interpolation, and upsampling, an n×128 dimensional feature vector is obtained as the point feature F. i ={f1,f2,…,f n}, where n represents the number of points in the edge point set, and n takes the value 1024, f n This refers to the point feature corresponding to the i-th edge point.
[0101] Step 4 includes the following steps:
[0102] Combine the point features obtained in step 3 with the point coordinates c obtained in step 2. n The input is fed into a convolutional neural network to predict the distance difference Δc. n This generates the voting point set Y. i ={y1,y2,…,y n},y n =c n +Δcn y n This represents the voting point position corresponding to the nth edge point.
[0103] Step 5 includes the following steps:
[0104] Step 5-1, convert the point set C from step 2 to... i The input is fed into a positional coding network to obtain an n×128 dimensional positional coding feature G. i ={g1,g2,…,g n}, where g n This refers to the edge point set C i The positional encoding feature corresponding to the coordinates of the nth edge point in the middle;
[0105] Step 5-2, G i and the point features F obtained in step 3 i By concatenating the features, we obtain n×256-dimensional feature information H. i ={h1,h2,…,h n}, where h n This refers to the edge point set C i The j-th edge point corresponds to the splicing of g. n and f n Features;
[0106] Step 5-3: Using the ball query method, the voting points y obtained in step 4 are... i Find the k closest points by distance. For the corresponding features Perform max pooling to obtain a new feature vector Z for each edge point. i ={z1,z2,…,z n}, k = 32, where z n This refers to the edge point set C i The new feature corresponding to the nth edge point.
[0107] Step 6 includes the following steps:
[0108] Step 6-1, use the voting points Y obtained in step 4. i The input is fed into a location coding network to obtain n×128-dimensional location coding features;
[0109] Step 6-2: Combine the positional encoding features with the feature vector Z obtained in step 5. i The input is fed into a Transformer encoder based on a multi-head attention mechanism to obtain curve feature information O. i ={o1,o2,…,o n}, where o n This refers to the edge point set C iThe curve feature corresponding to the nth edge point.
[0110] Step 7 includes the following steps:
[0111] The curve feature O obtained in step 6 i Perform a convolution operation to obtain the predicted curve parameters. Curve Category and confidence level Θ i ={θ1,θ2,…,θ n}, where t n r n θ n Representing the boundary point set C respectively i The curve features of the nth edge point predict the curve parameters, category, and confidence level to which the edge point belongs.
[0112] Step 8 includes the following steps:
[0113] Step 8-1, based on the curve parameters obtained in Step 7 and curve categories The curves are sampled, with num = 64 points sampled for each curve;
[0114] Step 8-2, use the curve confidence level Θ obtained in step 7. i Perform an NMS operation on it to filter out a reasonable set of curves E. i ={e1,e2,…,e n}, e n Indicates based on the edge point set C i The curve information to which the nth edge point belongs includes the sampling point, parameters, and category;
[0115] Step 8-3, calculate the loss value, including the point classification loss. Using the cross-entropy loss function and the voting point location loss function. and the predicted curve parameter loss function Using the L2 loss function, the predicted curve type loss function Reconstruct the loss function using the focal loss function. Calculated using the chamfer distance, which measures the similarity between the reconstructed edge point cloud and the ground truth edge point cloud:
[0116]
[0117]
[0118]
[0119]
[0120]
[0121]
[0122]
[0123] Where N is the number of points in the input point cloud, N = 8096, p i Let i be the predicted class probability of the i-th point in the original point cloud predicted by the network. The number of points in the edge point cloud. p ij Let k be the probability that the i-th edge point predicted by the network belongs to the j-th curve type. i This refers to the voting point location of the i-th edge point in the network's predicted edge point set, v i This refers to the curve parameter predicted based on the features of the i-th edge point in the edge point set, l i , Let α be the true value corresponding to the i-th edge point. ij The hyperparameter refers to the weight value of the curve type label j predicted by the i-th curve, A refers to the sample point set of the true edge curve, B refers to the sample point set of the predicted edge curve, size(*) refers to the number of points in the point set, and a and b refer to the points in A and B respectively.
[0124] Step 8-4: Perform backpropagation to obtain the trained parameterized edge curve prediction network.
[0125] Step 9 includes the following steps:
[0126] Step 9-1: Find the edge point cloud C from the curve sampling points obtained in Step 8. i Find the nearest point and obtain its corresponding point feature fi. i ;
[0127] Step 9-2: Concatenate the point positions and point features of the edge points corresponding to each curve, and input them into the PointNet network (Reference: Qi, C., Hao Su, Kaichun Mo and Leonidas J. Guibas. "PointNet: Deep Learning on Point Sets for 3D Classification and Segmentation." 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR) (2016): 77-85.) to obtain the global features of the m×1×128-dimensional curves, where m represents the number of curves after filtering in step 8.
[0128] Step 10 includes the following steps:
[0129] Step 10-1: Combine the obtained 1×128 dimensional global curve features with the features obtained in step 6. i The parameters are then concatenated and convolutional to obtain the final set of curve parameters.
[0130] Step 10-2, calculate the loss value:
[0131]
[0132]
[0133]
[0134]
[0135]
[0136] in The number of curves input. p ij Let v be the probability that the i-th curve predicted by the network belongs to the j-th curve type. i This refers to the curve parameters predicted by the network. For the corresponding true value;
[0137] Step 10-3 involves backpropagation, which ultimately yields the trained parameterized edge curve prediction network.
[0138] Step 11 includes the following steps:
[0139] Step 11-1: Sample the curve parameters obtained in step 10 and find the edge point closest to the sampling point to obtain the edge detection and parametric reconstruction of the model.
[0140] Example:
[0141] The objective task of this invention is as follows Figure 2 , Figure 3 and Figure 4 As shown, Figure 2 For the original model, Figure 3 For the true edges of the original model, Figure 4 for Figure 2 Based on the results of parametric edge curve detection, the overall structure of the method is as follows: Figure 5 As shown. The various steps of the invention are described below with reference to embodiments.
[0142] Step (1) involves collecting point cloud and edge curve parameters representing the CAD model. Taking the ABC dataset as an example, this is specifically divided into the following steps:
[0143] Step (1.1): Obtain CAD dataset D (including a file storing the model in .obj format and a file storing the model metadata in .yaml format) from the ABC dataset.
[0144] Step (1.2) generates the corresponding point cloud data, curve parameter data and classification label data from the 3D dataset D and stores them in the corresponding h5 file.
[0145] Step (1.2.1) reads the original 3D model o (in .obj format, recording the point and face information of the 3D model), obtains the coordinates of the 3D points contained in the model, and samples N = 15000 points using the farthest point sampling method, such as... Figure 2 As shown;
[0146] Step (1.2.2) reads the model meta-information file y (in .yaml format, recording the parameters and types of line, surface, and volume primitives contained in the 3D model, as well as the sampling point index in the original 3D model o corresponding to each primitive), obtains the curve sampling point index and curve type, and uses computer graphics methods to fit the sampling points to obtain the corresponding curve parameters. For straight lines, the coordinates of the sampling points at the two endpoints of the line are used for representation. For a circle, the center, normal, and radius of the circle are used as representations in the metadata. For circular arcs, we use the parameters included in the metadata and calculate two additional parameters α and β using the starting point of the sampling points, representing the starting and ending radians of the arc. Here, we fix the local coordinate system for calculating the radians. We use the four control points provided in the metadata to represent B-splines, and fix the order of the B-spline curve to 3. like Figure 3 As shown.
[0147] In step (1.2.3), after obtaining the curve parameters, we sample 64 points at equal intervals for each curve and calculate the centroid of each curve. At the same time, we find the point in the original model sampling points that is closest to the curve sampling points, thus obtaining the edge point model of the original model. We record the binary labels of the points: the label of the point in the edge point model is 1, and the label of the point not in the edge point model is 0. Then, we save the curve parameters, curve type and original point cloud sampling points in an h5 file.
[0148] Step (2) uses the CurveNet network to classify the points in the point cloud, thereby obtaining the edge point set of the point cloud, such as... Figure 5 As shown:
[0149] Step (2.1) involves inputting the CAD dataset D = {D} Train DTest} Divide into training set D Train ={d1,d2,…d i ,…,d N} and test set D test ={d N+1 ,d N+2 ,…,d N+j ,…,d N+M}, where d i Let d represent the i-th model in the training set. n+j Let i represent the j-th model in the test set, M represent the number of training sets, M represent the number of test sets, i takes values from 1 to N, and j takes values from 1 to M.
[0150] Step (2.2), for training set D Train Obtain its 3D point cloud model P Train ={P1,P2,…P i ,…,p N The data is then normalized and fed into the CurveNet classification network for training, resulting in a trained point cloud classification network. Simultaneously, the edge point set C = {C1, C2, ..., C} corresponding to each 3D point cloud model is obtained. i ,…,C N}, where P i This refers to the training set D. Train The i-th model d in i The original point cloud model, C i It refers to P i The corresponding set of edge points.
[0151] Step (3) uses PointNet++ to perform convolution operations on the edge point set to obtain point features that fuse local and global features, such as... Figure 5 As shown:
[0152] Step (3.1) involves taking the edge point set C obtained in step (2). i ={c1,c2,…,c n The input is fed into the PointNet++ network, and after multiple sampling, grouping, feature extraction, interpolation, and upsampling, an n×128 dimensional feature vector is obtained as the point feature F. i ={f1,f2,…,f n}, where n takes the value 1024.
[0153] Step (4): Using the point features obtained in step (3), each edge point votes for the curve center to which it belongs, and obtains the voting point set. This step specifically includes the following steps:
[0154] Step (4.1) combines the point features obtained in step (3) with the point coordinates c obtained in step 2. n The input is fed into a convolutional neural network to predict the distance difference Δc. n This generates the voting point set Y. i ={y1,y2,…,y n},y n =c n +Δc n y n This represents the voting point position corresponding to the nth edge point.
[0155] Step (5): Using the voting point corresponding to each edge point as the center, find the set of voting points near it, perform local feature aggregation, and obtain the local features of each edge point. This step specifically includes the following steps:
[0156] Step (5.1) involves changing the Z coordinates of the point from step (2). i The input is fed into a positional coding network to obtain an n×128 dimensional positional coding feature G. i ={g1,g2,…,g n};
[0157] Step (5.2), G i and the point features F obtained in step (3) i By concatenating the features, we obtain n×256-dimensional feature information H. i ={h1,h2,…,h n};
[0158] Step (5.3) uses a ball query method to process the voting points y obtained in step (4). i Find the k closest points by distance. For the corresponding features Perform max pooling to obtain a new feature vector Z for each edge point. i ={z1,z2,…,z n}, where k = 32.
[0159] Step (6) involves encoding the voting points obtained in step (4) at their positions, concatenating the position encoding with the local features obtained in step (5) to form new local features, and inputting this into the Transformer encoder based on a multi-head attention mechanism to obtain the final curve feature information. This step includes the following steps:
[0160] Step (6.1) involves taking the voting points Y obtained in step (4). i The input is fed into a location coding network to obtain n×128-dimensional location coding features;
[0161] Step (6.2) combines the positional encoding features with the feature vector Z obtained in step (5). i The input is fed into a Transformer encoder based on a multi-head attention mechanism to obtain curve feature information O. i ={o1,o2,…,o n}
[0162] Step (7) involves processing the curve feature O obtained in step (6). i Perform a convolution operation to obtain the predicted curve parameters. Curve Category and confidence level Θ i ={θ1,θ2,…,θ n}, where t n r n θ n Representing the boundary point set C respectively i The curve features of the nth edge point predict the curve parameters, category, and confidence level to which the edge point belongs.
[0163] Step (8) involves sampling the curve using the curve parameters from step (7) and performing NMS on the curve confidence obtained in step (7) to filter a reasonable set of curves. This step specifically includes the following steps:
[0164] Step (8.1), based on the curve parameters obtained in step (7) and curve categories The curves are sampled, with num = 64 points sampled for each curve;
[0165] Step (8.2) uses the curve confidence Θ obtained in step (7). i Perform an NMS operation on it to filter out a reasonable set of curves E. i ={e1,e2,…,e n};
[0166] Step (8.3), calculate the loss value.
[0167]
[0168]
[0169]
[0170]
[0171]
[0172]
[0173]
[0174] Where N is the number of points in the input point cloud, N = 8096, p i Let i be the predicted class probability of the i-th point in the original point cloud predicted by the network. The number of points in the edge point cloud. p ij Let k be the probability that the i-th edge point predicted by the network belongs to the j-th curve type. i This refers to the voting point location of the i-th edge point in the network's predicted edge point set, v i This refers to the curve parameter predicted based on the features of the i-th edge point in the edge point set, l i , Let α be the true value corresponding to the i-th edge point. ij The hyperparameter refers to the weight value of the curve type label j predicted by the i-th curve, A refers to the sample point set of the true edge curve, B refers to the sample point set of the predicted edge curve, size(*) refers to the number of points in the point set, and a and b refer to the points in A and B respectively.
[0175] Step (8.4) involves backpropagation to obtain the trained parameterized edge curve prediction network.
[0176] Step (9) involves sampling the curve set obtained in step (8) and finding the edge point closest to each sampling point. The edge point positions, edge point features obtained in step (3), voting point positions obtained in step (4), and curve feature information obtained in step (5) are then fused to generate the final curve features. This process includes the following steps:
[0177] Step (9.1): Find the edge point cloud C from the curve sampling points obtained in step (8). i Find the nearest point and obtain its corresponding point feature f. i ;
[0178] In step (9.2), the point positions and point features of the edge points corresponding to each curve are concatenated together and input into the PointNet network to obtain the global curve features of m×1×128 dimensions, where m represents the number of curves after filtering in step (8).
[0179] Step (10) involves using the curve parameter prediction network to obtain the final curve parameter set from the final curve features obtained in step (9). This step specifically includes the following steps:
[0180] Step (10.1) combines the obtained 1×128-dimensional global curve features with the features obtained in step (6). i The parameters are then concatenated and convolutional to obtain the final set of curve parameters.
[0181] Step (10.2), calculate the loss value:
[0182]
[0183]
[0184]
[0185]
[0186]
[0187] in The number of curves input. p ij Let v be the probability that the i-th curve predicted by the network belongs to the j-th curve type. i This refers to the curve parameters predicted by the network. For the corresponding true value;
[0188] In step (10.3), backpropagation is performed, and the trained parameterized edge curve prediction network is finally obtained.
[0189] Step (11) involves sampling the curve parameters obtained in step (10) and finding the edge point closest to the sampling point to obtain the edge detection and parameterized reconstruction of the model.
[0190] Results analysis:
[0191] The experimental environment parameters for the method of this invention are as follows:
[0192] 1) The experimental platform parameters for data sampling of the model were Ubuntu 22.04 64-bit operating system, AMD Ryzen 9 5900X 12-Core Processor, 64G memory, Python programming language, and Visual Code programming development environment;
[0193] 2) The experimental platform parameters for training and testing the parameterized edge curve prediction network were Ubuntu 22.04 64-bit operating system, AMD Ryzen 9 5900X 12-Core Processor, 64G memory, Python programming language, and Visual Code programming development environment.
[0194] The comparative experimental results of the present invention method with the methods in Reference 4 (hereinafter referred to as EC-Net) and Reference 5 (hereinafter referred to as PIE-Net) (as shown in Table 1) are analyzed as follows:
[0195] Experiments were conducted on a model of the well-known large CAD dataset ABC Dataset, with edge detection for example... Figure 6 As shown in Table 1, the comparisons based on precision, recall, and IoU parameters are presented in Table 1.
[0196] Table 1
[0197] ECD↓ 0.0360 0.0088 0.0035 IOU↑ 0.3561 0.6223 0.6742 Precision↑ 0.4872 0.6918 0.7243 Recall↑ 0.5736 0.8584 0.8857
[0198] In the self-comparison experiment, the NMS operation and the second-stage backtracking operation were removed, and the results were compared with the final experimental results. Figure 6 As shown.
[0199] Compared to PIE-NET, the method proposed in this invention is a point cloud parameterized edge curve detection method based on Hough voting. This method not only accelerates the curve parameter inference speed and achieves better results, but also has better robustness because it is not based on a proposal network.
[0200] This invention provides a point cloud parameterized edge curve detection method based on Hough voting. Many methods and approaches exist for implementing this technical solution; the above description is merely a preferred embodiment of the invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of this invention, and these improvements and modifications should also be considered within the scope of protection of this invention. All components not explicitly stated in this embodiment can be implemented using existing technologies.
Claims
1. A point cloud parameterized edge curve detection method based on Hough voting, characterized in that, Includes the following steps: Step 1: Collect point cloud and edge curve parameters representing the CAD model; Step 2: Use the CurveNet network to classify the points in the point cloud to obtain the edge point set of the point cloud; Step 3: Use PointNet++ to perform convolution operations on the edge point set to obtain point features that fuse local and global features; Step 4: Using the point features obtained in Step 3, each edge point votes for the curve center to which it belongs, and obtains the set of voting points; Step 5: Using the voting point corresponding to each edge point as the center, find the set of voting points near it, perform local feature aggregation, and obtain the local features of each edge point; Step 6: Encode the voting points obtained in Step 4, concatenate the position codes with the local features obtained in Step 5 to form new local features, and input them into the Transformer encoder based on the multi-head attention mechanism to obtain the final curve feature information. Step 7: Input the final feature information obtained in Step 6 into the curve parameter prediction network to obtain the predicted curve parameters, curve type, and curve confidence. Step 8: Use the curve parameters from Step 7 to sample the curve, and perform NMS operation on the curve confidence obtained in Step 7 to filter a reasonable set of curves. Step 9: Sample the curve set obtained in Step 8 and find the edge point closest to each sampling point. Merge the edge point position, the edge point feature obtained in Step 3, the voting point position obtained in Step 4, and the curve feature information obtained in Step 5 to generate the final curve feature. Step 10: Using the final curve features obtained in Step 9, obtain the final set of curve parameters through the curve parameter prediction network.
2. The point cloud parameterized edge curve detection method based on Hough voting according to claim 1, characterized in that, Step 1 includes the following steps: Step 1-1: Obtain the CAD dataset D from the ABC dataset; Steps 1-2: Generate the corresponding point cloud data, curve parameter data, and classification label data from the CAD dataset D, and save them into the corresponding h5 file.
3. The point cloud parameterized edge curve detection method based on Hough voting according to claim 2, characterized in that, Steps 1-2 include the following steps: Step 1-2-1: Read the obj file provided by the ABC dataset to obtain the point cloud of the original model; Step 1-2-2: Read the YAML file provided by the ABC dataset to obtain the curve sampling point index and curve type. Use computer graphics methods to fit the sampling points to obtain the corresponding curve parameters. For a straight line, use the coordinates of its two endpoints. The parameters of the straight line are represented as follows: x and y are the coordinates of the two endpoints, respectively; for a circle, it is represented by the center c, the normal n, and the radius r. The parameters of the circle are expressed as follows: For a circular arc, the parameters of the circle are used, with two additional parameters α and β representing the starting and ending radians of the arc. The local coordinate system for calculating the radians is fixed, and the parameters of the arc are expressed as follows: A B-spline is represented using four control points p1, p2, p3, p4, and the order of the B-spline curve is fixed at 3. The parameters of the B-spline curve are expressed as follows: After obtaining the curve parameters in steps 1-2-3, sample X1 points for each curve, and then save the curve parameters, curve type, and point cloud of the original model obtained in steps 1-1-2 in an h5 file.
4. The point cloud parameterized edge curve detection method based on Hough voting according to claim 3, characterized in that, Step 2 includes the following steps: Step 2-1, input the CAD dataset D = {D Train D Test } Divide into training set D Train ={d1,d2,…d i ,…,d N } and test set D Test ={d N+1 ,d N+2 ,…,d N+j ,…,d N+M }, where d i Let d represent the i-th model in the training set. n+j Let i represent the j-th model in the test set, M represent the number of training sets, M represent the number of test sets, i takes values from 1 to N, and j takes values from 1 to M. Step 2-2, for training set D Train Obtain its 3D point cloud model P Train ={P1,P2,…P i ,…,P N The data is then normalized and fed into the CurveNet classification network for training, resulting in a trained point cloud classification network. Simultaneously, the edge point set C = {C1, C2, ..., C} corresponding to each 3D point cloud model is obtained. i ,…,C N }, where P i This refers to the training set D. Train The i-th model d in i The original point cloud model, C i It refers to P i The corresponding set of edge points.
5. The point cloud parameterized edge curve detection method based on Hough voting according to claim 4, characterized in that, Step 3 includes the following steps: The edge point set C obtained in step 2 i ={c1,c2,…,c n The input is fed into the PointNet++ network, where c n Given the coordinates of the nth edge point in the edge point set, after sampling, grouping, feature extraction, interpolation, and upsampling, an n×128 dimensional feature vector is obtained as the point feature F. i ={f1,f2,…,f n }, where n represents the number of points in the edge point set, and n takes the value 1024, f n This refers to the point feature corresponding to the i-th edge point.
6. The point cloud parameterized edge curve detection method based on Hough voting according to claim 5, characterized in that, Step 4 includes the following steps: Combine the point features obtained in step 3 with the point coordinates c obtained in step 2. n The input is fed into a convolutional neural network to predict the distance difference Δc. n This generates the voting point set Y. i ={y1,y2,…,y n },y n =c n +Δc n y n This represents the voting point position corresponding to the nth edge point.
7. The point cloud parameterized edge curve detection method based on Hough voting according to claim 6, characterized in that, Step 5 includes the following steps: Step 5-1, convert the point set C from step 2 to... i The input is fed into a positional coding network to obtain an n×128 dimensional positional coding feature G. i ={g1,g2,…,g n }, where g n This refers to the edge point set C i The positional encoding feature corresponding to the coordinates of the nth edge point in the middle; Step 5-2, G i and the point features F obtained in step 3 i By concatenating the features, we obtain n×256-dimensional feature information H. i ={h1,h2,…,h n }, where h n This refers to the edge point set C i The j-th edge point corresponds to the splicing of g. n and f n Features; Step 5-3: Using the ball query method, the voting points y obtained in step 4 are... i Find the k closest points by distance. For the corresponding features Perform max pooling to obtain a new feature vector Z for each edge point. i ={z1,z2,…,z n }, k = 32, where z n This refers to the edge point set C i The new feature corresponding to the nth edge point.
8. The point cloud parameterized edge curve detection method based on Hough voting according to claim 7, characterized in that, Step 6 includes the following steps: Step 6-1, take the voting point set Y obtained in step 4. i The input is fed into a location coding network to obtain n×128-dimensional location coding features; Step 6-2: Combine the positional encoding features with the feature vector Z obtained in step 5. i The input is fed into a Transformer encoder based on a multi-head attention mechanism to obtain curve feature information O. i ={o1,o2,…,o n }, where o n This refers to the edge point set C i The curve feature corresponding to the nth edge point.
9. The point cloud parameterized edge curve detection method based on Hough voting according to claim 8, characterized in that, Step 7 includes the following steps: The curve feature O obtained in step 6 i Perform a convolution operation to obtain the predicted curve parameters. Curve Category Υ i ={r1,r2,…,r n } and confidence level Θ i ={θ1,θ2,…,θ n }, where t n r n θ n Representing the boundary point set C respectively i The curve features of the nth edge point predict the curve parameters, category, and confidence level to which the edge point belongs.
10. The point cloud parameterized edge curve detection method based on Hough voting according to claim 9, characterized in that, Step 8 includes the following steps: Step 8-1, based on the curve parameters obtained in Step 7 And curve category Υ i The curves are sampled, with num = 64 points sampled for each curve; Step 8-2, use the curve confidence level Θ obtained in step 7. i Perform NMS operation on the curves to filter out a reasonable set of curves E. i ={e1,e2,…,e n }, e n Indicates based on the edge point set C i The curve information to which the nth edge point belongs includes the sampling point, parameters, and category; Step 8-3: Calculate the loss value, including the point classification loss. Using the cross-entropy loss function and the voting point location loss function. and the predicted curve parameter loss function Using the L2 loss function, the predicted curve type loss function Reconstruct the loss function using the focal loss function. Calculated using the chamfer distance, which measures the similarity between the reconstructed edge point cloud and the ground truth edge point cloud: Where N is the number of points in the input point cloud, p i Let p be the predicted class probability of the i-th point in the original point cloud predicted by the network, Υ be the number of points in the edge point cloud, and p be the predicted class probability of the i-th point. ij Let k be the probability that the i-th edge point predicted by the network belongs to the j-th curve type. i This refers to the voting point location of the i-th edge point in the network's predicted edge point set, v i This refers to the curve parameter predicted based on the features of the i-th edge point in the edge point set, l i , Let α be the true value corresponding to the i-th edge point. ij The hyperparameter refers to the weight value of the curve type label j predicted by the i-th curve, A refers to the sample point set of the true edge curve, B refers to the sample point set of the predicted edge curve, size(*) refers to the number of points in the point set, and a and b refer to the points in A and B respectively. Step 8-4: Perform backpropagation to obtain the trained parameterized edge curve prediction network; Step 9 includes the following steps: Step 9-1: Find the edge point set C for the curve sampling points obtained in Step 8. i Find the nearest point and obtain its corresponding point feature f. i ; Step 9-2: Piece together the point positions and point features of the edge points corresponding to each curve, and input them into the PointNet++ network to obtain m×1×128-dimensional global curve features, where m represents the number of curves after filtering in step 8. Step 10 includes the following steps: Step 10-1: Combine the obtained 1×128 dimensional global curve features with the features obtained in step 6. i The parameters are then concatenated and convolutional to obtain the final set of curve parameters. Step 10-2, calculate the loss value: Where γ is the number of input curves; p ij Let v be the probability that the i-th curve predicted by the network belongs to the j-th curve type. i This refers to the curve parameters predicted by the network. For the corresponding true value; Step 10-3: Perform backpropagation and obtain the final set of curve parameters through the trained curve parameter prediction network.
Citation Information
Patent Citations
Parameterized edge curve extraction method for point cloud object
CN114723764A
Point cloud object parameterized edge curve extraction method based on density reweighted convolution
CN115311313A