Geometric modeling method, device, electronic device and storage medium
By optimizing the modeling parameters of the symbolic distance field through a three-dimensional convolutional neural network and a fully connected layer network, and reconstructing a three-dimensional geometric grid using the marching cube algorithm, the problems of low implicit geometric representation accuracy and low detail reconstruction accuracy in traditional methods are solved. High-precision geometric modeling.
Patent Information
- Application Number
- CN202410955627.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-17
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2044-07-17
AI Technical Summary
In existing three-dimensional geometric parametric modeling, it is difficult to optimize the high-resolution symbolic distance field based on the traditional expected value maximum algorithm, resulting in low accuracy of implicit geometric representation and low accuracy of detail reconstruction.
A three-dimensional convolutional neural network and a fully connected layer network are used to perform network training on the original symbolic distance field, and the modeling parameters of the quadratic kernel model are optimized until the loss function converges. The marching cube algorithm is used to reconstruct the three-dimensional geometric grid to improve the modeling accuracy. .
It improves the optimization capability of high-resolution symbolic distance fields, improves the accuracy of implicit geometric representation and detail reconstruction, and solves the problem that traditional methods are difficult to process high-resolution data.
Smart Images

Figure CN118505935B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data processing, and in particular to a geometric modeling method, device, electronic device and storage medium. Background Art
[0002] Geometric modeling is an important part of 3D animation and virtual-reality interaction. It aims to construct a suitable 3D data expression method to achieve high-precision geometric deformation and virtual-reality fusion in the 3D field.
[0003] In the related art, three-dimensional geometric parametric modeling is implemented based on the traditional expectation maximization algorithm. However, this algorithm is difficult to optimize high-resolution signed distance fields, that is, large input data, resulting in low accuracy of implicit geometric representation and low accuracy of detail reconstruction. Summary of the invention
[0004] The present disclosure provides a geometric modeling method, device, electronic device and storage medium.
[0005] According to the first aspect of the present disclosure, a geometric modeling method is provided. The method includes: obtaining an input original three-dimensional geometric mesh, extracting an original signed distance field of the original three-dimensional geometric mesh; initializing the modeling parameters of the secondary kernel model and the loss function of the network training based on the original signed distance field; performing network training on the original signed distance field through a three-dimensional convolutional neural network and a fully connected layer network to optimize the modeling parameters of the secondary kernel model until the loss function converges and the optimal modeling parameters are obtained; reconstructing the signed distance field based on the optimal modeling parameters, and reconstructing the three-dimensional geometric mesh of the signed distance field using a marching cubes algorithm.
[0006] In some embodiments, based on the original signed distance field, initializing the modeling parameters of the secondary kernel model and the loss function of the network training includes: randomly dividing the original signed distance field into K groups of data, where K is a positive integer; obtaining the mean vector, covariance matrix and weights of the K groups of data as the initial values of the modeling parameters of the secondary kernel model; reconstructing the signed distance field according to the initial values of the modeling parameters to obtain a reconstructed signed distance field; calculating the initial mean square error between the reconstructed signed distance field and the original signed distance field, and using the initial mean square error as the initial value of the loss function.
[0007] In some embodiments, the original signed distance field is trained through a three-dimensional convolutional neural network and a fully connected layer network to optimize the modeling parameters of the quadratic kernel model until the loss function converges to obtain the optimal modeling parameters, which includes: taking the original signed distance field as input for network training, optimizing the modeling parameters through a three-dimensional convolutional neural network and a fully connected layer network to obtain optimized modeling parameters; reconstructing the signed distance field for the optimized modeling parameters to obtain an optimized signed distance field, and calculating the mean square error between the optimized signed distance field and the original signed distance field; reconstructing a three-dimensional geometric mesh for the optimized signed distance field using a marching cubes algorithm to obtain an optimized three-dimensional geometric mesh, and calculating the Chamfer error between the optimized three-dimensional geometric mesh and the original three-dimensional geometric mesh; calculating the value of the loss function based on the mean square error and the Chamfer error, and determining the growth multiple of the loss function according to the value of the loss function and the initial value of the loss function; if the growth multiple of the loss function is less than a preset threshold, taking the optimized modeling parameters as the optimal modeling parameters, otherwise, continuing to optimize the modeling parameters through the three-dimensional convolutional neural network and the fully connected layer network.
[0008] In some embodiments, reconstructing the signed distance field for the optimized modeling parameters to obtain the optimized signed distance field includes: calculating the quadratic sum gate function and the quadratic kernel expectation based on the optimized modeling parameters; and reconstructing the signed distance field based on the quadratic sum gate function and the quadratic kernel expectation using a preset quadratic kernel gate function reconstruction framework to obtain the optimized signed distance field.
[0009] In some embodiments, the original signed distance field is used as input for network training, and the modeling parameters are optimized through a three-dimensional convolutional neural network and a fully connected layer network to obtain the optimized modeling parameters, including: using a three-dimensional convolutional neural network to perform convolution processing on the original signed distance field to obtain feature data of the original signed distance field; using a fully connected layer network to perform nonlinear transformation on the feature data to obtain the mean vector, covariance matrix and weights of the optimized K groups of data as the optimized modeling parameters.
[0010] In some embodiments, a marching cubes algorithm is used to reconstruct a three-dimensional geometric mesh from an optimized signed distance field, and obtaining the optimized three-dimensional geometric mesh includes: obtaining an initial three-dimensional geometric mesh, and for each edge of the initial three-dimensional geometric mesh, obtaining the signs of the signed distance fields of two vertices connected to the edge based on the optimized signed distance field; if the signs of the signed distance fields of the two vertices connected to the edge are different, performing interpolation calculations on the edge to obtain a position where the value of the signed distance field on the edge is 0; placing a third vertex at the position, constructing triangular faces between the vertices, and adding them to the initial three-dimensional geometric mesh, until the entire optimized signed distance field is traversed to obtain the optimized three-dimensional geometric mesh.
[0011] According to a second aspect of the present disclosure, a geometric modeling device is provided, including: an extraction module, used to obtain an input original three-dimensional geometric mesh and extract an original signed distance field of the original three-dimensional geometric mesh; an initialization module, used to initialize the modeling parameters of a secondary kernel model and a loss function of network training based on the original signed distance field; a learning module, used to perform network training on the original signed distance field through a three-dimensional convolutional neural network and a fully connected layer network to optimize the modeling parameters of the secondary kernel model until the loss function converges and the optimal modeling parameters are obtained; a reconstruction module, used to reconstruct the signed distance field based on the optimal modeling parameters, and use a marching cubes algorithm to reconstruct the three-dimensional geometric mesh of the signed distance field.
[0012] According to a third aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method of the aforementioned first aspect.
[0013] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable a computer to execute the method of the aforementioned first aspect.
[0014] According to a fifth aspect of the present disclosure, a computer program product is provided, comprising a computer program, and when the computer program is executed by a processor, the computer program implements the method of the aforementioned first aspect.
[0015] In summary, the geometric modeling method proposed in the present disclosure includes obtaining the input original three-dimensional geometric mesh, extracting the original signed distance field of the original three-dimensional geometric mesh; initializing the modeling parameters of the secondary kernel model and the loss function of the network training based on the original signed distance field; performing network training on the original signed distance field through a three-dimensional convolutional neural network and a fully connected layer network to optimize the modeling parameters of the secondary kernel model until the loss function converges and the optimal modeling parameters are obtained; reconstructing the signed distance field based on the optimal modeling parameters, and using the marching cubes algorithm to reconstruct the three-dimensional geometric mesh of the signed distance field. The present disclosure uses a three-dimensional convolutional neural network and a fully connected layer for network training to achieve the optimal modeling parameter set selection, and uses the network to learn three-dimensional geometry to perform high-precision data representation modeling, which can solve the problems of low implicit geometric representation accuracy and low detail reconstruction accuracy in related technologies.
[0016] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.
[0018] Figure 1 A schematic diagram of a flow chart of a geometric modeling method provided in an embodiment of the present disclosure;
[0019] Figure 2 A schematic flow chart of another geometric modeling method provided by an embodiment of the present disclosure;
[0020] Figure 3 A schematic diagram of a flow chart of a signed distance field reconstruction method provided by an embodiment of the present disclosure;
[0021] Figure 4 A schematic diagram of a flow chart of a three-dimensional geometric mesh reconstruction method provided in an embodiment of the present disclosure;
[0022] Figure 5 A schematic diagram of the structure of a geometric modeling device provided in an embodiment of the present disclosure;
[0023] Figure 6 A schematic block diagram of an exemplary electronic device 600 provided for an embodiment of the present disclosure. DETAILED DESCRIPTION
[0024] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0025] The following describes in detail a geometric modeling method, device, electronic device, storage medium, and program product proposed in the present disclosure in conjunction with the accompanying drawings.
[0026] Figure 1 The following is a flow chart of a geometric modeling method provided by an embodiment of the present disclosure. Figure 1 As shown, the method includes the following steps.
[0027] Step 101, obtaining an input original three-dimensional geometric mesh, and extracting an original signed distance field of the original three-dimensional geometric mesh.
[0028] In some embodiments of the present disclosure, a signed distance field (SDF) is a three-dimensional space value extracted from a three-dimensional geometric mesh structure using a deep signed distance field algorithm.
[0029] Step 102: Initialize the modeling parameters of the secondary kernel model and the loss function of the network training based on the original signed distance field.
[0030] In some embodiments of the present disclosure, the quadratic kernel model is a model using a quadratic kernel function (Epanechnikov Kernel), which can process inner product operations in a high-dimensional feature space.
[0031] In some embodiments of the present disclosure, a four-dimensional quadratic kernel model is used to extract the coordinate values in three directions of each three-dimensional coordinate in the original signed distance field and the signed distance values of the coordinates to form a data matrix; the mean, covariance matrix and weight of the data matrix are used as modeling parameters of the four-dimensional quadratic kernel model. Using the four-dimensional quadratic kernel model to model three-dimensional geometry can effectively use parameters to characterize the distribution of the signed distance field values.
[0032] Step 103, network training is performed on the original signed distance field through a three-dimensional convolutional neural network and a fully connected layer network to optimize the modeling parameters of the quadratic kernel model until the loss function converges and the optimal modeling parameters are obtained.
[0033] In some embodiments of the present disclosure, a three-dimensional convolutional neural network (3D Convolutional Neural Network, 3D CNN) can perform convolution operations in three dimensions and can effectively perform feature learning on the original signed distance field.
[0034] It should be noted that the convolution operation reduces the computational complexity while maintaining feature information, and processes high-resolution signed distance fields more efficiently, which can solve the problem in related technologies that it is difficult to optimize high-resolution signed distance fields based on traditional expected value maximization algorithms.
[0035] In some embodiments of the present disclosure, a fully connected layer network refers to a multilayer perceptron (MLP) including at least one fully connected layer, and the output of the training network is adjusted to a preset dimension by constructing the size of the weight matrix of the fully connected layer.
[0036] In some embodiments of the present disclosure, a signed distance field is reconstructed for the optimized modeling parameters, and three-dimensional mesh information is reconstructed for the signed distance field. The loss function is composed of the error between the reconstructed signed distance field and the original signed distance field and the error between the reconstructed three-dimensional geometric mesh and the original three-dimensional geometric mesh. When the error does not increase significantly, the loss function converges.
[0037] Step 104 : reconstructing the signed distance field based on the optimal modeling parameters, and using the marching cubes algorithm to reconstruct a three-dimensional geometric mesh from the signed distance field.
[0038] In some embodiments of the present disclosure, the modeling parameters are brought into a reconstruction framework based on a quadratic kernel gate function to obtain a reconstructed signed distance field.
[0039] In some embodiments of the present disclosure, the Marching Cubes algorithm is a simple iterative algorithm that can generate a triangular surface mesh from three-dimensional data.
[0040] In some embodiments of the present disclosure, the method further includes: obtaining a trained network model through the above steps 201-203; in the use test phase, using the trained network model to process the original signed distance field for any input three-dimensional geometric mesh to obtain the corresponding optimal modeling parameters, and reconstructing the signed distance field according to the modeling parameters; using the marching cubes algorithm to reconstruct the three-dimensional mesh information of the signed distance field. In this way, a large number of geometric modeling tests can be implemented.
[0041] Therefore, according to an embodiment of the present disclosure, by acquiring an input original three-dimensional geometric mesh, an original signed distance field of the original three-dimensional geometric mesh is extracted; based on the original signed distance field, modeling parameters of a secondary kernel model and a loss function of network training are initialized; network training is performed on the original signed distance field through a three-dimensional convolutional neural network and a fully connected layer network to optimize the modeling parameters of the secondary kernel model until the loss function converges to obtain optimal modeling parameters; based on the optimal modeling parameters, the signed distance field is reconstructed, and a marching cubes algorithm is used to reconstruct a three-dimensional geometric mesh from the signed distance field, which can optimize high-resolution signed distance fields and solve the problems of low implicit geometric representation accuracy and low detail reconstruction accuracy in related technologies.
[0042] Figure 2 A schematic diagram of a geometric modeling method provided by an embodiment of the present disclosure, Figure 1 The embodiment shown is further disclosed. Among them, steps 202-205 are further disclosed to step 102, and steps 206-2010 are further disclosed to step 103.
[0043] like Figure 2 As shown, the method includes the following steps.
[0044] Step 201 : obtaining an input original three-dimensional geometric mesh and extracting an original signed distance field of the original three-dimensional geometric mesh.
[0045] In some embodiments of the present disclosure, the signed distance field is a three-dimensional spatial value extracted from a three-dimensional geometric mesh structure using a deep signed distance field algorithm.
[0046] Step 202: randomly divide the original signed distance field into K groups of data, where K is a positive integer.
[0047] Step 203, obtaining the mean vector, covariance matrix and weight of K groups of data as initial values of modeling parameters of the quadratic kernel model.
[0048] In some embodiments of the present disclosure, the modeling parameters of the quadratic kernel model are the mean vector, covariance matrix, and weight of K groups of data, where K is a positive integer.
[0049] In one embodiment of the present disclosure, the coordinate values in three directions and the signed distance values at the three-dimensional coordinates are extracted for each three-dimensional coordinate in the original signed distance field to form a data matrix, and the data matrix is randomly divided into K groups, and the mean vector, covariance matrix, and weight of the K groups of data are obtained. The specific calculation formula is as follows:
[0050]
[0051] in, represents the jth group of modeling parameters, They represent the mean vector, covariance matrix, and weight of the jth group of data respectively, and j represents any positive integer between 1 and K.
[0052] Step 204: reconstruct the signed distance field according to the initial values of the modeling parameters to obtain a reconstructed signed distance field.
[0053] In some embodiments of the present disclosure, Figure 3 As shown, the method for reconstructing a signed distance field for modeling parameters includes the following steps 301-302.
[0054] Step 301 : Calculate the quadratic sum gate function and the quadratic kernel expectation based on the modeling parameters.
[0055] In one embodiment of the present disclosure, the modeling parameters include the mean vector, covariance matrix, and weight of K groups of data. The position variable mean vector is obtained from the modeling parameters. , the cosquare matrix of the location variables ;
[0056] Based on the location variable mean vector , the cosquare matrix of the location variables Get the quadratic kernel marginal distribution based on the location variable , the specific formula is as follows:
[0057]
[0058] In one embodiment of the present disclosure, a sub-matrix in the covariance matrix is obtained from the modeling parameters , calculate the quadratic kernel expectation based on the submatrix in the covariance matrix , the specific formula is as follows:
[0059]
[0060] Step 302 : reconstructing the signed distance field using a preset quadratic kernel gate function reconstruction framework based on the quadratic sum gate function and the quadratic kernel expectation.
[0061] In one embodiment of the present disclosure, based on the quadratic sum gate function obtained in step 301 above, and the quadratic kernel expectation , using the quadratic kernel gate function to reconstruct the formula Reconstructing Signed Distance Field Data .
[0062] Step 205: Calculate the initial mean square error between the reconstructed signed distance field and the original signed distance field, and use the initial mean square error as the initial value of the loss function.
[0063] In some embodiments of the present disclosure, the mean square error is the mean square of the difference between the values of the original signed distance field and the reconstructed signed distance field at the same position.
[0064] Step 206, using the original signed distance field as input for network training, optimizing modeling parameters through a three-dimensional convolutional neural network and a fully connected layer network, and obtaining optimized modeling parameters.
[0065] In some embodiments of the present disclosure, a three-dimensional convolutional neural network is used to perform convolution processing on the original signed distance field to obtain feature data of the original signed distance field; a fully connected layer network is used to perform nonlinear transformation on the feature data to obtain the optimized mean vector, covariance matrix and weights of K groups of data as optimized modeling parameters.
[0066] Preferably, the input N×N×N signed distance field data is convolved using a three-dimensional convolutional neural network, with a convolution kernel size of 3×3×3 and a step size of 1.
[0067] Preferably, the fully connected layer is constructed so that the output is 14×K-dimensional parameters, that is, 4-dimensional means of K groups of data, 9-dimensional covariance matrix parameters, and 1-dimensional weights.
[0068] Step 207 : reconstructing a signed distance field for the optimized modeling parameters to obtain an optimized signed distance field, and calculating a mean square error between the optimized signed distance field and the original signed distance field.
[0069] In some embodiments of the present disclosure, the mean square error is the square mean of the difference between the original signed distance field and the optimized signed distance field at the same position, denoted as L 1.
[0070] In some embodiments of the present disclosure, reconstructing the signed distance field for the optimized modeling parameters includes: calculating the quadratic sum gate function and the quadratic kernel expectation based on the optimized modeling parameters; reconstructing the signed distance field using a preset quadratic kernel gate function reconstruction framework based on the quadratic sum gate function and the quadratic kernel expectation to obtain the optimized signed distance field. The specific implementation of this embodiment refers to the above steps 301-302, which will not be described in detail here.
[0071] Step 208, using the marching cubes algorithm to reconstruct the three-dimensional geometric mesh of the optimized signed distance field to obtain the optimized three-dimensional geometric mesh, and calculating the Chamfer error between the optimized three-dimensional geometric mesh and the original three-dimensional geometric mesh.
[0072] In some embodiments of the present disclosure, Chamfer error is applied to a method for measuring the similarity between two point clouds.
[0073] In one implementation, S1 and S2 points are uniformly sampled on the original three-dimensional geometric grid and the optimized three-dimensional geometric grid, and the coordinates of each point are recorded as x and y, respectively, and the Chamfer error is calculated, recorded as L2, and the specific calculation formula is as follows:
[0074]
[0075] In some embodiments of the present disclosure, Figure 4 As shown, the method for reconstructing a three-dimensional geometric mesh from a signed distance field using a marching cubes algorithm includes the following steps 401-403.
[0076] Step 401 : obtaining an initial three-dimensional geometric mesh, and for each edge of the initial three-dimensional geometric mesh, obtaining the signs of the signed distance fields of two vertices connected to the edge based on the optimized signed distance field.
[0077] Step 402: If the signs of the signed distance fields of the two vertices connected to the edge are different, interpolation calculation is performed on the edge to obtain a position on the edge where the value of the signed distance field is 0.
[0078] Step 403, placing the third vertex at the position, constructing triangular facets between the vertices, and adding them to the initial three-dimensional geometric mesh, until the entire optimized signed distance field is traversed to obtain an optimized three-dimensional geometric mesh.
[0079] Step 209, calculating the value of the loss function based on the mean square error and the Chamfer error, and determining the growth multiple of the loss function according to the value of the loss function and the initial value of the loss function.
[0080] In some embodiments of the present disclosure, based on the preset weights, the mean square error L 1 and Chamfer error L2. Weighted summation to obtain the loss function L.
[0081] Preferably, the mean square error L 1 and Chamfer error L The weight of 2 is 0.2 or 0.8, and the specific calculation formula is as follows:
[0082] L= 0.2 L 1+0.8 L 2
[0083] Step 2010: If the growth multiple of the loss function is less than a preset threshold, the optimized modeling parameters are used as the optimal modeling parameters; otherwise, the modeling parameters are continuously optimized through the three-dimensional convolutional neural network and the fully connected layer network.
[0084] Step 2011: reconstruct the signed distance field based on the optimal modeling parameters, and use the marching cubes algorithm to reconstruct the three-dimensional geometric mesh of the signed distance field.
[0085] In other words, repeat the above steps S206-208 several times until the loss function converges. Preferably, when the growth multiple of the loss function is less than 10 -7 The loss function is considered to converge.
[0086] In some embodiments of the present disclosure, the above network training method can realize parameter learning for geometric representation of signed distance field of arbitrary resolution, and the parameters include mean vector, covariance matrix, and weights. The parameters of the model determine its local characteristics.
[0087] In some embodiments of the present disclosure, the method further includes: if the growth multiple of the loss function is less than a preset threshold, obtaining a trained network model; in the test phase, processing any input three-dimensional geometric grid to extract the corresponding original signed distance field, using the trained network model to process the original signed distance field to obtain corresponding modeling parameters, including K groups of means, covariance matrices and weights, and reconstructing the signed distance field according to the modeling parameters; using the marching cubes algorithm to reconstruct the three-dimensional grid information of the signed distance field.
[0088] It is understandable that the network training method of the present invention is used to obtain a trained network model, and the trained network model can be used to perform large-scale geometric modeling tests.
[0089] In summary, the geometric modeling method proposed in the present disclosure has the following beneficial effects:
[0090] 1. The present disclosure uses a four-dimensional quadratic kernel model to model three-dimensional geometry and effectively uses parameters to characterize the distribution of signed distance field values;
[0091] 2. The present invention adopts a three-dimensional convolutional neural network and a fully connected layer for three-dimensional geometric modeling. The convolution kernel of the effective neural network can learn the parameters of the geometric representation of the signed distance field of any resolution, and can achieve representation modeling of high-precision data volume, improve the accuracy of detail reconstruction, and solve the problems that related technologies are difficult to optimize the high-resolution signed distance field, the implicit geometric representation accuracy is low, and the detail reconstruction accuracy is low;
[0092] 3. The method disclosed in the present invention is used for network training, and the trained network model can be used for large-scale geometric modeling tests.
[0093] Corresponding to the above-mentioned geometric modeling method, the present disclosure also proposes a geometric modeling device. Figure 5 FIG. 5 is a schematic diagram of a geometric modeling device 500 provided in an embodiment of the present disclosure. Figure 5 As shown, including:
[0094] The extraction module 510 is used to obtain the input original three-dimensional geometric grid and extract the original signed distance field of the original three-dimensional geometric grid; the initialization module 520 is used to initialize the modeling parameters of the secondary kernel model and the loss function of the network training based on the original signed distance field; the learning module 530 is used to perform network training on the original signed distance field through a three-dimensional convolutional neural network and a fully connected layer network to optimize the modeling parameters of the secondary kernel model until the loss function converges and the optimal modeling parameters are obtained; the reconstruction module 540 is used to reconstruct the signed distance field based on the optimal modeling parameters, and use the marching cubes algorithm to reconstruct the three-dimensional geometric grid of the signed distance field.
[0095] In some embodiments, the initialization module 520 is specifically used to: randomly divide the original signed distance field into K groups of data, where K is a positive integer; obtain the mean vector, covariance matrix and weight of the K groups of data as the initial values of the modeling parameters of the quadratic kernel model; reconstruct the signed distance field according to the initial values of the modeling parameters to obtain a reconstructed signed distance field; calculate the initial mean square error between the reconstructed signed distance field and the original signed distance field, and use the initial mean square error as the initial value of the loss function.
[0096] In some embodiments, the learning module 530 is specifically used to: use the original signed distance field as input for network training, optimize the modeling parameters through the three-dimensional convolutional neural network and the fully connected layer network to obtain the optimized modeling parameters; reconstruct the signed distance field for the optimized modeling parameters to obtain the optimized signed distance field, and calculate the mean square error between the optimized signed distance field and the original signed distance field; reconstruct the three-dimensional geometric mesh of the optimized signed distance field using the marching cubes algorithm to obtain the optimized three-dimensional geometric mesh, and calculate the Chamfer error between the optimized three-dimensional geometric mesh and the original three-dimensional geometric mesh; calculate the value of the loss function based on the mean square error and the Chamfer error, and determine the growth multiple of the loss function according to the value of the loss function and the initial value of the loss function; if the growth multiple of the loss function is less than a preset threshold, use the optimized modeling parameters as the optimal modeling parameters, otherwise, continue to optimize the modeling parameters through the three-dimensional convolutional neural network and the fully connected layer network.
[0097] In some embodiments, the learning module 530 is further used to: calculate the quadratic sum gate function and the quadratic kernel expectation based on the optimized modeling parameters; reconstruct the signed distance field based on the quadratic sum gate function and the quadratic kernel expectation using a preset quadratic kernel gate function reconstruction framework to obtain an optimized signed distance field.
[0098] In some embodiments, the learning module 530 is also used to: use a three-dimensional convolutional neural network to convolve the original signed distance field to obtain feature data of the original signed distance field; use a fully connected layer network to perform nonlinear transformation on the feature data to obtain the optimized mean vector, covariance matrix and weights of K groups of data as optimized modeling parameters.
[0099] In some embodiments, the learning module 530 is also used to: obtain an initial three-dimensional geometric mesh, and for each edge of the initial three-dimensional geometric mesh, obtain the sign of the signed distance field of the two vertices connected to the edge based on the optimized signed distance field; if the signs of the signed distance fields of the two vertices connected to the edge are different, perform interpolation calculation on the edge to obtain the position where the value of the signed distance field on the edge is 0; place the third vertex at the position, construct triangular faces between the vertices, and add them to the initial three-dimensional geometric mesh, until the entire optimized signed distance field is traversed to obtain the optimized three-dimensional geometric mesh.
[0100] In summary, according to the embodiments of the present disclosure, the device obtains an input original three-dimensional geometric mesh, extracts the original signed distance field of the original three-dimensional geometric mesh; based on the original signed distance field, initializes the modeling parameters of the secondary kernel model and the loss function of the network training; performs network training on the original signed distance field through a three-dimensional convolutional neural network and a fully connected layer network to optimize the modeling parameters of the secondary kernel model until the loss function converges to obtain the optimal modeling parameters; reconstructs the signed distance field based on the optimal modeling parameters, and uses the marching cubes algorithm to reconstruct the three-dimensional geometric mesh of the signed distance field, which can perform representation modeling of high-precision data volume, and can solve the problems of low implicit geometric representation accuracy and low detail reconstruction accuracy in related technologies.
[0101] It should be noted that since the device embodiment of the present disclosure corresponds to the above-mentioned method embodiment, the above-mentioned explanation of the method embodiment is also applicable to the device of the present embodiment, and the principle is the same. For details not disclosed in the device embodiment, reference can be made to the above-mentioned method embodiment, and they will not be repeated in this disclosure.
[0102] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
[0103] Figure 6 A schematic block diagram of an example electronic device 600 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0104] like Figure 6 As shown, the device 600 includes a computing unit 601, which can perform various appropriate actions and processes according to a computer program stored in a ROM (Read-Only Memory) 602 or a computer program loaded from a storage unit 608 to a RAM (Random Access Memory) 603. In the RAM 603, various programs and data required for the operation of the device 600 can also be stored. The computing unit 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An I / O (Input / Output) interface 605 is also connected to the bus 604.
[0105] A number of components in the device 600 are connected to the I / O interface 605, including: an input unit 606, such as a keyboard, a mouse, etc.; an output unit 607, such as various types of displays, speakers, etc.; a storage unit 608, such as a disk, an optical disk, etc.; and a communication unit 609, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0106] The computing unit 601 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a CPU (Central Processing Unit), a GPU (Graphic Processing Units), various dedicated AI (Artificial Intelligence) computing chips, various computing units running machine learning model algorithms, a DSP (Digital Signal Processor), and any appropriate processor, controller, microcontroller, etc. The computing unit 601 performs the various methods and processes described above, such as the geometric modeling method. For example, in some embodiments, the geometric modeling method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 608. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 600 via the ROM 602 and / or the communication unit 609. When the computer program is loaded into the RAM 603 and executed by the computing unit 601, one or more steps of the method described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to execute the aforementioned geometric modeling method in any other appropriate manner (for example, by means of firmware).
[0107] Various embodiments of the systems and techniques described above herein may be implemented in digital electronic circuit systems, integrated circuit systems, FPGAs (Field Programmable Gate Arrays), ASICs (Application-Specific Integrated Circuits), ASSPs (Application Specific Standard Products), SOCs (System On Chips), CPLDs (Complex Programmable Logic Devices), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include: being implemented in one or more computer programs that may be executed and / or interpreted on a programmable system including at least one programmable processor that may be a dedicated or general-purpose programmable processor that may receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0108] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0109] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or apparatus. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. More specific examples of machine-readable storage media may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, RAM, ROM, EPROM (Electrically Programmable Read-Only-Memory) or flash memory, optical fiber, CD-ROM (Compact Disc Read-Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0110] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (Cathode-Ray Tube) or LCD (Liquid Crystal Display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0111] The systems and techniques described herein may be implemented in a computing system that includes a backend component (e.g., as a data server), or a computing system that includes a middleware component (e.g., an application server), or a computing system that includes a frontend component (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: LAN (Local Area Network), WAN (Wide Area Network), the Internet, and blockchain networks.
[0112] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services ("Virtual Private Server", or "VPS" for short). The server may also be a server of a distributed system, or a server combined with a blockchain.
[0113] It should be noted that artificial intelligence is a discipline that studies how computers can simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.), and includes both hardware-level and software-level technologies. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, and big data processing; artificial intelligence software technologies mainly include computer vision technology, speech recognition technology, natural language processing technology, as well as machine learning / deep learning, big data processing technology, knowledge graph technology, and other major directions.
[0114] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0115] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A geometric modeling method, characterized in that: The method comprises: Obtaining an input original three-dimensional geometric mesh, and extracting an original signed distance field of the original three-dimensional geometric mesh; Initializing modeling parameters of a secondary kernel model and a loss function of network training based on the original signed distance field; Performing network training on the original signed distance field through a three-dimensional convolutional neural network and a fully connected layer network to optimize the modeling parameters of the secondary kernel model until the loss function converges to obtain the optimal modeling parameters; reconstructing a signed distance field based on the optimal modeling parameters, and reconstructing a three-dimensional geometric grid from the signed distance field using a marching cubes algorithm; Initializing the modeling parameters of the secondary kernel model and the loss function of the network training based on the original signed distance field includes: Randomly divide the original signed distance field into K groups of data, where K is a positive integer; Obtaining the mean vector, covariance matrix and weight of the K groups of data as initial values of modeling parameters of the quadratic kernel model; Reconstructing the signed distance field according to the initial values of the modeling parameters to obtain a reconstructed signed distance field; An initial mean square error between the reconstructed signed distance field and the original signed distance field is calculated, and the initial mean square error is used as an initial value of the loss function.
2. The method according to claim 1, characterized in that The network training of the original signed distance field by a three-dimensional convolutional neural network and a fully connected layer network to optimize the modeling parameters of the secondary kernel model until the loss function converges, and the optimal modeling parameters are obtained, including: Using the original signed distance field as input for network training, optimizing the modeling parameters through the three-dimensional convolutional neural network and the fully connected layer network to obtain optimized modeling parameters; Reconstructing a signed distance field for the optimized modeling parameters to obtain an optimized signed distance field, and calculating a mean square error between the optimized signed distance field and the original signed distance field; Reconstructing a three-dimensional geometric grid of the optimized signed distance field using a marching cubes algorithm to obtain an optimized three-dimensional geometric grid, and calculating a Chamfer error between the optimized three-dimensional geometric grid and the original three-dimensional geometric grid; Calculating the value of the loss function based on the mean square error and the Chamfer error, and determining the growth multiple of the loss function according to the value of the loss function and the initial value of the loss function; If the growth multiple of the loss function is less than a preset threshold, the optimized modeling parameters are used as the optimal modeling parameters; otherwise, the modeling parameters are continuously optimized through the three-dimensional convolutional neural network and the fully connected layer network.
3. The method according to claim 2, characterized in that The step of reconstructing the signed distance field based on the optimized modeling parameters to obtain the optimized signed distance field comprises: Calculating a quadratic kernel gate function and a quadratic kernel expectation based on the optimized modeling parameters; Based on the secondary kernel gate function and the secondary kernel expectation, a preset secondary kernel gate function reconstruction formula is used to reconstruct the signed distance field to obtain the optimized signed distance field.
4. The method according to claim 2, characterized in that: The original signed distance field is used as input for network training, and the modeling parameters are optimized by the three-dimensional convolutional neural network and the fully connected layer network, and the optimized modeling parameters are obtained, including: Using the three-dimensional convolutional neural network to perform convolution processing on the original signed distance field to obtain feature data of the original signed distance field; The feature data is nonlinearly transformed using the fully connected layer network to obtain the optimized mean vector, covariance matrix and weight of the K groups of data as the optimized modeling parameters.
5. The method according to claim 2, characterized in that: The step of reconstructing the three-dimensional geometric grid of the optimized signed distance field by using the marching cubes algorithm to obtain the optimized three-dimensional geometric grid comprises: Acquire an initial three-dimensional geometric mesh, and for each edge of the initial three-dimensional geometric mesh, acquire the signs of the signed distance fields of two vertices connected to the edge based on the optimized signed distance field, If the signs of the signed distance fields of the two vertices connected to the edge are different, interpolation calculation is performed on the edge to obtain a position on the edge where the value of the signed distance field is 0; Vertices are placed at the positions, triangular facets are constructed between the vertices, and are added to the initial three-dimensional geometric mesh, until the entire optimized signed distance field is traversed to obtain the optimized three-dimensional geometric mesh.
6. A geometric modeling device, characterized in that: include: An extraction module, used for acquiring an input original three-dimensional geometric grid and extracting an original signed distance field of the original three-dimensional geometric grid; An initialization module, used to initialize the modeling parameters of the secondary kernel model and the loss function of the network training based on the original signed distance field; A learning module, used for performing network training on the original signed distance field through a three-dimensional convolutional neural network and a fully connected layer network to optimize the modeling parameters of the secondary kernel model until the loss function converges to obtain the optimal modeling parameters; A reconstruction module, configured to reconstruct a signed distance field based on the optimal modeling parameters, and to reconstruct a three-dimensional geometric grid from the signed distance field using a marching cubes algorithm; Initializing the modeling parameters of the secondary kernel model and the loss function of the network training based on the original signed distance field includes: Randomly divide the original signed distance field into K groups of data, where K is a positive integer; Obtaining the mean vector, covariance matrix and weight of the K groups of data as initial values of modeling parameters of the quadratic kernel model; Reconstructing the signed distance field according to the initial values of the modeling parameters to obtain a reconstructed signed distance field; An initial mean square error between the reconstructed signed distance field and the original signed distance field is calculated, and the initial mean square error is used as an initial value of the loss function.
7. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 5.
8. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-5.
9. A computer program product, characterized in that The invention comprises a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 5.
