3D CAD model retrieval method, device and medium based on global features

Through global feature extraction and deep learning, combined with virtual camera rendering and point cloud centroids, the problem of low accuracy and efficiency in complex models and large-scale libraries in 3D CAD model retrieval is solved, and efficient 3D CAD model retrieval is achieved.

CN118394963BActive Publication Date: 2024-09-24SHANDONG HUAYUN 3D TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410840565.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-27
Publication Date
2024-09-24
Estimated Expiration
2044-06-27

AI Technical Summary

Technical Problem

Existing 3D CAD model retrieval methods have low accuracy and efficiency in complex models and large-scale model libraries. Traditional methods are time-consuming and deep learning-based contour feature retrieval is not suitable for part models with complex machining features.

Method used

A three-dimensional CAD model retrieval method based on global features is used to render multiple viewing angle images through a preset virtual camera to obtain point cloud centroid and shape distribution features. It combines the depth model to extract global features, and filters the retrieval results based on categories to reduce the search scope and improve Accuracy and efficiency.

Benefits of technology

It improves the completeness and accuracy of three-dimensional feature acquisition, reduces retrieval time and cost, is suitable for complex models and large-scale model libraries, and improves the accuracy and efficiency of retrieval.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118394963B
    Figure CN118394963B
Patent Text Reader

Abstract

The embodiments of the present specification disclose a 3D CAD model retrieval method, device and medium based on global features, which relate to the field of model retrieval technology and are used to improve the efficiency and accuracy of 3D CAD model retrieval. The method comprises: receiving a geometric search request from a user terminal, determining a 3D model file and a search range of a CAD model to be searched; rendering the CAD model to be searched based on multiple acquisition perspectives of a preset virtual camera to obtain multiple perspective images; obtaining the point cloud centroid of the CAD model to be searched to calculate and determine the shape distribution features and bounding box features of the CAD model to be searched; inputting the shape distribution features, bounding box features and perspective images into a preset deep model architecture to obtain the global features and the category to which the CAD model to be searched belongs; calling corresponding model data based on the search range and the category to which the CAD model to be searched belongs, and determining the retrieval results according to the similarity between the model data and the global features.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present specification relates to the field of model retrieval technology, and in particular to a global feature-based three-dimensional CAD model retrieval method, device and medium. Background Art

[0002] In the course of their development, manufacturing customers often accumulate up to millions or even tens of millions of product model data, but it is difficult for engineers and customers to accurately describe the style and size of CAD models in words. When technicians need to reuse the 3D CAD models that have been created during the processing of CAD projects, they often need to rely on personal work experience and simple classification conditions to find similar or repeated molds and profiles in the huge drawing library, which not only consumes a lot of manpower and time, but also the query results are often incomplete and inaccurate, and the query accuracy and efficiency need to be improved. If you give up searching in the existing data and choose to recreate or approximate the design, it will lead to a surge in the workload of technicians, and the data scale will become increasingly large and chaotic due to too many repeated models, and a lot of time and cost will be spent on the maintenance of new materials in ERP / PLM. Therefore, CAD model retrieval has always been a rigid demand for manufacturing customers to reduce design costs.

[0003] In traditional 3D model retrieval methods, the corresponding graph is generally constructed by reading the model file, and then the similarity of the models is judged based on the graph matching algorithm. This type of retrieval method judges whether the models are similar based on lossless information, and the judgment accuracy is relatively high. However, it takes a long time to construct the corresponding graph structure of the 3D model by reading the file. When the model complexity or the amount of model library data increases, the retrieval time increases exponentially. At present, when searching based on deep learning networks, only the model contour features are generally considered for similarity retrieval. However, this retrieval method is not suitable for part models with complex processing features. When retrieving similar models, it is not only inaccurate but also inefficient. Summary of the invention

[0004] In order to solve the above technical problems, one or more embodiments of the present specification provide a 3D CAD model retrieval method, device and medium based on global features.

[0005] One or more embodiments of this specification adopt the following technical solutions:

[0006] One or more embodiments of this specification provide a 3D CAD model retrieval method based on global features, the method comprising:

[0007] Receiving a geometric search request from a user terminal, and determining a three-dimensional model file and a search range of a CAD model to be searched based on the geometric search request;

[0008] Rendering the CAD model to be searched based on multiple acquisition perspectives of a preset virtual camera to obtain images from multiple perspectives;

[0009] Acquire the point cloud centroid of the CAD model to be searched, determine parameter data of each point in the CAD model to be searched and the point cloud centroid, so as to determine shape distribution characteristics and bounding box characteristics of the CAD model to be searched based on the parameter data;

[0010] Inputting the shape distribution features, bounding box features and the view image into a preset deep model framework to obtain the global features and the category to which the CAD model to be searched belongs;

[0011] The corresponding model data is called based on the search scope and the category to which the CAD model to be searched belongs, and the retrieval result is determined according to the similarity between the model data and the global feature.

[0012] Optionally, in one or more embodiments of the present specification, before inputting the shape distribution features, the bounding box features and the view image into a preset deep model architecture to obtain the global features and the category to which the CAD model to be searched belongs, the method further includes:

[0013] Determine the actual classification results corresponding to each standard part data in the preset standard part data set based on the industry standard corresponding to the CAD model to be searched; wherein the preset standard part data includes: standard part view image, standard part shape distribution characteristics, and standard part bounding box characteristics;

[0014] The preset standard part data set is divided based on a preset division ratio to obtain training data and test data; wherein the training data and the test data are stored in different preset files;

[0015] Calling a preset file of the training data based on a preset program to input the training data in the preset file into an initial deep model architecture, and performing convolution processing on the training data based on a preset convolution module of the initial deep model architecture to obtain a feature vector corresponding to the training data;

[0016] Extract features of the feature vector belonging to the global self-attention mechanism encoder of the initial deep model architecture to obtain the training global features corresponding to the training data;

[0017] Inputting the training global features into the multilayer perceptron module of the initial deep model architecture, so as to classify the training global features through the multilayer perceptron module and determine the classification results corresponding to the training data; wherein the multilayer perceptron module is composed of two layers with GELU nonlinearity;

[0018] Based on the classification result and the actual classification result corresponding to the training data, determine the loss function of the initial deep model architecture, update the model parameters of the initial deep model architecture by backpropagation based on the loss function, and iteratively update the model parameters to obtain the trained deep model architecture;

[0019] The trained deep model architecture is evaluated based on the test data to obtain a preset deep model architecture that meets the requirements and model parameters of the preset deep model architecture.

[0020] Optionally, in one or more embodiments of the present specification, before receiving a geometric search request from a user terminal to determine a three-dimensional model file and a search range of a CAD model to be searched based on the geometric search request, the method further includes:

[0021] Determine the main function directory of the preset web framework, and obtain the model parameters corresponding to the preset deep model architecture, so as to load the program code corresponding to the model parameters and the preset search function into the main function directory of the preset web framework to obtain the initial geometric search service framework; wherein the preset web framework is a FastAPI framework;

[0022] Determine the client corresponding to the initial geometry search service framework as the application object, and determine the preset uvicorn server as the running module;

[0023] Loading the application object and the running module into the initial geometry search service framework based on corresponding identifiers, integrating the initial geometry search service framework with the preset uvicorn server, and obtaining the geometry search service framework;

[0024] The geometric search service framework is packaged based on a preset packaging tool to obtain a geometric search service package, and the geometric search service package is deployed on the user side so that the user side runs the geometric search service to obtain a geometric search interface, and monitors the geometric search interface to obtain the user side's geometric search request.

[0025] Optionally, in one or more embodiments of the present specification, rendering the CAD model to be searched based on multiple acquisition perspectives of a preset virtual camera to obtain multiple perspective images specifically includes:

[0026] Determine the vertex positions of the CAD model to be searched, so that the area containing each of the vertex positions in the field of view is used as the layout position of the preset virtual camera;

[0027] Calculating the vectors between each virtual camera and the vertex in sequence, so as to adjust the determined viewing direction of the preset virtual camera based on the vectors; wherein the number of the viewing directions corresponds to the number of the vertices;

[0028] The CAD model to be searched is rendered based on the viewing angle direction to obtain multiple viewing angle images.

[0029] Optionally, in one or more embodiments of the present specification, obtaining the point cloud centroid of the CAD model to be searched, determining parameter data of each point in the CAD model to be searched and the point cloud centroid, so as to determine the shape distribution characteristics and bounding box characteristics of the CAD model to be searched based on the parameter data, specifically includes:

[0030] Determine the point cloud centroid of the CAD model to be searched based on the adaptive point cloud average distance calculation, so as to determine the parameter data from each point in the CAD model to be searched to the point cloud centroid; wherein the parameter data includes: the distance from each point to the point cloud centroid, and the angle from each point to the point cloud centroid;

[0031] Determine respectively a distance distribution histogram corresponding to the distance from each point to the point cloud mass center, and an angle distribution histogram corresponding to the angle from each point to the point cloud mass center;

[0032] Determining the distance distribution data and the angle distribution data of the CAD model to be searched based on the distance distribution histogram and the angle distribution histogram, and performing standardization processing on the distance distribution data and the angle distribution data to obtain processed distance distribution data and processed angle distribution data;

[0033] The distance distribution data and the angle distribution data are sequentially connected into a one-dimensional array to obtain shape distribution features of the CAD model to be searched;

[0034] The maximum distance point corresponding to the preset angle is determined based on the distance distribution score and the angle distribution data, so as to form a bounding box of the CAD model to be searched based on the maximum distance point, and the data features of the bounding box are obtained as bounding box features.

[0035] Optionally, in one or more embodiments of the present specification, obtaining the point cloud centroid of the CAD model to be searched specifically includes:

[0036] Acquire point cloud data of the CAD model to be searched to calculate an average point cloud distance of the CAD model to be searched;

[0037] Determining a plurality of preselected centroid points of the CAD model to be searched based on the average point cloud distance and a preset average point cloud distance threshold;

[0038] Determining the neighborhood point cloud data corresponding to each of the preselected centroid points based on the distance between the point cloud data of the CAD model to be searched and each of the preselected centroid points;

[0039] The average neighborhood point cloud distance corresponding to each of the pre-selected centroid points is determined according to the neighborhood point cloud data, and the pre-selected centroid points are screened based on a preset point cloud density and the average neighborhood point cloud distance to determine the point cloud centroid of the CAD model to be searched.

[0040] Optionally, in one or more embodiments of the present specification, calling corresponding model data based on the search scope and the category to which the CAD model to be searched belongs, and determining the retrieval result according to the similarity between the model data and the global feature specifically includes:

[0041] Calling model data corresponding to the category of the CAD model to be searched in a preset MongoDB database within the search range;

[0042] Obtaining a cosine value of an angle between a global feature vector adjacent to a historical global feature corresponding to the historical global feature corresponding to the model data and corresponding to the global feature, so as to determine a feature similarity between the model data and the global feature based on the cosine value;

[0043] Determining the composition similarity between the model data and the global features based on the overlap ratio between the historical global features and the global features;

[0044] The similarity between the model data and the global feature is determined based on the weighted combination of the feature similarity and the component similarity, and a preset number of target models are determined as retrieval results based on the similarity.

[0045] Optionally, in one or more embodiments of the present specification, after calling corresponding model data based on the search scope and the category to which the CAD model to be searched belongs, and determining the retrieval result according to the similarity between the model data and the global feature, the method further includes:

[0046] Determining a display priority of the target model based on the similarity;

[0047] querying detailed information of the target model based on the model ID of the target model, and determining a display position of each detailed information according to the display priority;

[0048] The detailed information is transmitted to the user front end for display according to the display position.

[0049] One or more embodiments of this specification provide a 3D CAD model retrieval device based on global features, the device comprising:

[0050] at least one processor; and,

[0051] a memory communicatively connected to the at least one processor; wherein,

[0052] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to: execute any of the above-mentioned methods.

[0053] One or more embodiments of the present specification provide a non-volatile computer storage medium storing computer executable instructions, wherein the computer executable instructions are configured to execute any of the above-described methods.

[0054] At least one of the above technical solutions adopted in the embodiments of this specification can achieve the following beneficial effects:

[0055] Images from multiple different perspectives are obtained to more comprehensively capture the three-dimensional features of the model. This can avoid the problem that the single-angle visual feature analysis in the traditional method easily leads to the loss of three-dimensional features or inaccurate expression, and improve the completeness and accuracy of the visual feature acquisition of the CAD model to be searched. In addition, by obtaining geometric features, the missing three-dimensional structural features in the multi-angle perspective images are compensated. By inputting multimodal information into the deep model for training, the powerful representation and learning capabilities of deep learning can be used to mine potential feature representations, thereby improving the accuracy of CAD model classification. By obtaining the search range and other parameters of the CAD model to be searched that the user sets as needed, the search range can be narrowed, and further model data screening based on the category within the search range can further narrow the search range, avoiding the problem of long retrieval time and high cost caused by large-scale traversal retrieval in the entire database, and improving the accuracy and efficiency of retrieval. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] In order to more clearly illustrate the technical solutions in the embodiments of this specification or the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art description. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative labor. In the drawings:

[0057] Figure 1 A schematic diagram of a 3D CAD model retrieval method based on global features provided in an embodiment of this specification;

[0058] Figure 2 A schematic diagram of product standard classification provided in the embodiments of this specification;

[0059] Figure 3 A schematic diagram of multiple viewing angles of a CAD model to be retrieved provided in an embodiment of this specification;

[0060] Figure 4 A schematic diagram of shape distribution characteristics in an application scenario provided by an embodiment of this specification;

[0061] Figure 5 A schematic diagram showing training data and test data in an application scenario provided in an embodiment of this specification;

[0062] Figure 6 A search result display interface for a 3D CAD model search provided in an embodiment of this specification;

[0063] Figure 7 A schematic diagram of the task progress of a 3D CAD model retrieval provided in an embodiment of this specification;

[0064] Figure 8 A schematic diagram of the structure of a 3D CAD model retrieval device based on global features provided in an embodiment of this specification;

[0065] Fig. 9 A schematic diagram of the structure of a non-volatile storage medium provided in an embodiment of this specification. DETAILED DESCRIPTION

[0066] The embodiments of this specification provide a 3D CAD model retrieval method, device and medium based on global features.

[0067] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.

[0068] like Figure 1 As shown, the embodiment of this specification provides a flowchart of a 3D CAD model retrieval method based on global features. Figure 1 It can be seen that in one or more embodiments of this specification, a 3D CAD model retrieval method based on global features includes the following steps:

[0069] S101: receiving a geometric search request from a user terminal, and determining a three-dimensional model file and a search range of a CAD model to be searched based on the geometric search request.

[0070] At present, the historical design knowledge of 3D CAD models such as parts can be reused by retrieval technology in the field of 3D CAD to improve the standardization level of parts. The extensive application of standard parts can shorten the design and manufacturing cycle of mechanical products, reduce the waste of raw materials and energy, significantly improve the manufacturing accuracy and performance of products, and greatly improve production efficiency. Therefore, in the embodiment of this specification, after the user opens the imported or drawn model, if the model needs to be reused, it is necessary to perform a search. At this time, the user can set the search range and other search parameters of the CAD model to be searched, and generate the geometric search of the user. At this time, the server will receive the geometric search request of the user, so as to determine the 3D model file of the CAD model to be searched, that is, the model file imported by the user, and the search range of the CAD model to be searched according to the geometric search request. By obtaining the search range and other parameters of the CAD model to be searched set by the user as needed, the search range can be narrowed, thereby avoiding the problem of long search time and high cost caused by large-scale search, and improving the accuracy and efficiency of the search.

[0071] S102: Rendering the CAD model to be searched based on multiple acquisition perspectives of a preset virtual camera to obtain multiple perspective images.

[0072] In order to solve the problem of reduced expression accuracy caused by the loss of three-dimensional features of the model after the three-dimensional model is projected onto the two-dimensional model in the current traditional visual feature retrieval method. In the embodiment of this specification, the CAD model to be searched is rendered by using multiple acquisition perspectives of a pre-set virtual camera, such as a pre-set orthogonal camera, to obtain multiple perspective images. It should be noted that the pre-set virtual camera can be an orthogonal camera, and the orthogonal camera does not apply the perspective effect during the rendering process, so that the size and proportion of the rendered image in all directions remain consistent, ensuring that in the rendered perspective image, the size and shape of the model are not affected by the perspective deformation, thereby better retaining the three-dimensional features.

[0073] Specifically, in one or more embodiments of the present specification, rendering the CAD model to be searched based on multiple acquisition perspectives of a preset virtual camera to obtain multiple perspective images specifically includes the following steps:

[0074] First, determine the vertex positions of the CAD model to be searched, so that the area containing the vertex positions in the field of view is used as the layout position of the preset virtual camera. Then, the vectors between each virtual camera and the vertex are calculated in turn to adjust the determined viewing direction of the preset virtual camera based on the vector; it should be noted that the number of viewing directions corresponds to the number of vertices. The CAD model to be searched is rendered according to the viewing directions to obtain multiple viewing images. Figure 3As shown, in a certain application scenario, an orthogonal camera or a perspective camera can be used to obtain a screenshot with a size of 224*224 at 20 vertices of a 12-hedron.

[0075] By determining the vertex positions and using the area containing these vertex positions in the field of view as the layout position of the preset virtual camera, it can be ensured that all important parts of the CAD model to be searched can be rendered. The vector calculation between each virtual camera and the vertex and the step of adjusting the viewing direction based on the vector help to obtain images from multiple different viewing angles, thereby more comprehensively capturing the three-dimensional features of the model. This can avoid the problem that the single-angle visual feature analysis in the traditional method easily leads to the loss of three-dimensional features or inaccurate expression, improve the integrity and accuracy of the model, and by adjusting the layout position, quantity and viewing direction of the preset virtual camera according to specific needs, it can meet different CAD application scenarios.

[0076] S103: Acquire the point cloud centroid of the CAD model to be searched, determine parameter data of each point in the CAD model to be searched and the point cloud centroid, so as to determine shape distribution features and bounding box features of the CAD model to be searched based on the parameter data.

[0077] When searching based only on the view images of step S102 above, due to the memory limitation of multi-angle images, it is impossible to use images of each view without restriction, and a fixed number of views may not be able to fully represent the three-dimensional model, and some three-dimensional structural information will inevitably be lost. Therefore, in order to improve the accuracy of the search and make up for the problem of limited search accuracy caused by the inability to use images of each view without restriction. In the embodiment of this specification, the point cloud centroid of the CAD model to be searched is obtained to determine the parameter data of each point and the point cloud centroid in the CAD model to be searched, and then the shape distribution characteristics and bounding box characteristics of the CAD to be searched are determined according to the parameter data. By obtaining these geometric features, it is possible to make up for the missing three-dimensional structural features in the multi-angle views, thereby improving the search accuracy.

[0078] Specifically, in one or more embodiments of the present specification, obtaining the point cloud centroid of the CAD model to be searched, determining parameter data of each point in the CAD model to be searched and the point cloud centroid, thereby determining the shape distribution characteristics and bounding box characteristics of the CAD model to be searched according to the parameter data, specifically includes the following process:

[0079] First, the point cloud centroid of the CAD model to be searched is determined based on the adaptive point cloud average distance calculation, so as to obtain the parameter data of each point in the CAD model to be searched to the point cloud centroid; wherein, it should be noted that the parameter data includes: the distance from each point to the point cloud centroid, and the angle from each point to the point cloud centroid. The distance distribution histogram corresponding to the distance from each point to the point cloud centroid, and the angle distribution histogram corresponding to the angle from each point to the point cloud centroid are determined respectively. The distance distribution data and the angle distribution data of the CAD model to be searched are determined based on the distance distribution histogram and the angle distribution histogram, and the distance distribution data and the angle distribution data are standardized to obtain the processed distance distribution data and the processed angle distribution data. Determining the point cloud centroid can help understand the center position and overall distribution of the CAD model to be searched, so as to better describe the shape and posture of the model. By calculating the distance from the point to the point cloud centroid, the size and dimension information of the model can be captured, and the distance distribution data can be represented by the distance distribution histogram, which can help roughly estimate the size distribution of the model in various directions. Calculating the angle from the point to the point cloud centroid can provide information about the posture of the CAD model to be searched, and the angle distribution data can be represented by the angle distribution histogram, which can better understand the changes of the model in different directions. Connect the distance distribution data and the angle distribution data in sequence as follows Figure 4 The one-dimensional array shown is used to obtain the shape distribution characteristics of the CAD model to be searched. At the same time, the maximum distance point corresponding to the preset angle is determined based on the distance distribution score and the angle distribution data, so as to form a bounding box of the CAD model to be searched based on the maximum distance point, and the data characteristics of the bounding box are obtained as the bounding box characteristics. By connecting the distance distribution data and the angle distribution data into a one-dimensional array, multiple features can be represented as a comprehensive feature vector, which is convenient for analysis and processing, so as to better understand the overall picture of the CAD model to be searched. And determining the bounding box characteristics can help to classify and identify the shape of the model, so as to better understand the overall shape of the CAD model to be searched, and facilitate its rapid comparison and distinction with other models.

[0080] Further, in order to improve the accuracy, in one or more embodiments of the present specification, obtaining the centroid of the point cloud of the CAD model to be searched specifically includes the following process:

[0081] First, the point cloud data of the CAD model to be searched is obtained to calculate the average point cloud distance of the CAD model to be searched, and then the multiple pre-selected centroid points of the CAD model to be searched can be preliminarily determined by the average point cloud distance and the preset average point cloud distance threshold. Then, according to the distance between the point cloud data of the CAD model to be searched and each pre-selected centroid point, the neighborhood point cloud data corresponding to each pre-selected centroid point is further screened and determined, and the average distance of the neighborhood point cloud corresponding to each pre-selected centroid point is determined according to the neighborhood point cloud data. The pre-selected centroid points are screened based on the preset point cloud density and the average distance of the neighborhood point cloud to determine the point cloud centroid of the CAD model to be searched, thereby improving the accuracy of the centroid determination. By calculating the average point cloud distance and the average distance of the neighborhood point cloud, the density and distribution characteristics of the point cloud can be reflected, so as to better adapt to models of different shapes and densities, and the preset point cloud density can be dynamically adjusted according to the needs of the specific CAD project, so that this method can have better adaptability in different types of CAD model projects. In addition, through multi-layer screening and calculation, the process has a certain robustness to noise and abnormal points. Even if there are noise or some abnormal points in the point cloud data, the point cloud centroid can still be reliably determined, which improves the stability and reliability of the method.

[0082] S104: Input the shape distribution features, bounding box features and the view image into a preset deep model architecture to obtain the global features and the category of the CAD model to be searched.

[0083] In order to realize CAD model retrieval based on multi-dimensional fusion features, in the embodiment of this specification, the shape distribution features, bounding box features and perspective images obtained in the above process are used as input items and input into a pre-set deep model architecture, thereby obtaining the global features and categories of the CAD model to be searched.

[0084] Specifically, in one or more embodiments of the present specification, before inputting the shape distribution features, the bounding box features and the view image into the preset deep model architecture to obtain the global features and the category to which the CAD model to be searched belongs, the method further includes:

[0085] In order to obtain a preset deep model architecture that meets the requirements for rapid classification, the standard parts data set is classified (manually classified) in the embodiment of this specification, for example: bolts, nuts..., and the standard parts in the product are classified according to industry standards, such as Figure 2 As shown in FIG. 1 , it is the classification of standard parts in CrownCAD products, and geometric search is classified according to geometric features, so it is necessary to reclassify standard parts according to geometric features. In the training process of the embodiment of this specification, firstly according to the corresponding CAD model to be searched, Figure 2The industry standards shown determine the actual classification results corresponding to each standard part data in the preset standard part data set; it should be noted that the preset standard part data includes: standard part view image, standard part shape distribution characteristics, and standard part bounding box characteristics.

[0086] Then, the preset standard parts data set is divided based on the preset division ratio to obtain training data and test data. For example, 80% of each type of data set is randomly selected as training data and 20% as test data. Figure 5 The training data and test data are stored in different preset files, the training data corresponds to the train_datasets.txt file, and the test data corresponds to the test_datasets.txt file. Then, the preset file of the training data is called based on the preset program to input the training data in the preset file into the initial deep model architecture, so that the training data is convoluted according to the preset convolution module of the initial deep model architecture to obtain the feature vector corresponding to the training data. Then, the feature vector belongs to the global self-attention mechanism encoder of the initial deep model architecture, and feature extraction is performed to obtain the training global features corresponding to the training data. The training global features are input into the multilayer perceptron module of the initial deep model architecture to classify the training global features through the multilayer perceptron module to determine the classification results corresponding to the training data; wherein, it should be noted that the multilayer perceptron module is composed of two layers with GELU nonlinearity. Then, in order to ensure the classification accuracy of the model, the loss function of the initial deep model architecture is determined based on the actual classification results corresponding to the classification results and the training data, so as to update the model parameters of the initial deep model architecture based on the loss function by back propagation, and obtain the trained deep model architecture by iteratively updating the model parameters. The trained deep model architecture is evaluated based on the test data to obtain the preset deep model architecture and model parameters of the preset deep model architecture that meet the requirements. It should be noted that the initial deep model architecture is AlexNet+Transformer. Taking the trial view image as an example, a 4096-dimensional vector will be generated after the view image passes through the AlexNet network architecture. Then, the vectors of all views are fed into the global Transformer encoder for feature extraction. Finally, these features are classified through MLP.

[0087] In addition, it should be noted that the above model training service needs to be deployed separately. The machine configuration used for model training is shown in Table 1 below:

[0088] Table 1 Training server configuration

[0089]

[0090] Execute the training script under the model project on the CrownCAD training server to start the training. The model training adopts distributed training and uses two RTX 4090 graphics cards for training.

[0091] Further, in one or more embodiments of the present specification, before the above step S101 receives a geometric search request from a user terminal and determines the 3D model file and the search range of the CAD model to be searched based on the geometric search request, in order to enable the user terminal to use the geometric search service to perform multiplexing retrieval of the CAD model to be searched, the method further includes the following process:

[0092] First, determine the main function directory of the preset web framework, and obtain the model parameters corresponding to the preset deep model architecture, so as to load the model parameters and the program code corresponding to the preset search function into the main function directory of the preset web framework to obtain the initial geometry search service framework. Among them, the preset web framework is the FastAPI framework, which is a modern and fast web framework for building APIs, using Python 3.8+ and based on standard Python type prompts. It has the characteristics of fast and efficient coding, intelligence, simplicity, and robustness. It is easy to use and learn, improves the speed of function development, can be used for production-level code, reduces about 40% of human-induced errors, and is based on the relevant open standards of API. It is one of the fastest Python web frameworks. Then, determine the client corresponding to the initial geometry search service framework as the application object, and determine the preset uvicorn server as the running module. Among them, it should be noted that uvicorn is an asynchronous web server based on the asyncio library. It supports HTTP / 1.1 and HTTP / 2 protocols, uses asynchronous I / O to process requests, and can handle a large number of concurrent connections. Due to the use of asynchronous I / O, uvicorn is suitable for handling a large number of I / O intensive workloads and can achieve lower latency and higher throughput. In addition, since uvicorn can take full advantage of the asynchronous performance provided by the asyncio library, it supports asynchronous frameworks and protocols such as FastAPI.

[0093] The application object and the running module are loaded into the initial geometry search service framework based on the corresponding identifier, and the initial geometry search service framework is integrated with the preset uvicorn server to obtain the geometry search service framework. Then, the geometry search service framework is packaged based on the preset packaging tool to obtain the geometry search service package, and the geometry search service package is deployed on the user side, so that the user side runs the geometry search service to obtain the geometry search interface, and monitors the geometry search interface to obtain the geometry search request of the user side.

[0094] S105: Calling corresponding model data based on the search scope and the category to which the CAD model to be searched belongs, and determining a retrieval result according to a similarity between the model data and the global feature.

[0095] After the geometry search service is deployed, the above steps S101-S104 correspond to the user clicking the geometry search button on the front-end page; after receiving the request, the Java end uses restTemplate to send a geometry search http request to the geometry search service, and the request parameters are the model file and the search range; then the geometry search service calculates the geometric features and the category of the file after receiving the request. Then, in the embodiment of this specification, the corresponding model data will be called based on the search range and the category of the CAD model to be searched, and the search results will be determined based on the similarity between the model data and the global features.

[0096] Specifically, in one or more embodiments of the present specification, the corresponding model data is called based on the search scope and the category of the CAD model to be searched, and the search result is determined according to the similarity between the model data and the global feature, which specifically includes the following steps:

[0097] The model data corresponding to the category of the CAD model to be searched in the preset MongoDB database is called within the search range. By calling the model data with the corresponding category of the CAD model to be searched in the preprocessing database within the search range, the traversal search in the entire database is avoided, thereby improving the retrieval efficiency and reducing the amount of calculation. Then, the cosine value of the angle between the global feature vectors corresponding to the historical global feature corresponding to the model data and the global feature is obtained, so as to determine the feature similarity between the model data and the global feature based on the cosine value. Then, based on the overlap ratio of the historical global feature and the global feature, the composition similarity between the model data and the global feature is determined. Based on the overlap ratio of the historical global feature and the global feature, the composition similarity between the model data and the global feature is determined, which takes into account the composition structure of the model and helps to improve the accuracy of the retrieval results. The similarity between the model data and the global feature is determined based on the weighted feature similarity and the composition similarity, and a preset number of target models are determined as retrieval results according to the similarity. Determining the preset number of target models as retrieval results according to the similarity can obtain the expected number of retrieval results according to user needs and avoid outputting too much irrelevant model data.

[0098] Further, in one or more embodiments of the present specification, after calling corresponding model data based on the search scope and the category to which the CAD model to be searched belongs, and determining the search result according to the similarity between the model data and the global feature, the method further includes the following process:

[0099] The display priority of the target model corresponding to the CAD model to be searched is determined according to the similarity of the search results. Then, the detailed information of the target model is queried according to the model ID of the target model, and the display position of each detailed information is determined according to the display priority. Figure 6 As shown, the detailed information is transmitted to the user front end for display according to the display position.

[0100] Furthermore, if Figure 7 As shown, in one or more embodiments of the present specification, after receiving the geometric search request from the user end, the task status uploaded by the user end is received to update the task progress based on the task status, specifically: after creating the search task, the task status is Create and the progress is 0%, and then the current search model is converted to obj format and sent to python. At this time, it is determined whether the task status is Cancel, if so, the subsequent process is stopped, if not, the model update task status is running, and then it is determined whether the task status is Cancel at this time, if not, 20 perspective images of the model are generated, and the task progress is updated to 20%. Then at this time, it is determined whether the task status is Cancel, if not, the model geometric features are generated, and the task progress is updated to 40%; at this time, it is determined whether the task status is Cancel, if not, the model features are generated, and the task progress is updated to 60%; then it is determined whether the task status is Cancel, if not, the model features are compared and the task progress is updated to 80%; then it is determined whether the task status is Cancel, if not, it is sorted based on similarity, and the task progress is updated to 90%. Then. Determine whether the task status is Cancel, if not, return the search result update task progress to 95%. Then determine whether the task status is Cancel. If not, query the search result details and return them to the front end. The view update progress bar is 100%, and the front end displays the search structure and stops polling. If it is determined that the user end triggers a cancel operation during the whole process, causing the task status to be Cancel, the geometry search is stopped. At this time, the geometry search interface is destroyed and polling is stopped.

[0101] like Figure 8 As shown, the embodiment of this specification provides a schematic diagram of a 3D CAD model retrieval device structure based on global features. Figure 8 It can be seen that one or more embodiments of this specification provide a 3D CAD model retrieval device based on global features, the device comprising:

[0102] at least one processor; and,

[0103] a memory communicatively connected to the at least one processor; wherein,

[0104] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to: execute any of the above-mentioned methods.

[0105] like Fig. 9 As shown, the embodiment of this specification provides a schematic diagram of the internal structure of a non-volatile storage medium. Fig. 9 It can be seen that in one or more embodiments of this specification, a non-volatile storage medium stores computer executable instructions 901, and the computer executable instructions 901 can execute any of the methods described above.

[0106] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, equipment, and non-volatile computer storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0107] The above specific embodiments of the present specification are described. In some cases, the actions or steps recorded in the specification can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the process depicted in the accompanying drawings does not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0108] The above is only one or more embodiments of this specification and is not intended to limit this specification. For those skilled in the art, one or more embodiments of this specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of one or more embodiments of this specification should be included in the scope of this specification.

Claims

1. A 3D CAD model retrieval method based on global features, characterized in that: The method comprises: Receiving a geometric search request from a user terminal, and determining a three-dimensional model file and a search range of a CAD model to be searched based on the geometric search request; Rendering the CAD model to be searched based on multiple acquisition perspectives of a preset virtual camera to obtain images from multiple perspectives; Acquire the point cloud centroid of the CAD model to be searched, determine parameter data of each point in the CAD model to be searched and the point cloud centroid, so as to determine shape distribution characteristics and bounding box characteristics of the CAD model to be searched based on the parameter data; Inputting the shape distribution features, bounding box features and the view image into a preset deep model framework to obtain the global features and the category to which the CAD model to be searched belongs; Calling corresponding model data based on the search scope and the category to which the CAD model to be searched belongs, and determining a search result according to the similarity between the model data and the global feature; Before inputting the shape distribution features, the bounding box features and the view image into a preset deep model framework to obtain the global features and the category to which the CAD model to be searched belongs, the method further includes: Determine the actual classification results corresponding to each standard part data in the preset standard part data set based on the industry standard corresponding to the CAD model to be searched; wherein the preset standard part data includes: standard part view image, standard part shape distribution characteristics, and standard part bounding box characteristics; The preset standard part data set is divided based on a preset division ratio to obtain training data and test data; wherein the training data and the test data are stored in different preset files; Calling a preset file of the training data based on a preset program to input the training data in the preset file into an initial deep model architecture, and performing convolution processing on the training data based on a preset convolution module of the initial deep model architecture to obtain a feature vector corresponding to the training data; Extract features of the feature vector belonging to the global self-attention mechanism encoder of the initial deep model architecture to obtain the training global features corresponding to the training data; Inputting the training global features into the multilayer perceptron module of the initial deep model architecture, so as to classify the training global features through the multilayer perceptron module and determine the classification results corresponding to the training data; wherein the multilayer perceptron module is composed of two layers with GELU nonlinearity; Based on the classification result and the actual classification result corresponding to the training data, determine the loss function of the initial deep model architecture, update the model parameters of the initial deep model architecture by backpropagation based on the loss function, and iteratively update the model parameters to obtain the trained deep model architecture; Evaluate the trained deep model architecture based on the test data to obtain a preset deep model architecture that meets the requirements and model parameters of the preset deep model architecture; Obtaining the point cloud centroid of the CAD model to be searched, determining parameter data of each point in the CAD model to be searched and the point cloud centroid, so as to determine the shape distribution characteristics and bounding box characteristics of the CAD model to be searched based on the parameter data, specifically includes: Determine the point cloud centroid of the CAD model to be searched based on the adaptive point cloud average distance calculation, so as to determine the parameter data from each point in the CAD model to be searched to the point cloud centroid; wherein the parameter data includes: the distance from each point to the point cloud centroid, and the angle from each point to the point cloud centroid; Determine respectively a distance distribution histogram corresponding to the distance from each point to the point cloud mass center, and an angle distribution histogram corresponding to the angle from each point to the point cloud mass center; Determining the distance distribution data and the angle distribution data of the CAD model to be searched based on the distance distribution histogram and the angle distribution histogram, and performing standardization processing on the distance distribution data and the angle distribution data to obtain processed distance distribution data and processed angle distribution data; The distance distribution data and the angle distribution data are sequentially connected into a one-dimensional array to obtain shape distribution features of the CAD model to be searched; The maximum distance point corresponding to the preset angle is determined based on the distance distribution score and the angle distribution data, so as to form a bounding box of the CAD model to be searched based on the maximum distance point, and the data features of the bounding box are obtained as bounding box features.

2. A 3D CAD model retrieval method based on global features according to claim 1, characterized in that: Before receiving a geometric search request from a user terminal to determine a 3D model file and a search range of a CAD model to be searched based on the geometric search request, the method further includes: Determine the main function directory of the preset web framework, and obtain the model parameters corresponding to the preset deep model architecture, so as to load the program code corresponding to the model parameters and the preset search function into the main function directory of the preset web framework to obtain the initial geometric search service framework; wherein the preset web framework is a FastAPI framework; Determine the client corresponding to the initial geometry search service framework as the application object, and determine the preset uvicorn server as the running module; Loading the application object and the running module into the initial geometry search service framework based on corresponding identifiers, integrating the initial geometry search service framework with the preset uvicorn server, and obtaining the geometry search service framework; The geometric search service framework is packaged based on a preset packaging tool to obtain a geometric search service package, and the geometric search service package is deployed on the user side so that the user side runs the geometric search service to obtain a geometric search interface, and monitors the geometric search interface to obtain the user side's geometric search request.

3. A 3D CAD model retrieval method based on global features according to claim 1, characterized in that: The CAD model to be searched is rendered based on multiple acquisition perspectives of a preset virtual camera to obtain multiple perspective images, including: Determine the vertex positions of the CAD model to be searched, so that the area containing each of the vertex positions in the field of view is used as the layout position of the preset virtual camera; Calculating the vectors between each virtual camera and the vertex in sequence, so as to adjust the determined viewing direction of the preset virtual camera based on the vectors; wherein the number of the viewing directions corresponds to the number of the vertices; The CAD model to be searched is rendered based on the viewing angle direction to obtain multiple viewing angle images.

4. A 3D CAD model retrieval method based on global features according to claim 1, characterized in that: Obtaining the point cloud centroid of the CAD model to be searched specifically includes: Acquire point cloud data of the CAD model to be searched to calculate an average point cloud distance of the CAD model to be searched; Determining a plurality of preselected centroid points of the CAD model to be searched based on the average point cloud distance and a preset average point cloud distance threshold; Determining the neighborhood point cloud data corresponding to each of the preselected centroid points based on the distance between the point cloud data of the CAD model to be searched and each of the preselected centroid points; The average neighborhood point cloud distance corresponding to each of the pre-selected centroid points is determined according to the neighborhood point cloud data, and the pre-selected centroid points are screened based on a preset point cloud density and the average neighborhood point cloud distance to determine the point cloud centroid of the CAD model to be searched.

5. The 3D CAD model retrieval method based on global features according to claim 1, characterized in that: Calling corresponding model data based on the search scope and the category to which the CAD model to be searched belongs, and determining a search result according to the similarity between the model data and the global feature, specifically includes: Calling model data corresponding to the category of the CAD model to be searched in a preset MongoDB database within the search range; Obtaining a cosine value of an angle between a global feature vector adjacent to a historical global feature corresponding to the historical global feature corresponding to the model data and corresponding to the global feature, so as to determine a feature similarity between the model data and the global feature based on the cosine value; Determining the composition similarity between the model data and the global features based on the overlap ratio between the historical global features and the global features; The similarity between the model data and the global feature is determined based on the weighted combination of the feature similarity and the component similarity, and a preset number of target models are determined as retrieval results based on the similarity.

6. A 3D CAD model retrieval method based on global features according to claim 5, characterized in that: After calling corresponding model data based on the search range and the category to which the CAD model to be searched belongs, and determining the search result according to the similarity between the model data and the global feature, the method further includes: Determining a display priority of the target model based on the similarity; querying detailed information of the target model based on the model ID of the target model, and determining a display position of each detailed information according to the display priority; The detailed information is transmitted to the user front end for display according to the display position.

7. A 3D CAD model retrieval device based on global features, characterized in that: The device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can: execute any of the methods described in claims 1-6.

8. A non-volatile storage medium storing computer executable instructions, wherein the computer executable instructions can: execute the method according to any one of claims 1 to 6.