Method, system and medium for generating a boundary representation model based on a structured implicit space
By encoding and decoding the geometric and topological information of the B-rep model in a structured latent space, the problems of model incoherence and missing topological information in the prior art are solved, and the efficient generation of topologically consistent boundary representation models is achieved.
Patent Information
- Application Number
- CN202510363432.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-26
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2045-03-26
AI Technical Summary
Existing B-rep model generation methods fail to learn geometric features and topological relationships simultaneously within a unified representation space, resulting in incoherent models, missing topological information, or the need for additional post-processing steps to correct errors.
The structured latent space method is adopted to encode continuous geometric information and discrete topological information of different primitive types to form a unified latent vector. The latent space diffusion model is trained by the latent vector, and the relationship between primitive types and their geometric and topological information is decoded to generate a boundary representation model.
By simultaneously encoding geometric features and topological information in a unified structured latent space, the topological consistency of the generated boundary representation model is ensured, thereby improving generation efficiency, reducing training complexity, and achieving a generation efficiency of over 82%.
Smart Images

Figure CN120493324B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer graphics processing technology, and in particular to a method, system, and medium for generating boundary representation models based on structured latent space. Background Technology
[0002] B-rep (Boundary Representation) models are the most basic shape representation format for CAD models, widely used in design, engineering, robotics, e-commerce, and other fields. However, because B-rep models simultaneously contain continuous geometric parameters (such as surfaces and curves) and discrete topological relationships, generating B-rep models based on deep learning faces many challenges.
[0003] However, the main drawback of existing B-rep model generation methods is that they fail to learn the geometric features and topological relationships of the B-rep model simultaneously in a unified representation space, resulting in incoherent generated models, missing topological information, or the need for additional post-processing steps to correct errors.
[0004] Therefore, existing technologies still have shortcomings. Summary of the Invention
[0005] The technical problem to be solved by this invention is to provide a method, system, and medium for generating boundary representation models based on structured latent space, addressing the aforementioned deficiencies of existing technologies. The technical solution adopted by this invention is as follows:
[0006] In a first aspect, the present invention provides a method for generating boundary representation models based on structured latent space, wherein the method includes:
[0007] Encode continuous geometric information and corresponding discrete topological information from different primitive types to form a unified and expressive latent vector, wherein the primitive types include surfaces, curves and points;
[0008] Decode the latent vectors in the structured latent space to recover all primitive types and the relationships between their geometric and topological information;
[0009] The latent space diffusion model is trained based on latent vectors, and a boundary representation model is generated based on the latent space diffusion model according to different input conditions.
[0010] In one implementation, the encoding is derived from continuous geometric information of different primitive types and corresponding discrete topological information, forming a unified and expressive latent vector, including:
[0011] Based on a preset variational autoencoder, geometric information of different primitive types and corresponding discrete topological information are encoded into the surface latent space to obtain the latent vector.
[0012] In one implementation, the method of encoding geometric information of different primitive types and corresponding discrete topological information into a surface latent space based on a preset variational autoencoder to obtain the latent vector includes:
[0013] Determine the sampling points of several surfaces and several curves;
[0014] Train a graph neural network to propagate curve features based on topological connectivity to surface primitives;
[0015] A series of self-attention layers are used to aggregate and exchange features in the latent space of each surface;
[0016] The topologically sensed surface latent space is mapped to the mean and variance of the Gaussian latent space using a multilayer perceptron, and latent vectors are sampled from the predicted mean and variance.
[0017] In one implementation, decoding the latent vectors in the structured latent space to recover the relationships between all primitive types and their geometric and topological information includes:
[0018] Based on a pre-defined neural intersection module, the relationship between curves and points based on the geometric and topological information of surface latent vectors is recovered, and the intersection of two surfaces is predicted.
[0019] The sampled latent vectors and intersecting curve features are determined, and a decoder network containing CNN and upsampling layers is used to reconstruct surface primitives and curve primitives.
[0020] In one implementation, the step of recovering the relationship between curves and points based on the geometric and topological information of surface latent vectors using a preset neural intersection module, and predicting whether two surfaces intersect, includes:
[0021] A series of self-attention layers are used to perform in-depth feature exchange on different surface latent vectors sampled from the structured latent space.
[0022] A series of cross-attention layers are used to exchange the features of two surfaces, where the latent vector of the first surface is used as the query vector, and the latent vector of the second surface is used as the key vector and value vector.
[0023] A multilayer perceptron layer is used to map the swapped features onto the corresponding curve features, and a binary classifier is trained to determine whether the two surfaces intersect.
[0024] In one implementation, training a latent space diffusion model based on latent vectors and generating a boundary representation model based on the latent space diffusion model according to different input conditions includes:
[0025] By randomly repeating the hidden vector, it is filled to a fixed length until the predefined maximum number of surface primitives is reached;
[0026] Using conditional vectors as constraints, random noise is denoised and mapped to target latent vectors, where the conditional vectors are feature vectors generated based on input conditions;
[0027] The latent space diffusion model is trained using a linear scheduler with a denoised diffusion probability model, and the loss function is set as the L2 loss between the target latent vector and the true latent vector.
[0028] In one implementation, the condition vector is used as a constraint, including:
[0029] If there are no input conditions, the condition vector is set to zero;
[0030] If the input conditions are single view, multiple view, or sketch, then for each input image, a pre-trained DINOv2 model is used to extract a 1024-dimensional feature vector. When there are multiple input images, position encoding is added to embed view pose information, and the feature vectors of all images are fused by mean. An MLP layer is used to map the feature vectors into a 256-dimensional conditional vector.
[0031] If the input condition is a sparse point cloud or a dense point cloud, then for the input point cloud data, the PointNet network is used to extract a 1024-dimensional feature vector, and then the MLP layer is used to map it into a 256-dimensional condition vector.
[0032] Secondly, embodiments of the present invention also provide a boundary representation model generation system based on structured latent space, wherein the system is used to implement the steps of the boundary representation model generation method based on structured latent space as described in any of the above schemes, and the system includes:
[0033] The latent vector encoding module is used to encode continuous geometric information and corresponding discrete topological information from different primitive types to form a unified and expressive latent vector. The primitive types include surfaces, curves, and points.
[0034] The latent vector decoding module is used to decode latent vectors in the structured latent space to recover all primitive types and the relationships between their geometric and topological information;
[0035] The boundary representation model generation module is used to train a latent space diffusion model based on latent vectors, and generate a boundary representation model based on the latent space diffusion model according to different input conditions.
[0036] Thirdly, embodiments of the present invention also provide a terminal, wherein the terminal includes a memory, a processor, and a boundary representation model generation program based on structured latent space stored in the memory and executable on the processor. When the processor executes the boundary representation model generation program based on structured latent space, it implements the steps of the boundary representation model generation method based on structured latent space in any of the above schemes.
[0037] Fourthly, embodiments of the present invention also provide a computer-readable storage medium, wherein the computer-readable storage medium stores a boundary representation model generation program based on structured latent space, and when the boundary representation model generation program based on structured latent space is executed by a processor, it implements the steps of the boundary representation model generation method based on structured latent space as described in any of the above schemes.
[0038] Beneficial Effects: Compared with existing technologies, this invention provides a boundary representation model generation method based on a structured latent space. First, this invention encodes continuous geometric information and corresponding discrete topological information from different primitive types to form a unified and expressive latent vector. The primitive types include surfaces, curves, and points. Then, the latent vectors in the structured latent space are decoded to recover the relationships between all primitive types and their geometric and topological information. Next, a latent space diffusion model is trained based on the latent vectors, and a boundary representation model is generated based on the latent space diffusion model according to different input conditions. This invention can simultaneously encode geometric features and topological information in a unified structured latent space, ensuring topological consistency of the generated boundary representation model, improving effectiveness, significantly increasing the efficiency of boundary representation model generation, and reducing training complexity. Attached Figure Description
[0039] Figure 1 A flowchart of a preferred embodiment of the boundary representation model generation method based on structured latent space provided by the present invention.
[0040] Figure 2 This is a schematic diagram of the encoding process of the variational autoencoder in the boundary representation model generation method based on structured latent space provided in the embodiments of the present invention.
[0041] Figure 3 This is a schematic diagram illustrating the relationship between the geometry and topology of curves and points based on surface latent vectors in the boundary representation model generation method based on structured latent space provided in the embodiments of the present invention, which is based on a neural intersection module to recover the relationship between the geometry and topology of curves and points based on surface latent vectors.
[0042] Figure 4 This is a schematic diagram of the architecture of the boundary representation model generation device based on structured latent space provided in an embodiment of the present invention.
[0043] Figure 5A schematic diagram of a terminal provided in an embodiment of the present invention. Detailed Implementation
[0044] To make the objectives, technical solutions, and effects of this invention clearer and more explicit, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0045] The flowchart shown in the attached diagram is for illustrative purposes only and does not necessarily include all content, operations, or steps, nor does it require execution in the described order. For example, some operations or steps can be broken down, combined, or partially merged, so the actual execution order may change depending on the actual situation.
[0046] It should be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0047] It should be understood that, in order to clearly describe the technical solutions of the embodiments of the present invention, the terms "first" and "second" are used in the embodiments of the present invention to distinguish identical or similar items with essentially the same function and effect. For example, "first control information" and "second control information" are only used to distinguish different control information and do not limit their order.
[0048] Those skilled in the art will understand that the words "first" and "second" do not limit the quantity or the order of execution, and that the words "first" and "second" do not necessarily imply that they are different.
[0049] It should also be understood that the term "and / or" as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0050] Currently available B-rep model generation methods mainly include the following:
[0051] 1. Step-by-step training methods: For example, BRepGen (a diffusion-based generation method) and SolidGen (a generation method based on Transformer and pointer networks that can directly synthesize B-rep models) train different decoders / generators to independently generate surfaces, curves, and vertices. However, these methods fail to explicitly encode topological relationships, resulting in topological inconsistencies in the generated B-rep models.
[0052] 2. Multimodal input-based methods: such as CAD-MLLM, which can generate B-rep models based on various inputs such as point clouds, images, and text, but its generation process still relies on multiple steps and lacks a unified representation space.
[0053] 3. Graph neural network-based methods, such as BRepNet and AutoMate, can capture complex topological relationships, but they still rely on multi-stage processing when generating B-rep models, resulting in high computational overhead.
[0054] Based on the existing B-rep model generation methods described above, the shortcomings of existing technologies can be summarized as follows:
[0055] 1. Lack of topological consistency: Existing methods typically generate different geometric elements of the B-rep model step by step, lacking overall topological constraints, which makes the generated model prone to problems such as curve breakage and vertex loss.
[0056] 2. High proportion of invalid B-rep models: Because the topological information is not effectively constrained during training, the efficiency of the generated B-rep models is low. For example, the efficiency of BRepGen is only about 50%.
[0057] 3. High computational overhead: Existing methods rely on multi-stage training, such as training the surface generator and curve generator separately, which makes the training process complex and the inference time long.
[0058] 4. Insufficient support for multimodal input: Existing B-rep model generation methods are usually limited to point cloud input and lack compatibility with multiple inputs such as text, images, and sketches.
[0059] To address the shortcomings of existing technologies, this embodiment provides a method for generating boundary representation models based on structured latent space. This method can be applied to terminals, such as computers, smart TVs, and mobile phones.
[0060] The boundary representation model generation method based on structured latent space proposed in this embodiment is a novel representation method for learning and generating computer-aided design (CAD) models, presented in the form of boundary representation (B-rep) models. This boundary representation method unifies the continuous geometric properties of B-rep primitives (such as surfaces and curves) and their discrete topological relationships in a structured latent space. This method is based on a simple observation: the topological connection between two surfaces is essentially closely related to the geometry of their intersection. This prior knowledge allows the topological learning of B-rep to be reformulated as a geometric reconstruction problem in Euclidean space.
[0061] Specifically, this embodiment eliminates curves, vertices, and all topological connections in the structured latent space, and learns to identify and extract curve geometry from a pair of surface primitives through a neural cross-connect network. Therefore, the overall structured latent space of this embodiment is defined only for surfaces, but it can completely encode the entire B-rep model, including the geometric information of the surfaces, curves, vertices, and their topological relationships.
[0062] The compact and holistic structured latent space proposed in this embodiment enables the design of the first diffusion-based B-rep generator, which can accept various types of input, including point clouds, single / multi-view images, 2D sketches, and text descriptions. The method based on this embodiment significantly reduces ambiguity, redundancy, and inconsistencies in the B-rep generation process and lowers the training complexity of previous multi-step B-rep learning pipelines. Furthermore, it far surpasses existing state-of-the-art methods in terms of B-rep generation efficiency, achieving an efficiency of 82%.
[0063] Specifically, such as Figure 1 As shown in the figure, the boundary representation model generation method based on structured latent space in this embodiment includes the following steps:
[0064] Step S100: Encode continuous geometric information and corresponding discrete topological information from different primitive types to form a unified and expressive latent vector, wherein the primitive types include surfaces, curves and points.
[0065] To obtain the structured latent vector z from the B-rep model s ,like Figure 2 As shown in the figure, this embodiment uses a preset variational autoencoder (VAE) to encode geometric information of different primitive types and corresponding discrete topological information into the surface latent space to obtain the latent vector.
[0066] Specifically, in the geometric encoding process, given m surfaces Sampling points and n curves First, a series of convolutional and downsampling layers are applied to the curved surface. and curve superior:
[0067] f s =E gs (S i ),f c =E gc (C i )
[0068] in and These are the geometric feature vectors of surfaces and curves. It's important to note that the feature dimension of the surface is designed to be 32 = 2 × 2 × 8, where 8 is the feature dimension. This is because keeping the arrangement of max pooling operations unchanged would lose the orientation information of the primitives; therefore, this embodiment retains a spatial resolution of 2 to distinguish the orientation of the primitives. This design is also used for all other feature vectors in the network.
[0069] Next, this embodiment trains a graph neural network. Based on topological connection relationship T SC The curve features propagate to the surface primitives:
[0070] f cs =GNN(f s ,f c ,T SC ),#(2)
[0071] in It is the feature vector of the surface primitives as they perceive curves. This example uses a series of self-attention layers. This involves aggregating and exchanging features in the latent space of each surface to capture long-term relationships, thereby further strengthening the feature vectors. Ultimately, this embodiment utilizes a multilayer perceptron (MLP): The topology-aware surface latent space is mapped to the mean and variance of a Gaussian latent space. Finally, the latent vector z can be sampled from the predicted mean and variance. s .
[0072] Step S200: Decode the latent vectors in the structured latent space to recover the relationships between all primitive types and their geometric and topological information.
[0073] One direct method for supervised training in existing approaches is to reconstruct surface primitives. L1-norm or L2-norm loss is applied between the reconstructed and output surfaces. However, this does not guarantee that the latent vectors will encode topological information and other primitives. To force the latent vectors to encode the structured information of the B-rep model, this embodiment designs a neural intersection module to recover the low-level primitives (curves and points) based on the surface latent vector z. s The relationship between geometry and topology, such as Figure 3 As shown.
[0074] Specifically, it is observed that the intersection of two surfaces is always constrained by their boundaries. This embodiment utilizes this observation to insert topological and curve information into the latent space. A pre-defined neural intersection module is used to recover the relationship between the geometric and topological information of curves and points based on the latent vectors of the surfaces, and to predict whether two surfaces intersect. Then, the sampled latent vectors and intersection curve features are determined, and a decoder network containing a CNN and upsampling layers is used to reconstruct the surface primitives and curve primitives.
[0075] Specifically, this embodiment first uses a series of We employ a self-attention layer to perform in-depth feature exchange on latent vectors from different surfaces sampled from the latent space. For each pair of latent vectors, we add a positional encoding based on surface order (whether it's the first or second surface) to ensure that intersection is constrained by this surface order. We then utilize a series of cross-attention layers. To further exchange the features of the two surfaces, the latent vector of the first surface is used as the query vector, while the second surface serves as the key and value vectors. Ultimately, this embodiment uses a... The multilayer perceptron maps the swapped features onto the corresponding curve features. This embodiment also trains a... A binary classifier is used to determine whether two surfaces intersect.
[0076] Decoding and Loss Function: Given the sampled latent vector z s and intersecting curve characteristics z c This embodiment uses a decoder network containing CNN and upsampling layers to reconstruct surface and curve primitives.
[0077]
[0078] in and The corresponding reconstructed surface and curve primitives.
[0079] The loss function in this embodiment consists of three parts:
[0080] L1 reconstruction loss of a surface and curve sampling points
[0081] Binary cross-entropy loss of an intersecting classifier
[0082] A KL regularization loss that forces latent vectors to follow a standard Gaussian distribution
[0083]
[0084] Where w1 = 1, w2 = 1e -1 w3=1e -6 It is the weight of each loss value, μ i σ represents the noise mean, indicating the average noise level. i The noise standard deviation represents the dispersion or fluctuation range of the noise. In this embodiment, a learning rate of 1e is used. -4The Adam optimizer is used to train the network until the validation loss converges. Meanwhile, since the number of intersecting sample pairs is far less than the total number of possible sample pair combinations, a balanced sampling strategy is employed to ensure that the number of positive and negative sample pairs is equal during training. During the inference phase, this embodiment uses an intersection classifier to predict the intersection of all sample pairs.
[0085] During the experiments, the implementation example revealed that the semi-curve structure plays a crucial role in the robust training of the network. Although the 16×3 sampling points uniformly distributed on the curve itself have directionality, directly applying the L1 loss function to the reconstructed curve and the input curve without considering the semi-curve structure will cause the network to learn a curve with a fixed directionality (this direction is randomly assigned during the data preparation phase). Although chamfer distance can be used instead of the L1 loss function, this method significantly increases computational overhead. More importantly, the directionality of the curve is essential for forming closed curve loops with accurate trimmed surfaces. Therefore, this implementation example trains the network to predict directional curves (semi-curves) based on the order of surface orientation. The direction of the semi-curve ground truth (GT) is defined according to the first surface in the surface. Specifically, when used as the outer boundary of a surface, the semi-curve should form a counterclockwise closed loop, while when used as the inner boundary of a hole, it should form a clockwise loop. If the order of the surface orientation is reversed, the predicted semi-curve direction should also be reversed accordingly.
[0086] Step S300: Train the latent space diffusion model based on the latent vector, and generate a boundary representation model based on the latent space diffusion model according to different input conditions.
[0087] This embodiment fills the latent vector to a fixed length by randomly repeating it until a predefined maximum number of surface primitives is reached. Then, a conditional vector is used as a constraint to map random noise denoising to the target latent vector, where the conditional vector is a feature vector generated based on input conditions. Finally, the latent space diffusion model is trained using a linear scheduler with a denoising diffusion probability model, and the loss function is set as the L2 loss between the target latent vector and the ground truth latent vector.
[0088] Based on the learned latent vector representation This embodiment trains a latent space diffusion model (LDM) to achieve B-rep model generation based on multiple input conditions, such as... Figure 3 As shown, this embodiment first uses a randomly repeated latent vector z s Fill it to a fixed length This continues until a predefined maximum number of surface primitives M is reached. Subsequently, this embodiment employs a standard Transformer architecture. Using a 256-dimensional conditional input c as a constraint, random noise is... Denoising mapping to target latent vector
[0089]
[0090] Among them, the condition vector This is a 256-dimensional feature vector generated based on the input conditions. When there are no input conditions, the condition vector is set to zero. If the input conditions are a single view, multiple views, or a sketch, a pre-trained DINOv2 model is used to extract a 1024-dimensional feature vector for each input image. When multiple input images exist, positional encoding is added to embed viewpoint and pose information, and the feature vectors of all images are fused using the mean. An MLP layer is then used to map the feature vectors into a 256-dimensional condition vector. If the input conditions are sparse or dense point clouds, a PointNet network is used to extract a 1024-dimensional feature vector for the input point cloud data, and this vector is then mapped into a 256-dimensional condition vector through an MLP layer.
[0091] This embodiment uses the Denoising Diffusion Probability Model (DDPM) linear scheduler to train the Latent Space Diffusion Model (LDM). The configuration parameters include: a beta parameter ranging from [0.0001, 0.02], a diffusion step size of 1000 steps, and a fixed learning rate of 1e^(-1 / 2). 4 The Adam optimizer. The loss function is set to predict the latent vector. The L2 loss between the latent vector z and the true value.
[0092] When the denoised latent vector is obtained Then, in this embodiment, it is input into the intersection module and the decoder network to finally generate the B-rep model (S,C,T). SC Similar to the workflow of prior methods such as SolidGe and BRepGen, the output is converted into a watertight CAD model via OpenCascade. For each surface and curve, a C2-smooth B-spline primitive is first fitted to the recovered sampling points. Then, the common endpoints of curves on the same surface are detected and connected as coils. It is important to note that each surface can have multiple coils; the largest coil defines the outer boundary of the surface, while the remaining coils define the inner holes. Directed coils are used to trim and recover the surfaces. Finally, all surfaces are stitched together into a watertight B-rep model.
[0093] Even with fixed input conditions, generative models exhibit randomness and diversity in their output boundary representation (B-rep) models. To improve the quality of generative models, this embodiment introduces a test-time augmentation strategy. For a given point cloud dataset, the generative model is run multiple times, each time applying different random noise to generate multiple candidate B-rep models. The chamfer distance between each candidate model and the input conditions is calculated, and the model with the smallest distance is selected as the final output. Thanks to the parallelizability of the denoising process and post-processing steps, the test-time augmentation strategy does not significantly increase the overall inference time.
[0094] This invention comprehensively evaluates the B-rep models generated by the method in this embodiment from aspects such as legality, light field distance, coverage, maximum average difference, JS divergence, cyclomatic complexity, and average curvature. The evaluation results of the B-rep models generated by the method of this invention without input conditions are shown in Table 1 below. A quantitative analysis and comparison of the results generated unconditionally on the DeepCAD dataset by DeepCAD, BRepGen, and the method of this invention are presented. All values are the average results of 10 runs, with 3000 models sampled from each method in each run and compared with 1000 real models in the test set.
[0095] Table 1
[0096]
[0097]
[0098] As can be seen, when there are no input conditions, the B-rep model generated by the method in this embodiment outperforms the B-rep models generated by DeepCAD and BRepGen methods in terms of validity, coverage, maximum average difference, JS divergence, cyclomatic complexity, and average curvature.
[0099] When input conditions exist, the evaluation of the B-rep model generated based on the method of this invention covers the following modalities: point cloud conditions, text conditions, and image conditions (multi-view / single-view / sketch). When the input condition is a point cloud condition, this invention uses unconditional generation novelty analysis based on light field distance to measure the similarity between the generated sample and the DeepCAD training set, as shown in Table 2. The lower the light field distance, the more similar the generated sample is to the training set (the lower the novelty).
[0100] Table 2
[0101]
[0102] The quantitative results of B-rep models generated from point cloud conditions on the DeepCAD dataset are shown in Table 3 below.
[0103] Table 3
[0104]
[0105] This demonstrates the ability to generate quantitative results from point cloud data under imperfect input conditions. The method in this embodiment remains competitive even when faced with different types of noise and data defects. Compared to other benchmark methods, the proposed holistic implicit representation fosters a more consistent relationship between topological structure and geometric shape, resulting in more reasonable generation effects.
[0106] Table 4 shows a detailed quantitative comparison of the point cloud conditional generation results from the DeepCAD dataset. Table 4 compares the number of vertices, curves, and faces in the generated samples with the baseline ground truth, and also includes the reconstruction accuracy and completeness metrics for single-primary geometry. This invention also additionally reports the precision and recall of the generated samples in both geometric and topological dimensions.
[0107] Table 4
[0108]
[0109] Qualitative results are generated based on the scanning point cloud conditions obtained by a structured light scanner. These point clouds typically suffer from 1) noise, 2) local missing data, and 3) misalignment issues caused by limitations of the scanning equipment and environment. Nevertheless, the method in this embodiment can still generate multiple reasonable candidate generation schemes even when the input point cloud has severe noise interference. Table 5 shows the quantitative results of the generated B-rep model when the input condition is an image.
[0110] Table 5
[0111]
[0112] In summary, the method of this invention achieves an efficiency of 82%–84% in generating B-rep models, while the efficiency of the existing BRepGen method is only around 50%. The overall latent space proposed in this invention explicitly encodes topological relationships, avoiding the topological inconsistency problem caused by unclear topological information in existing technologies. Furthermore, this invention avoids the error accumulation problem that occurs in the BRepGen method during the step-by-step generation process (surface → curve → vertex); this invention only requires a single training iteration to generate a complete B-rep model, reducing computational costs and improving efficiency. The method of this invention is compatible with multimodal inputs including point clouds, images, text, and sketches, while BRepGen mainly focuses on a single input modality and is difficult to adapt flexibly.
[0113] Based on the above embodiments, the present invention also provides a boundary representation model generation system based on structured latent space. The system is used to implement the steps of the boundary representation model generation method based on structured latent space as described in any of the above method embodiments, such as... Figure 4 As shown, the system includes: a latent vector encoding module 10, a latent vector decoding module 20, and a boundary representation model generation module 30. Specifically, the latent vector encoding module 10 is used to encode continuous geometric information and corresponding discrete topological information from different primitive types to form unified and expressive latent vectors. The primitive types include surfaces, curves, and points. The latent vector decoding module 20 is used to decode latent vectors in the structured latent space to recover the relationships between all primitive types and their geometric and topological information. The boundary representation model generation module 30 is used to train a latent space diffusion model based on the latent vectors and generate a boundary representation model based on the latent space diffusion model according to different input conditions.
[0114] The working principle of each module in the boundary representation model generation system based on structured latent space in this embodiment is the same as that of each step in the above method embodiment, and will not be repeated here.
[0115] The modules in the aforementioned boundary representation model generation system based on structured latent space can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of the terminal in hardware form or independent of it, or stored in the memory of the terminal in software form, so that the processor can call and execute the corresponding operations of each module.
[0116] Based on the above embodiments, the present invention also provides a terminal, the principle block diagram of which can be as follows: Figure 5 As shown. The terminal may include one or more processors 100 ( Figure 5 (Only one is shown in the image), memory 101, and computer program 102 stored in memory 101 and executable on one or more processors 100. For example, a boundary representation model generation program based on structured latent space. When one or more processors 100 execute computer program 102, they can implement the various steps in the embodiment of the boundary representation model generation method based on structured latent space. Alternatively, when one or more processors 100 execute computer program 102, they can implement the functions of various modules / units in the embodiment of the boundary representation model generation system based on structured latent space, without limitation here.
[0117] In one embodiment, the processor 100 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0118] In one embodiment, memory 101 may be an internal storage unit of an electronic device, such as a hard drive or RAM. Memory 101 may also be an external storage device of the electronic device, such as a plug-in hard drive, smart media card (SMC), secure digital (SD) card, flash card, etc. Furthermore, memory 101 may include both internal and external storage units. Memory 101 is used to store computer programs and other programs and data required by the terminal. Memory 101 can also be used to temporarily store data that has been output or will be output.
[0119] Those skilled in the art will understand that Figure 5 The block diagram shown is merely a partial structural diagram related to the present invention and does not constitute a limitation on the terminal to which the present invention is applied. A specific terminal may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0120] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, operational databases, or other media used in the embodiments provided by this invention can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual operating data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0121] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for generating boundary representation models based on structured latent space, characterized in that, The method includes: Encode continuous geometric information and corresponding discrete topological information from different primitive types to form a unified latent vector, wherein the primitive types include surfaces, curves and points; Decode the latent vectors in the structured latent space to recover all primitive types and the relationships between their geometric and topological information; The process includes training a latent space diffusion model based on latent vectors, and generating a boundary representation model based on the latent space diffusion model according to different input conditions, including: By randomly repeating the hidden vector, it is filled to a fixed length until the predefined maximum number of surface primitives is reached; Using conditional vectors as constraints, random noise is denoised and mapped to target latent vectors, where the conditional vectors are feature vectors generated based on input conditions; The latent space diffusion model is trained using a linear scheduler with a denoised diffusion probability model, and the loss function is set as the L2 loss between the target latent vector and the true latent vector. Use the condition vector as constraints, including: If there are no input conditions, the condition vector is set to zero; If the input conditions are single view, multiple view, or sketch, then for each input image, a pre-trained DINOv2 model is used to extract a 1024-dimensional feature vector. When there are multiple input images, position encoding is added to embed view pose information, and the feature vectors of all images are fused by mean. An MLP layer is used to map the feature vectors into a 256-dimensional conditional vector. If the input condition is a sparse point cloud or a dense point cloud, then for the input point cloud data, the PointNet network is used to extract a 1024-dimensional feature vector, and then the MLP layer is used to map it into a 256-dimensional condition vector.
2. The method for generating boundary representation models based on structured latent space according to claim 1, characterized in that, The encoding is derived from continuous geometric information of different primitive types and corresponding discrete topological information, forming a unified latent vector, including: Based on a preset variational autoencoder, geometric information of different primitive types and corresponding discrete topological information are encoded into the surface latent space to obtain the latent vector.
3. The method for generating boundary representation models based on structured latent space according to claim 2, characterized in that, The method of encoding geometric information of different primitive types and corresponding discrete topological information into the latent space of the surface based on a preset variational autoencoder to obtain the latent vector includes: Determine the sampling points of several surfaces and several curves; Train a graph neural network to propagate curve features based on topological connectivity to surface primitives; A series of self-attention layers are used to aggregate and exchange features in the latent space of each surface; The topologically sensed surface latent space is mapped to the mean and variance of the Gaussian latent space using a multilayer perceptron, and latent vectors are sampled from the predicted mean and variance.
4. The method for generating boundary representation models based on structured latent space according to claim 1, characterized in that, The decoding of latent vectors in the structured latent space to recover the relationships between all primitive types and their geometric and topological information includes: Based on a pre-defined neural intersection module, the relationship between curves and points based on the geometric and topological information of surface latent vectors is recovered, and the intersection of two surfaces is predicted. The sampled latent vectors and intersecting curve features are determined, and a decoder network containing CNN and upsampling layers is used to reconstruct surface primitives and curve primitives.
5. The method for generating boundary representation models based on structured latent space according to claim 4, characterized in that, The method of recovering the relationship between curves and points based on the geometric and topological information of surface latent vectors, and predicting whether two surfaces intersect, based on a preset neural intersection module, includes: A series of self-attention layers are used to perform in-depth feature exchange on different surface latent vectors sampled from the structured latent space. A series of cross-attention layers are used to exchange the features of two surfaces, where the latent vector of the first surface is used as the query vector, and the latent vector of the second surface is used as the key vector and value vector. A multilayer perceptron layer is used to map the swapped features onto the corresponding curve features, and a binary classifier is trained to determine whether the two surfaces intersect.
6. A boundary representation model generation system based on structured latent space, characterized in that, The system is used to implement the steps of the boundary representation model generation method based on structured latent space as described in any one of claims 1-5, and the system includes: The latent vector encoding module is used to encode continuous geometric information and corresponding discrete topological information from different primitive types to form a unified latent vector. The primitive types include surfaces, curves, and points. The latent vector decoding module is used to decode latent vectors in the structured latent space to recover all primitive types and the relationships between their geometric and topological information; The boundary representation model generation module is used to train a latent space diffusion model based on latent vectors, and generate a boundary representation model based on the latent space diffusion model according to different input conditions.
7. A terminal, characterized in that, The terminal includes a memory, a processor, and a boundary representation model generation program based on structured latent space stored in the memory and executable on the processor. When the processor executes the boundary representation model generation program based on structured latent space, it implements the steps of the boundary representation model generation method based on structured latent space as described in any one of claims 1-5.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a boundary representation model generation program based on structured latent space. When the boundary representation model generation program based on structured latent space is executed by a processor, it implements the steps of the boundary representation model generation method based on structured latent space as described in any one of claims 1-5.
Citation Information
Patent Citations
Three-dimensional model representation method and system for expressing geometric details and complex topology
CN110889893A
Implicit nerve characterization method based on geometric primitives
CN118864760A