Machine learning methods, neural networks and methods, programs, media and systems for use
By learning local deep CAD neural networks and calculating the local topology signature of the B-rep graph, the problem of difficulty in effectively dealing with the local topology structure of CAD objects in the existing technology is solved, and efficient CAD object retrieval and topological similarity evaluation are achieved.
Patent Information
- Application Number
- CN202411392153.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-10-05
- Filing Date
- 2024-10-08
- Publication Date
- 2025-04-08
AI Technical Summary
When calculating the global topology signature of CAD objects, existing deep CAD neural networks are difficult to effectively deal with local topology structures, resulting in efficiency and accuracy problems in CAD object retrieval and topological similarity evaluation.
A computer-implemented machine learning method is proposed to calculate the local topological signature of the B-rep graph by learning local deep CAD neural networks. This method learns how to output the local topological signature of each B-rep feature by training the dataset, including the transformed B-rep model.
It realizes efficient retrieval and topological similarity evaluation of local parts of CAD objects, improves computing efficiency and accuracy, and can quickly query databases with local topological signatures, reducing the demand for storage and CPU resources.
Smart Images

Figure CN119783745A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of computer programs and systems, and more particularly to methods, systems and programs for machine learning. Background Art
[0002] Many systems and programs for designing, engineering and manufacturing of objects are available on the market. CAD is an abbreviation for computer-aided design, for example, and relates to software solutions for designing objects. CAE is an abbreviation for computer-aided engineering, for example, and relates to software solutions for simulating the physical behavior of future products. CAM is an abbreviation for computer-aided manufacturing, for example, and relates to software solutions for defining manufacturing processes and operations. In such computer-aided design systems, graphical user interfaces play an important role in the efficiency of the technology. These technologies can be embedded in product lifecycle management (PLM) systems. PLM refers to a business strategy that helps companies share product data, apply common processes, and exploit company knowledge to develop products from concept to the end of their lifecycle, across the concept of the extended enterprise. The PLM solutions provided by Dassault Systèmes (trademarks CATIA, ENOVIA and DELMIA) provide: an engineering center for organizing product engineering knowledge; a manufacturing center for managing manufacturing engineering knowledge; and an enterprise center for achieving enterprise integration and connecting to engineering and manufacturing centers. In summary, the system provides an open object model that connects products, processes, and resources to enable dynamic, knowledge-based product creation and decision support to drive optimized product definition, manufacturing preparation, production, and service.
[0003] In this and other cases, solutions are needed to improve CAD object retrieval and assessment of topological similarity between CAD objects.
[0004] European patent application EP22306233.2 filed by Dassault Systèmes on August 17, 2022, provides a machine learning method for a deep CAD neural network, which provides an improved solution for CAD object retrieval. The learned deep CAD neural network is trained to encode a B-rep graph into a compact topological signature vector of the input B-rep, which captures the topology of the B-rep. Therefore, this neural network can be used for CAD object retrieval or topological similarity assessment between CAD objects. However, although this deep CAD neural network has improved CAD model retrieval and topological similarity assessment between CAD objects, it calculates a topological signature representing the topology of the entire input B-rep, that is, a global topological signature representing the global topology of the B-rep.
[0005] The purpose of this disclosure is to provide a machine learning solution to compute the local topological signature of a B-rep. Summary of the invention
[0006] Therefore, a computer-implemented machine learning method is provided. The method comprises: obtaining a training data set of a B-rep graph. Each B-rep graph represents a corresponding B-rep. Each B-rep graph comprises a graph node, each graph node represents an edge, a face or a co-edge of a corresponding B-rep, and is associated with one or more geometric and / or topological signatures. Each B-rep graph also comprises a graph edge, each graph edge is between a corresponding first graph node representing a corresponding co-edge and a corresponding second graph node representing a face, an edge, an adjacent co-edge or a matching co-edge associated with the corresponding co-edge. The method also comprises: learning a local deep CAD neural network based on the training data set. The local deep CAD neural network is configured to take a B-rep graph as input and output a local topological signature of a B-rep element represented by the graph node for each graph node of the input B-rep graph.
[0007] The method may include one or more of the following features:
[0008] - Obtain a training dataset of B-rep graphs, including:
[0009] ○ For each initial B-rep model in the initial B-rep model set, perform one or more of the following transformations:
[0010] ■Surface geometry modification,
[0011] ■Edge geometry modification,
[0012] ■Surface removal,
[0013] ■Edge removal, and / or
[0014] ■Add pads or holes to the surface,
[0015] The training dataset consists of pairs of B-rep graphs, each pair of B-rep graphs includes a B-rep graph of an initial B-rep and a B-rep graph obtained by applying one or more transformations to the initial B-rep, and learning the deep CAD neural network includes, for each feature pair in the initial B-rep, minimizing a loss that penalizes:
[0016] = a difference between two similarities, each of which is a similarity between a local signature output by the neural network for one element of the pair of elements and a local signature output by the neural network for the corresponding element in the B-rep obtained by applying one or more transformations to the initial B-rep; and
[0017] = the difference between two distances, each of which represents a distance between one element of the pair of elements and a corresponding element in the B-rep obtained by applying one or more transformations to the initial B-rep and is used to measure the distance between the corresponding element and the closest modified element in the B-rep obtained by applying one or more transformations to the initial B-rep;
[0018] The losses are of the following types:
[0019]
[0020] in:
[0021] ○(F1; F2) is a pair of B-rep elements F1 and F2 of the initial B-rep;
[0022] o F′1 and F′2 are the elements corresponding to F1 and F2 in the B-rep obtained by applying one or more transformations to the initial B-rep;
[0023] ○ is the distance between F′1 and the closest modified element in a B-rep obtained by applying one or more transformations to said initial B-rep;
[0024] ○ is the distance between F′2 and the closest modified element in a B-rep obtained by applying one or more transformations to the initial B-rep;
[0025] ○ and are the local signatures of F1, F′1, F2 and F′2 respectively;
[0026] ○ margin is constant; and
[0027] ○sim is a function that measures the similarity between two vectors;
[0028] -sim is the cosine similarity function;
[0029] - the distance between an element of an initial B-rep and a corresponding element in a B-rep obtained by applying one or more transformations to said initial B-rep is the length of a path between said corresponding element in a B-rep obtained by applying one or more transformations to said initial B-rep and the closest modified element in a B-rep graph of said B-rep obtained by applying one or more transformations to said initial B-rep;
[0030] - the local deep CAD neural network comprises a convolution unit configured to perform kernel concatenation to concatenate the feature vector of each common edge with the feature vector of its neighboring B-rep elements according to the kernel of the neural network;
[0031] - the convolution unit is further configured to pass each concatenated feature vector of the common edge obtained by the kernel concatenation as input to the dense neural network;
[0032] - the convolution unit is further configured to calculate a new edge feature vector, a new face feature vector and a new co-edge feature vector for each vector output by the dense neural network for the input co-edge concatenated feature vector;
[0033] - the dense neural network, for the input cascade feature vector φ of the common edge c obtained by cascading the kernel c (i) , output:
[0034]
[0035] in, have the same dimension h, such that The dimension of is 3*h, and for each common edge c, each face F and each edge E, the new eigenvector is,
[0036]
[0037] in:
[0038] ○ is the output of the dense neural network for the common edge c The new common edge features calculated;
[0039] ○ is the new edge feature calculated for edge E, where and The eigenvectors corresponding to the two associated co-edges of edge E;
[0040] ○ is the new surface feature calculated for surface F, where corresponding to the k associated common edge features of face F, and / or
[0041] -The local deep CAD neural network is configured to repeatedly apply the convolution unit a predetermined number of times.
[0042] A neural network that can be learned according to the method is also provided, i.e. a computer-implemented neural network data structure having weights of a neural network learned by the method. The provided neural network can be directly learned by the method, for example, and its weights have been fixed by the learning step of the method.
[0043] A method for using a neural network is also provided. The method includes obtaining a B-rep graph representing a B-rep. The method also includes applying the neural network to the B-rep graph to obtain local topological signatures of elements of the B-rep.
[0044] A computer program is also provided, comprising instructions for executing the method and / or the method of use.
[0045] A computer-readable storage medium having a computer program and / or a neural network recorded thereon is also provided.
[0046] A computer system is also provided, comprising a processor coupled to a memory, wherein the memory has recorded thereon the above-mentioned computer program and / or the above-mentioned neural network.
[0047] Also provided is a device comprising a data storage medium having recorded thereon the computer program and / or the neural network.
[0048] The device may form or be used as a non-transitory computer-readable medium, for example on a SaaS (Software as a Service) or other server, or cloud-based platform, etc. The device may optionally include a processor coupled to a data storage medium. Thus, the device may form a computer system in whole or in part (e.g., the device is a subsystem of the entire system). The system may also include a graphical user interface coupled to the processor. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Non-limiting examples will now be described with reference to the accompanying drawings, in which:
[0050] - Figures 1 to 10 These methods are shown; and
[0051] - Fig.11 An example of a system is shown. DETAILED DESCRIPTION
[0052] A computer-implemented machine learning method is proposed. The method includes obtaining a training data set of a boundary representation (B-rep) graph. Each B-rep graph represents a corresponding B-rep. Each B-rep graph includes a graph node, each graph node represents an edge, face or co-edge of the corresponding B-rep, and is associated with one or more geometric and / or topological features. Each B-rep graph also includes a graph edge, each graph edge connects a corresponding first graph node and a second graph node, wherein the first graph node represents a corresponding co-edge, and the second graph node represents a face, edge, adjacent co-edge or mating co-edge associated with the corresponding co-edge. The method also includes: based on the training data set, learning a local deep CAD neural network. The local deep CAD neural network is configured to: take the B-rep graph as input, and output a local topological signature of the B-rep element represented by the graph node for each graph node of the input B-rep graph. This method can be referred to as a "learning method".
[0053] The described learning method results in an improved solution for topological similarity assessment of CAD models.
[0054] In particular, the learning method learns a local deep CAD neural network, which is configured to: take a B-rep graph as input, which is a graph that records the topology of a B-rep model (i.e., a boundary representation model) of a product; and, for each graph node of the input B-rep graph, calculate the local topological signature of the B-rep element represented by the graph node. The local topological signature of each element is a vector (e.g., dimension D=128) output by the local deep CAD neural network, which is further used to process the input B-rep graph through the layers of the neural network, and thereby form a vector representation of the element of the input B-rep graph. Currently, such a vector is obtained by processing the input B-rep graph through the layers of the local deep CAD neural network. Such a graph represents the geometry and topology of the B-rep, especially at the local level (i.e., at the level of each element of the B-rep), because it includes graph nodes representing the elements of the B-rep (edges, faces, common edges) and graph edges representing the topological relationships between the elements represented by the nodes connected by the edges. The graph also includes topological and / or geometric features of the underlying B-rep, i.e., feature vectors that encapsulate topological and / or geometric information. In other words, the input B-rep graph is a data structure that describes the geometry and topology of the B-rep, especially at a local level, and the local deep CAD neural network learned by the method takes such a graph as input and extracts local topological signatures of the elements of the input B-rep graph from it (because the network is trained / learned to do so). In other words, the learning method learns a neural network that is configured to encode the B-rep graph as a set of compact local topological signature vectors of the B-rep elements to record the topology of these elements and therefore the local topology of the B-rep.
[0055] The learning method and local deep CAD neural network differ from the method and deep CAD neural network disclosed in the previously cited European patent application EP22306233.2 in that the local deep CAD neural network is trained by the method to be able to output local topological signatures, each local topological signature representing the local topology of a corresponding element of the B-rep represented by the input B-rep graph. The deep CAD neural network disclosed in the previously cited European patent application EP22306233.2 is trained by the learning method disclosed therein to output a global topological signature representing the global topology of the B-rep represented by the input B-rep graph.
[0056] The learning method can thus be used for local CAD object retrieval (i.e. retrieval of local parts of a CAD object) or local similarity assessment between CAD objects (i.e. assessment of similarity between local parts of a CAD object), or more generally for local manipulation of CAD objects by using local topological signatures of the CAD objects. In other words, the learned local deep CAD neural network can be used for such tasks. In practice, a CAD model or object is a feature-based object represented by a feature tree from which a B-rep representation of the model can be generated (i.e. by executing the feature tree). The neural network is trained to find the topological signatures of local elements of such a CAD model and thus allows to manipulate these local elements of the CAD model by using their signatures.
[0057] The neural network can be used, for example, to find local signatures of two elements of a single CAD model or two CAD models, to compare them and evaluate the topological similarity between them, and thus find local topological similarity between two CAD models or within a single CAD model. For example, this can be used to search for local elements of CAD models (e.g., faces) in a CAD model database, which already includes local topological signatures of elements of CAD models in the database: for a given local element of a CAD model of interest, the learned neural network can be used to extract the topological signature of the element and query the database based on the signature. This allows retrieval of the CAD model element that is closest to the topological signature of a given CAD model in a database with topological signatures. Such retrieval can be used for CAD model design (i.e., designing a CAD model representing a manufactured product, which can be manufactured downstream of the method) to quickly replace local parts of CAD models with topologically similar ones, because the use of signatures allows fast queries in the database and fast and efficient retrieval of similar CAD model elements. The local topological signatures actually form a representation of the CAD model elements that is less expensive than the corresponding B-rep model or graph in terms of memory requirements (storage, memory usage) during use / operation and in terms of CPU resources, which makes the local topological signatures a computer object that allows CPU-efficient and memory-efficient operation of the CAD model. For example, each local signature can be a vector of relatively small dimensions (e.g., 64 or 128) while still providing good performance due to the fact that the input B-rep graph is topologically accurate. In other words, the method is thus a machine learning method for finding a local compact topological vector representation for the local elements of a given B-rep that is more efficient than the B-rep itself in terms of memory and CPU required for operation.
[0058] The learned neural network can also be used to detect B-rep elements (e.g., faces) with the same or similar topological signatures in a single B-rep model. For example, the neural network can be used to calculate all local topological signatures of B-rep elements (e.g., faces), based on which the element with the local topological signature that is most similar to the signature of a given element (e.g., in terms of the value of cosine similarity) can be identified.
[0059] The method and the use of the method also provide the following advantages:
[0060] - Allows fast queries using such signatures in databases with local topological signatures;
[0061] - Space efficiency: signatures are lightweight;
[0062] - The method is learned using an unlabeled B-rep dataset; and
[0063] - Deep learning on B-rep graphs for automatic local topology-aware retrieval. The advantage of working directly on this format is that it avoids losing any geometric information (due to approximation) or discarding topological information.
[0064] This learning method is suitable for machine learning.
[0065] As is known in the art of machine learning itself, the processing of inputs by a neural network comprises applying an operation to the input, the operation being defined by data including weight values. Thus, learning a neural network comprises determining the values of weights based on a data set configured for such learning, such data set being referred to as a learning data set or a training data set. To this end, the data set comprises data segments, each of which forms a respective training sample. The training samples represent the diversity of situations to which the neural network may be applicable after learning. Any training data set herein may comprise a plurality of training samples higher than 1000, 10000, 100000 or 1000000. In the context of the present disclosure, by "learning a neural network based on a data set", it is meant that the data set is a learning / training data set for the neural network, based on which the values of weights (also referred to as "parameters") are set.
[0066] In the context of learning methods, the training dataset is the dataset of B-rep graphs provided, which is now discussed. However, this does not exclude any preprocessing of this dataset before learning / training. Before discussing how to provide the dataset, let's first discuss the data structures involved.
[0067] "B-rep", also known as "B-Rep", stands for "Boundary Representation". In CAD applications, B-rep is the most common type of modeling. B-rep is a mathematically accurate representation of a three-dimensional object. This representation defines a solid as a collection of connected surface features that define the boundaries between interior and exterior points. There are two kinds of information in B-rep: topological components and the geometric definition of these components. Topological components include vertices, edges, and faces that define the surface of a three-dimensional object, as well as the connections between them. In addition to connectivity, topological information also includes the orientation of edges and faces, while geometric information usually consists of mathematical equations that describe vertices, edges, and faces (points, curves, and surfaces, respectively).
[0068] A B-rep (i.e., boundary representation) is a 3D representation of a mechanical part. Specifically, a B-rep is a persistent data representation that describes a 3D modeled object that represents the mechanical part. The B-rep may be the result of a calculation and / or a series of operations performed at the stage of designing a 3D modeled object representing the mechanical part. The shape of the mechanical part, when represented as a modeled object, is the B-rep displayed on a computer screen (e.g., a tessellation). In the example, the B-rep represents a portion of a modeled object.
[0069] B-Rep includes topological entities and geometric entities. Topological entities are: faces, edges and vertices. Geometric entities are three-dimensional objects: surfaces, planes, curves, lines, points. By definition, a face is a bounded part of a surface, called the supporting surface. An edge is a bounded part of a curve, called the supporting curve. A vertex is a point in three-dimensional space. Their relationship to each other is as follows. The bounded part of a curve is defined by two points (vertices) located on the curve. The bounded part of a surface is defined by its boundary, which is a set of edges located on the surface. The boundaries of the edges of a face are connected by shared vertices. Faces are connected by shared edges. If two faces share an edge, they are adjacent. Similarly, if two edges share a vertex, they are adjacent. In a CAD system, B-Rep collects the "is bounded by" relationship between topological entities and supporting geometry, and between topological entities and mathematical descriptions of supporting geometry, in an appropriate data structure. The internal edges of a B-Rep are edges that are shared by exactly two faces. By definition, a boundary edge is not shared, it only defines one face. By definition, a boundary face is defined by at least one boundary edge. A B-Rep is called closed if all its edges are interior edges. A B-Rep is called open if it includes at least one boundary edge. Closed B-Reps are used to model thick 3D bodies because they define the interior of the (virtual) space that encloses the material. Open B-Reps are used to model 3D skins, which represent 3D objects whose thickness is small enough to be negligible.
[0070] The key advantage of B-Rep over any other type of representation used in CAD modeling is its ability to accurately represent arbitrary shapes. All other representations in use, such as point clouds, distance fields and meshes, approximate the shape to represent it through discretization. On the other hand, B-Rep contains surface equations that represent the exact design and therefore constitutes a true "master model" for further manufacturing, whether it is generating toolpaths for CNC or discretizing to the correct sample density for a given 3D printer technology. In other words, by using B-Rep, the 3D model can be an accurate representation of the manufactured object. B-Rep is also advantageous for simulating the behavior of 3D models. In terms of stress, thermal, electromagnetic or other analysis, it supports local refinement of the simulation mesh to record physical phenomena, while in terms of kinematics, it supports the modeling of real contacts between surfaces. Finally, B-Rep allows for a smaller memory and / or file footprint. First, because the representation contains surfaces based only on parameters. In other representations such as meshes, the equivalent surface contains up to thousands of triangles. Second, because B-Rep does not contain any history-based information.
[0071] In addition to vertices, faces and edges, each B-rep in this article also includes co-edges. Co-edges are oriented edges, that is, the edges of the B-rep have additional orientation information. Co-edges thus define the ordering and face adjacency around the B-rep face, that is, they define the topology of the B-rep. Co-edges connect B-rep entities together. Each co-edge has a parent face (that is, the face whose boundary is defined by the co-edge), a parent edge (that is, by definition, the co-edge is an oriented edge and therefore has a parent edge), a mating co-edge (which has the same parent edge as the co-edge), a lower co-edge (corresponding to the next co-edge in the ring to which the co-edge belongs), and an upper co-edge (corresponding to the previous co-edge in the ring to which the co-edge belongs). Each co-edge maintains an adjacency relationship with the lower and upper co-edges around its parent face, the mating co-edges on adjacent faces, the parent face, and the parent edge. Figure 1 An example of the co-edge interaction between two faces of a cube (F: face, E: edge, C: co-edge, N: lower interaction, M: mating interaction, PF: parent face, PE: parent edge) and other entities is shown.
[0072] Each B-rep graph in this article is a graph representation of a corresponding B-rep, and includes graph nodes and graph edges. Each graph node represents a corresponding edge, a corresponding face, or a corresponding co-edge of a corresponding B-rep. This means that for each edge of a B-rep, there is a corresponding graph node; for each face of a B-rep, there is a corresponding graph node; for each co-edge of a B-rep, there is a corresponding graph node. Each graph node also includes geometric and / or topological features associated with the graph node (i.e., attached to the graph node). The feature is data associated with a node, such as a vector (also called a feature vector), and describes geometric data and / or topological data used to characterize the B-rep elements represented by the graph node. Table 1 below shows, according to an example of the method, for each B-rep entity (edge, co-edge, or face), a list of names of geometric and / or topological elements included in a feature vector attached to the corresponding graph node, and a description of each geometric and / or topological element. The numbers between brackets represent the dimensions of the corresponding vector.
[0073]
[0074]
[0075] Table 1: Examples of geometric and / or topological feature vectors
[0076] The features in the above example shown in Table 1 are invariant to the rotation and translation of the CAD model. Figure 2 The disentanglement of geometric and topological features is shown, showing two B-rep models that are very similar in geometry but very different in topology.
[0077] The graph also includes graph edges. Each graph edge connects two corresponding graph nodes, namely a corresponding first node and a second node. The first graph node represents a corresponding common edge. The second graph node represents one of the following:
[0078] - the face associated with the corresponding co-edge (i.e. the parent face of the co-edge, the face whose boundary this co-edge defines),
[0079] -edge (i.e., the parent edge of the co-edge),
[0080] - adjacent common edges (i.e., lower common edges or upper common edges, i.e., lower common edges or upper common edges in the ring to which the common edges belong), or
[0081] - Mating coedges (i.e., coedges that have the same parent edge as this coedge).
[0082] Obtaining a training data set may include creating a training data set, i.e., creating or generating a B-rep graph. Creating / generating a B-rep graph may include:
[0083] - obtaining (e.g., retrieving or downloading from (e.g., remote) storage or a server or a B-rep database) a B-rep encoded as a B-rep file (e.g., an already designed CAD model), which may be a STEP file;
[0084] - transforming (by any known method) the B-rep file into an initial B-rep graph, where the graph nodes are the topological components of the B-rep and the edges represent the interactions between them;
[0085] - extracting geometric parameters from the B-rep file and calculating topological and / or geometric features; and
[0086] -Integrate the calculated features into the initial B-rep graph to form the B-rep graph in the training dataset.
[0087] Alternatively, obtaining the training data set may include retrieving or downloading the B-rep graph from a (eg, remote) memory, server, or database.
[0088] Regardless of whether the method is to generate or retrieve the B-rep graph of the training data set, these graphs (or the initial B-rep graph discussed later) can represent the B-rep in the PartSupply data set, and in implementation can come from the 170,000 STEP files in the data set. In addition, the training data set can be unlabeled.
[0089] In addition to obtaining a training data set, the method also includes learning a local deep CAD neural network based on the training data set. Learning means that the method feeds the B-rep graph of the training data set as input to the neural network, and as long as the neural network does not output an output that is sufficiently satisfactory (e.g., relative to a suitable convergence criterion, e.g., relative to loss optimization, as discussed below), the weights of the neural network are modified. For the input B-rep graph and for each element of the B-rep represented by the input B-rep graph (i.e., edges, faces, and co-edges), the output of the neural network is a local topological signature of the element. Each local topological signature is an embedding vector output by the neural network for the corresponding element represented by each node of the input B-rep, which records the topology of the corresponding B-rep element to which it belongs.
[0090] Local deep CAD neural network is a deep neural network, also known as DNN. DNN is a set of powerful techniques for learning in neural networks, which is a programming paradigm inspired by biology, which enables computers to learn from observational data. In object recognition, the success of DNN is attributed to its ability to learn rich middle-level medium representations, rather than the manually designed underlying features (Zernike moments, HOG, Bag of Words, SIFT, etc.) used in other methods (min-cut, SVM, Boosting, Random Forest, etc.). More specifically, DNN focuses on end-to-end learning based on raw data. In other words, they are as far away from feature engineering as possible by completing end-to-end optimization from the beginning of the original features to the end of the label. DNN is discussed in the following references, DE Lumelhart, GE Hinton, RJ Williams, "Learning internal representations by error propagation, Parallel distributed processing: explorations in the microstructure of cognition", vol.1: foundations, MIT Press, Cambridge, MA, 1986, which is incorporated herein by reference.
[0091] The local deep CAD neural network can have the architecture of a classic graph convolutional network, for example, as discussed in the following reference, T.N. Kipf and M. Welling, "Semi-Supervised Classification with Graph Convolutional Networks", 2016, which is incorporated herein by reference. This architecture is particularly suitable because the input data of the local deep CAD neural network is a graph. The standard goal of such a model is to calculate an embedding vector for each node of the graph. These models are usually based on message passing: in order to calculate an embedding vector to describe the nodes of the graph, each node collects previous feature vectors from the neighborhood and passes them to the deep learning network. The local deep CAD neural network architecture may specifically be a deep learning model proposed in the following reference JG Lambourne, KD Willis, PK Jayaraman, A. Sanghi, P. Meltzer and H. Shayani, "BRepNet: A topological message passing system for solid models" CVPR 2021, which is incorporated herein by reference, and is based on the same principles as the classical graph convolutional network (as discussed in the previously cited reference TNKipf and M. Welling, "Semi-Supervised Classification with Graph Convolutional Networks", 2016), but with message passing based on co-edge topological interactions.
[0092] The local deep CAD neural network may include a convolution unit, which is a layer of the neural network where message passing occurs. The convolution unit is configured to perform kernel cascading. Kernel cascading cascades the feature vector of each co-edge with the feature vector of its neighboring B-rep elements according to the kernel of the neural network. As known in the field of machine learning itself, the kernel is a specified walk according to which the neural network cascades the features of the input, which are topological and / or geometric features here. The kernel cascades the features of each co-edge with the features of its neighbors according to this walk. The kernel walk can be a combination of the following five basic walk operations: lower co-edge, upper co-edge, mating co-edge, parent face and parent edge. Figure 3These operations are shown (PE: parent edge, PF: parent face, N: lower, P: upper, M: mate, C: co-edge, E: edge, F: face). The last two walk operations are terminal because they end up on entities that are not co-edges. The kernel can be {I, N, P, M, PE, PF} (I is the entity), that is, each co-edge concatenates its current feature vector with the current feature vectors of the lower co-edge, upper co-edge, mate co-edge, parent edge, and parent face, resulting in the following concatenated feature vectors (for each co-edge c):
[0093]
[0094] in, is the feature vector of entity k at step i.
[0095] The convolution unit can be further configured to pass the concatenated feature vector of each common edge obtained by the kernel concatenation as input to a dense neural network. The dense neural network is a deep neural network of multi-layer perception (MLP). The dense network can output (for each common edge c):
[0096]
[0097] in, have the same dimension h, such that The dimension is 3*h.
[0098] The convolution unit can also be configured to calculate a new edge feature vector, a new face feature vector, and a new co-edge feature vector for each vector output by the dense neural network for the input co-edge concatenation feature vector. For example, for the input co-edge c concatenation feature vector φ obtained by the kernel concatenation c (i) , the dense neural network can output:
[0099]
[0100] in, have the same dimension h, such that The dimension of is 3*h, and the new feature vector for each common edge c, each face F and each edge E can be
[0101]
[0102] in:
[0103] ● It is the output of the dense neural network for the common edge c The new common edge features calculated;
[0104] ● is the new edge feature calculated for edge E, where and The eigenvectors corresponding to its two associated common edges;
[0105] ● is the new surface feature calculated for surface F, where The features corresponding to its k associated common edges.
[0106] The computation of new feature vectors can be called "entity pooling" because this computation pools previously computed feature vectors (i.e., at the co-edge level) to obtain new features for faces, edges, and co-edge entities. The fact that this computation separates the intermediate vectors of the entities for pooling helps the neural network learn the specific features of each entity.
[0107] At the end of the convolution unit, the output may thus still be a graph in which a new feature vector is attached to each entity. The local deep CAD neural network may be configured to repeatedly apply the convolution unit a predetermined number of times, such as at least once (including only once), such as at least twice (including twice), such as at least three times (including three times). In other words, the method may stack several convolution units one after another. Just like stacking convolution layers in computer vision to increase the receptive field of the model, stacking convolution units helps each common edge see a larger part of the neighborhood, thereby helping to capture more global and / or complex features.
[0108] The local deep CAD neural network can then output all feature vectors attached to the graph, which are generated by applying the convolution unit one or more times (if necessary). These feature vectors are local topological signatures of the elements (also called entities) of the B-rep represented by the input B-rep graph. In other words, the local deep CAD neural network does not include any other units or modules above the convolution unit, and outputs the output of the convolution unit or its iteration.
[0109] Figure 4 An example of the global architecture of a local deep CAD neural network is shown, where three convolutional units are applied in succession before performing global pooling. Each convolutional unit performs kernel cascading, application of multi-layer perception (MLP), and entity pooling.
[0110] Learning can use a loss based on the distance to the modified feature. This is now discussed.
[0111] Specifically, in this case, obtaining a training data set of a B-rep graph may include, for each initial B-rep model in a set of initial B-rep models (obtaining the training data set may include providing an initial B-rep as an initial step), performing one or more of the following transformations:
[0112] -face geometry modification,
[0113] -Edge geometry modification,
[0114] -face removal,
[0115] - Edge removal, and / or
[0116] - add pads or holes to faces,
[0117] After performing these transformations, the training dataset consists of pairs of B-rep graphs, each pair comprising a B-rep graph of an initial B-rep and a B-rep graph of a B-rep obtained by applying one or more transformations to the initial B-rep.
[0118] This allows obtaining a training dataset containing a B-Rep model (or more precisely, a B-rep graph thereof) with pairs of entities / elements, with a quantifiable level of similarity between the neighborhoods of two entities (because the transformation that transforms one element into another is known). For each initial B-rep, the transformations listed above can be applied to a basic 10% of the entities of the initial B-rep (e.g., one transformation for each entity within this 10%). Obtaining the training dataset can include storing a plurality of entity pairs, each entity pair being formed by an initial entity and its transformation. Added or deleted faces and edges can be stored individually (i.e., not in pairs).
[0119] The distance of an element / entity to a modified element (DME) is the distance between the entity and the closest modified entity, i.e., the distance between the entity (as in the initial B-rep to which it belongs) and the modified entity (being the closest entity in the B-rep obtained by applying one or more transformations to the initial B-rep). The distance is the path length between the two entities in the B-rep graph of the initial B-rep. In other words, the B-rep graph of the initial B-rep (i.e., corresponding to the unmodified model) and the list of modified features are used to calculate the DME. Figure 5 The B-rep graph of B-rep and its transformations are shown. Figure 6 The DME of the entity of this B-rep is shown.
[0120] For each pair of entities in the training data set (an initial entity and its transformation), obtaining the training data set may include defining the DME of the pair as the DME of the entity after the modified B-Rep (i.e., generated by the transformation). Therefore, each training sample in the training data set may be a triple containing two entities and a DME, (F, F′, DME F / F′ ), where F is the entity from the B-Rep model O, and F' is the entity from the transformed B-Rep model O mod The same entity in DMEF / F′ Yes mod DME in F'.
[0121] Learning a deep CAD neural network may include, for each feature pair in the initial B-rep, minimizing a loss that penalizes:
[0122] - a difference between two similarities, the two similarities being respectively the similarity between a local signature output by the neural network for one of the pair of elements and a local signature output by the neural network for the corresponding element in the B-rep obtained by applying one or more transformations to the initial B-rep; and
[0123] - a difference between two distances, the two distances corresponding to each other between one of the elements of the pair and the corresponding element in the B-rep obtained by applying one or more transformations to the initial B-rep, and used to measure the distance between the corresponding element and the closest modified element in the B-rep obtained by applying one or more transformations to the initial B-rep.
[0124] By "penalizing the difference", it is meant that when this difference (which can be represented by a suitable distance, for example) is higher, the value of the loss is also higher. In order to minimize the loss, training aims to avoid or at least significantly reduce these high values.
[0125] The losses may be of the following types (eg, may be given by the following formula, for example, up to a certain proportion):
[0126]
[0127] in:
[0128] -(F1; F2) is a pair of B-rep elements F1 and F2 of the initial B-rep;
[0129] - F′1 and F′2 are the elements corresponding to F1 and F2 in the B-rep obtained by applying one or more transformations to the initial B-rep;
[0130] - is the distance between F′1 and the closest modified element in the B-rep obtained by applying one or more transformations to the initial B-rep;
[0131] - is the distance between F′2 and the closest modified element in the B-rep obtained by applying one or more transformations to the initial B-rep;
[0132] - and are the local signatures of F1, F′1, F2, and F′2, respectively, and K is the number of convolutional units in the neural network;
[0133] -margin is a constant, for example, margin=0.3; and
[0134] -sim is a function that measures the similarity between two vectors.
[0135] The above loss can make it so that, for a given pair of entities, if the entities on the modified B-Rep model are close to modification, the cosine similarity between the pair of entities is low. Therefore, the lower the DME, the lower the cosine similarity. In other words, if Then F1, F′1 is farther from the modified element than F2, F′2, so Compare In other words, the training objective can be expressed as:
[0136]
[0137] As previously described, the distance between an element of the initial B-rep and a corresponding element in the B-rep obtained by applying one or more transformations to the initial B-rep may be the length of the path between the corresponding element and the closest modified element in the B-rep obtained by applying one or more transformations to the initial B-rep in the B-rep graph of the B-rep obtained by applying one or more transformations to the initial B-rep. sim may be a cosine similarity function, defined for two vectors x and y by the following formula:
[0138]
[0139] A neural network that can be learned according to the learning method is also provided, i.e., a computer-implemented neural network data structure having weights of the neural network learned by the method. For example, a neural network is provided that can be directly learned by the method, and its weights are fixed by the learning step of the method.
[0140] A method for using a neural network is also provided. The method includes obtaining a B-rep graph representing a B-rep. The method also includes applying the neural network to the B-rep graph to obtain a local topological signature of a B-rep element.
[0141] The method of use can be used for local similarity search and CAD object retrieval between CAD models, i.e., for searching similar local B-rep elements (faces, edges) within the same B-rep or between two B-reps. In fact, the learned neural network generates local topological signatures from the input B-rep (CAD) objects. These local signatures embed local topological information. Therefore, topologically similar CAD model elements have or tend to have higher signature similarity.
[0142] The method of use may be used for local topological similarity search between two CAD models. In this case, the method of use may include:
[0143] - providing a first B-rep graph of the first B-rep and a second B-rep graph of the second B-rep;
[0144] - applying the neural network to the first B-rep graph and the second B-rep graph, thereby obtaining a first local topological signature for each element of the first B-rep and a second local topological signature for each element of the second B-rep; and
[0145] - Evaluating the similarity between the first local topological signature and the second local topological signature, for example to find the most similar pair of elements of the first B-rep and the second B-rep, or to find the element most similar to a given element.
[0146] In the above, the first B-rep and the second B-rep may be identical, in which case the method searches for local similarities within the same B-rep.
[0147] The method of use can be used for local topological similarity retrieval within the same CAD model. In this case, the method of use may include:
[0148] - Provide B-rep drawing of CAD model;
[0149] - applying a neural network to the B-rep graph to obtain a local topological signature for each element of the B-rep; and
[0150] - selecting one of the obtained local topological signatures (e.g., a face) and automatically evaluating the similarity of the selected signature with each of the other obtained signatures, thereby obtaining a topological similarity score between the element represented by the one signature (the element and / or its signature may be referred to as a "query item") and each of the other elements of the B-rep; and
[0151] - Automatically selecting the element most similar to the element represented by the one signature, for example by selecting all elements having a similarity score above a predetermined threshold, or by selecting the k elements with the highest similarity scores, where k>0 (for example, k>1).
[0152] The method of use may be used to retrieve local CAD object elements in a database by topological similarity search. In this case, the method of use may include:
[0153] -supply:
[0154] ○ A given B-rep graph for a given B-rep;
[0155] o A database of B-rep elements and / or CAD model elements (e.g. faces or edges) associated with these B-reps, each element in the database being associated with its local topological signature (i.e. already calculated, e.g. previously using a neural network)
[0156] - Applying a neural network to a given B-rep graph, thereby obtaining local signatures of the elements of the given B-rep;
[0157] - querying the database using at least one partial signature for an element of a given B-rep (e.g., performing one or more queries, each query using a partial signature); and
[0158] - For each element in the database, evaluate the similarity between the local signature of a given B-rep element and the local signature of this element.
[0159] The above method may also optionally include selecting the elements with the highest similarity (eg, k elements with the highest similarity, k>0, or elements with a similarity higher than a predefined threshold).
[0160] As described above, a database of B-rep elements with local topological signatures can be derived from signature calculations performed using a local deep CAD neural network. In other words, a method for forming a database of B-rep elements with local topological signatures is provided, the method comprising:
[0161] - providing a B-Rep or a B-Rep graph thereof, e.g., providing a B-Rep and generating a B-Rep graph;
[0162] -For each B-rep, a local deep CAD neural network is applied to its B-rep graph, thereby obtaining the local topological signatures of individual elements of the B-rep.
[0163] In all of the above examples of methods of use and methods of formation, providing a B-rep graph of a B-rep may include generating a B-rep graph as described above to provide a training data set in a learning method. Providing a database may include obtaining local topological signatures of at least some (e.g., all) models in a database by applying a local deep CAD neural network to the B-rep graphs of these models (i.e., providing a database may include generating). Evaluating the similarity between one signature and another may include calculating a cosine similarity between the two signatures, sometimes also referred to as a "similarity score" in this disclosure. Because calculating the similarity between two signatures is very fast, the results can be provided to a user in a very short time.
[0164] Figure 7 The result of querying 700 a database of 300 CAD models is shown. The most similar element retrieved is shown by reference numeral 710, and the "score" represents the cosine similarity.
[0165] FIG. 8A to FIG. 9 The following describes a case where the above-described method is used for local topological similarity retrieval within the same CAD model. Fig. 8A CAD model showing the components of the brake assembly. Fig. 8A and Figure 8B (corresponding to Fig. 8A As shown in the figure, the semi-cylinder is selected as the query. Fig. 9 The most similar features selected (i.e., features selected because they have a topological signature similar to that of the queried semi-cylinder) are shown. Those faces with a similarity score of 1 are shown in black, and those faces with a similarity score (strictly) between 0.98 and 1 are shown in gray. All other faces with a score below 0.85 are shown in white.
[0166] The learning method, the method for forming a database and the use method may be integrated into the same process, the process comprising: an offline phase including the learning method and the method for forming a database, and an online phase including the use method. Alternatively, the method for forming a database may be part of the online phase.
[0167] Fig.10 An embodiment of such a process is shown, which includes:
[0168] -Offline phase: This phase aims to train the model using the manufactured B-Rep objects. Note that this phase may be transparent to the end user. This phase includes:
[0169] --B-Rep graph generation: Implements the transformation pipeline from the original B-Rep training file to a graph, where the nodes of the graph are topological components and the edges represent the interactions between them. Data parsing includes geometric parameter extraction and feature calculation of different components;
[0170] --The neural network model is learned based on the training B-Rep graph. It consists of a model based on a B-Rep convolutional neural network that maps each topological feature into a signature; for example, topological features that are more similar in geometry and topology have more similar signatures. To this end, the DME (distance to modified features) discussed earlier is used to compare the similarity between pairs of features;
[0171] - Online phase, including the following: Given a B-Rep file, a B-Rep and selected entities on the B-Rep database, the data is first preprocessed to generate the corresponding B-Rep graph. Then, the trained model is applied to calculate the signatures of the input and database objects. Finally, the local regions that are most similar to the selected topological entities (faces or edges) of the input B-Rep in terms of signature similarity (distance) are obtained from the B-Rep in the search database.
[0172] The method is computer-implemented. This means that the steps (or substantially all steps) of the method are performed by at least one computer or any similar system. Therefore, the steps of the method are performed by a computer, which may be fully automatic, or semi-automatic. In an example, the triggering of at least some steps of the method may be performed by user-computer interaction. The level of user-computer interaction required may depend on the level of automation foreseen and balanced with the need to achieve the user's wishes. In an example, the level may be user-defined and / or predefined.
[0173] A typical example of a computer implementation of a method is to perform the method using a system suitable for this purpose. The system may include a processor coupled to a memory and a graphical user interface (GUI), the memory having recorded thereon a computer program including instructions for performing the method. The memory may also store a database. The memory is any hardware suitable for such storage and may include several physically distinct parts (e.g., one for the program and possibly one for the database).
[0174] Fig.11 An example of the system is shown, where the system is a client computer system, such as a user's workstation.
[0175] The client computer of the example includes a central processing unit (CPU) 1010 connected to an internal communication bus 1000, a random access memory (RAM) 1070 also connected to the bus. The client computer is also provided with a graphics processing unit (GPU) 1110, which is associated with a video random access memory 1100 connected to the bus. The video RAM 1100 is also known in the art as a frame buffer. A mass storage device controller 1020 manages access to mass storage devices such as a hard disk drive 1030. Mass storage devices suitable for tangibly embodying computer program instructions and data include all forms of non-volatile memory, including, for example, semiconductor memory devices such as EPROM, EEPROM and flash memory devices; magnetic disks such as internal hard disks and removable disks; magneto-optical disks. Any of the above may be supplemented or incorporated by a specially designed ASIC (application specific integrated circuit). A network adapter 1050 manages access to a network 1060. The client computer may also include a tactile device 1090 such as a cursor control device, a keyboard, etc. A cursor control device is used in the client computer to allow the user to selectively position the cursor at any desired location on the display 1080. In addition, the cursor control device allows the user to select various commands and input control signals. The cursor control device includes a plurality of signal generating devices for inputting control signals to the system. Typically, the cursor control device may be a mouse, and the buttons of the mouse are used to generate the signals. Alternatively or additionally, the client computer system may include a sensitive pad and / or a sensitive screen.
[0176] The computer program may include instructions executable by a computer, the instructions including means for causing the above-mentioned system to perform the method. The program may be recorded on any data storage medium, including the memory of the system. The program may be implemented, for example, in a digital electronic circuit, or in computer hardware, firmware, software, or in a combination thereof. The program may be implemented as a device, such as a product tangibly contained in a machine-readable storage device for execution by a programmable processor. The method steps may be performed by a programmable processor that executes a program of instructions to perform the functions of the method by operating on input data and generating output. The processor may therefore be programmable and coupled to receive data and instructions from a data storage system, at least one input device, and at least one output device, and to send data and instructions to a data storage system and at least one output device. The application may be implemented in a high-level procedural or object-oriented programming language, or, if desired, in an assembly or machine language. In any case, the language may be a compiled language or an interpreted language. The program may be a complete installer or an updater. The application of the program on the system in any case generates instructions for performing the method. Alternatively, the computer program may be stored and executed on a server in a cloud computing environment, which communicates with one or more clients via a network. In this case, the processing unit executes the instructions included in the program, so that the method is performed on the cloud computing environment.
Claims
1. A computer-implemented machine learning method, the method comprising: A training dataset of B-rep graphs is obtained, each B-rep graph represents a corresponding B-rep and includes: graph nodes, each graph node representing an edge, face, or co-edge of the corresponding B-rep and associated with one or more geometric and / or topological features; and Graph edges, each graph edge being between a corresponding first graph node and a corresponding second graph node, the first graph node representing a corresponding co-edge, and the second graph node representing a face, an edge, an adjacent co-edge, or a mating co-edge associated with the corresponding co-edge; and A local deep CAD neural network is learned based on the training data set, wherein the local deep CAD neural network is configured to take a B-rep graph as input and output a local topological signature of the B-rep element represented by each graph node of the input B-rep graph.
2. The method according to claim 1, wherein: The training data set for obtaining the B-rep graph includes: For each initial B-rep model in a set of initial B-rep models, one or more of the following transformations are performed: Surface geometry modification, Edge geometry modification, Face removal, Edge removal, and / or Add pads or holes to faces, The training data set consists of pairs of B-rep graphs, each pair of B-rep graphs includes a B-rep graph of an initial B-rep and a B-rep graph of a B-rep obtained by applying one or more of the transformations to the initial B-rep, Wherein, learning the deep CAD neural network includes, for each element pair in the initial B-rep, minimizing the loss that penalizes: a difference between two similarities, each of which is a similarity between a local signature output by the neural network for one element of the pair of elements and a local signature output by the neural network for a corresponding element in the B-rep obtained by applying one or more transformations to the initial B-rep; and a difference between two distances, each of which corresponds to a distance between one of the elements in the pair and a corresponding element in the B-rep obtained by applying one or more transformations to the initial B-rep, and is used to measure the distance between the corresponding element and the closest modified element in the B-rep obtained by applying one or more transformations to the initial B-rep.
3. The method according to claim 2, wherein: The types of losses described are: in: -(F1; F2) is a pair of B-rep elements F1 and F2 of the initial B-rep; - F′1 and F′2 are elements corresponding to F1 and F2 in the B-rep obtained by applying one or more transformations to the initial B-rep; - is the distance between F′1 and the closest modified element in the B-rep obtained by applying one or more transformations to the initial B-rep; - is the distance between F′2 and the closest modified element in the B-rep obtained by applying one or more transformations to the initial B-rep; - and are the local signatures of F1, F′1, F2 and F′2 respectively; -margin is a constant; and -sim is a function that measures the similarity between two vectors.
4. The method according to claim 3, wherein: The sim is the cosine similarity function.
5. The method according to any one of claims 2 to 4, wherein: The distance between an element of an initial B-rep and a corresponding element in a B-rep obtained by applying one or more transformations to the initial B-rep is the length of a path between the corresponding element and the closest modified element in the B-rep obtained by applying one or more transformations to the initial B-rep, in a B-rep graph of the B-rep obtained by applying one or more transformations to the initial B-rep.
6. The method according to any one of claims 1 to 5, wherein: The local deep CAD neural network includes a convolution unit configured to perform kernel cascading, which concatenates the feature vector of each common edge with the feature vector of its neighboring B-rep elements according to the kernel of the neural network.
7. The method according to claim 6, wherein: The convolution unit is also configured to pass each cascade feature vector of the common edge obtained by the kernel cascade as input to a dense neural network.
8. The method according to claim 7, wherein: The convolution unit is further configured to calculate a new edge feature vector, a new face feature vector and a new co-edge feature vector for each vector output by the dense neural network for the input concatenated feature vector of the input co-edge.
9. The method according to claim 8, wherein: For the cascade feature vector φ of the common edge c obtained by the kernel cascade, c (i) , the dense neural network outputs: in, have the same dimension h, such that The dimension of is 3*h, and for each common edge c, each face F and each edge E, the new eigenvector is, in: · is the output of the dense neural network for the common edge c The new common edge features calculated; · is the new edge feature calculated for edge E, where and The eigenvectors corresponding to its two associated common edges; · is the new surface feature calculated for surface F, where The features corresponding to its k associated common edges.
10. The method according to claim 6 or 9, wherein: The local deep CAD neural network is configured to repeatedly apply the convolution unit a predetermined number of times.
11. A neural network capable of learning according to the method of any one of claims 1 to 10.
12. A method for using the neural network according to claim 11, the method comprising: Obtaining a B-rep graph representing the B-rep; The neural network is applied to the B-rep graph to obtain local topological signatures of elements of the B-rep.
13. A computer program comprising instructions, when the instructions are executed on a computer, the computer performs the method according to any one of claims 1 to 10 and / or the method according to claim 12.
14. A computer-readable data storage medium having recorded thereon the computer program according to claim 13 and / or the neural network according to claim 11.
15. A computer system comprising a processor coupled to a memory, wherein the computer program according to claim 13 and / or the neural network according to claim 11 is recorded on the memory.
Citation Information
Patent Citations
Machine-learning for topologically-aware cad retrieval
EP4325388C0