A three-dimensional model retrieval method based on deep learning feature recognition
By constructing an end-to-end multi-task feature recognition and retrieval network, the problem of insufficient utilization of local structural information in existing 3D model retrieval technologies is solved, achieving efficient and accurate 3D model retrieval, supporting intelligent recommendation of part design and process solutions, and improving product development efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-25
- Publication Date
- 2026-03-24
AI Technical Summary
Existing 3D model retrieval technologies struggle to effectively utilize the local structural information of models, lack organic integration with retrieval tasks, and suffer from insufficient adaptability to complex industrial scenarios based on manually designed local feature descriptors, resulting in limited retrieval accuracy and efficiency.
An end-to-end multi-task feature recognition and retrieval network is constructed. Global shape and local processing features are extracted through non-uniform sampling of point clouds and an improved PointNet++ architecture. The Hungarian algorithm is then used for feature matching to achieve a weighted fusion of global cosine distance and local Hungarian matching distance.
It significantly improves the accuracy and efficiency of 3D model retrieval, enabling rapid identification and retrieval of parts containing specific functional structures, supporting rapid reuse of part designs and intelligent recommendation of process solutions, shortening product development cycles, and reducing design and manufacturing costs.
Smart Images

Figure CN121412414B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer-aided manufacturing, and particularly to a three-dimensional model retrieval method based on deep learning feature recognition. BACKGROUND
[0002] With the continuous development of computer-aided design technology and the accelerated promotion of industrial digitization process, three-dimensional models have become the core data carrier in the product design and manufacturing process. In the fields of aerospace, automobile manufacturing, mechanical equipment, etc., a large amount of three-dimensional model resources has been accumulated. How to quickly and accurately retrieve the models meeting the design requirements from these model libraries has become a key problem to improve product development efficiency and promote design resource reuse.
[0003] Traditional three-dimensional model retrieval methods mainly rely on global shape descriptors, such as view-based representation methods and voxel-based representation methods. These methods encode the overall geometric features of the model to realize the similarity comparison of the model. However, in actual engineering applications, designers often pay more attention to the local structural features of the model, such as holes, grooves, steps, etc. These local features are usually closely related to the functional requirements and manufacturing processes of the parts. Traditional methods have obvious deficiencies in capturing and utilizing these local feature information.
[0004] In recent years, deep learning-based retrieval methods have brought new opportunities for 3D model retrieval. For example, the Chinese patent with publication number CN117033686A proposes a mechanical part 3D model retrieval scheme based on PointNet, which extracts and clusters features from quantized and down-sampled point cloud data by constructing a KNN double-layer local feature extraction neural network, achieving fast retrieval of part similarity. This scheme has achieved good results in global shape description through hierarchical feature learning, but due to its network structure mainly relying on global feature aggregation of point clouds, the perception ability of local geometric details is limited, and when dealing with local structures such as complex cavities, fine threads or multiple transition features, it is difficult to capture their subtle geometric differences and topological relationships, ultimately leading to limited retrieval accuracy. Qin et al. in the document "VGNet: Multimodal Feature Extraction and Fusion Network for 3D CAD Model Retrieval" (published in IEEE Transactions on Multimedia, 2025, vol. 27, pp. 1432-1447) designed independent feature extraction networks and multi-modal fusion modules for view and adjacency graph modalities, improving the discriminability of joint representation of 3D CAD models through a correlation loss function. However, this method still mainly relies on overall description vectors, making it difficult to fully capture local detail information of the model.
[0005] In the area of local feature research, Ji et al., in their paper "Structure correspondence searching of CAD model using local feature-based description and indexing" (published in PatternRecognition, 2024, vol. 148, pp. 110126), proposed using attribute adjacency graphs to segment CAD models into structural units and extracting descriptors for each unit through weighted shape distribution vectors and neighbor sets. This method has achieved some success in rule-based local feature acquisition, but its feature descriptors are highly dependent on manual design, lack sufficient semantic information, and have limited generalization ability in complex industrial scenarios. Wu et al., in their paper "AAGNet: A graph neural network towards multi-task machining feature recognition" (published in Robotics and Computer-Integrated Manufacturing, 2024, vol. 86, pp. 102661), proposed AAGNet, a multi-task machining feature recognition network based on geometric attribute adjacency graphs. This network can simultaneously perform semantic segmentation, instance segmentation, and bottom surface segmentation tasks, achieving high-precision recognition of 24 typical machining features. However, this method mainly focuses on feature recognition and cannot effectively convert the feature recognition results into local feature descriptions that can be used for retrieval.
[0006] In summary, existing 3D model retrieval technologies still suffer from the following prominent problems: First, most deep learning methods struggle to effectively utilize the local structural information of models, failing to meet the demands of refined retrieval; second, existing feature recognition methods lack organic integration with retrieval tasks, making it difficult to form end-to-end solutions; and finally, manually designed local feature descriptors lack semantic depth, resulting in insufficient adaptability in complex and ever-changing industrial scenarios. These problems severely restrict the application effectiveness of 3D model retrieval technologies in practical engineering. Summary of the Invention
[0007] To address the shortcomings of existing technologies, this invention proposes a 3D model retrieval method based on deep learning feature recognition. By constructing an end-to-end multi-task feature recognition and retrieval network, it achieves efficient and unified description and matching of the global shape and local processing features of 3D models, significantly improving the retrieval efficiency and recognition accuracy of 3D models.
[0008] To achieve the above objectives, the present invention adopts the following technical solution:
[0009] This invention proposes a 3D model retrieval method based on deep learning feature recognition, comprising the following steps:
[0010] S1. Obtain the 3D CAD model dataset of the mechanical parts;
[0011] S2. Perform point cloud sampling on each 3D model in the 3D CAD model dataset, synchronously collect the spatial coordinates and normal vector of each sampling point, and associate the area, face type, geometric center point coordinates and face ID of the face to which the sampling point belongs to generate a point cloud dataset.
[0012] S3. Using the point cloud data corresponding to each of the three-dimensional models as an independent sample, the point cloud dataset is divided into a training set, a validation set, and a test set according to a predetermined ratio; then, normalization and tensor quantization preprocessing are performed on each sample in the training set, validation set, and test set respectively, so that each sample has the same number of points and feature dimensions.
[0013] S4. Construct a processing feature recognition network model. Use the preprocessed training set from S3 to train the processing feature recognition network model to obtain a trained network model.
[0014] S5. Construct a parts database, which contains multiple 3D parts models;
[0015] S6. Perform point cloud sampling and preprocessing on each 3D part model in the part database to generate a first input tensor; input the first input tensor into the trained network model, and extract and save the first global shape feature vector and the first local shape feature vector set corresponding to each 3D part model.
[0016] S7. Perform point cloud sampling and preprocessing on the 3D model of the part to be queried to generate a second input tensor; input the second input tensor into the trained network model, extract and save the second global shape feature vector and the second local shape feature vector set corresponding to the part to be queried;
[0017] S8. Calculate the cosine distance between the second global shape feature vector and each first global shape feature vector. At the same time, calculate the Hungarian matching distance between the second local shape feature vector set and each first local shape feature vector set. Weight and fuse the cosine distance and Hungarian matching distance of each set to obtain a comprehensive retrieval distance. Output the top N candidate 3D part models with the highest similarity to the part to be queried based on the comprehensive retrieval distance, where N is a preset positive integer.
[0018] Furthermore, in S2, the specific method for point cloud sampling includes:
[0019] S201. Preset the minimum number of sampling points for each face in the three-dimensional model;
[0020] S202. Based on the area of each face of the 3D model, allocate the number of sampling points to each face using a weighted strategy. The formula for the weighted strategy is:
[0021]
[0022] For the first The coefficient for allocating the number of sampling points on each surface. , For the first The area of each face. For the first The area of each face. This represents the total number of faces in the 3D model. This is the scaling factor;
[0023] S203. Based on the number of sampling points allocated in S202, sample each face of the three-dimensional model to obtain the spatial coordinates and normal vector of each sampling point;
[0024] S204. Adjust the total number of sampling points on each surface to the preset target total number of points by random screening or repeated sampling;
[0025] S205. For each sampling point, integrate the area, surface type, geometric center coordinates, and surface ID of the surface to which it belongs to generate a point cloud dataset.
[0026] Furthermore, in S4, the processing feature recognition network model includes a point feature extraction layer, a surface feature enhancement module, and a multi-task output head connected in sequence; the point feature extraction layer is based on... The architecture is modified, and the MLP (Multilayer Perceptron) is replaced with residual blocks; the point feature extraction layer is used to extract point-level feature vectors, the surface feature enhancement module is used to receive and process point-level feature vectors and output enhanced surface-level feature vectors, and the multi-task output head is used to receive and process point-level feature vectors and enhanced surface-level feature vectors and output point classification results, surface classification results and processed feature instance similarity matrix.
[0027] Furthermore, the residual block is composed of two one-dimensional convolutional layers connected by an identity mapping.
[0028] Furthermore, the surface feature enhancement module includes a first stitching unit, a first MLP, an attention weight calculation unit, a surface feature generation unit, a BN (Batch Normalization) layer, a CBAM (Convolutional Block Attention Module), a residual fusion unit, and a second stitching unit connected in sequence. The first stitching unit and the attention weight calculation unit are respectively connected to the point feature extraction layer. The CBAM is also connected to the second stitching unit, and the second stitching unit is connected to the multi-task output head.
[0029] Furthermore, the multi-task output head includes a point cloud segmentation branch, a semantic segmentation branch, and an instance segmentation branch set in parallel; the point cloud segmentation branch is used to receive and process point-level feature vectors and output point classification results; the semantic segmentation branch is used to receive and process the enhanced surface-level feature vectors and output surface classification results; the instance segmentation branch is used to process the enhanced surface-level feature vectors and output a processed feature instance similarity matrix.
[0030] Further, the extraction process of the first local shape feature vector set in S6 is as follows: based on the similarity matrix of the processing feature instances, the faces belonging to the same processing feature instance are identified; the enhanced surface-level feature vectors of all faces belonging to the same processing feature instance are aggregated to generate the local shape feature vector of the processing feature instance; the local shape feature vectors of all processing feature instances constitute the first local shape feature vector set.
[0031] Furthermore, in S8, the method for calculating the Hungarian matching distance is as follows:
[0032] S801. Normalize the first local shape feature vector set and the second local shape feature vector set respectively to obtain the first normalized local shape feature vector set and the second normalized local shape feature vector set.
[0033] S802. Calculate the cosine similarity between each feature vector in the first normalized local shape feature vector set and each feature vector in the second normalized local shape feature vector set, and construct a cost matrix based on the cosine similarity.
[0034] S803. Input the cost matrix into the Hungarian algorithm to solve and obtain the optimal matching pair set between the first normalized local shape feature vector set and the second normalized local shape feature vector set;
[0035] S804. Calculate the average matching cost of all matching pairs in the optimal matching pair set;
[0036] S805. Calculate the size penalty term based on the difference in the number of feature vectors in the first local shape feature vector set and the second local shape feature vector set;
[0037] S806. The average matching cost and the size penalty term are weighted and summed to obtain the Hungarian matching distance.
[0038] Furthermore, the formula for calculating the comprehensive retrieval distance is as follows:
[0039]
[0040] In the formula, To comprehensively search distance, The second global shape feature vector and the first The cosine distance between the first global shape feature vectors corresponding to each 3D part model The second set of local shape feature vectors and the first Hungarian matching distance between the first local shape feature vector sets corresponding to each 3D part model. The weights are the cosine distances. The weights for the Hungarian matching distance, .
[0041] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0042] (1) This invention uses a processing feature recognition network model to simultaneously extract global shape features and local processing features of a 3D model, and weights and fuses global cosine distance and local Hungarian matching distance to achieve multi-level feature similarity measurement. It not only considers the overall contour similarity of the model, but also deeply matches the geometric and layout information of key processing features such as holes, slots, and steps. Thus, while maintaining retrieval efficiency, it significantly improves the retrieval accuracy for specific functional structures, effectively meeting the refined retrieval needs of actual industrial scenarios such as product design, process planning and resource reuse.
[0043] (2) In terms of data preprocessing, this invention proposes a non-uniform sampling method for point clouds based on the area and geometric properties of the surface, and integrates multi-dimensional attributes such as normal vector and surface type to construct a more information-rich point cloud representation. In terms of network structure, this invention also improves the classic PointNet++ architecture by introducing residual blocks to enhance feature extraction capabilities, and combines point-surface fusion units and CBAM to achieve accurate transformation and enhancement from point-level features to surface-level features. In terms of feature matching, this invention proposes a local feature set matching metric method based on the Hungarian algorithm and size penalty, which effectively solves the matching problem of unequal number and uneven distribution of feature instances, and forms a complete and robust feature extraction and similarity calculation strategy.
[0044] (3) By accurately identifying and retrieving three-dimensional models containing specific processing features, this invention can effectively support the rapid reuse of part designs, intelligent recommendation of process schemes, and optimized allocation of manufacturing resources. Researchers can directly retrieve existing parts with similar local structures according to functional requirements and reuse their design parameters, process routes, and even CNC codes, thereby greatly shortening the product development cycle and reducing design and manufacturing costs. It has significant engineering application value for promoting intelligent manufacturing and the reuse of design knowledge. Attached Figure Description
[0045] Figure 1 This is an overall flowchart of the three-dimensional model retrieval method provided in the embodiments of the present invention;
[0046] Figure 2 This is a schematic diagram of a portion of the MfInstseg (machinery parts processing feature recognition) dataset used in this embodiment of the invention;
[0047] Figure 3 This is a structural block diagram of the processing feature recognition network constructed in the embodiments of the present invention;
[0048] Figure 4 This is a structural block diagram of the point feature extraction layer in an embodiment of the present invention;
[0049] Figure 5 This is a structural block diagram of the surface feature enhancement module in an embodiment of the present invention;
[0050] Figure 6 This is a schematic diagram of the part retrieval results in an embodiment of the present invention. Detailed Implementation
[0051] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0052] Example
[0053] refer to Figure 1 This embodiment proposes a 3D model retrieval method based on deep learning feature recognition, including the following steps:
[0054] S1. Obtain a 3D CAD model dataset of mechanical parts. The 3D models in the dataset have machining feature labels and instance labels. In this embodiment, the 3D CAD model dataset is the publicly available MfInstseg dataset. This dataset contains a large number of 3D CAD models, and each model's face has machining feature labels (such as holes, slots, steps, etc.) and instance labels. Some model examples in this dataset are shown below. Figure 2 As shown, faces containing the same processing feature instance have the same instance label. The processing feature label and instance label corresponding to each face can be indexed by the face ID.
[0055] S2. Perform point cloud sampling on each 3D model in the 3D CAD model dataset, synchronously collect the spatial coordinates and normal vector of each sampling point, and associate the area, surface type, geometric center point coordinates and surface ID of the surface to which the sampling point belongs to generate a point cloud dataset.
[0056] In this step, a non-uniform sampling strategy is used for point cloud sampling, which specifically includes the following sub-steps:
[0057] S201. Preset the minimum number of sampling points for each face in the three-dimensional model. In this embodiment, the minimum number of sampling points is preset to 5 points.
[0058] S202. Based on the area of each face, allocate the number of sampling points to each face using a weighted strategy. The formula for the weighted strategy is as follows:
[0059]
[0060] For the first The coefficient for allocating the number of sampling points on each surface. For the first The area of each face, 1≤ ≤ , For the first The area of each face. This represents the total number of faces in the 3D model. This is the scaling factor;
[0061] in ω ∈ [0 , 1] ,when Approaching 0, the actual strategy is to allocate the number of sampling points according to area; when Approaching 1, the actual strategy is to assign the same number of sampling points to each face.
[0062] S203. Based on the number of sampling points allocated in S202, perform parametric sampling on each surface of the three-dimensional model to obtain the spatial coordinates and normal vector of each sampling point.
[0063] The parametric sampling process specifically involves: creating a parametric surface representation for each facet and randomly generating parameter pairs. Calculate the point coordinates and normal vector corresponding to the parameter in three-dimensional space, and confirm that the point corresponding to the parameter is within the effective parameter boundary of the current face; repeat this sampling process until the number of points obtained meets the requirements or the number of attempts reaches the preset upper limit; if the final number of sampling points still does not meet the standard, select the geometric center point in front as the supplementary sampling point.
[0064] The sampling process in this step ensures that a specified number of geometrically correct sampling points can be stably obtained even on complex surfaces.
[0065] S204. After merging the sampling points of each face of the three-dimensional model, check the total number of sampling points for each face. If the total number of sampling points for each face exceeds the preset target total number of points... Then, the total number of sampling points on each surface is adjusted to [a certain value] through random selection. If the total number of sampling points on each surface is insufficient, it will be supplemented by repeated sampling. In this embodiment, The value is 4096.
[0066] S205. For each sampling point, integrate the area, surface type, geometric center coordinates, and surface ID of the surface to which it belongs to generate the point cloud dataset.
[0067] S3. Using the point cloud data corresponding to each 3D model as an independent sample, the point cloud dataset is divided into a training set, a validation set, and a test set according to a predetermined ratio. Then, normalization and tensor quantization preprocessing are performed on each sample in the training set, validation set, and test set respectively, so that each sample has the same number of points and feature dimensions, and each sample is constructed into a tensor format suitable for subsequent network model input.
[0068] In this embodiment, the point cloud dataset is divided into a training set, a validation set, and a test set in a ratio of 0.7:0.15:0.15. The training set contains 43,745 samples, the validation set contains 9,375 samples, and the test set contains 9,375 samples. The normalization preprocessing for each sample involves normalizing the spatial coordinates of all sampling points within a unit sphere to eliminate size and positional differences. After normalization, all samples are constructed into a uniform tensor format, with each sample's input tensor having a dimension of [missing value]. The 12 feature dimensions include: 3D coordinates, 3D normal vector, 1D surface type, 1D area, 3D surface center coordinates, and 1D surface ID. Processed feature labels and instance labels are used only for training supervision and are not used as input to the network model.
[0069] S4. Construct a processing feature recognition network model. Train the processing feature recognition network model using the preprocessed training set from S3 to obtain the trained network model. (Reference) Figure 3 In this embodiment, the processing feature recognition network model includes a point feature extraction layer, a surface feature enhancement module, and a multi-task output head connected in sequence.
[0070] refer to Figure 4 Point feature extraction layer based on The architecture was modified, and the MLP was replaced with residual blocks, that is... The MLP used in the SA and FP layers is replaced with residual blocks, which consist of two one-dimensional convolutional layers connected by an identity mapping, while the rest of the structure remains unchanged. The input dimension of this layer is... The tensor, which is the input tensor constructed in S3, is input into this layer, and the output dimension is... Point-level feature vectors.
[0071] refer to Figure 5 The surface feature enhancement module includes a first concatenation unit, a first MLP, an attention weight calculation unit, a surface feature generation unit, a BN layer, a CBAM, a residual fusion unit, and a second concatenation unit connected in sequence. The first concatenation unit and the attention weight calculation unit are connected to the point feature extraction layer. The CBAM is also connected to the second concatenation unit, which is connected to the multi-task output head. The point-level feature vector output by the point feature extraction layer and the spatial coordinates of each point are concatenated by the first concatenation unit to generate a dimension of [missing information]. The first fusion feature; the first MLP performs nonlinear transformation and feature extraction on the first fusion feature, outputting intermediate features; the attention weight calculation unit calculates a scalar attention weight for each point based on the intermediate features, generating an attention weight map; the surface feature generation unit multiplies the point-level feature vector output by the point feature extraction layer with the corresponding attention weight, and sums and aggregates all weighted point features within the same surface along the feature dimension according to the surface ID of the surface to which each point belongs, generating a dimension of... The initial surface-level feature vector, where The current 3D model has a total number of faces; the BN layer performs BN processing on the initial face-level feature vectors, outputting normalized lower-level feature vectors; CBAM performs channel attention and spatial attention calculations on the normalized lower-level feature vectors sequentially, outputting a dimension of... The first enhanced feature; the residual fusion unit adds the first enhanced feature element-wise to the normalized subsequent feature vector to achieve residual connection, and the output dimension is... The second fusion feature; the second splicing unit splices the first enhanced feature and the second fusion feature, and the output dimension is The enhanced surface-level feature vector is then fed to the multi-task output head.
[0072] refer to Figure 3 The multi-task output header includes point cloud segmentation branches, semantic segmentation branches, and instance segmentation branches set in parallel.
[0073] The point cloud segmentation branch includes a second MLP and a third MLP in concatenation. The point-level feature vector output from the point feature extraction layer serves as the input to the second MLP, which performs feature transformation on the point-level feature vector. The third MLP further maps the output of the second MLP to the class score of each point, with an output dimension of [missing information]. The point classification prediction results are as follows: there are a total of 25 categories, including 24 categories of processing features and 1 category of background.
[0074] The semantic segmentation branch includes a point-to-surface fusion unit, a fourth MLP, and a fifth MLP connected sequentially. The point-to-surface fusion unit is connected to the second MLP and the surface feature enhancement module. The point-to-surface fusion unit aggregates the output of the second MLP into surface-level point features based on surface IDs, and concatenates these surface-level point features with the enhanced surface-level feature vectors output by the surface feature enhancement module to form fused surface features. The fourth MLP performs nonlinear transformations and feature extraction on the fused surface features. The fifth MLP maps the output of the fourth MLP to the category score of each surface, with an output dimension of [missing information]. The face classification prediction results.
[0075] The instance segmentation branch includes a sixth MLP and an instance feature fusion unit connected in series. The instance feature fusion unit is also connected to the surface feature enhancement module, the seventh MLP and the eighth MLP respectively. The sixth MLP is also connected to the fourth MLP.
[0076] The sixth MLP further reduces and transforms the output of the fourth MLP to obtain the first instance feature. The instance feature fusion unit fuses the first instance feature with the enhanced surface-level feature vector output by the surface feature enhancement module. The output of the instance feature fusion unit is then processed by the independent seventh and eighth MLPs. The similarity calculation unit calculates the similarity between each surface based on the outputs of the seventh and eighth MLPs and outputs a dimension of... The similarity matrix of processing feature instances.
[0077] During training, a dynamic weight allocation method is used to balance the cross-entropy loss for point classification, the cross-entropy loss for area classification, and the instance matching comparison loss. The network parameters are updated through gradient backpropagation. After training converges, the network model parameters are saved.
[0078] S5. Construct a parts database, which contains multiple 3D parts models. In this embodiment, the parts database contains 1015 3D mechanical parts models. Figure 6 middle to The document showcases some 3D mechanical part models from the parts database.
[0079] S6. Perform point cloud sampling and preprocessing on each 3D part model in the part database to generate a first input tensor; input the first input tensor into the trained network model, and extract and save the first global shape feature vector and the first local shape feature vector set corresponding to each 3D part model.
[0080] Specifically:
[0081] For each 3D part model in the part database, point cloud sampling and preprocessing are performed using the method described in step S2 to generate a first input tensor of 4096×12.
[0082] The first input tensor is input into the trained network model. The point-level feature vector output by the point feature extraction layer is subjected to global pooling and subsequent fully connected layer transformation to obtain a vector with a dimension of 1×1024. This vector is used as the first global shape feature vector of the three-dimensional part model.
[0083] Based on the similarity matrix of the processing feature instances output by the instance segmentation branch, the set of faces belonging to the same processing feature instance is determined. The enhanced surface-level feature vectors of the faces contained in each processing feature instance are averaged and aggregated to obtain the local shape feature vector of that processing feature instance. The local shape feature vectors of all processing feature instances of this 3D part model constitute the first local shape feature vector set. For example, in this embodiment, Figure 6 After the 3D part model in k is processed by the machining feature recognition network model, the first global shape feature vector with a dimension of 1×1024 is extracted. At the same time, it is identified that the 3D part model contains a total of 25 machining feature instances, and a local shape feature vector with a dimension of 1×256 is extracted for each machining feature instance. The 25 local shape feature vectors together constitute the first local shape feature vector set of the 3D part model.
[0084] Save the first global shape feature vector and the first local shape feature vector set of each 3D part model to the feature index library.
[0085] S7. Using the same method as S6, generate the second global shape feature vector and the second local shape feature vector set for the 3D model of the part to be queried.
[0086] S8. Calculate the cosine distance between the second global shape feature vector and each first global shape feature vector. At the same time, calculate the Hungarian matching distance between the second local shape feature vector set and each first local shape feature vector set. Weight and fuse the cosine distance and Hungarian matching distance of each set to obtain a comprehensive retrieval distance. Output the top N candidate 3D part models with the highest similarity to the part to be queried based on the comprehensive retrieval distance.
[0087] Specifically, for the k-th 3D part model in the parts database:
[0088] The formula for calculating cosine distance is:
[0089]
[0090] In the formula, This is the second global shape feature vector. For the first The first global shape feature vector of a 3D part model for and The cosine distance between them Represents the vector dot product. Representing vectors Norm.
[0091] The method for calculating the Hungarian matching distance is as follows:
[0092] Let the set of second local shape feature vectors be . ,in , where m is the total number of machining feature instances contained in the 3D model of the part to be queried.
[0093] The set of the first local shape feature vectors of the k-th 3D part model in the part database is: ,in u represents the total number of machining feature instances contained in the 3D part model.
[0094] S801, respectively for and Q proceed Normalization processing yields the first set of normalized local shape feature vectors. and the second normalized local shape feature vector set The specific calculation method is as follows:
[0095]
[0096]
[0097] In the formula, For Q, the first Local feature vectors, for The Middle Local feature vectors, for The Middle Local feature vectors, for The first in Local feature vectors; To use a very small positive number to avoid the denominator being zero, in this embodiment we take... .
[0098] S802, Calculation Each local feature vector in The cosine similarity between local feature vectors is calculated, and a cost matrix is constructed based on the cosine similarity. ;
[0099]
[0100] In the formula, For C, the first The element in row j, column j, has dimension C. , for and The cosine similarity.
[0101] S803. Input C into the Hungarian algorithm, solve and obtain the result. and The optimal set of matching pairs between This makes the total matching cost Minimum, For the feature index in Q; for The feature index in the matrix; K is the number of successfully matched feature pairs. , For C, the corresponding optimal matching pair Element.
[0102] S804. Calculate the average matching cost of all matching pairs in the optimal matching pair set. The specific calculation formula is as follows;
[0103]
[0104] S805. Calculate the size penalty term based on the difference in the number of feature vectors between the first local shape feature vector set and the second local shape feature vector set. , The specific calculation formula is as follows:
[0105]
[0106] S806. The average matching cost and the size penalty term are weighted and summed to obtain the Hungarian matching distance. The specific calculation formula is as follows:
[0107]
[0108] In the formula, For Q and The Hungarian matching distance between them.
[0109] The cosine distance and Hungarian matching distance of each group are weighted and fused to obtain a comprehensive retrieval distance. The formula for calculating the comprehensive retrieval distance is as follows:
[0110]
[0111] In the formula, To comprehensively search distance, The weights are the cosine distances. The weights for the Hungarian matching distance, In this embodiment , =0.3.
[0112] Sort all the calculated comprehensive search distances from smallest to largest, and output the top N most similar candidate 3D part models. In this embodiment, N=10.
[0113] The specific embodiments of the present invention are provided to enable those skilled in the art to understand or implement the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention.
[0114] It should be understood that the present invention is not limited to the content already described above, and various modifications and changes can be made without departing from its scope. The scope of the present invention is limited only by the appended claims.
Claims
1. A 3D model retrieval method based on deep learning feature recognition, characterized in that, Includes the following steps: S1. Obtain the 3D CAD model dataset of the mechanical parts; S2. Perform point cloud sampling on each 3D model in the 3D CAD model dataset, synchronously collect the spatial coordinates and normal vector of each sampling point, and associate the area, face type, geometric center point coordinates and face ID of the face to which the sampling point belongs to generate a point cloud dataset. S3. Using the point cloud data corresponding to each of the three-dimensional models as an independent sample, the point cloud dataset is divided into a training set, a validation set, and a test set according to a predetermined ratio. Subsequently, normalization and tensor quantization preprocessing are performed on each sample in the training set, validation set, and test set to ensure that each sample has the same number of points and feature dimensions. S4. Construct a processing feature recognition network model. Use the preprocessed training set from S3 to train the processing feature recognition network model to obtain a trained network model. S5. Construct a parts database, which contains multiple 3D parts models; S6. Perform point cloud sampling and preprocessing on each 3D part model in the part database to generate a first input tensor; input the first input tensor into the trained network model, and extract and save the first global shape feature vector and the first local shape feature vector set corresponding to each 3D part model. S7. Perform point cloud sampling and preprocessing on the 3D model of the part to be queried to generate a second input tensor; input the second input tensor into the trained network model, extract and save the second global shape feature vector and the second local shape feature vector set corresponding to the part to be queried; S8. Calculate the cosine distance between the second global shape feature vector and each first global shape feature vector. At the same time, calculate the Hungarian matching distance between the second local shape feature vector set and each first local shape feature vector set. Weight and fuse the cosine distance and Hungarian matching distance of each set to obtain a comprehensive retrieval distance. Output the top N candidate 3D part models with the highest similarity to the part to be queried based on the comprehensive retrieval distance, where N is a preset positive integer.
2. The 3D model retrieval method based on deep learning feature recognition according to claim 1, characterized in that, In S2, the specific method for point cloud sampling includes: S201. Preset the minimum number of sampling points for each face in the three-dimensional model; S202. Based on the area of each face of the 3D model, allocate the number of sampling points to each face using a weighted strategy. The formula for the weighted strategy is: For the first The sampling point allocation coefficient for each face, 1≤ ≤n, For the first The area of each face. For the first The area of each face. This represents the total number of faces in the 3D model. This is the scaling factor; S203. Based on the number of sampling points allocated in S202, sample each face of the three-dimensional model to obtain the spatial coordinates and normal vector of each sampling point; S204. Adjust the total number of sampling points on each surface to the preset target total number of points by random screening or repeated sampling; S205. For each sampling point, integrate the area, surface type, geometric center coordinates, and surface ID of the surface to which it belongs to generate a point cloud dataset.
3. The 3D model retrieval method based on deep learning feature recognition according to claim 1, characterized in that, In S4, the processing feature recognition network model includes a point feature extraction layer, a surface feature enhancement module, and a multi-task output head connected in sequence. The point feature extraction layer is based on the PointNet++ architecture, and the MLP in it is replaced with residual blocks. The point feature extraction layer is used to extract point-level feature vectors. The surface feature enhancement module is used to receive and process point-level feature vectors and output enhanced surface-level feature vectors. The multi-task output head is used to receive and process point-level feature vectors and enhanced surface-level feature vectors and output point classification results, surface classification results, and processing feature instance similarity matrix.
4. The 3D model retrieval method based on deep learning feature recognition according to claim 3, characterized in that, The residual block consists of two one-dimensional convolutional layers connected by an identity mapping.
5. The 3D model retrieval method based on deep learning feature recognition according to claim 3, characterized in that, The surface feature enhancement module includes a first stitching unit, a first MLP, an attention weight calculation unit, a surface feature generation unit, a BN layer, a CBAM, a residual fusion unit, and a second stitching unit connected in sequence. The first stitching unit and the attention weight calculation unit are respectively connected to the point feature extraction layer. The CBAM is also connected to the second stitching unit, and the second stitching unit is connected to the multi-task output head.
6. The 3D model retrieval method based on deep learning feature recognition according to claim 3, characterized in that, The multi-task output head includes a point cloud segmentation branch, a semantic segmentation branch, and an instance segmentation branch set in parallel; the point cloud segmentation branch is used to receive and process point-level feature vectors and output point classification results. The semantic segmentation branch is used to receive and process the enhanced surface-level feature vector and output the surface classification result; The instance segmentation branch is used to process the enhanced surface-level feature vector and output the processed feature instance similarity matrix.
7. The 3D model retrieval method based on deep learning feature recognition according to claim 3, characterized in that, The extraction process of the first local shape feature vector set in S6 is as follows: Based on the similarity matrix of the processing feature instances, the faces belonging to the same processing feature instance are identified; the enhanced surface-level feature vectors of all faces belonging to the same processing feature instance are aggregated to generate the local shape feature vector of the processing feature instance; the local shape feature vectors of all processing feature instances constitute the first local shape feature vector set.
8. The 3D model retrieval method based on deep learning feature recognition according to claim 1, characterized in that, In S8, the method for calculating the Hungarian matching distance is as follows: S801. Normalize the first local shape feature vector set and the second local shape feature vector set respectively to obtain the first normalized local shape feature vector set and the second normalized local shape feature vector set. S802. Calculate the cosine similarity between each feature vector in the first normalized local shape feature vector set and each feature vector in the second normalized local shape feature vector set, and construct a cost matrix based on the cosine similarity. S803. Input the cost matrix into the Hungarian algorithm to solve and obtain the optimal matching pair set between the first normalized local shape feature vector set and the second normalized local shape feature vector set; S804. Calculate the average matching cost of all matching pairs in the optimal matching pair set; S805. Calculate the size penalty term based on the difference in the number of feature vectors in the first local shape feature vector set and the second local shape feature vector set; S806. The average matching cost and the size penalty term are weighted and summed to obtain the Hungarian matching distance.
9. The 3D model retrieval method based on deep learning feature recognition according to claim 1, characterized in that, The formula for calculating the comprehensive retrieval distance is: In the formula, To comprehensively search distance, The second global shape feature vector and the first The cosine distance between the first global shape feature vectors corresponding to each 3D part model The second set of local shape feature vectors and the first Hungarian matching distance between the first local shape feature vector sets corresponding to each 3D part model. The weights are the cosine distances. Weights for Hungarian matching distances. .
Citation Information
Patent Citations
Mechanical part three-dimensional model retrieval method based on feature extraction
CN117033686A
Multi-scale segmentation and partial matching 3D models
US20120136860A1