Three-dimensional object matching, characterization and model training method, device and equipment
By directly constructing the 3D model as a graph structure and using the graph neural network model for processing, the problem of information loss in 3D object matching is solved, and higher precision and efficient matching effects are achieved.
Patent Information
- Application Number
- CN202310652426.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-02
- Publication Date
- 2024-09-27
AI Technical Summary
When the existing technology converts a three-dimensional model into a graph structure, there is information loss in the sampling process, making it difficult to achieve high-precision modeling and matching.
A direct construction method is adopted that uses the surfaces in the three-dimensional model as graph nodes and lines as graph edges, and uses the pre-trained graph neural network model to process the graph structure and extract graph representations to achieve matching of three-dimensional objects.
By directly constructing the graph structure and processing the graph neural network model, higher-precision three-dimensional object matching is achieved, improving the accuracy and efficiency of object matching.
Smart Images

Figure CN118710936A
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of three-dimensional object matching, and in particular to a method, device and equipment for three-dimensional object matching, characterization and model training. Background Art
[0002] Industrial design and production use a large number of parts, including a large number of parts with similar structures. Modeling the similarity of parts can help designers quickly retrieve similar parts during the design phase, increase reuse rates, reduce modification and design costs, and improve design efficiency. This has important practical significance and application value.
[0003] Graph is a very common data model in the real world and in the scientific field. For example, traffic networks and social networks can all be modeled as graphs. Designing different neural networks based on graphs to solve different tasks is the problem studied by Graph Neural Network (GNN). In addition, since the computational complexity of neural networks is relatively fixed, for some problems with high computational complexity that cannot be solved within polynomial time complexity, neural networks can be used to calculate approximate solutions, thereby improving computational efficiency.
[0004] In order to extract the three-dimensional model into a graph structure, there has been a method based on Reeb Graph. However, this method requires first sampling points on the surface of the three-dimensional model and then constructing a graph based on the sampling points. The sampling process will cause information loss. If the sampling accuracy is not enough, it will lead to a large information loss. If the sampling accuracy is too high, it will lead to a higher amount of calculation.
[0005] Therefore, a matching method that can be directly based on the three-dimensional model is needed to achieve higher-precision modeling. Summary of the invention
[0006] A technical problem to be solved by the present disclosure is how to provide a graph matching method that can be directly based on a three-dimensional model to achieve higher-precision modeling.
[0007] According to the first aspect of the present disclosure, a three-dimensional object matching method is provided, comprising: obtaining a graph structure corresponding to a three-dimensional object; the graph structure is obtained by taking each face in a three-dimensional model of the three-dimensional object as a graph node, and connecting the graph nodes corresponding to two faces adjacent to each line in the three-dimensional model with edges; processing the graph structure using a pre-trained graph neural network model to obtain a graph representation of the three-dimensional object; and determining a target object that matches the three-dimensional object based on the graph representation.
[0008] Optionally, the method also includes: constructing a meta-path for at least one substructure in the three-dimensional model, the meta-path being used to characterize the path relationship between graph nodes constituting the substructure in the graph structure, wherein the graph structure is processed using a pre-trained graph neural network model to obtain a graph representation of the three-dimensional object, including: using a pre-trained graph neural network model to process the graph structure based on the meta-path to obtain a graph representation of the three-dimensional object.
[0009] Optionally, the graph neural network model includes a feature extraction module and a graph representation calculation module; the feature extraction module is used to extract feature information of each graph node in the graph structure to obtain an initialization representation of each graph node; the graph representation calculation module is used to perform convolution processing on the initialization representation of each graph node in the graph structure and the node representation of each graph node in the meta-path to obtain the graph representation of the three-dimensional object.
[0010] Optionally, the graph representation calculation module includes a convolutional layer module and a readout module, the convolutional layer module includes one or more convolutional layers, and any one of the convolutional layers includes a first aggregation module, a second aggregation module, a splicing module, a first multi-layer perceptron and an activation module; the first aggregation module is used to aggregate the node representations of at least some of the neighbor nodes of the graph node in the previous convolutional layer to obtain a first aggregation result; the second aggregation module is used to aggregate the node representations of at least some of the graph nodes in the meta-path where the graph node is located in the previous convolutional layer to obtain a second aggregation result; the splicing module is used to splice the node representation of the graph node in the previous convolutional layer, the first aggregation result and the second aggregation result; the first multi-layer perceptron is used to convert the feature dimension of the splicing result to obtain an output with the same feature dimension as the feature dimension of the output of the graph node in the previous convolutional layer; the activation module is used to perform nonlinear processing on the output of the first multi-layer perceptron to obtain the node representation of the graph node in the convolutional layer; the readout module calculates the graph representation based on the node representation of each graph node in the graph structure in at least one convolutional layer.
[0011] Optionally, the aggregation processing includes: sum calculation; or mean calculation; or weighted summation based on an attention mechanism.
[0012] Optionally, the feature information includes at least one of the following: spatial information; surface type; area; material; processing method; and color.
[0013] Optionally, the feature extraction module includes an encoding module, a splicing module and a second multi-layer perceptron; the encoding module is used to encode different types of features; the splicing module is used to splice the encoding results; the second multi-layer perceptron is used to convert the feature dimension of the splicing result to obtain a feature vector with a predetermined dimension.
[0014] Optionally, the method also includes: obtaining a training sample set, the training sample set including one or more training samples, any one training sample including a graph structure of two three-dimensional objects and the true similarity between the two three-dimensional objects; training the graph neural network model using the training sample set with the goal of minimizing the difference between the similarity between two vector representations obtained by processing the graph structure of the two three-dimensional objects in the training sample using the graph neural network model and the true similarity.
[0015] Optionally, based on the graph representation, determining the target object that matches the three-dimensional object includes: respectively calculating the similarity between the graph representation and the graph representations of other three-dimensional objects; and determining the target object that matches the three-dimensional object based on the similarity calculation result.
[0016] Optionally, the method further comprises: storing the graphical representation of the three-dimensional object in a three-dimensional object database.
[0017] Optionally, the three-dimensional object includes at least one of the following: industrial parts, furniture, and electronic products.
[0018] According to a second aspect of the present disclosure, a three-dimensional object matching method is provided, comprising: obtaining a graph representation of the three-dimensional object; the graph representation is obtained by processing the graph structure of the three-dimensional object using a pre-trained graph neural network model; the graph structure is obtained by using each face in the three-dimensional model of the three-dimensional object as a graph node, and connecting the graph nodes corresponding to two faces adjacent to each line in the three-dimensional model with edges; based on the graph representation, determining a target object that matches the three-dimensional object.
[0019] According to a third aspect of the present disclosure, a three-dimensional object representation method is provided, comprising: obtaining a graph structure corresponding to the three-dimensional object; the graph structure is obtained by using each face in a three-dimensional model of the three-dimensional object as a graph node, and connecting the graph nodes corresponding to two faces adjacent to each line in the three-dimensional model with edges; and processing the graph structure using a pre-trained graph neural network model to obtain a graph representation of the three-dimensional object.
[0020] According to a fourth aspect of the present disclosure, a training method for a graph neural network model is provided, wherein the graph neural network model is used to process a graph structure of a three-dimensional object to obtain a graph representation of the three-dimensional object, wherein the graph structure is obtained by using each face in the three-dimensional model of the three-dimensional object as a graph node and connecting the graph nodes corresponding to two faces adjacent to each line in the three-dimensional model with an edge, wherein the method comprises: obtaining a training sample set, wherein the training sample set comprises one or more training samples, and any one of the training samples comprises a graph structure of two three-dimensional objects and a true similarity between the two three-dimensional objects; and training the graph neural network model using the training sample set with the goal of minimizing the difference between the similarity between two graph representations obtained by processing the graph structure of two three-dimensional objects in the training sample using the graph neural network model and the true similarity.
[0021] According to a fifth aspect of the present disclosure, a three-dimensional object matching device is provided, comprising: an acquisition module for acquiring a graph structure corresponding to a three-dimensional object; the graph structure is obtained by taking each face in a three-dimensional model of the three-dimensional object as a graph node, and connecting the graph nodes corresponding to two faces adjacent to each line in the three-dimensional model with edges; a processing module for processing the graph structure using a pre-trained graph neural network model to obtain a graph representation of the three-dimensional object; and a determination module for determining a target object that matches the three-dimensional object based on the graph representation.
[0022] Optionally, the device also includes: a construction module, used to construct a meta-path for at least one substructure in the three-dimensional model, and the meta-path is used to characterize the path relationship between the graph nodes constituting the substructure in the graph structure, wherein the processing module uses a pre-trained graph neural network model to process the graph structure based on the meta-path to obtain a graph representation of the three-dimensional object.
[0023] Optionally, the graph neural network model includes a feature extraction module and a graph representation calculation module; the feature extraction module is used to extract feature information of each graph node in the graph structure to obtain an initialization representation of each graph node; the graph representation calculation module is used to perform convolution processing on the initialization representation of each graph node in the graph structure and the node representation of each graph node in the meta-path to obtain the graph representation of the three-dimensional object.
[0024] Optionally, the graph representation calculation module includes a convolutional layer module and a readout module, the convolutional layer module includes one or more convolutional layers, and any one of the convolutional layers includes a first aggregation module, a second aggregation module, a splicing module, a first multi-layer perceptron and an activation module; the first aggregation module is used to aggregate the node representations of at least some of the neighbor nodes of the graph node in the previous convolutional layer to obtain a first aggregation result; the second aggregation module is used to aggregate the node representations of at least some of the graph nodes in the meta-path where the graph node is located in the previous convolutional layer to obtain a second aggregation result; the splicing module is used to splice the node representation of the graph node in the previous convolutional layer, the first aggregation result and the second aggregation result; the first multi-layer perceptron is used to convert the feature dimension of the splicing result to obtain an output with the same feature dimension as the feature dimension of the output of the graph node in the previous convolutional layer; the activation module is used to perform nonlinear processing on the output of the first multi-layer perceptron to obtain the node representation of the graph node in the convolutional layer; the readout module calculates the graph representation based on the node representation of each graph node in the graph structure in at least one convolutional layer.
[0025] Optionally, the aggregation processing includes: sum calculation; or mean calculation; or weighted summation based on an attention mechanism.
[0026] Optionally, the feature information includes at least one of the following: spatial information; surface type; area; material; processing method; and color.
[0027] Optionally, the feature extraction module includes an encoding module, a splicing module and a second multi-layer perceptron; the encoding module is used to encode different types of features; the splicing module is used to splice the encoding results; the second multi-layer perceptron is used to convert the feature dimension of the splicing result to obtain a feature vector with a predetermined dimension.
[0028] Optionally, the device also includes: a sample acquisition module, used to acquire a training sample set, the training sample set including one or more training samples, any training sample including a graph structure of two three-dimensional objects and the true similarity between the two three-dimensional objects; a training module, used to train the graph neural network model using the training sample set with the goal of minimizing the difference between the similarity between two vector representations obtained by processing the graph structure of the two three-dimensional objects in the training sample using the graph neural network model and the true similarity.
[0029] Optionally, the determination module calculates similarities between the graphic representation and graphic representations of other three-dimensional objects respectively, and determines a target object that matches the three-dimensional object based on the similarity calculation result.
[0030] Optionally, the device further includes: a storage module, configured to store the graphical representation of the three-dimensional object in a three-dimensional object database.
[0031] Optionally, the three-dimensional object includes at least one of the following: industrial parts, furniture, and electronic products.
[0032] According to a sixth aspect of the present disclosure, a three-dimensional object matching device is provided, comprising: an acquisition module, used to acquire a graph representation of a three-dimensional object; the graph representation is obtained by processing a graph structure of the three-dimensional object using a pre-trained graph neural network model; the graph structure is obtained by using each face in the three-dimensional model of the three-dimensional object as a graph node, and connecting the graph nodes corresponding to two faces adjacent to each line in the three-dimensional model with edges; a determination module, used to determine a target object that matches the three-dimensional object based on the graph representation.
[0033] According to the seventh aspect of the present disclosure, a three-dimensional object representation device is provided, including: an acquisition module, used to acquire a graph structure corresponding to the three-dimensional object; the graph structure is obtained by taking each face in the three-dimensional model of the three-dimensional object as a graph node, and connecting the graph nodes corresponding to two faces adjacent to each line in the three-dimensional model with edges; a processing module, used to process the graph structure using a pre-trained graph neural network model to obtain a graph representation of the three-dimensional object.
[0034] According to an eighth aspect of the present disclosure, a training device for a graph neural network model is provided, wherein the graph neural network model is used to process a graph structure of a three-dimensional object to obtain a graph representation of the three-dimensional object, wherein the graph structure is obtained by using each face in the three-dimensional model of the three-dimensional object as a graph node and connecting the graph nodes corresponding to two faces adjacent to each line in the three-dimensional model with an edge, and the device comprises: a sample acquisition module, used to acquire a training sample set, wherein the training sample set comprises one or more training samples, and any one of the training samples comprises a graph structure of two three-dimensional objects and a true similarity between the two three-dimensional objects; and a training module, used to train the graph neural network model using the training sample set with the goal of minimizing the difference between the similarity between two graph representations obtained by processing the graph structure of two three-dimensional objects in the training sample using the graph neural network model and the true similarity.
[0035] According to a ninth aspect of the present disclosure, a computing device is provided, comprising: a processor; and a memory on which executable code is stored, and when the executable code is executed by the processor, the processor executes the method described in any one of the first to fourth aspects above.
[0036] According to a tenth aspect of the present disclosure, a computer program product is provided, comprising an executable code. When the executable code is executed by a processor of an electronic device, the processor is caused to execute the method described in any one of the first to fourth aspects above.
[0037] According to the eleventh aspect of the present disclosure, a non-temporary machine-readable storage medium is provided, on which executable code is stored. When the executable code is executed by a processor of an electronic device, the processor executes the method described in any one of the first to fourth aspects above.
[0038] Therefore, the present disclosure uses each face in the three-dimensional model of the three-dimensional object as a graph node, connects the graph nodes corresponding to the two faces adjacent to each line in the three-dimensional model with edges to obtain a graph structure, and uses a pre-trained graph neural network model to process the graph structure to obtain a graph representation of the three-dimensional object, and determines the target object that matches the three-dimensional object based on the graph representation. Therefore, by directly building a graph structure based on the three-dimensional model and performing object matching based on it, higher-precision modeling can be achieved, thereby improving the accuracy of object matching. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The above and other objects, features and advantages of the present disclosure will become more apparent through a more detailed description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, wherein like reference numerals generally represent like components in the exemplary embodiments of the present disclosure.
[0040] Figure 1 A schematic flowchart of a three-dimensional object matching method according to an embodiment of the present disclosure is shown.
[0041] Figure 2 A schematic diagram of the design principle of an embodiment of the present disclosure is shown.
[0042] Figure 3 A schematic diagram of the overall structure of a retrieval system according to an embodiment of the present disclosure is shown.
[0043] FIG. 4A to FIG. 4C A schematic diagram of retrieval results for different models is shown.
[0044] Figure 5 The overall flow chart of the three-dimensional object matching method disclosed in the present invention is shown.
[0045] Figure 6 A schematic structural diagram of a three-dimensional object matching device according to an embodiment of the present disclosure is shown.
[0046] Figure 7 A schematic structural diagram of a three-dimensional object matching device according to another embodiment of the present disclosure is shown.
[0047] Figure 8 A schematic structural diagram of a three-dimensional object representation device according to an embodiment of the present disclosure is shown.
[0048] Fig. 9 A structural schematic diagram of a training device for a graph neural network model according to an embodiment of the present disclosure is shown.
[0049] Fig.10 A schematic diagram of the structure of a computing device according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0050] The preferred embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the preferred embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.
[0051] Figure 1 A schematic flowchart of a three-dimensional object matching method according to an embodiment of the present disclosure is shown. Figure 1 The method shown can be implemented in software via a computer program, and can also be executed via a specifically configured computing device.
[0052] See also Figure 1 , in step S110, a graph structure corresponding to the three-dimensional object is obtained.
[0053] A three-dimensional object may be a physical object with a specific spatial structure in real space. That is, a three-dimensional object may be a three-dimensional physical object, such as an industrial component. A three-dimensional object may also be an object with a specific spatial structure in a virtual space. That is, a three-dimensional object may also be a three-dimensional virtual object, such as a virtual component to be matched.
[0054] The graph structure may be constructed in real time or in advance, that is, the first graph structure may be obtained by real-time construction or by reading the graph structure from a database.
[0055] A three-dimensional model can be regarded as a parametric representation of a three-dimensional object, that is, a three-dimensional model can use functions and some parameters (such as length, width, height, curvature, etc.) to describe the shape of a three-dimensional object. A three-dimensional model can be given in advance or generated in real time. For example, in an actual scene, the two-dimensional data of a three-dimensional object can be processed to generate a three-dimensional model. For another example, a three-dimensional object can be sampled, and a three-dimensional model can be constructed based on the sampled data. The present disclosure does not particularly limit the method of constructing a three-dimensional model.
[0056] As an example, the three-dimensional model can be a model file in step / stp format produced by software. The step / stp format is a common format in CAD software used for industrial design, which can store all the features and information required by the present disclosure. Step / stp can store the geometric information of the three-dimensional model in a lossless manner. Some commonly used CAD software, such as CATIA, 3Dmax, SolidWorks, etc., have their own proprietary data formats, which can all be converted into step / stp formats and still contain the model feature information required by the present disclosure.
[0057] When extracting a three-dimensional model into a graph structure, there is a method based on Reeb Graph (i.e., Reeb graph). However, this method requires first sampling points on the surface of the three-dimensional model (such as a CAD model) and then constructing a graph based on the sampling points. The sampling process causes information loss. If the sampling accuracy is not enough, it will lead to a large information loss. If the sampling accuracy is too high, it will lead to a higher amount of calculation.
[0058] To this end, the present disclosure proposes a composition method directly based on a three-dimensional model to achieve higher precision modeling.
[0059] When constructing a graph structure based on a three-dimensional model, the present disclosure maps each face in the three-dimensional model to a graph node on the graph, and regards the lines in the three-dimensional model as edges on the graph. That is, the graph structure is obtained by using each face in the three-dimensional model of the three-dimensional object as a graph node, and connecting the graph nodes corresponding to the two faces adjacent to each line in the three-dimensional model with edges. In the present disclosure, a graph node may be referred to as a node for short.
[0060] In specific operations, for the original 3D model (such as step / stp file), you can first traverse all the faces and lines (which can be called curves), assign them numbers respectively as unique identifiers. Then, each face is defined as a node on the graph, and each line is defined as an edge on the graph. The points connected by this edge are the two adjacent faces of the curve in the original model.
[0061] It should be noted that in a 3D model, most curves are adjacent to two faces, corresponding to two points on an edge of the graph. However, there are some unexpected situations. For example, for faces such as cylinders and cones, their generatrix is also regarded as a curve in CAD. This type of curve has only one adjacent face. In this case, this edge (curve) can be ignored. In addition, there are some curves that are adjacent to multiple faces (more than 2). In this case, I can add edges between the nodes corresponding to these faces. In this way, the graph structure can be extracted.
[0062] There are many types of primitive faces and curves corresponding to nodes and edges. For example, the type of face may include but is not limited to plane, cylinder, cone, sphere, elliptical cylinder, elliptical cone, torus, and Nurbs face. The type of line may include but is not limited to straight line, arc, circular line, elliptical line, elliptical arc, and Nurbs line. Depending on the type, different nodes and edges can also be regarded as different types. In other words, the graph structure constructed by the present disclosure is a heterogeneous graph. Heterogeneous graphs take into account more node types and relationship types, and therefore can better characterize the structure of the three-dimensional model.
[0063] In step S120, the graph structure is processed using a pre-trained graph neural network model to obtain a graph representation of the three-dimensional object.
[0064] The pre-trained graph neural network model can be used to extract features from the graph structure. The feature extraction result obtained by using the graph neural network model to extract features from the graph structure can obtain a graph representation of the three-dimensional object. The graph representation is also a vector representation of the graph structure of the three-dimensional object.
[0065] Step S120 can be processed in real time or pre-processed in advance. In the pre-processed scenario, the three-dimensional object can be processed in advance using a pre-trained graph neural network model, and the obtained graph representation of the three-dimensional object can be stored, and the pre-stored data can be directly read in this step to obtain the graph representation of the three-dimensional object.
[0066] The graph neural network model has two main functions: one is to calculate the initialization representation of each graph node in the graph structure; the other is to calculate the graph representation of the entire graph structure based on the initialization representation of each graph node in the graph structure.
[0067] Therefore, the graph neural network model can include a feature extraction module and a graph representation calculation module.
[0068] The feature extraction module is used to extract the feature information of each graph node in the graph structure and obtain the initialization representation of each graph node. The initialization representation is used to represent the feature information of the graph node itself. The initialization representation is the vectorized representation obtained after processing the feature information of the graph node, that is, the feature vector. Under the action of the feature extraction module, different graph nodes can have an initialization representation with a unified dimension.
[0069] The feature information of a node may include but is not limited to at least one of the following: spatial information; surface type; area; material; processing method; color. The spatial information may refer to the spatial information of the surface corresponding to the node in a three-dimensional model, such as the uvgrid information of the surface corresponding to the node.
[0070] As an example, the feature extraction module may include a coding module, a splicing module and a second multi-layer perceptron. The coding module is used to encode different types of features. Specifically, the coding module can use different encoding methods for the features according to whether the features are discrete features or continuous features. For example, one-hot encoding can be adopted for discrete features, and normalization can be adopted for continuous features. The encoding result is the encoding result of different types of features of the same graph node. The splicing module is used to splice all the encoding results of different types of features together. The second multi-layer perceptron is used to convert the feature dimension of the splicing result to obtain a feature vector with a predetermined dimension. The second multi-layer perceptron may include an input layer, a hidden layer and an output layer. Among them, the number of hidden layers can be set according to actual conditions. The dimension of the feature vector output by the second multi-layer perceptron is equal to the number of neurons (i.e., output units) in the output layer.
[0071] As described above, there are multiple types of graph nodes. In the present disclosure, the parameters of the second multilayer perceptrons corresponding to different types of graph nodes may not be shared. That is, an independent second multilayer perceptron may be designed for each type of graph node. These multiple second multilayer perceptrons may participate in training together to train second multilayer perceptrons with different parameters. When performing feature extraction on different types of graph nodes, second multilayer perceptrons with different parameters may be used.
[0072] The graph representation calculation module is used to calculate the graph representation based on the initialization representation of each graph node in the graph structure. The graph representation reflects the feature information of the entire graph structure. That is, the graph representation can be regarded as a vectorized representation of the entire graph structure. The graph representation can also be called a vector representation of a three-dimensional object.
[0073] Therefore, when executing step S120, the feature extraction module in the graph neural network model can be used to extract the feature information of each graph node to obtain the initialization representation of each graph node; and then the graph representation calculation module in the graph neural network model is used to calculate the graph representation based on the initialization representation of each graph node in the graph structure. The specific process of feature extraction and graph representation calculation can be found in the relevant description.
[0074] As an example, the graph representation calculation module may include a convolutional layer module and a readout module.
[0075] The convolutional layer module can be used to perform one or more convolutional layers on each graph node in the graph structure to obtain the convolution results of each node. That is, the convolutional layer module can include one or more convolutional layers, and the convolutional layers can use but are not limited to convolutional calculation methods such as GCN (Graph Convolutional Network) and GAT (Graph Attention Network).
[0076] The convolution calculation method of GCN is essentially the same as the convolution process of CNN, which is a weighted summation process, that is, the neighbor points are passed through the degree matrix and its adjacency matrix, the weight of each edge is calculated, and then the weighted sum is performed.
[0077] When the convolution method of GCN is applied to the present disclosure, any convolution layer in the convolution layer module can perform weighted summation on the node representation calculation results of the neighbor nodes of each graph node in the structure graph in the previous convolution layer to obtain the node representation calculation results of each graph node in the convolution layer, wherein the weights of the neighbor nodes are calculated based on the degree matrix. For the convolution principle of GCN, please refer to the prior art.
[0078] GAT uses the Attention mechanism, which allows each graph node to distinguish and identify the characteristics of its neighbor nodes, and assign different weights to the contribution of its neighbor nodes to its own information.
[0079] When the convolution method of GAT is applied to the present disclosure, any convolution layer in the convolution layer module can perform a weighted summation based on the attention coefficient on the node representation calculation results of the neighbor nodes of each graph node in the structure graph in the previous convolution layer, and obtain the node representation calculation results of each graph node in the convolution layer, wherein the attention coefficient is a model parameter used to characterize the weight of the neighbor node. The convolution principle of GAT will not be further explained here.
[0080] In addition, the convolution layer can also use other convolution calculation methods suitable for graph structures (such as GraphSage), which will not be exhaustively listed or elaborated in this disclosure.
[0081] For example, taking the convolution layer using the GCN convolution calculation method as an example, for any graph node in the graph structure, the convolution calculation can be performed using the following formula:
[0082]
[0083]
[0084] in, For graph node x i The node representation after (l+1) layers of convolutional layers, i is the number of the graph node, N(i) represents all the neighboring nodes of graph node i, is a parameter. σ is an activation function. cat represents a vector concatenation operation. MLP is a multi-layer perceptron, which processes the dimension of the concatenated feature vector to a predetermined dimension. For example, the dimension of the concatenated feature vector can be processed to be the same as The dimensions are consistent.
[0085] Any convolutional layer can obtain the convolution result of each graph node in the graph structure in the convolutional layer, that is, the node representation of the graph node in the convolutional layer (that is, the node vector). The readout module can calculate the graph representation based on the node representation of each graph node in at least one convolutional layer in the graph structure. Specifically, the readout module can calculate the global representation of all graph nodes in at least one convolutional layer based on the node representation of each graph node in at least one convolutional layer in the graph structure; and calculate the graph representation based on the global representation of at least one convolutional layer, such as adding the global representation of at least one convolutional layer to obtain the graph representation.
[0086] For example, the readout module can calculate the node representation of each graph node in the graph structure at each convolution layer to obtain the global representation of the graph structure at the convolution layer; the global representations of all convolution layers can be added to obtain the graph representation. For another example, the readout module can also only calculate the node representation of each graph node in the graph structure at the last convolution layer to obtain the global representation of the graph structure at the last convolution layer; the global representation of the last convolution layer is used as the graph representation. When calculating the global representation of a convolution layer, the global representation can be calculated by summing, averaging, maximizing, etc. the node representations of all graph nodes in the graph structure at the convolution layer.
[0087] In the 3D model of a 3D object, some special types of local features often play an important role. Based on domain knowledge, there are usually some common substructures, such as through holes, grooves, holes, bosses, chamfers, etc. These semantic substructures are important for identifying the geometric features of 3D objects, and therefore play an important role in matching similar 3D objects. However, there is currently no method based on graphs to model these substructures in a targeted manner.
[0088] In order to obtain semantic substructure information such as through holes and grooves in a three-dimensional model, the present disclosure constructs a corresponding meta-path for at least one substructure in the three-dimensional model. The meta-path is used to characterize the path relationship between the graph nodes that constitute the substructure in the graph structure. For example, for a hole structure, its core is a cylindrical surface, and there are two planes on both sides of the cylindrical surface, and the dihedral angle between the plane and the cylindrical surface is 90 degrees. Therefore, we can define "plane-cylinder-plane" as a meta-path, and so on. For different features, we can define different meta-paths.
[0089] After defining the meta-path of the substructure in the graph structure, when executing step S120, the graph structure can be processed based on the meta-path using a pre-trained graph neural network model to obtain a graph representation of the three-dimensional object. Thus, the obtained graph representation can not only represent the overall structural information of the three-dimensional object, but also represent the local structural information of the substructures such as through holes, grooves, holes, bosses, chamfers, etc. in the three-dimensional object, thereby improving the accuracy of object matching.
[0090] Taking the graph neural network model including the feature extraction module and the graph representation calculation module mentioned above as an example, the graph representation calculation module can perform convolution processing on the initialization representation of each graph node in the graph structure and the initialization node representation of each graph node in the meta-path to obtain a graph representation of a three-dimensional object.
[0091] As mentioned above, the graph representation calculation module includes a convolutional layer module and a readout module.
[0092] The convolutional layer module may include one or more convolutional layers, and any convolutional layer may include a first aggregation module, a second aggregation module, a splicing module, a first multi-layer perceptron, and an activation module. The first aggregation module is used to aggregate the node representations of at least some of the neighboring nodes of the graph node in the previous convolutional layer to obtain a first aggregation result. The second aggregation module is used to aggregate the node representations of at least some of the graph nodes in the meta-path where the graph node is located in the previous convolutional layer to obtain a second aggregation result. The splicing module is used to splice the node representation of the graph node in the previous convolutional layer, the first aggregation result, and the second aggregation result. The first multi-layer perceptron is used to convert the feature dimension of the splicing result to obtain an output with the same feature dimension as the feature dimension of the output of the graph node in the previous convolutional layer. The activation module is used to perform nonlinear processing on the output of the first multi-layer perceptron to obtain the node representation of the graph node in the convolutional layer. Among them, the aggregation processing may include but is not limited to any one of sum calculation, mean calculation, and weighted summation based on the attention mechanism.
[0093] As an example, any graph node in the graph structure can be convolved in each convolutional layer using the following formula:
[0094]
[0095]
[0096]
[0097] in, For graph node x i The node representation after (l+1) layers of convolutional layers, i is the number of the graph node, N(i) represents all the neighboring nodes of graph node i, M k(i) represents all nodes in the kth meta-path, is a parameter. σ is an activation function. cat represents a vector concatenation operation. MLP is a multi-layer perceptron, which processes the dimension of the concatenated feature vector to a predetermined dimension. For example, the dimension of the concatenated feature vector can be processed to be the same as The dimensions are consistent. Represents the first aggregation result. Represents the second aggregation result.
[0098] Based on the above convolution calculation formula, each graph node in the graph structure can obtain its neighborhood information through two methods. On the one hand, it receives information from all first-order neighbor nodes and performs aggregation operations; on the other hand, it aggregates all nodes on each meta-path through pre-defined meta-paths. The representations obtained by the two methods are spliced together with the original node representation, and the dimensions are aligned through MLP. Finally, the updated node representation of the next layer is obtained through the calculation of the activation function.
[0099] After each layer of convolution calculation, the readout module can calculate the global representation of this layer based on the convolution calculation results of each graph node in the graph structure at this convolution layer (i.e., node representation). The global representation of the lth convolution layer can be recorded as The calculation formula can be expressed as: in, For graph node x i Node representation after l convolutional layers.
[0100] The final global representation (i.e., graph representation) can be denoted as Z g . Z g The calculation formula can be expressed as: Among them, Z g There is no unique way to calculate . A simpler way to calculate is to take only the representation of the last layer as the final output, without calculating each layer The calculation of is not limited to sum pooling, other pooling methods can also be used, such as mean pooling, max pooling and other methods, which are not exhaustive.
[0101] In addition, the two aggregation operations above in the computational graph nodes (i.e., computation ) are all summed. The summation can also be replaced by the mean calculation or the attention mechanism. Taking the calculation process of as an example, the calculation process based on the attention mechanism is as follows:
[0102]
[0103]
[0104]
[0105] Among them, α j is the attention coefficient; sim(i,k) represents the similarity between graph node i and graph node k.
[0106] In step S130 , a target object matching the three-dimensional object is determined based on the graph representation.
[0107] The three-dimensional object refers to the object to be queried. When querying an object matching the three-dimensional object, the graph representation of the three-dimensional object can be obtained by executing steps S110 and S120. After obtaining the graph representation of the three-dimensional object, the similarity between the graph representation of the three-dimensional object and the graph representation of other three-dimensional objects can be calculated, and based on the similarity calculation result, the target object matching the three-dimensional object can be determined.
[0108] Other three-dimensional objects may refer to three-dimensional objects in a three-dimensional object database. The three-dimensional object database may include multiple three-dimensional objects and their vector representations. The vector representations of the three-dimensional objects in the three-dimensional object database may be calculated in advance, and the calculation method may be the calculation method shown in step S110 and step S120 above.
[0109] Figure 2 A schematic diagram of the design principle of an embodiment of the present disclosure is shown.
[0110] See also Figure 2 First, we can obtain the graph structures of the two three-dimensional objects to be matched, and then input them into the pre-trained graph neural network model GNN respectively to obtain the graph representations of the two three-dimensional objects output by the graph neural network model GNN, and then calculate the similarity between the two graph representations to obtain the similarity calculation results of the two three-dimensional objects.
[0111] As an example, the similarity between the graph representations of two three-dimensional objects can be calculated using the following formula:
[0112] Sim(g,g′)=||Z g -Z g′ || p
[0113] in,‖‖ p represents the p-norm, Z g is the graph representation of the three-dimensional object g, Z g′ is the graph representation of the three-dimensional object g′, and Sim(g,g′) represents the similarity calculation result between the graph representation of the three-dimensional object g and the graph representation of the three-dimensional object g′.
[0114] When determining the target object that matches the three-dimensional object based on the similarity calculation result, the object with a similarity greater than a predetermined threshold can be directly determined as the target object that matches the three-dimensional object; or a predetermined number of objects with high similarity rankings can be provided to the user as retrieved objects, and the user can further select the target object from them.
[0115] The present disclosure can also store the graphical representation of the three-dimensional object in a three-dimensional object database, so that the graphical representation of the three-dimensional object can be directly retrieved and applied in subsequent applications, thereby achieving a technical effect of repeated application after one processing.
[0116] The technical solution provided by the embodiment of the present disclosure may also include a training process of the neural network model as shown in the following figure.
[0117] A training sample set is obtained, where the training sample set includes one or more training samples, and any training sample includes a graph structure of two three-dimensional objects and a true similarity between the two three-dimensional objects.
[0118] The true similarity can be obtained by calculating the similarity between the graph structures of two three-dimensional objects.
[0119] Considering that the algorithm for calculating the similarity between the graph structures of two objects is relatively complex to implement, and the graph structure of a three-dimensional object can be represented by other data structures (such as the graph and dimension data of the three-dimensional object, a three-dimensional model, etc.). Therefore, the similarity between other structural data (such as a three-dimensional model) that can reflect the three-dimensional topological structure of the two three-dimensional objects can also be calculated as the real similarity. Alternatively, in actual scenarios, the real similarity can also be determined by manual assignment.
[0120] After obtaining the training sample set, the graph neural network model can be trained using the training sample set with the goal of minimizing the difference between the similarity between two graph representations obtained by processing the graph structures of two objects in the training samples using the graph neural network model and the true similarity.
[0121] It should be understood that, ideally, the goal of training a graph neural network model is to minimize the difference between the similarity between the two graph representations obtained by processing the graph structure of two objects in the training sample using the graph neural network model and the true similarity. However, considering that the ideal state is difficult to achieve in practical applications, the present disclosure aims to minimize the difference between the similarity between the two graph representations obtained by processing the graph structure of two three-dimensional objects in the training sample using the graph neural network model and the true similarity as a practical application goal.
[0122] As an example, given a set of 3D models G of multiple 3D objects, we can first build a graph structure for each 3D model, and then use the existing algorithm to calculate the similarity between the two 3D models for each pair of 3D models as the ground-truth label y. Thus, we can get a triple (g1, g2, y). Each triple (g1, g2, y) can be regarded as a piece of sample data. Based on this, the training goal of the graph neural network model is,
[0123]
[0124] Among them, λ is the regularization coefficient, and θ is the parameter of the graph neural network model. Sim(g1,g2) represents the similarity between the vector representations of the three-dimensional models g1 and g2 obtained based on the graph neural network model.
[0125] Based on the above loss function, the parameters of the graph neural network model can be updated through the gradient descent method to complete the model training. In this way, after at least one round of iterative training, a trained graph neural network model can be obtained.
[0126] The present disclosure also proposes a three-dimensional object matching method, including: obtaining a graph representation of the three-dimensional object; the graph representation is obtained by processing the graph structure of the three-dimensional object using a pre-trained graph neural network model; the graph structure is obtained by using each face in the three-dimensional model of the three-dimensional object as a graph node, and connecting the graph nodes corresponding to two faces adjacent to each line in the three-dimensional model with edges; based on the graph representation, determining the target object that matches the three-dimensional object.
[0127] Combined with the above Figure 1 The difference between the three-dimensional object matching method described above is that, in this embodiment, the vector representation of the three-dimensional object obtained can be obtained through real-time processing or read from a database. The vector representation read from the database is obtained in advance according to Figure 1 The above is obtained by processing steps S110 and S120.
[0128] The present disclosure also proposes a three-dimensional object representation method, including: obtaining a graph structure corresponding to the three-dimensional object; the graph structure is obtained by using each face in the three-dimensional model of the three-dimensional object as a graph node, and connecting the graph nodes corresponding to two faces adjacent to each line in the three-dimensional model with edges; using a pre-trained graph neural network model to process the graph structure to obtain a graph representation of the three-dimensional object. For details about the method, please refer to the above combined Figure 1 Related description of step S110 and step S120.
[0129] The present disclosure also proposes a training method for a graph neural network model, the graph neural network model is used to process the graph structure of a three-dimensional object to obtain a graph representation of the three-dimensional object, the graph structure is obtained by using each face in the three-dimensional model of the three-dimensional object as a graph node, and connecting the graph nodes corresponding to two faces adjacent to each line in the three-dimensional model with edges, the method comprising: obtaining a training sample set, the training sample set comprising one or more training samples, any one of the training samples comprising the graph structure of two objects and the true similarity between the two objects; and using one or more training samples to train the graph neural network model with the goal of minimizing the difference between the similarity between the two graph representations obtained by processing the graph structure of two three-dimensional objects in the training sample using the graph neural network model and the true similarity. For details related to the method, please refer to the relevant description above, which will not be repeated here.
[0130] The specific application scenarios of this solution are described in detail below.
[0131] First, the three-dimensional object involved in the solution provided in the embodiment of the present disclosure can refer to any object with a certain spatial structure, including but not limited to at least one of the following: industrial parts, physical equipment, furniture, and electronic products. That is, the three-dimensional object matching method provided in the embodiment of the present disclosure can be applied to the topological structure matching problem of any three-dimensional model, and is not limited to industrial parts.
[0132] For example, industrial parts refer to any parts with a three-dimensional structure, and these parts can be applied to any industrial field.
[0133] For example, industrial parts may include but are not limited to at least one of the following: screws, washers, handles, gears, bearings, flywheels, chains, pulleys, and other common mechanical parts. In addition, the parts involved in the embodiments of the present disclosure may further include but are not limited to at least one of the following: parts involved in physical equipment such as automation equipment, instrumentation and measuring equipment, transmission equipment, and control equipment.
[0134] Exemplarily, the physical devices involved in the embodiments of the present disclosure include at least the content described in the previous paragraph. For example, the automation equipment may include but is not limited to at least one of the following: switches, components, buttons, etc.; the instruments and measuring equipment may include but is not limited to at least one of the following: rulers, valves, temperature measuring instruments, pressure instruments, flow instruments, etc.; the transmission equipment may include but is not limited to at least one of the following: motors, speed regulators, etc.; the control equipment may include but is not limited to at least one of the following: mice, keyboards, remote controllers, etc.
[0135] Illustratively, the furniture involved in the embodiments of the present disclosure may include, but is not limited to, at least one of the following: daily living furniture such as beds, tables, chairs, kitchen utensils, etc.; smart home devices such as televisions, stereos, projectors, etc.
[0136] Illustratively, the furniture involved in the embodiments of the present disclosure may include, but is not limited to, at least one of the following: a mobile phone, a tablet computer, a notebook, a display, etc.
[0137] It should be understood that the embodiments of the present disclosure have no particular restrictions on the form, material, and composition of three-dimensional objects, and any three-dimensional object with a three-dimensional spatial structure can be processed using this solution.
[0138] It should be noted that when using this solution to implement related functions such as three-dimensional object matching, a three-dimensional object refers to any object with a three-dimensional spatial structure in the actual scene, and when implementing this solution, the three-dimensional object can be displayed or displayed in the form of two-dimensional data. For example, this solution can be applied to a shopping platform, where some of the goods displayed on the shopping platform (such as beds, water cups, mobile phones and other physical goods) have a three-dimensional spatial structure in the actual scene, but on this shopping platform, the goods are displayed in the form of two-dimensional images. It should be understood that these goods with a three-dimensional spatial structure are still within the scope of the three-dimensional objects described in this solution.
[0139] Secondly, the technical solution provided by the embodiment of the present disclosure can be applied to and is not limited to the matching scenario of three-dimensional objects. The scenario can also be further applied to actual business scenarios, such as recommendation or search. For example, the matching scenario of three-dimensional objects can also be further applied to the recommendation business scenario of three-dimensional objects.
[0140] Exemplarily, it can be applied to any platform or application with a recommendation function. Based on the three-dimensional objects (for example, beds or screws) that the user has pre-browsed, collected or selected, this solution is used to determine other three-dimensional objects that match the three-dimensional object, and the matching results are recommended to the user. For another example, the matching scenario of three-dimensional objects can be further applied to the search business scenario of three-dimensional objects. Exemplarily, it can be applied to any platform or application with a search function. Based on the search term entered by the user, the search term can specifically correspond to a certain type of three-dimensional object, and this solution is used to determine other three-dimensional objects that match the three-dimensional object of this type, and the matching results are fed back to the user.
[0141] In addition to being applied to three-dimensional object matching, the technical solution provided by the present disclosure can also be applied to three-dimensional object design. That is, based on the technical solution provided by the embodiments of the present disclosure, a graphical representation of each three-dimensional object can be obtained, so that industrial parts that meet actual business needs can be designed based on the graphical representation of the three-dimensional object.
[0142] Exemplarily, the three-dimensional object matching method disclosed herein can be applied to a model retrieval system.
[0143] Figure 3 A schematic diagram of the overall structure of a retrieval system according to an embodiment of the present disclosure is shown.
[0144] like Figure 3 As shown, the retrieval system may include a sorting system and a parts library.
[0145] Given a model g for search (i.e., Queryg shown in the figure), the ranking system first constructs a graph structure (heterogeneous graph) based on the model; then extracts features through the graph neural network model GNN to obtain its graph representation Zg; calculates the similarity Sim(g,g′) between Zg and the graph representations of other models in the model library, and sorts them from small to large. The top-ranked models are the retrieval results. Since the vector representations of all models in the model library can be calculated in advance, only Sim(g,g′) needs to be calculated, which greatly improves the computational efficiency compared to existing methods.
[0146] FIG. 4A to FIG. 4C A schematic diagram of retrieval results for different models is shown.
[0147] like Figure 4A As shown in Figure 4, the search results include the structural diagrams, names and numbers of several top-ranked models. Among them, the model on the far left refers to the model used for search (i.e., Query). The models with numbers on the right are the results retrieved in descending order based on similarity.
[0148] Figure 5 The overall flow chart of the three-dimensional object matching method disclosed in the present invention is shown.
[0149] See also Figure 5 For the original step / stp file, the graph structure can be extracted first. After the graph structure is extracted, the model can be used to calculate the graph representation of the graph structure, and similarity calculation can be performed based on the graph representation.
[0150] Based on the difference between the similarity calculation results and the real results, the model can be trained. After the model training is completed, the trained model calculation graph can be used for representation.
[0151] So far combined Figures 1 to 5 The implementation process of the three-dimensional object matching method disclosed in the present invention is described in detail.
[0152] Industrial design and production use a large number of parts, including a large number of parts with similar structures. Modeling the similarity of parts can help designers quickly retrieve similar parts during the design phase, increase reuse rates, reduce modification and design costs, and improve design efficiency. This has important practical significance and application value.
[0153] Graph is a very common data model in the real world and in the scientific field. For example, traffic networks and social networks can all be modeled as graphs. Designing different neural networks based on graphs to solve different tasks is the problem studied by graph neural networks (GNNs). In addition, since the computational complexity of neural networks is relatively fixed, for some problems with high computational complexity that cannot be solved within polynomial time complexity, neural networks can be used to calculate approximate solutions, thereby improving computational efficiency.
[0154] This paper designs an algorithm framework for similarity calculation and matching of CAD models based on GNN, which specifically includes three modules: graph structure extraction, representation calculation and similarity calculation.
[0155] In the graph structure extraction module, the present disclosure extracts the graph structure from the original CAD model based on the step / stp format commonly used in the CAD field (including but not limited to), where each node on the graph corresponds to a face in the CAD model, and the nodes corresponding to two adjacent faces are connected on the graph. Each different type of face corresponds to a type of node. At the same time, the geometric features of the face are assigned to the corresponding nodes.
[0156] In the characterization calculation module, the present disclosure proposes to use a graph neural network to measure the similarity between two graphs. At the same time, in order to obtain the substructure information in the CAD model, for structures such as grooves and through holes, the present disclosure defines the meta-paths corresponding to these substructures in the graph, and designs a graph neural network based on meta-path to better capture the information of the CAD model. After performing GNN calculations based on the graph structure and obtaining the representation of each node, the representation of the entire graph is obtained through readout calculations.
[0157] The number of industrial parts is extremely large, and there are high requirements for algorithm performance. Although the current graph matching algorithm can accurately measure and calculate the similarity of graph structures, the computational complexity of the matching algorithm is high, exceeding the polynomial complexity (NP hard). Each calculation requires the input of two original graphs, and then the algorithm matches the two graphs. The calculation takes a long time and cannot cope with large amounts of data. In the similarity calculation module, the similarity measurement of graph structures can be achieved by measuring the similarity between vectors. Since the operation of obtaining the representation of the entire graph can be calculated for each graph separately, it does not depend on the graph to be matched with it, and the computational time of the neural network is relatively certain, so it can be calculated in advance. In the matching process, only the representation vector needs to be processed, which can effectively improve efficiency.
[0158] The three-dimensional object matching method disclosed in the present invention may also be implemented as a three-dimensional object matching device. Figure 6 , Figure 7 The structure diagram of the three-dimensional object matching device in different embodiments is shown. The functional units of the three-dimensional object matching device can be implemented by hardware, software, or a combination of hardware and software that implements the principles of the present disclosure. It can be understood by those skilled in the art that Figure 6 , Figure 7 The functional units described can be combined or divided into sub-units to implement the principles of the above invention. Therefore, the description herein can support any possible combination, division, or further limitation of the functional units described herein. The following is a brief description of the functional units that the three-dimensional object matching device can have and the operations that each functional unit can perform. For the details involved, please refer to the relevant description above, which will not be repeated here.
[0159] Figure 6 A schematic structural diagram of a three-dimensional object matching device according to an embodiment of the present disclosure is shown.
[0160] See also Figure 6 The three-dimensional object matching device 600 may include an acquisition module 610 , a processing module 620 and a determination module 630 .
[0161] The acquisition module 610 is used to acquire a graph structure corresponding to a three-dimensional object; the graph structure is obtained by using each face in the three-dimensional model of the three-dimensional object as a graph node and connecting the graph nodes corresponding to two faces adjacent to each line in the three-dimensional model with an edge. The processing module 620 is used to process the graph structure using a pre-trained graph neural network model to obtain a graph representation of the three-dimensional object. The determination module 630 is used to determine a target object that matches the three-dimensional object based on the graph representation.
[0162] The three-dimensional object matching device 600 may further include a construction module. The construction module is used to construct a meta-path for at least one substructure in the three-dimensional model, and the meta-path is used to represent the path relationship between the graph nodes constituting the substructure in the graph structure, wherein the processing module 620 may use a pre-trained graph neural network model to process the graph structure based on the meta-path to obtain a graph representation of the three-dimensional object.
[0163] For the structure of the graph neural network model, please refer to the relevant description above.
[0164] The three-dimensional object matching device 600 may also include a sample acquisition module and a training module. The sample acquisition module is used to acquire a training sample set, wherein the training sample set includes one or more training samples, and any training sample includes a graph structure of two three-dimensional objects and the true similarity between the two three-dimensional objects. The training module is used to train the graph neural network model using the training sample set with the goal of minimizing the difference between the similarity between two vector representations obtained by processing the graph structure of two three-dimensional objects in the training sample using the graph neural network model and the true similarity.
[0165] The determination module 630 may respectively calculate the similarity between the graphic representation and the graphic representations of other three-dimensional objects, and determine a target object that matches the three-dimensional object based on the similarity calculation result.
[0166] The three-dimensional object matching device 600 may further include a storage module. The storage module is used to store the graph representation of the three-dimensional object in a three-dimensional object database.
[0167] Figure 7 A schematic structural diagram of a three-dimensional object matching device according to another embodiment of the present disclosure is shown.
[0168] See also Figure 7 The three-dimensional object matching device 700 may include an acquisition module 710 and a determination module 720 .
[0169] The acquisition module 710 is used to obtain a graph representation of the three-dimensional object; the graph representation is obtained by processing the graph structure of the three-dimensional object using a pre-trained graph neural network model; the graph structure is obtained by using each face in the three-dimensional model of the three-dimensional object as a graph node, and connecting the graph nodes corresponding to the two faces adjacent to each line in the three-dimensional model with edges; the determination module 720 is used to determine the target object that matches the three-dimensional object based on the graph representation.
[0170] Combined with the above Figure 6The difference between the embodiments described above is that, in this embodiment, the acquisition module 710 can directly acquire the graphical representation of the three-dimensional object. The acquired graphical representation of the three-dimensional object can be obtained through real-time processing or read from a database. The graphical representation read from the database can be obtained in advance according to Figure 1 The above is obtained by processing steps S110 and S120.
[0171] The three-dimensional object matching device may further include functional modules, which can be referred to in conjunction with the above Figure 6 Description.
[0172] The three-dimensional object characterization method disclosed in the present invention may also be implemented as a three-dimensional object characterization device. Figure 8 The structure diagram of the three-dimensional object representation device according to one embodiment of the present disclosure is shown. The functional units of the three-dimensional object representation device can be implemented by hardware, software, or a combination of hardware and software that implements the principles of the present disclosure. It can be understood by those skilled in the art that Figure 8 The functional units described can be combined or divided into sub-units to implement the principles of the above invention. Therefore, the description herein can support any possible combination, division, or further limitation of the functional units described herein. The following is a brief description of the functional units that the three-dimensional object matching device can have and the operations that each functional unit can perform. For the details involved, please refer to the relevant description above, and no further description will be given here.
[0173] See also Figure 8 The three-dimensional object representation device 800 may include an acquisition module 810 and a processing module 820 .
[0174] The acquisition module 810 is used to acquire a graph structure corresponding to a three-dimensional object; the graph structure is obtained by using each face in the three-dimensional model of the three-dimensional object as a graph node and connecting the graph nodes corresponding to two faces adjacent to each line in the three-dimensional model with an edge. The processing module 820 is used to process the graph structure using a pre-trained graph neural network model to obtain a graph representation of the three-dimensional object.
[0175] In this implementation example, the acquisition module 810 corresponds to the above Figure 1 Step S110 described above, the processing module 820 corresponds to the above combined Figure 1 For details on the operations performed by the acquisition module 810 and the processing module 820, please refer to the above combined Figure 1 The relevant description will not be repeated here.
[0176] The training method of the graph neural network model disclosed in the present invention can also be implemented as a training device for a graph neural network model. Fig. 9The structure diagram of the training device of the graph neural network model according to one embodiment of the present disclosure is shown. The functional units of the training device can be implemented by hardware, software, or a combination of hardware and software that implements the principles of the present disclosure. It can be understood by those skilled in the art that Fig. 9 The functional units described can be combined or divided into sub-units to implement the principles of the above invention. Therefore, the description herein can support any possible combination, division, or further limitation of the functional units described herein. The following is a brief description of the functional units that the training device can have and the operations that each functional unit can perform. For the details involved, please refer to the relevant description above, which will not be repeated here.
[0177] See also Fig. 9 The training device 900 may include a sample acquisition module 910 and a training module 920 .
[0178] The sample acquisition module 910 is used to acquire a training sample set, where the training sample set includes one or more training samples, and any training sample includes a graph structure of two three-dimensional objects and a true similarity between the two three-dimensional objects;
[0179] The training module 920 is used to train the graph neural network model using the training sample set with the goal of minimizing the difference between the similarity between two graph representations obtained by processing the graph structure of two three-dimensional objects in the training sample using the graph neural network model and the true similarity.
[0180] For the training process and the structure of the graph neural network model, please refer to the relevant description above.
[0181] Fig.10 A schematic diagram of the structure of a computing device that can be used to implement the above-mentioned three-dimensional object matching method or three-dimensional object characterization method or model training method according to an embodiment of the present disclosure is shown.
[0182] See also Fig.10 , the computing device 1000 includes a memory 1010 and a processor 1020 .
[0183] The processor 1020 may be a multi-core processor or may include multiple processors. In some embodiments, the processor 1020 may include a general-purpose main processor and one or more special coprocessors, such as a graphics processing unit (GPU), a digital signal processor (DSP), etc. In some embodiments, the processor 1020 may be implemented using a customized circuit, such as an application-specific integrated circuit (ASIC) or a field programmable gate array (FPGA).
[0184] The memory 1010 may include various types of storage units, such as system memory, read-only memory (ROM), and permanent storage devices. Among them, ROM can store static data or instructions required by the processor 1020 or other modules of the computer. The permanent storage device may be a readable and writable storage device. The permanent storage device may be a non-volatile storage device that does not lose the stored instructions and data even after the computer is powered off. In some embodiments, the permanent storage device uses a large-capacity storage device (such as a magnetic or optical disk, flash memory) as a permanent storage device. In some other embodiments, the permanent storage device may be a removable storage device (such as a floppy disk, optical drive). The system memory may be a readable and writable storage device or a volatile readable and writable storage device, such as a dynamic random access memory. The system memory may store some or all instructions and data required by the processor at run time. In addition, the memory 1010 may include any combination of computer-readable storage media, including various types of semiconductor memory chips (DRAM, SRAM, SDRAM, flash memory, programmable read-only memory), and disks and / or optical disks may also be used. In some embodiments, the memory 1010 may include a readable and / or writable removable storage device, such as a laser disc (CD), a read-only digital versatile disc (such as a DVD-ROM, a double-layer DVD-ROM), a read-only Blu-ray disc, an ultra-density optical disc, a flash memory card (such as an SD card, a mini SD card, a Micro-SD card, etc.), a magnetic floppy disk, etc. The computer-readable storage medium does not include carrier waves and transient electronic signals transmitted wirelessly or wired.
[0185] The memory 1010 stores executable codes, and when the executable codes are processed by the processor 1020 , the processor 1020 can execute the three-dimensional object matching method or the three-dimensional object representation method or the model training method mentioned above.
[0186] The three-dimensional object matching method, three-dimensional object characterization method, model training method, device and equipment according to the present disclosure have been described in detail above with reference to the accompanying drawings.
[0187] In addition, the method according to the present disclosure may also be implemented as a computer program or a computer program product, which includes computer program code instructions for executing the above steps defined in the above method of the present disclosure.
[0188] Alternatively, the present disclosure may also be implemented as a non-temporary machine-readable storage medium (or computer-readable storage medium, or machine-readable storage medium) on which executable code (or computer program, or computer instruction code) is stored. When the executable code (or computer program, or computer instruction code) is executed by a processor of an electronic device (or computing device, server, etc.), the processor executes the various steps of the above-mentioned method according to the present disclosure.
[0189] Those skilled in the art will further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or a combination of both.
[0190] The flow charts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the system and method according to multiple embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0191] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.
Claims
1. A three-dimensional object matching method, characterized in that: include: Obtaining a graph structure corresponding to a three-dimensional object; The graph structure is obtained by using each face in the three-dimensional model of the three-dimensional object as a graph node and connecting the graph nodes corresponding to two faces adjacent to each line in the three-dimensional model with edges; Processing the graph structure using a pre-trained graph neural network model to obtain a graph representation of the three-dimensional object; Based on the graph representation, a target object matching the three-dimensional object is determined.
2. A three-dimensional object matching method, characterized in that: include: Obtaining a graph representation of the three-dimensional object; the graph representation is obtained by processing the graph structure of the three-dimensional object using a pre-trained graph neural network model; The graph structure is obtained by using each face in the three-dimensional model of the three-dimensional object as a graph node and connecting the graph nodes corresponding to two faces adjacent to each line in the three-dimensional model with edges; Based on the graph representation, a target object matching the three-dimensional object is determined.
3. A three-dimensional object characterization method, characterized in that: include: Obtaining a graph structure corresponding to a three-dimensional object; The graph structure is obtained by using each face in the three-dimensional model of the three-dimensional object as a graph node and connecting the graph nodes corresponding to two faces adjacent to each line in the three-dimensional model with edges; The graph structure is processed using a pre-trained graph neural network model to obtain a graph representation of the three-dimensional object.
4. A training method for a graph neural network model, characterized in that: The graph neural network model is used to process a graph structure of a three-dimensional object to obtain a graph representation of the three-dimensional object, wherein the graph structure is obtained by using each face in a three-dimensional model of the three-dimensional object as a graph node and connecting the graph nodes corresponding to two faces adjacent to each line in the three-dimensional model with edges, and the method comprises: Acquire a training sample set, wherein the training sample set includes one or more training samples, and any training sample includes a graph structure of two three-dimensional objects and a true similarity between the two three-dimensional objects; The graph neural network model is trained using the training sample set with the goal of minimizing the difference between the similarity between two graph representations obtained by processing the graph structures of two three-dimensional objects in the training samples using the graph neural network model and the true similarity.
5. A three-dimensional object matching device, characterized in that: include: An acquisition module, used for acquiring a graph structure corresponding to a three-dimensional object; The graph structure is obtained by using each face in the three-dimensional model of the three-dimensional object as a graph node and connecting the graph nodes corresponding to two faces adjacent to each line in the three-dimensional model with edges; A processing module, used to process the graph structure using a pre-trained graph neural network model to obtain a graph representation of the three-dimensional object; A determination module is used to determine a target object matching the three-dimensional object based on the graph representation.
6. A three-dimensional object matching device, characterized in that: include: An acquisition module, used to acquire a graph representation of a three-dimensional object; the graph representation is obtained by processing a graph structure of the three-dimensional object using a pre-trained graph neural network model; the graph structure is obtained by using each face in the three-dimensional model of the three-dimensional object as a graph node, and connecting the graph nodes corresponding to two faces adjacent to each line in the three-dimensional model with edges; A determination module is used to determine a target object matching the three-dimensional object based on the graph representation.
7. A three-dimensional object representation device, characterized in that: include: An acquisition module, used for acquiring a graph structure corresponding to a three-dimensional object; The graph structure is obtained by using each face in the three-dimensional model of the three-dimensional object as a graph node and connecting the graph nodes corresponding to two faces adjacent to each line in the three-dimensional model with edges; A processing module is used to process the graph structure using a pre-trained graph neural network model to obtain a graph representation of the three-dimensional object.
8. A training device for a graph neural network model, characterized in that: The graph neural network model is used to process a graph structure of a three-dimensional object to obtain a graph representation of the three-dimensional object, wherein the graph structure is obtained by using each face in the three-dimensional model of the three-dimensional object as a graph node and connecting the graph nodes corresponding to two faces adjacent to each line in the three-dimensional model with edges, and the device includes: A sample acquisition module, used to acquire a training sample set, wherein the training sample set includes one or more training samples, and any training sample includes a graph structure of two three-dimensional objects and a true similarity between the two three-dimensional objects; A training module is used to train the graph neural network model using the training sample set with the goal of minimizing the difference between the similarity between two graph representations obtained by processing the graph structures of two three-dimensional objects in the training samples using the graph neural network model and the true similarity.
9. A computing device comprising: processor; as well as A memory having executable codes stored thereon, which, when executed by the processor, causes the processor to execute the method according to any one of claims 1 to 4.
10. A non-transitory machine-readable storage medium having executable codes stored thereon, which, when executed by a processor of an electronic device, causes the processor to execute the method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Method and device for establishing node representation model, equipment and computer storage medium
CN112508115A
Key point detection method, training method, device, equipment, medium and product
CN115578393A
Node classification method for realizing heterogeneous primitive path aggregation based on graph convolution and self-attention mechanism
CN115828143A
Lightweight three-dimensional CAD model classification and retrieval method based on graph convolutional network
CN116187200A
Model training method and apparatus, model calling method and apparatus, computer device, and storage medium
WO2022141869A1
