Discrete grid implicit curve design method and device based on deep neural network

By using a discrete mesh implicit curve design method based on deep neural networks, the robustness and adaptability of curve generation in existing technologies are solved, and curves that meet user constraints can be generated efficiently on low-quality meshes.

CN121095488APending Publication Date: 2025-12-09ZHEJIANG SCI-TECH UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511076406.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-01
Publication Date
2025-12-09

AI Technical Summary

Technical Problem

Existing curve modeling methods are inadequate in terms of robustness, convergence, and adaptability to low-quality meshes, making it difficult to generate high-quality curves that meet user constraints in complex geometric modeling.

Method used

We employ a discrete grid implicit curve design method based on deep neural networks. Through interpolation point embedding, feature field construction, and a two-stage training strategy, we generate implicit functions that satisfy user constraints. We then use a neural network with an efficient channel attention module and a lightweight gating unit for curve prediction.

Benefits of technology

Generating high-quality, stable curves under low-quality mesh conditions improves the robustness of curve generation and its ability to adapt to complex geometric modeling, enabling fast and efficient curve construction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121095488A_ABST
    Figure CN121095488A_ABST
Patent Text Reader

Abstract

According to the discrete grid implicit curve design method based on the deep neural network, an implicit scalar field is constructed through grid interpolation points, curve implicit expression is predicted through the neural network, geometric priori such as interpolation constraint, smoothness constraint and user-defined feature constraint is fused, and adaptability and numerical stability to low-quality grids are enhanced. The network integrates an efficient channel attention module and a lightweight gating unit, the feature extraction capability is enhanced, and the calculation efficiency is improved; and adopting a two-stage training strategy, namely pre-training and optimizing the initialization capability, and then quickly optimizing and converging to a target curve, so that the overall training effect is improved. Compared with a traditional method, the method can still stably generate a high-fidelity curve on the degraded grid, supports feature alignment and obstacle avoidance design based on user intention, is outstanding in robustness and practicability, and has wide application prospects in the fields of CAD / CAM, virtual surgery, geometric modeling and the like.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the fields of computer graphics, digital geometry processing technology and machine learning, and particularly relates to a discrete mesh implicit curve design method and device based on a deep neural network. Robust and efficient implementation of constraint-included implicit curve generation. BACKGROUND

[0002] Curve design, as a core topic in the field of computer-aided geometric design and computer graphics, plays a key role in many practical scenarios such as product modeling, virtual simulation, medical image processing, numerical control path generation, mesh cutting and segmentation. In recent years, with the rapid development of three-dimensional scanning technology and artificial intelligence content generation technology, the demand for digital geometric modeling based on triangular mesh continues to rise, and curve modeling in non-Euclidean space (such as curved surface mesh) has become a research hotspot in the current academic and industrial circles. In the existing technical system, curve design methods are mainly divided into two categories: explicit methods and implicit methods.

[0003] Explicit methods achieve curve design by directly modeling the interpolation points or parametric surfaces of the curve, and common means include projection, smoothing, parameterization or spline curve, etc. This kind of method has certain operational flexibility, but due to the need to meet multiple geometric constraints such as smoothness and embedding, it often faces many problems in practical application: not only is the numerical stability poor, but it is also sensitive to noise anomalies, and it is easy to cause curve quality to decline, especially when dealing with low-quality or degenerate meshes, its performance is greatly discounted.

[0004] Implicit methods, on the other hand, indirectly complete curve modeling by constructing a scalar field (such as a variational model or a partial differential equation) and extracting the contour lines of the scalar field as the target curve. This kind of method can effectively avoid the self-intersection problem common in explicit modeling, but in actual operation, its effect is highly dependent on the numerical calculation accuracy of the discrete difference operator (such as the Laplace-Beltrami operator), so it has a high sensitivity to mesh quality. On meshes containing narrow angles, acute angles or degenerate triangles, implicit methods are prone to slow convergence or even difficulty in converging, which leads to poor curve generation quality.

[0005] In summary, the existing curve modeling methods still have significant shortcomings and limitations in terms of robustness, convergence and adaptability to low-quality meshes. Therefore, it is an urgent need to develop a curve design method that can simultaneously meet the requirements of strong numerical stability, high curve quality and flexible user control, in order to adapt to the needs of complex geometric modeling and engineering applications. SUMMARY

[0006] In view of the deficiencies of the prior art, the present application provides a discrete grid implicit curve design method and device based on a deep neural network. The method aims to overcome many technical difficulties faced by existing implicit curve modeling methods in practical applications, including poor numerical stability, high sensitivity to grid quality, difficulty in expressing complex constraints, etc. Through innovative design, the present application can robustly generate curves that meet user constraints under low-quality grid conditions, not only generating high-quality curves, but also having excellent stability and practicality, suitable for application in complex geometric modeling scenarios.

[0007] The discrete grid implicit curve design method based on a deep neural network comprises the following steps:

[0008] Step one, obtain an input triangular grid and a user-specified interpolation point and feature point sequence;

[0009] Step two, insert the interpolation point as a "virtual vertex" into the grid surface and construct an updated topology;

[0010] Step three, based on the updated grid, extract vertex coordinates, normal vectors, interpolation fields, signed distance fields, and feature guide fields as network input features;

[0011] Step four, construct a loss function using physical constraints to optimize the network to generate an implicit function that meets the constraints;

[0012] Step five, construct a neural network containing an attention module and a gating unit to predict the implicit scalar field φ;

[0013] Step six, adopt a two-stage training strategy to improve the generation efficiency of the model;

[0014] Step seven, extract the zero level set curve from the predicted implicit field as the final target curve.

[0015] Further, in step one, obtain an input triangular grid M=(V,F), and a user-specified interpolation point sequence and a feature point sequence

[0016] Further, in step two, for a user-input interpolation point sequence sequence P c that does not belong to the original vertex set V, it is considered as a virtual vertex and inserted into the original triangular grid M to construct a new triangular grid M' containing virtual interpolation vertices. Specifically: when a certain interpolation point p i is located inside a triangular face, the corresponding triangle will be virtually divided, resulting in three new triangles. When p iWhen the interpolation point is located on a mesh edge, the edge is split so that the interpolation point is seamlessly embedded as a new vertex of the mesh. A new mesh M' containing the virtual interpolation vertex is obtained. Through the interpolation point embedding operation, the subsequent feature construction and physical constraint calculation processes are effectively simplified, and the stability and consistency of the overall modeling process are improved.

[0017] Further, in step three, according to the new mesh M' obtained in step two and the interpolation point sequence P c , a discrete interpolation field scalar field φ p is constructed. Since the new mesh M' is constructed according to the interpolation points in step two, the scalar field can be simply defined as:

[0018]

[0019] The scalar field φ p serves as an explicit identification of the user-defined constraint position.

[0020] The initial signed distance field is constructed as follows: for the interpolation point sequence P c input by the user, first sort it to construct a closed loop. The sorting method includes the following steps:

[0021] (1) Obtain the three-dimensional coordinates of P c in the mesh M', and calculate its geometric center (centroid);

[0022] (2) After centering all point coordinates, use principal component analysis method to project them onto a two-dimensional plane;

[0023] (3) In the two-dimensional plane, take the centroid as the reference, calculate the polar angle of each point relative to the centroid, and sort it in ascending order according to the polar angle;

[0024] (4) According to the sorting result, rearrange the original point sequence to obtain the interpolation point index P c ' arranged in spatial closed order.

[0025] Then, use Dijkstra algorithm to calculate P cThe shortest path between two adjacent points is found, and all local paths are sequentially spliced to generate a complete closed path. The path only follows the grid boundary and does not pass through any triangular facet, thereby ensuring its geometric feasibility. Then, all the vertices on the closed path are regarded as source points of heat conduction, and a heat kernel method is applied to calculate the unsigned distance field on the entire grid. The distance field is smooth near the path and has strong numerical stability. Finally, it is determined whether the generated path constitutes a simple loop. If the path is a simple loop (i.e., without self-intersection or nesting), a region growing algorithm based on flood filling is used to determine the internal vertex set enclosed by the closed loop, and the distance values at these internal vertices are taken as the opposite, thereby constructing a signed distance field φ0with spatial sign information; if the path does not constitute a simple loop, the original unsigned distance field is directly used as the initial signed distance field φ0.

[0026] The feature guide field is used to provide additional geometric or semantic information in model training, enhancing the network's response to user constraints. The construction method is as follows: for the feature point sequence P f input by the user, including the obstacle point sequence P obs and the feature alignment point sequence P align , a discrete feature guide scalar field φ fea is first defined on the vertices of the triangular mesh, initially set to 0. For the obstacle point sequence P obs specified by the user, the scalar value at the corresponding vertex is set to 1, and a Gaussian kernel function is used to diffuse the neighborhood region centered on the obstacle point, causing the feature guide value to gradually decay to 0 near the obstacle point. This process effectively forms a soft obstacle region in space, guiding the network to avoid crossing this region when generating the curve. For the feature alignment point sequence P align , the guide field value at the corresponding vertex is directly set to -1 to emphasize the importance of this region, thereby prompting the predicted curve to better fit the user-specified alignment region. After fusing the above processing, the feature guide scalar field φ fea defined on all mesh vertices is obtained.

[0027] The vertices V' and vertex normals N' of the new mesh M' obtained in step two, and the interpolation field, the initial signed distance field and the feature guide field obtained in step three are spliced to serve as the network input feature X input :

[0028] X input = [V', N', φ p , φ0, φ fea ].

[0029] Further, the loss function L total is constructed using physical constraints in step four:

[0030] Ltotal = L sdf + λ int L int + λ smooth L smooth + λ fea L fea

[0031] The definition of each loss term is as follows:

[0032] The signed distance field regularization term L sdf regularizes the level set function predicted by the model through the Eikonal equation, and constrains the gradient modulus of the predicted level set function The smooth energy form with good numerical stability is adopted in this method:

[0033]

[0034] where is the gradient of the level set function.

[0035] The interpolation point constraint term L int is used to force the predicted level set function to be zero at the interpolation point:

[0036]

[0037] The curve smoothing term L smooth ensures the smoothness of the generated curve by minimizing the geodesic curvature energy of the curve. Specifically, the Willmore energy formula is used to minimize the geometric curvature of the zero contour line of the predicted level set function:

[0038]

[0039] where Γ represents the zero contour line of the level set function, κ represents the geodesic curvature, and δ(φ) is the Dirac function, which sets the non-zero value of φ to zero to ensure that the predicted field remains continuous near the curve. In order to reduce the complexity of solving, the regularization constraint of the geodesic distance field can be regarded as a prior constraint, thereby simplifying the above formula, and using the Laplacian of the level set function φ Δφ to approximate the geodesic curvature κ, formula (3) is written as:

[0040]

[0041] The feature-guided term L fea is used to guide the zero level set contour to approach or be close to the feature region:

[0042]

[0043] However, the traditional neural field method usually needs to sample a large number of spatial points in the continuous domain, which is difficult to directly apply to the task of curved surface modeling based on triangular mesh. To solve this problem, the method proposes a strategy based on mesh vertex discretization, which regards all mesh vertices as computing nodes and performs numerical calculation of the loss function based on the associated Voronoi sub-domain, thereby improving the stability and accuracy of optimization. This discretization scheme is applicable to multiple key loss terms, including the distance field constraint of the implicit function, the smoothing constraint and the feature perception constraint. The discrete forms of formula (1), formula (4) and formula (5) are as follows:

[0044]

[0045] where N(v i ) represents the set of adjacent triangles of vertex v i , c t is the barycenter position of triangle t, w i,t represents the Voronoi sub-domain area of vertex v i in triangle t, usually taken as |t| / 3. The function G σ (φ(c t )) is a Gaussian weight based on φ(c t ), which is used to approximate the Dirac function and realize local weighting of the neighborhood of the zero level set curve.

[0046] Further, based on the input feature X input constructed in step three, an efficient neural network structure is designed and used to process the feature vector on the mesh vertex to predict the final implicit scalar field function.

[0047] The neural network architecture used is a new type of three-dimensional surface mesh implicit curve modeling network (Neural Implicit Curve Modeling on Meshes, NICMM), which is specially optimized for the geometric feature extraction and curve modeling task of three-dimensional mesh structure. Compared with the traditional multi-layer perception neural network, NICMM introduces a hierarchical feature processing mechanism in the network structure and integrates two lightweight and efficient feature enhancement modules to improve the model's expression ability and convergence speed.

[0048] Specifically, the NICMM network structure introduces the following two key modules:

[0049] Efficient Channel Attention (ECA): To improve the feature representation ability without significantly increasing the computational burden, the network inserts an ECA attention mechanism after each convolutional module. This module first performs global average pooling on the input feature map in the spatial dimension to extract the global response of each channel as a channel descriptor. Then, a lightweight one-dimensional convolution with an adaptive kernel size is used to process the descriptor to capture the local interaction between channels.

[0050] The convolution kernel size k is calculated as follows:

[0051]

[0052] where C is the number of channels, and γ and b are adjustment hyperparameters. The convolution result is activated by Sigmoid and used as a channel attention weight to act on the original feature map. Through the multiplication operation between channels, the effective channels are highlighted and the redundant channels are suppressed, thereby enhancing the discriminability of the features.

[0053] Light Gated Linear Unit (Light GLU): To further improve the feature selectivity, the ECA module is followed by a Light GLU activation mechanism. This module generates channel-level gating weights through a learnable linear transformation plus a sigmoid activation function, and performs element-wise multiplication with the original features. This gating mechanism achieves nonlinear modulation in the feature space, further improving the response ability of the model to key features, with extremely low computational overhead.

[0054] Through the integration of the above modules, the NICMM network can efficiently model the input features and output an implicit scalar field function defined on the vertices of the triangular mesh.

[0055] Further, a two-stage optimization strategy is used in step six to train the neural network to obtain an implicit scalar field function φ Θ that can accurately generate geometric constraints. The training process does not rely on real labeled curves (i.e., no GroundTruth), but uses user input constraints and guiding fields, combined with geometric and physical priors to construct a loss function for individual optimization on each instance. Specifically, it includes the following two stages:

[0056] The first stage is the pre-training stage. For each mesh M = (V, F) to be processed, N groups of interpolation point sequences and feature point sequences are randomly sampled from the vertex set. Each group contains m vertices as simulated curve constraint inputs. First, the new mesh M' is obtained by embedding the interpolation points according to P c Then, the loss function is constructed based on M', Pc and P f Generate φ according to the operation in step three. p φ0 and φ fea The input feature tensor X is obtained by concatenating it with the corresponding vertex coordinates and vertex normal vectors. input The network output is the implicit function value φ defined on the vertices. Θ (v), and train the model parameters Θ by optimizing the objective as follows:

[0057]

[0058] The optimization process uses the AdamW optimizer with an initial learning rate of 0.01. This stage is mainly used to obtain initialization parameters Θ that have a certain awareness of the current mesh structure. * This improves the convergence efficiency of subsequent training phases. This phase typically requires only 10 iterations to complete the optimization, with a training time of approximately 2 minutes. Compared to training from scratch, pre-training significantly accelerates convergence, enabling the network to quickly adapt to individual input data, thus achieving efficient and robust personalized curve generation.

[0059] The second stage is the parameter optimization stage. In this stage, initial input features are constructed based on the interpolation point sequence and feature point sequence of the actual user input. The network parameters are then further optimized to improve the model's prediction of the implicit function φ. Θ The zero level set Γ: Γ = φ Θ (-1) (0).

[0060] This aligns with the user's designed geometric intent. The AdamW optimizer is continued in this phase, but the learning rate is adjusted to 0.001, and an early stopping mechanism is introduced to accelerate training. Specifically: for each model prediction of φ... Θ Extract the contour lines Γ with implicit function values ​​of 0 from them, and then find the contour lines with width Γ centered on Γ. ( The energy of the smoothing and curvature terms is calculated within a region of average side length. If the energy fluctuation of the loss function is less than the threshold δ or lower than the preset lower limit ò after several consecutive iterations, the training is terminated.

[0061] Furthermore, in step seven, the φ predicted by the model is... Θ Extract the zero-level set curve Γ as the target curve that satisfies the geometric constraints.

[0062] Compared with the prior art, the beneficial effects of the present invention are:

[0063] 1. This invention has a high degree of adaptability to geometric constraints: By introducing a feature guidance mechanism based on control points and an implicit function modeling method, this invention can generate target curves that accurately satisfy various geometric constraints such as alignment and obstacles on complex surfaces.

[0064] 2. The application improves network robustness and generalization performance: a two-stage training strategy is adopted, which makes the neural network have stable performance on different initializations and low-quality grids, significantly improving adaptability and usability under non-ideal input conditions.

[0065] 3. The application realizes an efficient and fast curve generation process: the network architecture is lightweight and efficient, combined with a pre-training strategy to significantly speed up convergence, and users only need to provide control points to quickly obtain high-quality curve results, improving the interactive experience in practical applications. BRIEF DESCRIPTION OF DRAWINGS

[0066] Figure 1 A flowchart of the discrete grid implicit curve design method based on the deep neural network of the application;

[0067] Figure 2 A specific flowchart of an embodiment of the discrete grid implicit curve design method based on the deep neural network of the application;

[0068] Figure 3 A schematic diagram of a low-quality grid processed by the discrete grid implicit curve design method based on the deep neural network of the application;

[0069] Figure 4 A schematic diagram of interpolation points at different positions in the discrete grid implicit curve design method based on the deep neural network of the application;

[0070] Figure 5 A schematic diagram of an initial signed distance field constructed according to user input in the discrete grid implicit curve design method based on the deep neural network of the application;

[0071] Figure 6 A network architecture diagram of the discrete grid implicit curve design method based on the deep neural network of the application;

[0072] Figure 7 An effect diagram of the application of the discrete grid implicit curve design method based on the deep neural network on a low-quality grid;

[0073] Figure 8 A structural diagram of the discrete grid implicit curve generation device based on the deep neural network of the application. DETAILED DESCRIPTION

[0074] With reference to the accompanying drawings, the technical solutions in the embodiments of the present application will be clearly and completely described below, obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work belong to the protection scope of the present application.

[0075] Embodiment

[0076] The method is widely used in multiple fields including three-dimensional model segmentation, surgical path planning, animation motion design, intelligent manufacturing path planning, mesh cutting, etc., and provides a high-precision curve construction capability meeting geometric constraints for designers or systems, and enhances the geometric processing intelligence and adaptability of a three-dimensional modeling system. Taking construction of an implicit curve meeting interpolation and obstacle constraint on a low-quality triangular mesh as an example, an implementation process of a curve modeling method based on a neural implicit function is introduced.

[0077] Specifically, the method comprises the following steps: a user inputs a triangular mesh model, an interpolation point sequence and feature point information, constructs a sparse interpolation field, a signed distance field and a feature guide field;

[0078] A loss function containing geometric and physical priors is constructed for each input sample, and an implicit field is stably optimized in combination with a discretization strategy;

[0079] A neural network containing an efficient channel attention module and a lightweight gating unit is used to predict an implicit scalar function meeting constraints by taking multiple field functions as input features;

[0080] Finally, a zero-level set curve is extracted from the implicit function as a target result, and robust modeling on a rough or irregular triangular mesh is supported, so that the stability and precision of curve construction in a complex input scene are improved.

[0081] Figure 1 is a flowchart of a discrete mesh implicit curve design method based on a deep neural network in an embodiment of the present application.

[0082] The method comprises the following steps:

[0083] In step 101, an input triangular mesh and a user-specified interpolation point and feature point sequence are acquired;

[0084] In step 102, the interpolation point is virtually inserted into the mesh, and an updated topological structure is constructed;

[0085] In step 103, based on the updated mesh, vertex coordinates, normal vectors, an interpolation field, a signed distance field and a feature guide field are extracted as network input features;

[0086] Step 104, constructing a loss function with physical constraints, optimizing the network to generate an implicit function satisfying the constraints;

[0087] Step 105, constructing a neural network containing attention modules and gating units for predicting the implicit scalar field φ;

[0088] Step 106, adopting a two-stage training strategy to improve the generation efficiency of the model; Step 107, extracting the zero level set curve from the predicted implicit field as the final target curve;

[0089] Specifically, a discrete grid implicit curve design method and device based on a deep neural network are provided, Figure 2 A specific real-time process of one embodiment of the discrete grid implicit curve design method based on a deep neural network in the embodiment is shown. The embodiment includes the following steps:

[0090] Step one, obtaining a low-quality triangular mesh M=(V, F) input by a user (as shown in Figure 3 ), where V=4000, F=8000, and a user-specified interpolation point sequence and a feature point sequence

[0091] Step two, for the user-specified interpolation point sequence , the interpolation points in the sequence P c that do not belong to the original vertex set V are regarded as virtual vertices and are inserted into the original triangular mesh M to construct a new triangular mesh M' containing virtual interpolation vertices. Specifically: when an interpolation point p i is located inside a triangular face, the corresponding triangular face is virtually divided, thereby generating three new triangular faces. When the interpolation point p i is located on an edge of the mesh, the edge is divided, thereby seamlessly embedding the interpolation point as a new vertex of the mesh (as shown in Figure 4 ). Finally, a new mesh M' containing virtual interpolation vertices is obtained. Through the interpolation point embedding operation, the subsequent feature construction and physical constraint calculation processes are effectively simplified, and the stability and consistency of the overall modeling process are improved.

[0092] Step three, according to the new mesh M' obtained in step two and the user-specified interpolation point sequence P c , a discrete interpolation field scalar field φ p is constructed. Since the new mesh M' is constructed according to the interpolation points in step two, the scalar field can be simply defined as:

[0093]

[0094] This scalar field φ p serves as an explicit identification of the user-specified constraint position.

[0095] The initial signed distance field is constructed by the following way: for the sequence of interpolation points P c input by the user, first sort it to construct a closed loop. The sorting method includes the following steps:

[0096] (1) Get the three-dimensional coordinates of P c in the mesh M' and calculate its geometric center (centroid);

[0097] (2) After the centering process of all point coordinates, use the principal component analysis (PCA) method to project them into a two-dimensional plane;

[0098] (3) In the two-dimensional plane, take the centroid as the reference, calculate the polar angle of each point relative to the centroid, and sort it in ascending order according to the polar angle;

[0099] (4) According to the sorting result, rearrange the original point sequence to get the interpolation point index P c ' arranged in spatial closed order.

[0100] Then, use Dijkstra's algorithm to calculate the shortest path between adjacent points in P c ' on the mesh boundary, and sequentially splice all local paths to generate a complete closed path. This path only follows the mesh boundary and does not cross any triangular patch, thus ensuring its geometric feasibility. Then, take all the vertices on this closed path as the source points of heat conduction, and apply the geodesic method based on heat kernel to calculate the unsigned distance field on the entire mesh. This distance field is smooth near the path and has strong numerical stability. Finally, determine whether the generated path constitutes a simple loop. If the path is a simple loop (i.e., no self-intersection, no nesting), use the region growing algorithm based on flood fill to determine the internal vertex set enclosed by the closed loop, and take the negative of the distance values at these internal vertices to construct the signed distance field φ0with spatial sign information (as shown in Figure 5 ). If the path does not constitute a simple loop, directly use the original unsigned distance field as the initial signed distance field φ0.

[0101] The feature guide field is used to provide additional geometric or semantic information in model training, enhancing the network's response to user constraints. Its construction method is as follows: for the sequence of feature points P f input by the user, including the obstacle point sequence P obs and the feature alignment point sequence P align , first define a discrete feature guide scalar field φ fea on the vertices of the triangular mesh, initially set to 0. For the user-specified obstacle point sequence P obsThe scalar value at the corresponding vertex is set to 1, and the neighborhood region thereof is diffused using a Gaussian kernel function with the vertex as the center, and the bandwidth parameter of the Gaussian kernel function is set to 0.4 (twice the average edge length of the input mesh M), so that the feature guide value gradually decays to 0 at a position close to the obstacle point. This process can effectively form a soft obstacle region in space, guiding the network to avoid crossing the region when generating the curve. For the feature alignment point sequence P align , the guide field value of the corresponding vertex is directly set to -1 to emphasize the importance of the region, so as to make the predicted curve more consistent with the user-specified alignment region. After fusing the above processing, the feature guide scalar field φ fea is obtained, which is defined on all the vertices of the mesh.

[0102] The vertices V' and vertex normals N' of the new mesh M', the interpolation field obtained in step three, the initial signed distance field and the feature guide field are spliced as the network input features X input :

[0103] X input = [V', N', φ p , φ0, φ fea ]

[0104] Step four, constructing a loss function L total using physical constraints:

[0105] L total = L sdf + λ int L int + λ smooth L smooth + λ fea L fea ,

[0106] where λ int = 5000, λ smooth = 500, λ fea = 500.

[0107] The signed distance field regularization term L sdf regularizes the level set function predicted by the model based on the Eikonal equation, and constrains the gradient modulus of the predicted level set function The smooth energy form with good numerical stability is adopted:

[0108]

[0109] where is the gradient of the level set function.

[0110] The interpolation point constraint term L int is used to force the predicted level set function to be zero at the interpolation point:

[0111]

[0112] Lsmooth smooth , to ensure the smoothness of the generated curve by minimizing the geodesic curvature energy of the curve, specifically, the Willmore energy formula is adopted to minimize the geometric curvature of the zero level set of the predicted level set function:

[0113]

[0114] where Γ represents the zero level set of the level set function, κ represents the geodesic curvature, δ(φ) is the Dirac function, and the non-zero value of φ is set to zero to ensure that the prediction field remains continuous near the curve. To reduce the complexity of the solution, the regularization constraint of the geodesic distance field is regarded as a prior constraint, thereby simplifying the above formula, and the Laplacian operator Δφ of the level set function φ is used to approximate the geodesic curvature κ, at this time L smooth is:

[0115]

[0116] Lfeature fea , to guide the zero level set to approach or be close to the feature region:

[0117]

[0118] However, the traditional neural field method usually needs to sample a large number of spatial points in the continuous domain, which is difficult to directly apply to the surface modeling task based on triangular mesh. To solve this problem, a discretization strategy based on mesh vertex is proposed, which regards all mesh vertices as sampling points, and performs numerical calculation of the loss function based on the associated Voronoi subdomain, thereby improving the optimization stability and integration accuracy. This discretization scheme is applicable to multiple key loss terms, including the distance field constraint of the implicit function, the smoothing constraint, and the feature perception constraint, and the specific form is as follows:

[0119]

[0120] where N(v i ) represents the set of adjacent triangles of vertex v i , c t is the barycenter position of triangle t, w i,t represents the Voronoi subdomain area of vertex v i in triangle t, and |t| / 3 is taken. The function G σ (φ(c t )) is based on φ(c tGaussian weight of the step function, which is used to approximate the Dirac function, to realize the local weighting of the zero level set curve neighborhood.

[0121] Step five, based on the input features X constructed in step three input An efficient neural network structure is designed and adopted to process the feature vectors on the mesh vertices to predict the final implicit scalar field function.

[0122] The neural network architecture adopted is a new type of three-dimensional surface mesh implicit curve modeling network (Neural Implicit Curve Modeling on Meshes, NICMM) (as shown in Figure 6 The network is specially designed for the optimization of the geometric feature extraction and curve modeling tasks of three-dimensional mesh structures. Compared with the traditional neural network using multi-layer perceptron (MLP), NICMM introduces a hierarchical feature processing mechanism in the network structure, and integrates two lightweight and efficient feature enhancement modules to improve the expression ability and convergence speed of the model.

[0123] Specifically, the following two key modules are introduced in the NICMM network structure:

[0124] Efficient channel attention module (Efficient Channel Attention, ECA): In order to improve the feature representation ability without significantly increasing the computational burden, the network inserts the ECA attention mechanism after each convolution module. This module first performs global average pooling on the input feature map in the spatial dimension to extract the global response of each channel as a channel descriptor; then, a lightweight one-dimensional convolution with adaptive kernel size is used to process the descriptor to capture the local interaction between channels.

[0125] The convolution kernel size k is calculated as follows:

[0126]

[0127] Where C is the number of channels, which is 256, and γ and b are adjustment hyperparameters, which are set to 2 and 1 respectively. The convolution result is activated by Sigmoid to be used as the channel attention weight, which is applied to the original feature map. Through the multiplication operation between channels, the effective channels are highlighted and the redundant channels are suppressed, thereby enhancing the discriminability of the features.

[0128] Light Gated Linear Unit (LightGLU): To further enhance the feature selectivity, a LightGLU activation mechanism is used after the ECA module. This module generates channel-level gating weights through a learnable linear transformation plus a Sigmoid activation function, and element-wise multiplies with the original features. This gating mechanism realizes nonlinear modulation in the feature space, further enhancing the model's response ability to key features, and has extremely low computational overhead.

[0129] Through the integration of the above modules, the NICMM network can realize efficient modeling of input features and output an implicit scalar field function defined on the vertices of the triangular mesh.

[0130] Step six, a two-stage optimization strategy is used to train the neural network to obtain an implicit scalar field function φ Θ that can accurately generate geometric constraints. The training process does not rely on real labeled curves (i.e. no Ground Truth), but uses user input constraints and guide fields, combined with geometric and physical priors to construct a loss function, and performs individual optimization on each instance. Specifically, it includes the following two stages:

[0131] The first stage is the pre-training stage. For each mesh M = (V, F) to be processed, 1000 groups of interpolation point sequences and feature point sequences are randomly sampled from its vertex set. Each group contains 3-5 vertices as simulated curve constraint inputs. First, a new mesh M' is obtained according to P c embedding, then according to M', P c and P f , φ p , φ0 and φ fea are generated according to the operation of step three, and the input feature tensor X input is obtained by concatenating the corresponding vertex coordinates and vertex normal vectors. The network output is the implicit function value φ Θ (v) defined on the vertices, and the model parameters Θ are trained by the following optimization objective:

[0132]

[0133] The optimization process uses the AdamW optimizer with an initial learning rate of 0.01. This stage is mainly used to obtain the initialization parameters Θ *, thereby improving the convergence efficiency of the subsequent training phase. This phase usually only needs 10 iterations to complete the optimization, and the training time is about 2 minutes. Compared with training from scratch, pre-training significantly speeds up the convergence, enabling the network to quickly adapt to individual input data, thereby achieving efficient and robust personalized curve generation.

[0134] The second stage is the parameter optimization stage. In this stage, the initial input features are constructed according to the user's actual input interpolation point sequence and feature point sequence, and the network parameters are further optimized to make the model predict the zero level set of the implicit function Θ :

[0135] Γ=φ Θ (-1) (0).

[0136] The geometric intent designed by the user. This stage continues to use the AdamW optimizer, but adjusts the learning rate to 0.001, and introduces an early stopping mechanism to speed up training. Specifically: for each model prediction Θ , extract the contour Γ where the implicit function value is 0, and calculate the smoothness term and curvature term energy in the region centered on Γ with a width of 1.5. If the loss function energy fluctuates by less than a threshold δ = 1e -5 -4 after a certain number of consecutive iterations, or is lower than the preset lower limit ò = 0.5, the training is terminated.

[0137] Step seven, extract the zero level set curve Γ from the model prediction Θ φ Figure 7 , as the target curve that satisfies the geometric constraints (as shown in

[0138] Corresponding to the above-mentioned embodiments of the discrete grid implicit curve design method based on deep neural network, embodiments of the discrete grid implicit curve generation device based on deep neural network are also provided.

[0139] Referring to Figure 8 , the discrete grid implicit curve generation device based on deep neural network provided comprises a memory and one or more processors, the memory stores executable code, and the processor executes the executable code to implement one of the above-mentioned embodiments of the discrete grid implicit curve design method based on deep neural network.

[0140] In summary, the embodiment of the device for generating discrete grid implicit curve based on deep neural network provided by the application can be applied to any device with data processing capability, which can be a device or apparatus such as a computer. The device embodiment can be realized by software, and can also be realized by hardware or a combination of software and hardware. Taking software realization as an example, as a logical device, it is formed by reading the corresponding computer program instructions in the non-volatile memory into the memory for running by the processor of the device with data processing capability. From the hardware level, as shown in Figure 8 Fig. 1 is a hardware structure diagram of the device for generating discrete grid implicit curve based on deep neural network provided by the application in any device with data processing capability, in addition to the processor, the memory, the network interface, and the non-volatile memory shown in Figure 8 Fig. 1, the device in the embodiment in any device with data processing capability usually further includes other hardware according to the actual function of the device with data processing capability, which will not be described here.

[0141] The implementation process of the functions and roles of each unit in the above device is specifically described in the implementation process of the corresponding steps in the above method, which will not be described here.

[0142] It should be noted that in this paper, relationship terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between the entities or operations. Moreover, the terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device.

[0143] The above is only the preferred embodiment of the application, and does not limit the application in any way. Although the embodiments of the application have been shown and described, those skilled in the art can understand that various changes, modifications, replacements and variations can be made to the embodiments without departing from the principles and spirit of the application, and the scope of the application is defined by the appended claims and their equivalents.

Claims

1. A discrete grid implicit curve design method based on deep neural networks, characterized in that, The method includes the following steps: Step 1: Obtain the input triangular mesh and the user-specified sequence of interpolation points and feature points; Step 2: Insert the interpolation points as "virtual vertices" into the mesh surface and construct the updated topology; Step 3: Based on the updated mesh, extract vertex coordinates, normal vectors and interpolation fields, signed distance fields and feature guidance fields as network input features; Step 4: Construct a loss function using physical constraints and optimize the network to generate implicit functions that satisfy the constraints; Step 5: Construct a neural network containing an attention module and a gating unit to predict the implicit scalar field φ; Step six: A two-stage training strategy is adopted to improve the efficiency of model generation; Step 7: Extract the zero-level set curve from the predicted implicit field as the final target curve.

2. The discrete grid implicit curve design method based on deep neural networks according to claim 1, characterized in that, In step two, the insertion of the interpolation point includes: when the interpolation point is inside the face, the triangular face is virtually divided into three sub-triangles; when the interpolation point is on the edge, the edge is virtually split so that the interpolation point becomes a grid vertex; when the interpolation point is on a vertex, no processing is performed.

3. The discrete grid implicit curve design method based on deep neural networks according to claim 1, characterized in that, In step three, the signed distance field is constructed as follows: First, the interpolation point sequence is sorted, and then a closed polygonal path along the edge is constructed based on the ordered interpolation points. The shortest path between each pair of points is calculated using Dijkstra's algorithm and then spliced ​​into a closed loop. If the closed loop is a simple loop, the unsigned distance field is calculated using the hot kernel method, and a sign value is assigned based on the relationship between the inside and outside of the closed loop to obtain the signed distance field. Otherwise, the unsigned field is used directly as the initial signed distance field.

4. The discrete grid implicit curve design method based on deep neural networks according to claim 1, characterized in that, In step three, the feature guidance term is implemented through a feature field, which diffuses the influence of user-specified "attraction points" and "repulsion points" through a Gaussian kernel function to construct a region-aware scalar guidance field; Specifically, the feature-guided field is constructed as follows: a feature-guided scalar field φ, initially set to 0 and defined on the grid vertices, is constructed. fea For user-specified obstacle points, φ fea The corresponding position value is set to 1, and a Gaussian kernel function is used to gradually decay the surrounding area to 0; for the user-specified feature alignment region, φ fea The corresponding position value is set to -1.

5. The discrete grid implicit curve design method based on deep neural networks according to claim 1, characterized in that, In step three, the network input feature is a nine-dimensional vector, specifically including: vertex coordinates, normal vector, interpolation field, signed distance field, and feature guidance field.

6. The discrete grid implicit curve design method based on deep neural networks according to claim 1, characterized in that, The loss function L total Includes the following four items: L total =L sdf +λ int L int +λ smooth L smooth +λ fea L fea , Wherein, λ before each loss term represents the weight of the corresponding term; Signed distance field regularization term L sdf The model predicts the level set function by regularizing it using the Eikonal equation, thus constraining the gradient magnitude of the predicted level set function. This method employs a smooth energy form with good numerical stability. in Let φ be the gradient of the level set function; Interpolation point constraint term L int This is used to force the prediction level set function to be zero at the interpolation point: Where p i Indicates the interpolation point specified by the user; Curve smoothing term L smooth The smoothness of the generated curve is ensured by minimizing the geodesic curvature energy of the curve. Specifically, the Willmore energy formula is used to minimize the geometric curvature of the zero contour lines of the predicted level set function. Where Γ represents the zero contour line of the level set function, κ represents the geodesic curvature, and δ(φ) is the Dirac function. Non-zero values ​​in φ are set to zero to ensure that the predicted field remains continuous near the curve. Feature guide item L fea Used to guide the zero-level set contour lines closer to or from the characteristic region: Where φ fea This represents a feature-guided field generated by user-specified feature points.

7. The discrete grid implicit curve design method based on deep neural networks according to claim 1, characterized in that, In step four, the curve regularization term adopts the rewritten Eikonal term, and is applied through the gradient operator of the implicit function φ. Approximate calculations are performed; the curve smoothing term is approximated using the rewritten Willmore energy form and the Laplace operator Δφ of the implicit function φ; the regularization constraint of the geodesic distance field is applied. Treating this as a priori constraint simplifies the above formula. Simultaneously, the Laplace operator Δφ of the level set function φ is used to approximate the geodesic curvature κ. In this case, the curve smoothing term L... smooth It can be written as:

8. The discrete grid implicit curve design method based on deep neural networks according to claim 1, characterized in that, In step five, the neural network includes the following two feature enhancement modules: an efficient channel attention module (ECA) to improve feature representation capabilities without significantly increasing computational burden; and a lightweight gating unit (Light GLU) to enhance the model's feature selectivity and nonlinear expression capabilities.

9. The discrete grid implicit curve design method based on deep neural networks according to claim 1, characterized in that, In step five, a two-stage training strategy is adopted to improve the model generation efficiency; specifically: the first stage is the pre-training stage; by sampling multiple sets of interpolation points and feature point sequences on the input grid to form a dataset, the model parameters Θ are trained by optimizing the target as follows: Where φ Θ (P i The first stage is the level set function defined on the grid vertices; the pre-trained model obtained in this stage is used to improve the convergence efficiency of subsequent training stages; the second stage is the parameter optimization stage. This stage constructs initial input features based on the interpolation point sequence and feature point sequence of the actual user input, and further optimizes the network parameters to improve the model's prediction of the implicit function φ. Θ The zero-level set.

10. A discrete grid implicit curve generation device based on deep neural networks, comprising a memory and one or more processors, wherein the memory stores executable code, characterized in that, When the processor executes the executable code, it implements the discrete grid implicit curve design method based on deep neural networks as described in any one of claims 1-9.