Three-dimensional model classification method based on dual Transformer branches

Through the dual Transformer branch method, combined with the extraction and collaborative learning of block features and view features, the problem of difficulty in capturing detailed information in 2D views in 3D model classification is solved, significantly improving the classification accuracy and achieving fine-grained 3D models. and effective extraction and fusion of global features.

CN114863186BInactive Publication Date: 2024-10-01HARBIN UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210622404.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-02
Publication Date
2024-10-01
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the classification of three-dimensional models, it is difficult to capture detailed information in two-dimensional views, resulting in low classification accuracy.

Method used

Using a method based on dual Transformer branches, the Transformer sub-network of block features extracts local features and the Transformer sub-network of view features extracts global features, supervises each other during the training process through collaborative learning, and fuses the features of the two branches to improve classification accuracy. Rate.

Benefits of technology

It effectively improves the classification accuracy of 3D models, can capture fine-grained local information and global information of 3D models, and improves the distinction and accuracy of classification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114863186B_ABST
    Figure CN114863186B_ABST
Patent Text Reader

Abstract

The present invention relates to a three-dimensional model classification method based on dual Transformer branches. The present invention relates to the problem that in the process of three-dimensional model classification, it is difficult to capture detail information and the classification accuracy is low when the two-dimensional view represents the three-dimensional model. At present, the three-dimensional model classification method based on the view usually focuses on using different deep neural network models for the view to mine the distinguishability and temporal relationship between views. These methods are all view-level and cannot capture local detail information from multiple views. These subtle and distinguishing local details are the key to effectively classifying the three-dimensional model. To this end, the present invention adopts a three-dimensional model classification method based on dual Transformer branches. The method can effectively obtain the global information of the three-dimensional model and the fine-grained local information, which effectively improves the representation ability of the three-dimensional model. When classifying the three-dimensional model, the trained network model based on the dual Transformer branch is used to extract the three-dimensional model features. The network extracts the global information and local information of the three-dimensional model respectively, and then fuses the two parts of information, and finally classifies by the fused features. In this way, the three-dimensional model is fully represented and the classification accuracy is improved. The present invention is applied to the classification of three-dimensional models.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the problem that in the process of three-dimensional model classification, two-dimensional views representing three-dimensional models are difficult to capture detailed information and have low classification accuracy. Background Art

[0002] In recent years, 3D models have been widely used in applications such as robotics, medical diagnosis, and 3D modeling. As the basis for various applications, 3D model classification has become an important research direction in the field of computer vision. However, due to the inherent complexity of 3D shapes, 3D shape classification is a challenging task. Currently, the mainstream method for 3D model classification is to project the 3D model from different angles to obtain a set of 2D views to represent the 3D model. Due to the rapid development of deep neural networks in 2D image analysis, view-based 3D model classification methods have achieved satisfactory performance.

[0003] At present, the view-based 3D model classification methods usually focus on using different deep neural network models for views to mine the distinguishability and temporal relationship between views. These methods are all view-level and cannot capture local detail information from multiple views. These subtle and distinguishing local details are the key to effectively classifying 3D models. Therefore, the present invention proposes a 3D model classification method based on dual Transformer branches, which can effectively obtain global information of 3D models and fine-grained local information. The method has two branches, namely, a Transformer subnetwork based on block features and a Transformer subnetwork based on view features. The Transformer subnetwork based on block features takes a single view as input, each view is divided into multiple blocks, the association relationship between blocks is extracted, and different attention values ​​are assigned to different blocks in each view, so that the difference in importance of each block can be effectively represented to promote the aggregated 3D model features to have rich local details and be more distinguishable. The Transformer subnetwork based on view features uses Transformer to assign different attention values ​​to each view, highlighting the different importance between all views of the same object, and effectively aggregates view features into global features of the 3D model. Finally, the two branches learn and guide each other throughout the training process through collaborative learning.

[0004] Collaborative learning accomplishes the same task by jointly learning multiple models. The present invention designs a collaborative learning framework, which includes two Transformer-based branches, one for extracting subtle and discriminative local features of the 3D model, and the other for extracting global features of the 3D model. Different from the existing collaborative methods that use multiple similar networks for implicit knowledge distillation, our semantic collaborative learning uses two Transformer branches, which respectively learn the local features and global features of the 3D model for explicit knowledge distillation, thereby improving the classification accuracy of the 3D model. Summary of the invention

[0005] The present invention relates to the problem that in the process of three-dimensional model classification, two-dimensional views representing three-dimensional models are difficult to capture detailed information and have low classification accuracy.

[0006] The above invention objectives are mainly achieved through the following technical solutions:

[0007] The 3D model classification method based on dual Transformer branches includes the projection view acquisition stage, network training stage and 3D model classification stage:

[0008] The projected view acquisition stage comprises the following steps:

[0009] S1. Each 3D model is oriented vertically along a consistent axis, and then 12 viewpoint cameras are evenly fixed at 30° north latitude to obtain views.

[0010] The network training phase comprises the steps of:

[0011] S2, putting all the projection views as training data into the Transformer branch network that extracts global features for training;

[0012] S3, putting all the projection views as training data into the Transformer branch network for extracting local features for training;

[0013] S4. Optimize the two branch networks through collaborative learning.

[0014] S41. Reducing the L2 distance between global and local features extracted by dual-branch networks through collaborative learning So that they can learn and guide each other during the whole training process. The expression is as follows:

[0015]

[0016] Among them, K represents the batch-size during training, x V,i and x B,i Represent the global features and local features extracted by the two networks respectively.

[0017] The three-dimensional model classification stage comprises the steps of:

[0018] S5. Put all the projection views of the 3D model into the Transformer network for extracting global features to extract view-level features. Different attention values ​​are assigned to each view to highlight the different importance of all views of the same object, and the view features are effectively aggregated into global features of the 3D model.

[0019] S51, mapping all projection views into one-dimensional vectors after maximum pooling;

[0020] S52. All one-dimensional vectors are used as input of the Transformer network to extract the global features of the three-dimensional model.

[0021] S6. Cut each projection view of the 3D model and put it into the Transformer network for extracting local features to extract block-level features. Different attention values ​​are assigned to different blocks. This can effectively represent the difference in importance of each block, so as to promote the aggregated 3D model features to have rich local details and be more distinguishable.

[0022] S61, extract features from each projection view through CNN and cut it into several blocks of the same size, and map each block into a one-dimensional vector;

[0023] S62, taking the one-dimensional vectors of all block mappings of each projection view as the input of the Transformer network to extract local features;

[0024] S63, bilinear pooling is performed on the local features of all the extracted projection views to obtain the local features of the three-dimensional model. The steps of bilinear pooling are as follows:

[0025] The local feature vectors extracted from all shadow views are accumulated after the outer product, and the bilinear feature matrix is ​​output. Then the obtained bilinear feature matrix is ​​flattened after SUM Pooling, and the local feature x of the 3D model is obtained by normalization. The expression is as follows:

[0026]

[0027] Among them, s i,0 represents the local feature vector of the i-th projection view of the 3D model, N represents the number of projection views of the 3D model, n represents the window size of SUM Pooling, vec(·) represents the flattening operation, and Norm(·) represents the normalization operation.

[0028] S7. The features extracted by the two branch networks are integrated to complete the classification.

[0029] S71, weighted addition of the global features and local features extracted by the dual-branch network to obtain features representing the three-dimensional model, and then predict the category of the three-dimensional model and output the classification result z. The expression is as follows:

[0030] z=argmax(αx V,i +(1-α)x B,i ) T ,

[0031] Among them, α follows U(0,1) distribution, x V,i and x B,i Represent the global features and local features extracted by the two networks respectively.

[0032] Effects of the Invention

[0033] The present invention provides a three-dimensional model classification method based on dual Transformer branches. In the stage of obtaining the projection view, each three-dimensional model is vertically oriented along a consistent axis, and 12 viewpoint cameras are evenly fixed at 30° north latitude to obtain views respectively; in the network training stage, the Transformer subnetwork based on block features and the Transformer subnetwork based on view features are first trained separately, and then the collaborative learning method is used to supervise each other during the training process, thereby improving the classification effect; in the three-dimensional model classification stage, the Transformer subnetwork based on block features extracts local features at the block level of the three-dimensional model to achieve fine-grained three-dimensional model classification, and the Transformer subnetwork based on view features effectively fuses the view features into the global features of the three-dimensional model to achieve coarse-grained three-dimensional model classification, and then fuses the features extracted by the two subnetworks by weighted addition, and finally predicts the category of the three-dimensional model. Experiments show that the present invention can effectively improve the classification accuracy of three-dimensional models. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 Projection point camera position map;

[0035] Figure 2 Overall framework diagram;

[0036] Figure 3 Confusion matrix for ModelNet10;

[0037] Figure 4 Confusion matrix for ModelNet40. Specific implementation methods

[0038] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are 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.

[0039] Embodiment 1:

[0040] The present invention is a three-dimensional model classification method based on dual Transformer branches, which includes a projection view acquisition stage, a network training stage and a three-dimensional model classification stage:

[0041] The projected view acquisition stage comprises the following steps:

[0042] S1. Each 3D model is oriented vertically along a consistent axis, and then 12 viewpoint cameras are evenly fixed at 30° north latitude to obtain views.

[0043] The network training phase comprises the steps of:

[0044] S2: Put all the projection views obtained in S1 as training data into the Transformer branch network that extracts global features for training;

[0045] S3, putting all the projection views obtained in S1 as training data into the Transformer branch network for extracting local features for training;

[0046] S4, adopt collaborative learning method to make the networks in S1 and S2 supervise each other during the training process.

[0047] The three-dimensional model classification stage comprises the steps of:

[0048] S5. Put all the projection views of the 3D model into the Transformer network for extracting global features to extract view-level features. Different attention values ​​are assigned to each view to highlight the different importance of all views of the same object, and the view features are effectively aggregated into global features of the 3D model.

[0049] S6. Cut each projection view of the 3D model and put it into the Transformer network for extracting local features to extract block-level features. Different attention values ​​are assigned to different blocks. This can effectively represent the difference in importance of each block, so as to promote the aggregated 3D model features to have rich local details and be more distinguishable.

[0050] S7, the global features obtained in S5 and the local features obtained in S6 are fused to predict the category of the three-dimensional model, and finally the classification result is output.

[0051] In the embodiment of the present invention, in the model training stage, two-dimensional views are obtained as training data using the projection view acquisition method described in this article, and are respectively put into the Transformer branch network for extracting global features and the Transformer branch network for extracting local features for training, and then the collaborative learning method is used to supervise the learning of the two in the training process; in the three-dimensional model classification stage, the two-dimensional views projected from the three-dimensional model are respectively put into the two branch networks to extract global features and local features, and then the features extracted by the two sub-networks are fused by weighted addition, and finally the category of the three-dimensional model is predicted. The present invention can effectively improve the classification accuracy of three-dimensional models.

[0052] The embodiments of the present invention are described in detail below:

[0053] The embodiment of the present invention is to retrieve chair_890 in the ModelNet10 database, and the classification method of the present invention includes the stage of obtaining the projection view, the stage of network training and the stage of three-dimensional model classification:

[0054] The projected view acquisition stage comprises the following steps:

[0055] S1. Each 3D model is oriented vertically along a consistent axis, and then 12 viewpoint cameras are evenly fixed at 30° north latitude to obtain views.

[0056] After the above processing, each 3D model obtains 12 2D views, and the ModelNet10 view dataset obtains a total of 58788 (4899×12) 2D projection views. The camera position of the projection point is as follows Figure 1 shown.

[0057] The network training phase comprises the steps of:

[0058] S2, putting all the projection views as training data into the Transformer branch network that extracts global features for training;

[0059] All the projection views obtained by S1 are input into the Transformer branch network that extracts global features for training.

[0060] S3, putting all the projection views as training data into the Transformer branch network for extracting local features for training;

[0061] All the projection views obtained by S1 are input into the Transformer branch network that extracts local features for training.

[0062] S4. Optimize the two branch networks through collaborative learning.

[0063] S41. Reducing the L2 distance between global and local features extracted by dual-branch networks through collaborative learning So that they can learn and guide each other during the whole training process. The expression is as follows:

[0064]

[0065] Among them, K represents the batch-size during training, x V,i and x B,i Represent the global features and local features extracted by the two networks respectively.

[0066] During the entire training process, different weights are set for each branch network for collaborative learning training. After the above process, a trained 3D model classification model based on dual Transformer branches is obtained. The overall framework is as follows Figure 2 shown.

[0067] The three-dimensional model classification stage comprises the steps of:

[0068] S5. Cut each projection view of the 3D model and put it into the Transformer network for extracting local features to extract block-level features. Different attention values ​​are assigned to different blocks. This can effectively represent the difference in importance of each block, so as to promote the aggregated 3D model features to have rich local details and be more distinguishable.

[0069] S51, mapping all projection views into one-dimensional vectors after maximum pooling;

[0070] The 12 projection views of chair_890 are max-pooled and linearly mapped into 12 one-dimensional vectors of length 384.

[0071] S52. All one-dimensional vectors are used as input of the Transformer network to extract the global features of the three-dimensional model.

[0072] A class vector is added to learn the features of all views, and then sine-cosine position encoding is added to all one-dimensional vectors and sent to the multi-head self-attention network in Transformer to extract the global features of the three-dimensional model.

[0073] S6. Cut each projection view of the 3D model and put it into the Transformer network for extracting local features to extract block-level features. Different attention values ​​are assigned to different blocks. This can effectively represent the difference in importance of each block, so as to promote the aggregated 3D model features to have rich local details and be more distinguishable.

[0074] S61, extract features from each projection view through CNN and cut it into several blocks of the same size, and map each block into a one-dimensional vector;

[0075] Each projection view of chair_890 is first extracted with CNN, and then 36 blocks of the same size are obtained by moving the sliding window on the feature map. Finally, all blocks are mapped to a one-dimensional vector set of length 64.

[0076] S62, taking the one-dimensional vectors of all block mappings of each projection view as the input of the Transformer network to extract local features;

[0077] A class vector is added to the one-dimensional vector set to learn the features of each block from a single view, and then sine-cosine position encoding is added to all vectors and input into the multi-head self-attention network in the Transformer to extract local features.

[0078] S63, bilinear pooling is performed on the local features of all the extracted projection views to obtain the local features of the three-dimensional model. The steps of bilinear pooling are as follows:

[0079] The local feature vectors extracted from all shadow views are accumulated after the outer product, and the bilinear feature matrix is ​​output. Then the obtained bilinear feature matrix is ​​flattened after SUM Pooling, and the local feature x of the 3D model is obtained by normalization. The expression is as follows:

[0080]

[0081] Among them, s i,0 represents the local feature vector of the i-th projection view of the 3D model, N represents the number of projection views of the 3D model, n represents the window size of SUM Pooling, vec(·) represents the flattening operation, and Norm(·) represents the normalization operation.

[0082] S7. The features extracted by the two branch networks are integrated to complete the classification.

[0083] S71, weighted addition of the global features and local features extracted by the dual-branch network to obtain features representing the three-dimensional model, and then predict the category of the three-dimensional model and output the classification result z. The expression is as follows:

[0084] z=argmax(αx V,i +(1-α)x B,i ) T ,

[0085] Among them, α follows U(0,1) distribution, x V,i and x B,iRepresent the global features and local features extracted by the two networks respectively.

[0086] After the above process, the final category of chair_890 is chair.

[0087] In this embodiment, ModelNet10 includes 10 categories, a total of 4899 models, including 3991 training set models and 908 test set models. After obtaining the two-dimensional view according to the S1 method, the ModelNet10 view data set includes 10 categories, a total of 58788 (4899×12) two-dimensional views, including 47892 (3991×12) training set views and 10896 (908×12) test set views. In addition, ModelNet40 includes 40 categories, a total of 12311 models, including 9843 training set models and 2468 test set models. After obtaining the two-dimensional view according to the S1 method, the ModelNet40 view data set includes 40 categories, a total of 147732 (12311×12) two-dimensional views, including 118116 (9843×12) training set views and 29616 (2468×12) test set views. In order to reflect the effectiveness of the present invention, the following situations are compared:

[0088] 1. If only S2 and S5 are executed to classify the 3D model, the classification accuracy is:

[0089] ModelNet10: 93.17%; ModelNet40: 91.09%.

[0090] 2. If only S3 and S6 are executed to classify the 3D model, the classification accuracy is:

[0091] ModelNet10: 92.18%; ModelNet40: 89.95%.

[0092] 3. If S4 is not executed to classify the 3D model, the classification accuracy is:

[0093] ModelNet10: 94.38%, which is 1.21% and 2.2% higher than Case 1 and Case 2 respectively;

[0094] ModelNet40: 92.22%, which is 1.13% and 2.27% higher than Case 1 and Case 2, respectively.

[0095] 4. If S5 and S7 are not executed to classify the 3D model, the classification accuracy is:

[0096] ModelNet10: 90.53%, 4.62% less than case 6;

[0097] ModelNet40: 88.49%, a 4.54% reduction from Case 6.

[0098] 5. If S6 and S7 are not executed to classify the 3D model, the classification accuracy is:

[0099] ModelNet10: 93.72%, 1.43% less than case 6;

[0100] ModelNet40: 90.76%, a decrease of 2.27% from Case 6.

[0101] 6. If the three-dimensional model classification is performed completely according to the method of the present invention, the classification accuracy is:

[0102] ModelNet10: 95.15%, 0.77% higher than case 3. The confusion matrix is ​​as follows Figure 3 As shown;

[0103] ModelNet40: 93.03%, 0.81% higher than case 3. The confusion matrix is ​​as follows Figure 4 shown.

[0104] It can be seen that the three-dimensional model classification method proposed in the present invention can effectively capture the detailed information of the three-dimensional model and improve the classification accuracy of the three-dimensional model.

[0105] The present invention may also have other various embodiments. Without departing from the spirit and essence of the present invention, those skilled in the art may make various corresponding changes and modifications based on the present invention, but these corresponding changes and modifications should all fall within the scope of protection of the claims attached to the present invention.

Claims

1. A three-dimensional model classification method based on dual Transformer branches, characterized in that: It includes the projection view acquisition stage, network training stage and 3D model classification stage: The projected view acquisition stage comprises the following steps: S1, each 3D model is oriented vertically along a consistent axis, and then 12 viewpoint cameras are evenly fixed at 30° north latitude to obtain views respectively; The network training phase comprises the steps of: S2, putting all the projection views as training data into the Transformer branch network that extracts global features for training; S3, putting all the projection views as training data into the Transformer branch network for extracting local features for training; S4. Collaborative learning and optimization of two branch networks according to the method of step S41: S41. Reducing the L2 distance between global and local features extracted by dual-branch networks through collaborative learning So that they can learn and guide each other throughout the training process; the expression is as follows: Among them, K represents the batch-size during training, x V,i and x B,i Respectively represent the global features and local features extracted by the two networks; The three-dimensional model classification stage comprises the steps of: S5. According to the method of steps S51-S52, all projection views of the 3D model are put into the Transformer network for extracting global features to extract view-level features. Different attention values ​​are assigned to each view to highlight the different importance of all views of the same object, and the view features are effectively aggregated into global features of the 3D model: S51, mapping all projection views into one-dimensional vectors after maximum pooling; S52, taking all one-dimensional vectors as input of the Transformer network to extract the global features of the three-dimensional model; S6. According to the method of steps S61-S63, each projection view of the 3D model is cut and put into the Transformer network for extracting local features to extract block-level features, and different attention values ​​are assigned to different blocks. This can effectively represent the difference in importance of each block, so as to promote the aggregated 3D model features to have rich local details and be more distinguishable: S61, extract features from each projection view through CNN and cut it into several blocks of the same size, and map each block into a one-dimensional vector; S62, taking the one-dimensional vectors of all block mappings of each projection view as the input of the Transformer network to extract local features; S63, bilinearly pooling the local features of all the extracted projection views to obtain local features of the three-dimensional model; S7, according to the method of step S71, the features extracted by S5 and S6 are merged to complete the classification: S71, weighted addition of the global features and local features extracted by the dual-branch network is performed to obtain features representing the three-dimensional model, and then the classification result z of the three-dimensional model is predicted; the expression is as follows: z=arg max(αx V,i +(1-α)x B,i ) T Among them, α follows U(0,1) distribution, x V,i and x B,i Represent the global features and local features extracted by the two networks respectively.

2. The method according to claim 1, characterized in that The method of bilinear pooling in step S63 is as follows: The local feature vectors extracted from all projection views are accumulated after the outer product, and the bilinear feature matrix is ​​output; the obtained bilinear feature matrix is ​​then flattened after SUM Pooling, and the local feature x of the 3D model is obtained by normalization; the expression is as follows: Among them, s i,0 represents the local feature vector of the i-th projection view of the 3D model, N represents the number of projection views of the 3D model, n represents the window size of SUM Pooling, vec(·) represents the flattening operation, and Norm(·) represents the normalization operation.