Geometric invariant 3d model classification algorithm based on smooth quadratic loss
By performing random rotation enhancement on the 3D model and designing a smooth quadratic loss function, the problem of insufficient classification accuracy of 3D models in existing technologies is solved, and the rotation invariance and robustness of the model are improved, especially in complex industrial product classification tasks.
Patent Information
- Application Number
- CN202510464519.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-14
- Publication Date
- 2025-12-23
- Estimated Expiration
- 2045-04-14
AI Technical Summary
Existing 3D model recognition methods lack classification accuracy when dealing with complex and fine-grained structures, and are not robust to noise and outliers.
A geometrically invariant 3D model classification algorithm based on smooth quadratic loss is adopted. The training data is enhanced by randomly rotating the 3D model, and a smooth quadratic loss function is designed to enhance the rotation invariance and robustness of the model.
It improves the accuracy and robustness of 3D model classification, especially in complex and multi-category industrial product classification tasks, and enhances tolerance to noise and outliers.
Smart Images

Figure CN120375068B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of product part classification, and particularly relates to a geometric invariant three-dimensional model classification algorithm based on smooth quadratic loss. BACKGROUND
[0002] With the rapid development of industrial manufacturing, the types and quantities of parts are showing an explosive growth. In the production, assembly and supply chain management process, a large number of parts need to be accurately classified. However, the traditional manual classification method is low in efficiency, consumes a lot of time, and is easily affected by human subjective factors, leading to classification errors.
[0003] The prior art can greatly improve the efficiency and accuracy of three-dimensional part classification by means of the powerful data processing capability of artificial intelligence, thereby saving valuable time cost. In the three-dimensional model recognition task, model classification methods such as PointNet and PointNet++ have appeared. In Figure 1 the classification flowchart of PointNet is shown, which is specially used for processing irregular point cloud data (such as 3D scanning point cloud or LiDAR data). The core idea of PointNet is to process the features of each point independently, and the network processes the entire point cloud by aggregating the features of all points. Each point is first processed by a shared MLP (Multi-Layer Perceptron) to generate a feature vector of the point. Due to the shared MLP, the processing of each point is the same, ensuring that the network is not sensitive to the order of points, i.e. not dependent on the arrangement of points.
[0004] However, since the local structure in the point cloud is very important for understanding and recognizing the shape of an object, PointNet performs poorly in handling complex and fine-grained structures. After actual testing, it is found that its classification ability for complex industrial parts is poor, and since its model has no intervention training ability for abnormal points, when the training data is close to the actual training category data amount, the robustness of its algorithm is not excellent.
[0005] Figure 2 the classification flowchart of PointNet++ is shown, which is an improvement of PointNet, aiming to further enhance the modeling ability of local structure of point cloud data. Unlike PointNet which directly processes the entire point cloud, PointNet++ uses a hierarchical structure to gradually aggregate the local information of the point cloud at different scales. Each layer processes the points in a local region, and captures the finer geometric structure in the point cloud by extracting local features. This method can more effectively capture the local geometric information of the point cloud by dividing the point cloud into different local regions and extracting features in each region.
[0006] Although PointNet++ has significant advantages in local feature extraction, it still relies on sampling and aggregation of local regions. In extreme cases, if the density of the point cloud varies greatly, or there are some areas where the points are too sparse, PointNet++ is difficult to effectively extract and aggregate the features of these sparse areas, affecting the classification result. At the same time, PointNet++ models the local structure more finely, but its robustness to noise and abnormal points is not very strong. SUMMARY
[0007] In view of the above problems in the prior art, the geometric invariant three-dimensional model classification algorithm based on smooth quadratic loss provided by the present application solves the problem of insufficient classification accuracy of existing three-dimensional model recognition methods for complex three-dimensional shape models.
[0008] In order to achieve the above-mentioned purpose of the application, the technical scheme adopted by the present application is:
[0009] The present application provides a geometric invariant three-dimensional model classification algorithm based on smooth quadratic loss, which comprises the following steps:
[0010] S1, obtaining three-dimensional models of various product parts, and performing mesh sampling on continuous parameter surfaces and edges in each three-dimensional model to obtain discretized parameter surfaces and edges;
[0011] S2, randomly rotating each discretized edge and parameter surface, and using the type of product parts corresponding to the three-dimensional model, the discretized parameter surface and edge before and after random rotation as a data set;
[0012] S3, training a deep classification model using the data set, wherein the loss function of the deep classification model comprises a smooth quadratic loss function based on the model output before and after rotation and a cross-entropy loss function;
[0013] S4, performing mesh sampling on the continuous parameter surfaces and edges of the entity three-dimensional model of the product part to be identified, and then inputting the trained deep classification model to obtain the type of the product part to be identified.
[0014] Further, the deep classification model comprises a CNN model, a graph neural network and a multilayer perceptron connected in sequence, and the expression of the loss function of the deep classification model is:
[0015]
[0016] wherein, is the loss function of the deep classification model; is the cross-entropy loss function; is the smooth quadratic loss function; C is the total number of types of product parts; y c is the label of the cth type of product part; Pc Predict the probability of the product part belonging to the c-th class for the deep classification model; B is the training batch size; β' is the smoothing degree adjustment parameter; and is the i-th dimension data of the graph neural network output of the data before and after the random rotation of the n-th three-dimensional model; is and the cosine similarity of
[0017] Further, the method of randomly rotating each discretized edge and parameter surface comprises:
[0018] Randomly select a rotation angle, and calculate the rotation matrix of the discretized edge and parameter surface along the X, Y and Z axes of the space coordinate system according to the rotation angle:
[0019]
[0020] wherein R X (θ), R Y(θ) and R Z (θ) are the rotation matrices of the X, Y and Z axes respectively; θ is the rotation angle;
[0021] For each edge and parameter surface, randomly select a direction in the X, Y and Z axes as the rotation axis;
[0022] According to the selected rotation axis, the three-dimensional geometric coordinates P and normal vector features N acting on the parameter surface, and the three-dimensional geometric coordinates P and tangent vector features T acting on the edge, the rotated features are obtained:
[0023] E' fl [P,T]=R l (θ)·E f [P,T]
[0024] S' fl [P,N]=R l (θ)·S f [P,N]
[0025] wherein R l (θ) is the rotation matrix of the l-axis, and l takes the values of X, Y and Z; E f and S f are the discretized edge and parameter surface respectively; E' fl and S' fl are the features of E f and S f rotated along the l-axis.
[0026] Further, the CNN model comprises a first convolutional layer, a second convolutional layer, a third convolutional layer, an average pooling layer and a full connection layer connected in sequence, and the input channel, the output channel and the convolution kernel size of the first convolutional layer, the second convolutional layer and the third convolutional layer are (6, 64, 3), (64, 128, 3) and (128, 256, 3) respectively, and the input dimension and the hidden layer dimension of the full connection layer are 256 and 64 respectively.
[0027] The discretized parameter faces and edges of each three-dimensional model before and after rotation are fused through multiple channels of the CNN model to obtain the face structure feature vectors and the connection edge feature vectors before and after rotation.
[0028] Further, the multi-layer GNN of the graph neural network performs stacked calculation on the information input by each three-dimensional model, so that the information of each face node is transmitted between nodes to obtain the topological features in the global view; and the expression of the face node features and the edge features updated by each GNN layer is:
[0029]
[0030] wherein, and are the face node features output by the kth and (k-1)th GNN layers respectively; and σ and φ are the multi-layer perceptron layers for updating the face node features and the edge features respectively. is the adjacent face feature of in the (k-1)th GNN layer, and N(u) is the set of all adjacent face features of . is the feature of the shared edge between and in the kth GNN layer. is the feature of the shared edge between and output by the (k-1)th GNN layer. is the adjacent face feature of in the kth GNN layer; β (k) is the feature for marking and distinguishing the face nodes in the (k-1)th GNN layer; γ (k) is the feature for marking and distinguishing the edges in the (k-1)th GNN layer; and is the dot product.
[0031] Further, the grid sampling on the continuous parameter faces and edges in each three-dimensional model comprises: sampling the parameter faces by using a two-dimensional grid on the face nodes, and sampling each edge by using a one-dimensional grid.
[0032] Further, the geometry-invariant three-dimensional model classification algorithm further comprises performing a maximum pooling operation on the face node features output by the graph neural network by using a pooling layer to extract global features, and then inputting the global features into a multi-layer perceptron for classification to obtain the type of the three-dimensional model.
[0033] The beneficial effects of the present application are: in the face of the demand for classification of industrial product parts, the present scheme starts from the direction of enhancing the rotation invariance of the deep classification model, and focuses on improving the problems of multiple product categories, unbalanced product quantities of various categories, and complex engineering part model files in actual production scenarios. Specifically, the present scheme can introduce additional information to the training of the model by randomly rotating the original three-dimensional training data, enrich the feature space that can be learned in the training process of the classification model, and also compensate for the lack of data in the actual production scenario.
[0034] The present scheme designs a smooth quadratic loss function based on the original and rotated three-dimensional model data from the training level of the deep classification model, which can control the deep classification model to maintain the topological representation consistency of the original and rotated data in the training process, regulate the recognition ability of the model to the original and rotated features, and thus ensure the high classification consistency of the model under different transformations, and also improve the robustness of the model to noise and abnormal points. BRIEF DESCRIPTION OF DRAWINGS
[0035] Figure 1 A classification flowchart of PointNet in the prior art.
[0036] Figure 2 A classification flowchart of PointNet++ in the prior art.
[0037] Figure 3 A general architecture diagram of the geometry-invariant three-dimensional model classification algorithm based on smooth quadratic loss.
[0038] Figure 4 A flowchart of the geometry-invariant three-dimensional model classification algorithm based on smooth quadratic loss. DETAILED DESCRIPTION
[0039] The specific embodiments of the present application are described below to facilitate understanding of the present application by those skilled in the art, but it should be clear that the present application is not limited to the scope of the specific embodiments, and for those skilled in the art, it is obvious that various changes are within the spirit and scope of the present application defined and determined by the appended claims, and all applications utilizing the concept of the present application are within the scope of protection.
[0040] REFERENCES Figure 4 , Figure 4A flow chart of a geometric invariant three-dimensional model classification algorithm based on a smooth quadratic loss is shown; as Figure 4 The method S includes steps S1-S4.
[0041] In step S1, three-dimensional models of various product parts are acquired, and the continuous parameter surfaces and edges in each three-dimensional model are mesh sampled to obtain discrete parameter surfaces and edges; the three-dimensional model is preferably a B-rep format file in the present scheme.
[0042] When mesh sampling the parameter surfaces and edges, two-dimensional mesh is used on the surface nodes to sample the parameter surfaces, and one-dimensional mesh is used on each edge to sample the edges. For example, 10*10 mesh is used to sample the original parameterized surface, and 1*10 mesh is used to sample the edges, so that the continuous parameter surfaces and edges are discretized for feature extraction, thereby describing the geometric topology information of each surface and edge.
[0043] The discrete parameter surfaces include three channels of coordinates and three channels of normal vectors; the discrete edges include three channels of coordinates and three channels of tangent vectors.
[0044] In step S2, each discrete edge and parameter surface is randomly rotated, and the product part type corresponding to the three-dimensional model, the discrete parameter surfaces and edges before and after random rotation are used as a data set.
[0045] In an embodiment of the present application, the method of randomly rotating each discrete edge and parameter surface includes:
[0046] A rotation angle is randomly selected, and a rotation matrix of the discrete edge and parameter surface rotating along the X, Y and Z axes of the space coordinate system is calculated according to the rotation angle:
[0047]
[0048] Wherein, R X (θ), R Y(θ) (θ) and R Z (θ) are the rotation matrices of the X, Y and Z axes respectively; θ is the rotation angle;
[0049] For each edge and parameter surface, a direction in the X, Y and Z axes is randomly selected as the rotation axis;
[0050] According to the selected rotation axis, the three-dimensional geometric coordinates P and normal vector features N of the parameter surface, and the three-dimensional geometric coordinates P and tangent vector features T of the edge are acted on to obtain the rotated features:
[0051] E' fl [P,T]=R l (θ)·Ef [P,T]
[0052] S' fl [P,N]=R l (θ)·S f [P,N]
[0053] Among them, R l (θ) is the rotation matrix along the l-axis, where l takes values of X, Y, and Z; E f and S f These are the discretized edges and parametric surfaces, respectively; E' fl and S' fl E respectively f and S f Features after rotation along the l-axis.
[0054] This approach ensures that each 3D model has a corresponding file for its rotation during deep classification model training, and that these files exhibit adjacency relationships in the actual training batch data, facilitating subsequent loss function calculation. Since the features of the rotated shape are similar to those of the original shape, producing the same classification results, the model improves the classification accuracy of product parts by minimizing the differences between the two 3D models during training.
[0055] In step S3, the deep classification model is trained using the dataset. The loss function of the deep classification model includes a smooth quadratic loss function based on the model output before and after rotation and a cross-entropy loss function.
[0056] The deep classification model in this scheme consists of a CNN model, a graph neural network, and a multilayer perceptron connected in sequence, such as... Figure 3 As shown, the overall architecture of the geometrically invariant 3D model classification algorithm based on smooth quadratic loss provided in this scheme consists of three parts. The first part is file preprocessing, including discretization of the 3D model and processing of the CNN model; simultaneously, random rotation is performed on the original file to obtain the rotated representation, and then all initial topological feature information is fused and expressed through convolutional neural network layers; the second part is the graph neural network layer, which fuses the features of each face with the edge features surrounding that face, so that each face feature has the information features of adjacent faces and edges, and pooling layers are used to uniformly extract all face features; the third part is the multilayer perceptron, which reduces the dimension of the hidden layers to the number of categories to be classified, outputs the final classification result, and a smooth quadratic loss function is designed in this part to control the training process of the classification model.
[0057] In implementation, the preferred expression for the loss function of the deep classification model in this scheme is:
[0058]
[0059] wherein, is a loss function of the deep classification model; is a cross-entropy loss function; is a quadratic loss function with smoothing; C is the total number of types of product parts; y c is the label of the cth type of product part; P c is the probability predicted by the deep classification model that the product part belongs to the cth type of product part; B is the size of the training batch; β' is a smoothing degree adjustment parameter; and is the i-th dimensional data output by the graph neural network of the data before and after random rotation of the n-th three-dimensional model; is and is the cosine similarity of
[0060] The quadratic loss function with smoothing of the present scheme is characterized by a smooth curve and gradient, which imposes a penalty on low similarity features and is more tolerant of high similarity features, so that the quadratic loss function with smoothing GCL has better tolerance to abnormal features in the training process and can better handle the influence of special data in the training data on the whole training. Through the training constraint of GCL, the randomly rotated features can be closely aligned with the original corresponding features, thereby enhancing the rotation invariance of the classification model.
[0061] The present scheme improves the rotation invariance recognition ability of the classification model for complex three-dimensional shapes through the strategy of first rotating enhancement and then using the quadratic loss function with smoothing for constraint, thereby enhancing the generalization performance and robustness of the classification model in real industrial product classification.
[0062] In step S4, the continuous parameter surface and edges of the entity three-dimensional model of the product part to be identified are mesh sampled, and then input into the trained deep classification model to obtain the type of the product part to be identified.
[0063] In implementation, the CNN model of the present scheme preferably comprises a first convolutional layer, a second convolutional layer, a third convolutional layer, an average pooling layer and a fully connected layer connected in sequence, and the convolutional process thereof is: first convolutional layer CNN(6, 64, 3)→second convolutional layer CNN(64, 128, 3)→third convolutional layer CNN(128, 256, 3)→average pooling layer Pool(1, 1)→fully connected layer FC(256, 64), wherein the function representation is: CNN(input channel, output channel, convolution kernel size), Pool(1, 1) represents the average pooling layer, and FC(input dimension, hidden layer dimension).
[0064] The discretized parameter faces and edges of each three-dimensional model before and after rotation are fused through multiple channels of the CNN model to obtain the face structure feature vectors and the connecting edge feature vectors before and after rotation. That is, each three-dimensional model obtains two vectors before and after rotation, one being the feature set of all surfaces as graph nodes, and the other being the feature set of all edges.
[0065] After the original three-dimensional model parameter topological features are expressed by the CNN model, the topological information of the three-dimensional model needs to be transmitted in a global view. The face-edge features are updated by using a graph neural network (GNN), and the feature of each face node is gradually calculated and fused to contain the edge features around the face and the adjacent face node features. Through the calculation of multiple stacked GNN layers, the topological information of each face node is transmitted between nodes, and the topological features in a global view are gradually learned.
[0066] In the graph neural network, the expression of the face node feature and the edge feature updated by each GNN layer is as follows:
[0067]
[0068] wherein, and are the face node features output by the kth and (k-1)th GNN layers respectively; σ and φ are the multi-layer perceptron layers for updating the face node features and the edge features respectively; is the adjacent face feature of in the (k-1)th GNN layer, and N(u) is the set of all adjacent face features of ; is the feature of the shared edge between and in the kth GNN layer; is the feature of the shared edge between and output by the (k-1)th GNN layer; is the adjacent face feature of in the kth GNN layer; β (k) is the feature for marking and distinguishing the face nodes in the (k-1)th GNN layer; γ (k) is the feature for marking and distinguishing the edges in the (k-1)th GNN layer; and ⊙ is the dot product.
[0069] The multi-layer perceptron layer σ in the graph neural network is composed of two fully connected layers for learning the internal hidden space features. The algorithm of the graph neural network part uses the adjacent face features and the shared edge features of the face node features, respectively adopts the dot product summation and the projection, and combines the multi-layer stacked GNN layers to make the face node features h uFusion with the surrounding information, gradually update learning global topology features (graph neural network processing does not change the feature dimension, output is [the total number of faces, hidden layer dimension]).
[0070] The graph neural network updates the face-edge feature alternately by stacking and iterating the two-part formula above, so that each face node feature gradually obtains a global view, and thus this part only needs to output the last layer of face node feature as the final global topology representation result. And The graph neural network updates the face-edge feature alternately by stacking and iterating the two-part formula above, so that each face node feature gradually obtains a global view, and thus this part only needs to output the last layer of face node feature as the final global topology representation result.
[0071] In implementation, the geometric invariant three-dimensional model classification algorithm of the scheme preferably further includes adopting a pooling layer to perform a maximum pooling operation on the face node feature output by the graph neural network, extract a global feature, and then input the global feature into a multilayer perceptron for classification to obtain the type of the three-dimensional model.
[0072] The classification algorithm of the scheme was tested and evaluated on the Solidletters dataset together with PointNet and PointNet++, and the classification accuracy of the three algorithms is shown in the following table:
[0073]
[0074] As can be seen from the above table, the classification accuracy of the geometric invariant three-dimensional model classification algorithm of the scheme based on the smooth quadratic loss is higher than that of the previous three-dimensional model classification methods such as PointNet and PointNet++.
[0075] In summary, the scheme uses random rotation of the original model in the three-dimensional space to create new training data, and combines a smooth quadratic loss function designed in the model training process to reduce the classification recognition feature difference between the rotated graph and the original graph, thereby improving the accuracy of the existing classification algorithm in small data or complex three-dimensional model classification tasks.
Claims
1. A geometrically invariant 3D model classification algorithm based on smooth quadratic loss, characterized in that, Including the following steps: S1. Obtain 3D models of various product components, and perform mesh sampling on continuous parametric surfaces and edges in each 3D model to obtain discretized parametric surfaces and edges; S2. Randomly rotate each discretized edge and parameter surface, and use the product component type corresponding to the 3D model, the discretized parameter surfaces and edges before and after random rotation as the dataset; S3. Train the deep classification model using the dataset. The loss function of the deep classification model includes a smooth quadratic loss function based on the model output before and after rotation, and a cross-entropy loss function; the smooth quadratic loss function... The expression is: Where B is the training batch size; Adjust parameters for smoothness; for and Cosine similarity; and The i-th dimension data output by the graph neural network for the data before and after random rotation of the n-th 3D model; S4. Perform mesh sampling on the continuous parametric surfaces and edges of the solid 3D model of the product component to be identified, and then input it into the trained deep classification model to obtain the type of the product component to be identified. Methods for randomly rotating each discretized edge and parametric surface include: Randomly select a rotation angle, and based on the rotation angle, calculate the rotation matrix of the discretized edges and parameter surfaces along the X, Y, and Z axes of the spatial coordinate system: , , in, , and These are the rotation matrices for the X, Y, and Z axes, respectively; The rotation angle; For each edge and parameter surface, a direction is randomly selected from the X, Y, and Z axes as the rotation axis; Based on the selected rotation axis, the 3D geometric coordinates P and normal vector N acting on the parametric surface, and the 3D geometric coordinates P and tangent vector T acting on the edge, the rotated features are obtained: in, Let l be the rotation matrix along the l-axis, where l takes values of X, Y, and Z; and These are the discretized edges and parameter surfaces, respectively; and They are respectively and Features after rotation along the l-axis.
2. The geometrically invariant 3D model classification algorithm according to claim 1, characterized in that, The deep classification model comprises a CNN model, a graph neural network, and a multilayer perceptron connected in sequence. The expression for the loss function of the deep classification model is: , in, The loss function for the deep classification model; The cross-entropy loss function; The function is a smoothed quadratic loss function; C represents the total number of different types of product components. Labels for components of Class C products; Predict the probability of a component belonging to product category c for a deep classification model.
3. The geometrically invariant 3D model classification algorithm according to claim 1, characterized in that, The CNN model consists of a first convolutional layer, a second convolutional layer, a third convolutional layer, an average pooling layer, and a fully connected layer connected in sequence. The input channels, output channels, and kernel sizes of the first convolutional layer, the second convolutional layer, and the third convolutional layer are (6, 64, 3), (64, 128, 3), and (128, 256, 3), respectively. The input dimension and hidden layer dimension of the fully connected layer are 256 and 64, respectively. The discretized parameter surfaces and edges of each 3D model before and after rotation are fused through multiple channels of the CNN model to obtain the surface structure feature vectors and connection edge feature vectors before and after rotation.
4. The geometrically invariant 3D model classification algorithm according to claim 2, characterized in that, The multi-layered Graph Neural Network (GNN) stacks and computes information from each 3D model input, allowing information from each face node to be passed between nodes, thus obtaining topological features from the global view. The expressions for updating face node features and edge features in each GNN layer are as follows: in, and These are the surface node features output by the k-th and (k-1)-th GNN layers, respectively; and These are multi-layer perceptrons that update surface node features and edge features, respectively. In the (k-1)th GNN layer Adjacent surface features, for The set of all adjacent face features, ; In the k-th GNN layer and Features of shared edges between them; The output of the (k-1)th GNN layer and Features of shared edges between them; In the k-th GNN layer Adjacent surface features; To label and distinguish the features of face nodes in the k-1 layer of a GNN; To label and distinguish the features of edges in the k-1 layer of a GNN; It is the dot product.
5. The geometrically invariant 3D model classification algorithm according to any one of claims 1-4, characterized in that, Mesh sampling of continuous parametric surfaces and edges in each 3D model includes: sampling parametric surfaces using a 2D mesh at surface nodes and sampling each edge using a 1D mesh.
6. The geometrically invariant 3D model classification algorithm according to claim 2, characterized in that, It also includes using pooling layers to perform max pooling on the surface node features output by the graph neural network to extract global features, and then inputting the global features into a multilayer perceptron for classification to obtain the type of the 3D model.
Citation Information
Patent Citations
Non-standard part classification and retrieval method based on graph neural network
CN118230049A