Part similarity calculation method of point cloud classification and representation learning model
Through the combination of heuristic point cloud sampling and clustering algorithm, the limitations of traditional methods when processing complex parts are solved, more accurate part similarity calculation is achieved, computing and storage efficiency is improved, and it has wide application value.
Patent Information
- Application Number
- CN202411424360.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-12
- Publication Date
- 2024-12-31
AI Technical Summary
Traditional point cloud processing and part similarity calculation methods have limitations when processing complex parts. Pure classification methods cannot effectively distinguish the similarity of similar parts, while pure characterization methods are difficult to utilize the semantic information of parts.
Heuristic point cloud sampling is used to combine geometric information and topological information of point cloud data, and by combining pure classification and pure representation methods, the clustering algorithm is used to achieve dimensionality reduction of embedded representations, thereby more accurately calculating the similarity between parts.
It improves the computing efficiency and storage efficiency of the model, can calculate the similarity between parts more accurately, and has high application value and promotion prospects.
Smart Images

Figure CN119229212A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a method for calculating part similarity of a point cloud classification and representation learning model. Background Art
[0002] In CAD / CAM, modeling technology is the principle and method of converting objects and their properties in the real world into digital expressions inside computers. It is a tool that defines digital models, digital information, and graphic information represented inside computers, and is the source of product informatization. Modeling features are hailed as a milestone in the development of CAD / CAM. As a carrier of various information in the product development process, it contains not only the geometric topological information of parts, but also some non-geometric information required for manufacturing and other processes.
[0003] Therefore, the modeling feature contains rich engineering semantics, which is an integrated description of the cavities, holes, grooves, etc. on the geometric shapes at a higher level; STEP (Standard for the Exchange of Product Model Data) stands for Product Model Data Exchange Standard. Since becoming an international standard (ISO10303), STEP files have played an important role in geometric data interaction as a universal text intermediate exchange format for 3D CAD.
[0004] In particular, the STEP file is a universal format for describing BRep (boundary representation) model data, which can accurately represent the geometric and topological information of a part, making it possible to exchange and share it between different CAD systems.
[0005] PointNet++ is a deep learning model widely used in point cloud classification. It achieves efficient point cloud data processing and classification by hierarchically abstracting the local and global features of point clouds.
[0006] PointTransformer V3 is a representation learning model for point cloud data. By introducing the attention mechanism, it can capture the geometric topological features in point cloud data more flexibly and accurately. PointTransformer V3 has high expressiveness when processing complex point cloud data and can generate high-quality embedded representations.
[0007] Traditional point cloud processing and part similarity calculation methods have certain limitations when dealing with complex parts; pure classification methods are usually unable to effectively distinguish the similarities of different parts in the same category, and pure representation methods focus on the shape and position features of point clouds, making it difficult to utilize the classification semantic information of parts in business scenarios.
[0008] Therefore, a part similarity calculation method based on point cloud classification and representation learning model is proposed. Summary of the invention
[0009] In view of the shortcomings of the prior art, the present invention provides a method for calculating the similarity of parts of a point cloud classification and representation learning model. Compared with the traditional point cloud processing method, the method adopts heuristic point cloud sampling and combines the geometric information and topological information of the point cloud data to make the part information expressed by the point cloud data richer. Based on the problem that the pure classification method cannot distinguish the similarity of the same type of parts, and the pure representation method cannot highlight the semantic information of the parts, the present invention combines the two methods to enable the model to simultaneously consider the classification semantic information and representation information of the parts, thereby more accurately calculating the similarity between the parts, and uses the clustering algorithm to achieve dimensionality reduction of the embedded representation, reducing the dimension of the feature representation, and improving the calculation efficiency and storage efficiency of the model. The present invention can be used for a wider range of downstream tasks related to design and model, including part recognition, classification, similarity calculation, etc., has the advantages of high application value and promotion prospects, and solves the limitations of traditional point cloud processing and part similarity calculation methods in processing complex parts. The pure classification method is usually unable to effectively distinguish the similarity of different parts in the same category, and the pure representation method is difficult to use the classification semantic information of the parts in business scenarios because it focuses on the shape features and position features of the point cloud.
[0010] Technical solution: To realize the above-mentioned method for calculating the similarity of parts of the point cloud classification and representation learning model, compared with the traditional point cloud processing method, the heuristic point cloud sampling is adopted, and the geometric information and topological information of the point cloud data are combined to make the part information expressed by the point cloud data richer; based on the problem that the pure classification method cannot distinguish the similarity of the same parts, and the pure representation method cannot highlight the semantic information of the parts, the present invention combines the two methods to enable the model to simultaneously consider the classification semantic information and representation information of the parts, so as to more accurately calculate the similarity between the parts, and use the clustering algorithm to achieve dimensionality reduction of the embedded representation, reduce the dimension of the feature representation, and improve the computational efficiency and storage efficiency of the model; the present invention can be used for a wider range of downstream tasks related to design and model, including part recognition, classification, similarity calculation, etc., and has high application value and promotion prospects. The present invention provides the following technical solutions: A method for calculating part similarity of a point cloud classification and representation learning model comprises the following steps: Step 1: Obtain the part model dataset, extract the point cloud data, and divide it into a training set and a test set; Step 2: Use the PointNet++ classification model to classify the point cloud data of the part model and obtain its semantic features; Step 3: Use the PointTransformerV3 model to obtain the embedded representation of the part model; Step 4: Combine the classification in step 2 with the embedding representation in step 3 to calculate the similarity between part models.
[0011] Preferably, the specific steps in step 1 are as follows: 1) Obtain point cloud data through part model files; 2) In the preparation of input data for the embedding representation model, a heuristic point cloud sampling method is used to uniformly discretize each face of the part model and assign different colors to each face, extracting the discrete point cloud that uses color to represent topological information, and obtaining the coordinates, normals, and colors of each point; 3) In the input data preparation of the classification model, a fixed number of point cloud data is obtained through sampling, and the point cloud data is normalized and aligned to ensure data consistency.
[0012] Preferably, the specific steps in step three are as follows: a. Input the coordinates, normals and color information of the point cloud into the PointTransformerV3 model , Obtaining a high-dimensional embedding representation ; b. Use the Kmeans algorithm to reduce the dimensionality of the high-dimensional embedding representation: ; c. Training: In a batch, use the clustering embedding of the parts themselves to form positive sample pairs , the cluster embedding of the part with other parts as negative sample pairs , using cosine similarity to measure the difference between different embedding representations
[0013] (where the angle brackets are cosine similarity), the loss function of the model in the unsupervised learning process is:
[0014] (in is the temperature parameter).
[0015] Preferably, N is the number of point cloud sampling points, and B is the batch; Where d is the dimension of the representation space representing a single point in the space; Where k is the dimension of the representation space for a single settlement representation, and M is the number of settlements.
[0016] Preferably, the specific steps in step 4 are as follows: If the two part models are of different types, the similarity is 0.
[0017] Preferably, if the two parts are of the same type, the cosine similarity between the embedding representation vectors of the part models is calculated based on the embedding representation.
[0018] Preferably, the cosine similarity is finally mapped to an approximate distribution of the true similarity through an activation function to estimate the similarity between the part models.
[0019] Compared with the prior art, the present invention provides a method for calculating part similarity of a point cloud classification and representation learning model, which has the following beneficial effects: 1. Compared with the traditional point cloud processing method, the part similarity calculation method of the point cloud classification and representation learning model adopts heuristic point cloud sampling and combines the geometric information and topological information of the point cloud data to make the part information expressed by the point cloud data richer; based on the problem that the pure classification method cannot distinguish the similarity of the same parts, and the pure representation method cannot highlight the semantic information of the parts, the present invention combines the two methods to enable the model to simultaneously consider the classification semantic information and representation information of the parts, thereby more accurately calculating the similarity between parts.
[0020] 2. The part similarity calculation method of the point cloud classification and representation learning model uses a clustering algorithm to achieve dimensionality reduction of the embedded representation, reduces the dimension of the feature representation, and improves the computational efficiency and storage efficiency of the model. The present invention can be used for a wider range of design and model-related downstream tasks, including part recognition, classification, similarity calculation, etc., and has high application value and promotion prospects. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 This is a flow chart of a method for calculating part similarity based on a point cloud classification model and a point cloud representation learning model. DETAILED DESCRIPTION
[0022] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0023] See also Figure 1 ; A method for calculating part similarity of a point cloud classification and representation learning model comprises the following steps: Step 1: Obtain the part model dataset, extract the point cloud data, and divide it into a training set and a test set; The specific steps in step one are as follows: 1) Obtain point cloud data through part model files; 2) In the preparation of input data for the embedding representation model, a heuristic point cloud sampling method is used to uniformly discretize each face of the part model and assign different colors to each face, extracting the discrete point cloud that uses color to represent topological information, and obtaining the coordinates, normals, and colors of each point; 3) In the input data preparation of the classification model, a fixed amount of point cloud data is obtained through sampling, and the point cloud data is normalized and aligned to ensure data consistency. Step 2: Use the PointNet++ classification model to classify the point cloud data of the part model and obtain its semantic features; Step 3: Use the PointTransformerV3 model to obtain the embedded representation of the part model; The specific steps in step three are as follows: a. Input the coordinates, normals and color information of the point cloud into the PointTransformerV3 model ; Where N is the number of point cloud sampling points, B is the batch, Obtaining a high-dimensional embedding representation ; Where d is the dimension of the representation space representing a single point in the space; b. Use the Kmeans algorithm to reduce the dimensionality of the high-dimensional embedding representation: ; Where k is the dimension of the representation space for a single settlement representation, and M is the number of settlements; c. Training: In a batch, use the clustering embedding of the parts themselves to form positive sample pairs , the cluster embedding of the part with other parts as negative sample pairs , using cosine similarity to measure the difference between different embedding representations
[0024] (where the angle brackets are cosine similarity), the loss function of the model in the unsupervised learning process is:
[0025] (in is the temperature parameter); Step 4: Combine the classification in step 2 with the embedding representation in step 3 to calculate the similarity between part models; The specific steps in step 4 are as follows: If the two part models are of different types, the similarity is 0; If the two parts are of the same type, the cosine similarity between the embedding representation vectors of the part models is calculated based on the embedding representation; Finally, the cosine similarity is mapped to the approximate distribution of the true similarity through the activation function to estimate the similarity between the part models.
[0026] In order to make the technical solution in the embodiment of the present invention clearly and completely described, the present invention is further described in detail by taking a three-dimensional model in the actual test set as an example. The actual data set contains 68,000 pairs of modeling data and three-dimensional models.
[0027] The following steps are involved: Step 1: Dataset Preparation The part model data is extracted from the STEP file and processed as high sampling rate point cloud data and low sampling rate point cloud data respectively.
[0028] Example of step file data content: The first step file data: “ ... DATA; #5=PRODUCT('SIM-03A-M','','',(#2)); #2=PRODUCT_CONTEXT('',#1,'mechanical'); #1=APPLICATION_CONTEXT('managedmodelbased3dengineering'); #10=PRODUCT_DEFINITION('','',#6,#3); #3=PRODUCT_DEFINITION_CONTEXT('partdefinition',#1,''); #11=PRODUCT_DEFINITION_SHAPE('','',#10); #587=MECHANICAL_DESIGN_GEOMETRIC_PRESENTATION_REPRESENTATION('',(#78,#110,#142,#17 4,#206,#238,#265,#297,#329,#361,#388,#420,#452,#484,#511,#534,#559,#584,#29),#16); #7=PRODUCT_CATEGORY('part','specification'); #19=SHAPE_REPRESENTATION('',(#18),#16); #17=CARTESIAN_POINT('',(0.,0.,0.)); #31=CARTESIAN_POINT('Axis2P3DLocation',(0.,0.,0.)); #36=CARTESIAN_POINT('LineOrigine',(0.,0.,2.5)); #40=CARTESIAN_POINT('Vertex',(0.,0.,0.)); #42=CARTESIAN_POINT('Vertex',(0.,0.,5.)); ...... Second step file data: DATA; #5=PRODUCT('SIM-UNT-53A-MH20','','',(#2)); #2=PRODUCT_CONTEXT('',#1,'mechanical'); #1=APPLICATION_CONTEXT('managedmodelbased3dengineering'); #10=PRODUCT_DEFINITION('','',#6,#3); #3=PRODUCT_DEFINITION_CONTEXT('partdefinition',#1,''); #11=PRODUCT_DEFINITION_SHAPE('','',#10); #562=MECHANICAL_DESIGN_GEOMETRIC_PRESENTATION_REPRESENTATION('',(#29),#16); #7=PRODUCT_CATEGORY('part','specification'); #19=SHAPE_REPRESENTATION('',(#18),#16); #17 = CARTESIAN_POINT('', (0., 0., 0.)); #31 = CARTESIAN_POINT('Axis2P3DLocation', (120.505563359, 10.0536249223, 0.)); #36 = CARTESIAN_POINT('LineOrigine', (120.505563359, 10.0536249223, 2.5)); #40 = CARTESIAN_POINT('Vertex', (120.505563359, 10.0536249223, 0.)); #42 = CARTESIAN_POINT('Vertex', (120.505563359, 10.0536249223, 5.)); #45 = CARTESIAN_POINT('LineOrigine', (120.505563359, -0.0808066022545, 0.)); #49 = CARTESIAN_POINT('Vertex', (120.505563359, -10.2152381268, 0.)); #52 = CARTESIAN_POINT('LineOrigine', (120.505563359, -10.2152381268, 2.5)); #56 = CARTESIAN_POINT('Vertex', (120.505563359, -10.2152381268, 5.)); #59 = CARTESIAN_POINT('LineOrigine', (120.505563359, -0.0808066022545, 5.)); #71 = CARTESIAN_POINT('Axis2P3DLocation', (170.50484048, -9.94637507774, 0.)); #76 = CARTESIAN_POINT('LineOrigine', (145.50520192, -10.0808066023, 0.)); .... Processing of High Sampling Rate Point Cloud Data Extract high-sampling rate point cloud data containing geometric topology information from STEP files, including the coordinates, normals and color information of the point. The color is the unique special identifier of the surface where the point is located.
[0029] Files 1, 2 (as a batch, the first three digits of feat are the normal, and the last three digits are the color integer RGB divided by 255): {'coord':tensor([[0.1621,0.0076,0.0000],[0.5672,0.0836,0.0971],[0.0000,0.0456,0.0654],. ..,[0.7052,-0.0572,0.0293],[0.7290,0.0588,0.0051],[0.9787,-0.0211,0.0293]],device='cuda: 0'),'feat':tensor([[5.3358e-02,-5.8846e-01,-8.0676e-01,7.4902e-01,4.8235e-01,5.8824e-01 ],[-1.0090e-13,-1.6669e-14,1.0000e+00,3.5294e-02,4.7059e-01,1.4902e-01],[1.0000e+00,-0.0 000e+00,-0.0000e+00,8.7843e-01,3.8431e-01,6.6275e-01],...,[1.0000e+00,-2.9108e-12,5.251 4e-12,2.3922e-01,6.8627e-01,9.3725e-01],[1.8225e-11,-1.0000e+00,-2.9801e-13,9.9608e-01,3 .0588e-01,2.0784e-01],[1.4361e-13,3.8385e-15,1.0000e+00,7.8431e-01,2.7059e-01,4.5490e-0 1]],device='cuda:0'),'batch':tensor([0,0,0,...,1,1,1],device='cuda:0'),'grid_size':0.01} Processing of low sampling rate point cloud data Extract low-sampling rate point cloud data from STEP files as input for the classification model.
[0030] File 1: [array([[-0.30087839,-0.29586004,0.01906848],[-0.03046836,-0.29586004,0.02254071],[-0.65762528,-0.29586004,-0.03840 734],...,[0.8184376,0.12053684,0.09527487],[0.89286731,0.03709628,0.09527487],[0.88672045,0.23873693,0.09527487]])] File 2: [array([[-0.91178696,0.26153697,0.07357285],[-0.91178696,0.36038362,-0.00703071],[-0.91178696,-0.11782495,0.060824 44],...,[0.78516544,0.05628439,0.09070626],[0.8401527,0.17050272,0.09070626],[0.87284685,-0.00635546,0.09070626]])] Step 2: Classify the two part files and get the category 1, that is, the connection block Step 3: Calculate the high-dimensional representation of the two parts and perform clustering to obtain a low-dimensional cluster embedding representation that can be read and stored: Part 1 [-0.020261704921722412,-0.047484591603279114,-0.05054210126399994,-0.03443702310323715,0.02285575307905674,0.008108957670629025,-0.040373943746089935,-0.01959276758134365,-0.0534973032 77254105,-0.03171977028250694,-0.04960198327898979,0.015056789852678776,0.01517860870808363,-0.016666382551193237,-0.0009754406055435538,-0.05335509032011032,-0.006439910735934973,...] Part 2 [-0.02275942452251911,-0.0006644855602644384,0.013295788317918777,0.02142944373190403,0.06131865084171295,0.04868548735976219,-0.007427355274558067,0.0121700344607234,0.030689740553498268,-0.01941070333123207,0.027525044977664948,0.0383666940 0334358,0.017391251400113106,0.0030331406742334366,0.04283040016889572,0.04916035011410713,-0.021408990025520325,0.020733267068862915,0.00743838120251894,0.026340847834944725,0.023658238351345062,-0.00851372629404068,-0.046753354370594025,...] Step 4: Since they are parts of the same type, we further calculate the preliminary similarity estimate of the two parts: s=0.509554898733767. After being transformed to the true probability distribution through the sigmoid activation function, the true similarity is about 1 / (1+exp(-s))=0.6247..., which is about 62.47%.
[0031] The beneficial effects of the present invention are as follows: compared with the traditional point cloud processing method, the part similarity calculation method of the point cloud classification and representation learning model adopts heuristic point cloud sampling, combines the geometric information and topological information of the point cloud data, so that the part information expressed by the point cloud data is richer; based on the problem that the pure classification method cannot distinguish the similarity of the same type of parts, and the pure representation method cannot highlight the semantic information of the parts, the present invention combines the two methods to enable the model to simultaneously consider the classification semantic information and representation information of the parts, thereby more accurately calculating the similarity between parts, and using the clustering algorithm to achieve dimensionality reduction of the embedded representation, reducing the dimension of the feature representation, and improving the computational efficiency and storage efficiency of the model; the present invention can be used for a wider range of design and model-related downstream tasks, including part recognition, classification, similarity calculation, etc., and has high application value and promotion prospects.
[0032] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for calculating part similarity of a point cloud classification and representation learning model, characterized in that: The following steps are involved: Step 1: Obtain the part model dataset, extract the point cloud data, and divide it into a training set and a test set; Step 2: Use the PointNet++ classification model to classify the point cloud data of the part model and obtain its semantic features; Step 3: Use the PointTransformerV3 model to obtain the embedded representation of the part model; Step 4: Combine the classification in step 2 with the embedding representation in step 3 to calculate the similarity between part models.
2. The method for calculating part similarity of a point cloud classification and representation learning model according to claim 1, characterized in that: The specific steps in step 1 are as follows: 1) Obtain point cloud data through part model files; 2) In the preparation of input data for the embedding representation model, a heuristic point cloud sampling method is used to uniformly discretize each face of the part model and assign different colors to each face, extracting the discrete point cloud that uses color to represent topological information, and obtaining the coordinates, normals, and colors of each point; 3) In the input data preparation of the classification model, a fixed number of point cloud data is obtained through sampling, and the point cloud data is normalized and aligned to ensure data consistency.
3. The method for calculating part similarity of a point cloud classification and representation learning model according to claim 2, characterized in that: The specific steps in step three are as follows: a. Input the coordinates, normals and color information of the point cloud into the PointTransformerV3 model , Obtaining a high-dimensional embedding representation ; b. Use the Kmeans algorithm to reduce the dimensionality of the high-dimensional embedding representation: ; c. Training: In a batch, use the clustering embedding of the parts themselves to form positive sample pairs , the cluster embedding of the part with other parts as negative sample pairs , using cosine similarity to measure the difference between different embedding representations ; The angle brackets are cosine similarity, and the loss function of the model in the unsupervised learning process is: ; in is the temperature parameter.
4. The method for calculating part similarity of a point cloud classification and representation learning model according to claim 3, characterized in that: Where N is the number of point cloud sampling points, and B is the batch; Where d is the dimension of the representation space representing a single point in the space; Where k is the dimension of the representation space for a single settlement representation, and M is the number of settlements.
5. The method for calculating part similarity of a point cloud classification and representation learning model according to claim 4, characterized in that: The specific steps in step 4 are as follows: If the two part models are of different types, the similarity is 0.
6. The method for calculating part similarity of a point cloud classification and representation learning model according to claim 5, characterized in that: If the two parts are of the same type, the cosine similarity between the embedding representation vectors of the part models is calculated based on the embedding representation.
7. The method for calculating part similarity of a point cloud classification and representation learning model according to claim 6, characterized in that: Finally, the cosine similarity is mapped to the approximate distribution of the true similarity through the activation function to estimate the similarity between the part models.