Mesh model skeleton binding method, device, computer equipment and storage medium

By predicting the joint position vector and connection probability matrix of the 3D animation character grid model in the network, bone binding is automatically performed, solving the problem of low bone binding efficiency in the existing technology, and achieving more efficient and high-quality binding effects.

CN119784908APending Publication Date: 2025-04-08BEIJING SHENGSHU TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411925653.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-25
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

In the prior art, the skeleton binding efficiency of the 3D animation character grid model is low, and animator needs to manually adjust the parameters, which is time-consuming and labor-intensive.

Method used

By receiving the target role's mesh model, input it into the first prediction network to predict the joint position vector, then input the mesh model and joint position vector to the second prediction network to output the joint connection probability matrix, and finally use this information for bone binding.

Benefits of technology

Reduce or avoid manual adjustment of binding parameters, improve the efficiency of bone binding, and generate high-quality binding results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119784908A_ABST
    Figure CN119784908A_ABST
Patent Text Reader

Abstract

The present invention provides a skeleton binding method, device, computer equipment and storage medium for a mesh model. The method comprises receiving a mesh model of a target character; inputting the mesh model into a first prediction network, wherein the first prediction network is used to predict the joint position vector of the target character's skeleton joint according to the mesh model, and the joint position vector includes the offset of the point on the skeleton joint from the target character's skin; inputting the mesh model and the joint position vector into a second prediction network, wherein the second prediction network is used to output a joint connection probability matrix according to the mesh model and the joint position vector, and the joint connection probability matrix includes the connection probability between the skeleton joints; and skeleton binding the mesh model using the joint position vector and the joint connection probability matrix. Through the present invention, the skeleton binding efficiency of the mesh model can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of animation modeling technology, and in particular to a skeleton binding method, device, computer equipment and storage medium for a mesh model. Background Art

[0002] In recent years, significant progress has been made in artificial intelligence generated content (AIGC), with inputs in various forms such as text, images, videos, audio, and 3D content. 3D content is the visual form closest to the real-world 3D environment and contains a huge amount of knowledge. With the vigorous development of AI technology, 3D content generation has received increasing attention in various fields, especially in games, entertainment design, movies, mixed reality, and social media. On the other hand, users' demand for diverse, high-quality, animatable characters and avatars is growing rapidly.

[0003] At present, when making 3D animation characters, artists usually need to manually create the character's physical mesh model in 3D modeling software to form the skin, including the character's body structure, facial details, etc., and create a skeleton, that is, a virtual bone joint, which constitutes the internal structure of the character. Then bind the skeleton to the skin so that the movement of the skeleton can drive the change of the mesh surface, so that the character can "move", to achieve the creation and driving of 3D animation characters. The emergence of this animation bone binding technology provides technical support for animation design, broadens the creative space of animation design, and continuously innovates the creative concept.

[0004] In the prior art, in the process of creating a skeleton and binding it to the skin, in order to achieve fine control of the skeleton over the mesh model, animators usually adjust the parameters manually. Even for a professional animator, it is very time-consuming and laborious to obtain a satisfactory binding result.

[0005] Therefore, how to improve the skeleton binding efficiency of 3D character mesh models has become a technical problem that needs to be solved urgently in this field. Summary of the invention

[0006] The purpose of the present invention is to provide a skeleton binding method, device, computer equipment and storage medium for a mesh model, which are used to solve the above-mentioned technical problems in the prior art.

[0007] On the one hand, to achieve the above-mentioned purpose, the present invention provides a skeleton binding method for a mesh model.

[0008] The skeleton binding method of the mesh model includes: receiving the mesh model of the target character; inputting the mesh model into a first prediction network, wherein the first prediction network is used to predict the joint position vectors of the skeleton joints of the target character according to the mesh model, and the joint position vectors include the offset of the points on the skeleton joints from the skin of the target character; inputting the mesh model and the joint position vectors into a second prediction network, wherein the second prediction network is used to output a joint connection probability matrix according to the mesh model and the joint position vectors, and the joint connection probability matrix includes the connection probabilities between the skeleton joints; and skeleton binding the mesh model using the joint position vectors and the joint connection probability matrix.

[0009] Furthermore, before using the joint connection probability for skeleton binding, the method also includes: converting the joint connection probability matrix into a weight matrix through a weight function; using the skeleton joints as nodes and the weights corresponding to the two nodes in the weight matrix as the weights of the edges between the two nodes to construct a graph structure; removing redundant edges in the graph structure according to the weight size to generate a skeleton tree structure, wherein the skeleton tree structure is used for skeleton binding.

[0010] Furthermore, the step of performing skeleton binding on the mesh model includes: displaying the joint position vector and the skeleton tree structure; receiving adjustment information of the joint position vector and / or the skeleton tree structure; modifying the joint position vector and / or the skeleton tree structure according to the adjustment information; and performing skeleton binding on the mesh model using the modified joint position vector and the skeleton tree structure.

[0011] Furthermore, the following steps are adopted to train and obtain the first prediction network and the second prediction network: obtain a sample grid model set, wherein the sample grid model set includes multiple sample grid models, and each sample grid model corresponds to a sample character; annotate the joint position vectors of the sample grid model to obtain the sample joint position vectors, and annotate the joint connection probability matrix of the sample grid model to obtain the sample joint connection probability matrix; construct an initial first prediction network and an initial second prediction network; use the sample grid model as the input data of the initial first prediction network, use the sample joint position vector as the target data of the initial first prediction network, use the output data of the sample grid model and the initial first prediction network as the input data of the initial second prediction network, use the sample joint connection probability matrix as the target data of the initial second prediction network, and iteratively train the initial first prediction network and the initial second prediction network to obtain the initial first prediction network and the initial second prediction network.

[0012] Furthermore, iterative training of the initial first prediction network and the initial second prediction network includes: step S1: randomly obtaining a number of sample grid models from the sample grid model set, and training the initial first prediction network and the initial second prediction network; step S2: after each training, the total loss is calculated using the following formula : ,in, To control the first loss and the second loss The balance parameter between the two is in the range of [0, 1]. is the loss of the initial first prediction network in the current training, and the second loss is the loss of the initial second prediction network in the current training; Step S3: Determine the total loss The value of decreases, where the total loss When the value of no longer decreases, step S4 is executed. When the total loss When the value of still decreases, return to step S1; Step S4: stop training and output the first prediction network and the second prediction network.

[0013] Furthermore, the first loss is calculated using the following formula: and the second loss :

[0014]

[0015]

[0016]

[0017] Among them, S is the number of sample grid models participating in the current training, is the first mean absolute error, is the first mean absolute error of the mth sample mesh model, and the first mean absolute error is the predicted joint position vector of the skeletal joint for a sample mesh model. and the true joint position vector The mean absolute error is, N is the number of skeletal joints of the sample mesh model, is the second mean absolute error, is the second mean absolute error of the mth sample mesh model, and the second mean absolute error is the predicted connection probability of two bone joints for one sample mesh model. The probability of connecting with the real The mean absolute error between .

[0018] Furthermore, the mesh model includes vertex data and face data, the first prediction network includes stacked multiple layers of graph convolution layers, a global pooling layer connected to each of the graph convolution layers, and a first multi-layer perceptron connected to each of the global pooling layers respectively, and inputting the mesh model into the first prediction network includes: generating an initial vertex feature matrix according to the vertex data; generating an adjacency matrix according to the face data; inputting the initial vertex feature matrix and the adjacency matrix into the first layer of graph convolution layer, and the input data of each subsequent layer of graph convolution layer includes the adjacency matrix and the vertex feature matrix output by the previous layer of graph convolution layer; inputting the vertex feature matrix output by each of the graph convolution layers into the global pooling layer, and each of the global pooling layers outputs a global feature vector corresponding to the graph convolution layer; and splicing each of the global feature vectors into the first multi-layer perceptron, wherein the first multi-layer perceptron is used to extract a nonlinear representation of the global feature vector to output the joint position vector.

[0019] Furthermore, the second prediction network includes a second multilayer perceptron and an output conversion layer, and inputting the mesh model and the joint position vector into the second prediction network includes: generating offset vectors of two skeletal joints according to the joint position vector; splicing the offset vectors of the two skeletal joints and the mesh model to obtain a splicing feature matrix; inputting the splicing feature matrix into the second multilayer perceptron, wherein the second multilayer perceptron is used to extract nonlinear features of the splicing feature matrix to output an intermediate representation of the connection probability; and inputting the intermediate representation of the connection probability into the output conversion layer to output the joint connection probability matrix.

[0020] On the other hand, to achieve the above-mentioned purpose, the present invention provides a skeleton binding device for a mesh model.

[0021] The skeleton binding device of the mesh model includes: a receiving module, which is used to receive the mesh model of the target character; a first processing module, which is used to input the mesh model into a first prediction network, wherein the first prediction network is used to predict the joint position vectors of the skeleton joints of the target character according to the mesh model, and the joint position vectors include the offset of the points on the skeleton joints from the skin of the target character; a second processing module, which is used to input the mesh model and the joint position vectors into a second prediction network, wherein the second prediction network is used to output a joint connection probability matrix according to the mesh model and the joint position vectors, and the joint connection probability matrix includes the connection probabilities between the skeleton joints; and a binding module, which is used to perform skeleton binding on the mesh model using the joint position vectors and the joint connection probability matrix.

[0022] On the other hand, to achieve the above objectives, the present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.

[0023] On the other hand, to achieve the above object, the present invention also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above method are implemented.

[0024] The skeleton binding method, device, computer equipment and storage medium of the mesh model provided by the present invention, in the skeleton binding method of the mesh model, when binding the mesh model of the target character, the mesh model is input into the first prediction network to obtain the joint position vector, and then the mesh model and the joint position vector are input into the second prediction network to obtain the joint connection probability matrix, and finally the mesh model can be skeleton-bound based on the joint position vector and the joint connection probability matrix. Through the present invention, the manual adjustment of binding parameters in the binding process is reduced or avoided, and the efficiency of binding is improved, wherein the joint position vector corresponds to the skeleton joint, including the offset of multiple points on the skeleton joint from the skin, and is directly generated by learning, and the dependence on artificial skeleton annotation is reduced. On the basis of, the shape and distribution of the joint can also be more accurately described, which is helpful to generate high-quality binding results; at the same time, the joint connection probability matrix is ​​used to limit the joint connection relationship, and it can also be directly generated by learning, and on the basis of reducing the dependence on artificial skeleton annotation, the probability is used to limit the strength of the connection relationship between the skeleton joints, and the binding weight can be better adjusted, and the binding effect can be further improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings: Figure 1 A flowchart of a skeleton binding method for a mesh model provided in Embodiment 1 of the present invention; Figure 2 A flowchart of another mesh model skeleton binding method provided in Embodiment 1 of the present invention; Figure 3 A schematic diagram of a first prediction network provided in Embodiment 1 of the present invention; Figure 4 A schematic diagram of a second prediction network provided in Embodiment 1 of the present invention; Figure 5 A block diagram of a skeleton binding device for a mesh model provided in Embodiment 2 of the present invention; Figure 6 This is a hardware structure diagram of a computer device provided in Embodiment 3 of the present invention. DETAILED DESCRIPTION

[0026] In order to make the purpose, technical scheme and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0027] Embodiment 1 The embodiment of the present invention provides a mesh model skeleton binding method, through which a prediction model is pre-trained, so that the mesh model can be used to predict the offset of points on the skeleton joints from the character skin and the connection between the skeleton joints, and then the mesh model is skeleton bound based on the prediction results, reducing the process of manually adjusting parameters during the skeleton binding process, and improving the skeleton binding efficiency of the 3D character mesh model. Specifically, Figure 1 A flowchart of a skeleton binding method for a mesh model provided in the first embodiment of the present invention, such as Figure 1 As shown, the skeleton binding method of the mesh model provided in this embodiment includes the following steps S101 to S104.

[0028] Step S101: receiving a mesh model of a target character.

[0029] Specifically, the target character can be a humanoid cartoon character, a quadruped cartoon character, a bird cartoon character, or other types of cartoon characters. The mesh model includes the geometric information of the target character, such as vertex data and face data, which are used to describe the shape and topological structure of the character. Among them, the mesh vertex is the basic component unit of the mesh. Each vertex represents its position in space with three-dimensional coordinates. The three-dimensional coordinate representation of the vertex is also the vertex data. The mesh face is the component unit of the mesh surface, which is defined by several vertex indices. For example, a triangular face is composed of 3 vertex indices, and a quadrilateral face is composed of 4 vertex indices. The vertex index of the component face is also the face data. For a character, the mesh surface is also the skin of the character.

[0030] Step S102: inputting the grid model into the first prediction network.

[0031] The first prediction network is used to predict the joint position vector of the target character's skeletal joint according to the grid model. The joint position vector includes a plurality of first elements, and the first element represents the offset of a point on the skeletal joint from the target character's skin.

[0032] Specifically, the inventors found that the geometric features defined by the character's mesh model imply the distribution rules of the character's skeletal joints. Therefore, by training the neural network, it is possible to learn local features of the mesh model such as curvature and boundaries from the above geometric features, and also learn global features such as the symmetry and proportion of the mesh as a whole, and then predict the character's joint information based on these local and global features.

[0033] On this basis, a neural network model and a training sample set are constructed. The training sample includes the mesh model of the character and the joint information of the character. The mesh model is used as input data and the joint information is used as the output target. The neural network model is trained to obtain a prediction network that can predict the character's joint information based on the character's mesh model. In this application, the prediction network is defined as the first prediction network. Therefore, in this step, the mesh model of the target character is input into the pre-trained first prediction network, and the first prediction network can predict the joint information.

[0034] In this embodiment, for the mesh model of the target character, the joint information predicted by the first prediction network is expressed as an N-dimensional vector It can be expressed in the form of, where n represents the number of skeletal joints contained in the mesh model, each dimensional joint position vector corresponds to a skeletal joint, including N first elements, each element representing the offset of a point on the skeletal joint from the target character's skin. The target character's skin is also the mesh surface, and the offset of the point on the skeletal joint from the target character's skin can be the vector between the reference point on the skeletal joint and the reference point on the mesh surface. Further, the reference point on the skeletal joint can be the reference point generated when the neural network learns the position of the skeletal joint through the mesh model, for example, it can include the center point of the skeletal joint, the local depression point of the joint bending part, the point with higher curvature, etc. The reference point of the mesh surface can be defined as the point on the mesh surface that is closest to the skeletal joint reference point, or it can also be defined as the projection point obtained by projecting the reference point of the skeletal joint onto the mesh surface.

[0035] In this embodiment, the above-mentioned joint position vector is constructed to limit the joint information. The N-dimensional offset corresponding to each skeletal joint can more accurately describe the position and shape of the joint area, which is conducive to describing a high-precision skeletal model. The multi-point offset can also support more complex binding strategies, making the deformation of the mesh smoother and more natural, thereby retaining more geometric details and enhancing the realism of the animation effect.

[0036] Step S103: Input the mesh model and the joint position vector into the second prediction network.

[0037] The second prediction network is used to output a joint connection probability matrix according to the grid model and the joint position vector, and the joint connection probability matrix includes multiple second elements, and the second elements represent the connection probability of two skeletal joints.

[0038] Specifically, the inventors have found that the mesh model and the above-mentioned joint position vectors can provide sufficient information to describe the spatial distribution, geometric relationships and potential connection patterns of the joints in the mesh. Therefore, by training the neural network, the geometric shape, spatial relationships and topological characteristics of the skeletal joints can be learned from the above information, and the natural connection relationship between the skeletal joints can be inferred.

[0039] On this basis, a neural network model and a training sample set are constructed. The training samples include the mesh model of the character, the corresponding joint position vectors, and the connection relationship between the joints. The mesh model and the corresponding joint position vectors are used as input data, and the connection relationship between the joints is used as the output target. The neural network model is trained to obtain a prediction network that can predict the connection relationship between the joints based on the character mesh model and the corresponding joint position vectors. In this application, the prediction network is defined as the second prediction network. Therefore, in this step, the mesh model of the target character and the joint position vectors output by the above-mentioned first prediction network are input into the pre-trained second prediction network, and the second prediction network can predict the connection relationship between the joints.

[0040] In this embodiment, for the mesh model of the target character, the connection relationship between the joints predicted by the second prediction network is expressed as a joint connection probability matrix To represent, where n represents the number of bone joints contained in the mesh model, the matrix includes multiple second elements, and each second element represents the connection probability of two bone joints.

[0041] In this embodiment, the connection relationship between joints is characterized by a joint connection probability matrix. The probability value is a continuous variable ranging from [0,1]. The size of the value can express the strength of the joint connection, rather than simply "connected" or "not connected". In the process of bone generation or inference, there may be some unclear joint connection relationships. The probability matrix can quantify this uncertainty, which is suitable for processing complex bone structures in diverse models such as humans and animals.

[0042] Step S104: Use the joint position vectors and the joint connection probability matrix to perform skeleton binding on the mesh model.

[0043] Specifically, the core goal of bone binding is to assign one or more bone joints to each mesh vertex in the mesh model so that the position of the vertex can be deformed with the movement of the bone joints. The output of the binding includes the joint weight matrix and the bone topology. The joint weight matrix is ​​used to describe which bone joints each vertex is affected by and the strength of the influence; the bone topology is used to describe the connection relationship between the bone joints and determine the hierarchical structure of the joints.

[0044] In this embodiment, the specific position of the skeletal joint in three-dimensional space is provided by the joint position vector, and the joint weight matrix is ​​obtained by relying on the spatial relationship between the vertex and the joint position; the joint connection probability matrix describes the connection relationship and its strength between the skeletal joints, which can derive the hierarchical structure of the skeleton, and also provide a reference for the binding weight distribution, ensuring that the binding relationship conforms to the logic of the skeleton topology. Optionally, when the mesh model is skeletally bound using the joint position vector and the joint connection probability matrix, the joint position is calculated using the joint position vector corresponding to the skeletal joint, and then the distance between the mesh vertex and the joint is calculated, and the distance is used to further calculate the initial weight of the vertex to the joint, and then the joint connection probability matrix is ​​used to adjust the weight distribution, for example, to enhance the weight of the directly connected joints, and limit the binding weight of the unconnected joints, so that it conforms to the hierarchical logic of the skeleton, and generates a binding result that conforms to the logic of the skeleton structure.

[0045] In the mesh model skeleton binding method provided in this embodiment, when binding the mesh model of the target character, the mesh model is input into the first prediction network to obtain the joint position vector, and then the mesh model and the joint position vector are input into the second prediction network to obtain the joint connection probability matrix. Finally, the mesh model can be skeleton bound based on the joint position vector and the joint connection probability matrix, thereby reducing or avoiding manual adjustment of binding parameters during the binding process and improving the efficiency of binding. The joint position vector corresponds to the skeletal joint, including the offset of multiple points on the skeletal joint from the skin. It is directly generated through learning, reducing the dependence on artificial skeletal annotation, and can also more accurately describe the shape and distribution of the joint, which is helpful to generate high-quality binding results. At the same time, the joint connection probability matrix is ​​used to limit the joint connection relationship, which can also be directly generated through learning, reducing the dependence on artificial skeletal annotation, and using probability to limit the strength of the connection relationship between skeletal joints can better adjust the binding weight and further improve the binding effect.

[0046] Figure 2 A flowchart of another mesh model skeleton binding method provided in Embodiment 1 of the present invention. Optionally, in one embodiment, Figure 2As shown, before using the joint connection probability to perform skeleton binding, the method also includes: step S105: converting the joint connection probability matrix into a weight matrix through a weight function; step S106: using skeleton joints as nodes and the weights corresponding to two nodes in the weight matrix as the weights of the edges between the two nodes to construct a graph structure; step S107: removing redundant edges in the graph structure according to the weight size to generate a skeleton tree structure, wherein in step S104, the skeleton tree structure is used for skeleton binding.

[0047] Specifically, when converting the joint connection probability matrix into a weight matrix through a weight function, a negative logarithmic transformation or an inverse transformation can be performed. The smaller the weight value obtained, the stronger the connection relationship between the two skeletal joints. Then each skeletal joint is taken as a node, and the weight of each pair of joints in the weight matrix, that is, the weights corresponding to the two nodes, are used as edge weights to construct a graph structure. For this graph structure, according to the size of the edge weight, the edges with larger weights are excluded first, and the redundant edges in the graph structure are removed. Among them, when the mesh model has K joints, the graph structure constructed by the original weight matrix includes K*(K−1) / 2 edges. After removing the redundant edges, a skeletal tree structure including K−1 edges can be obtained. The generated skeletal tree structure is used for skeletal binding. When calculating the weight distribution between mesh vertices and skeletal joints, the computational efficiency of skeletal binding can be improved.

[0048] Optionally, in one embodiment, the step of performing skeleton binding on the mesh model includes: displaying joint position vectors and a skeleton tree structure; receiving adjustment information of the joint position vectors and / or the skeleton tree structure; modifying the joint position vectors and / or the skeleton tree structure according to the adjustment information; and performing skeleton binding on the mesh model using the modified joint position vectors and the skeleton tree structure.

[0049] Specifically, the joint position vectors can be displayed through three-dimensional visualization tools. For example, in a three-dimensional view, the joint position vectors are displayed on the mesh model through a graphical representation of the joint point (such as a sphere or a point). Each joint point can be distinguished by a unique identifier (such as a number or a name). Specifically, three-dimensional rendering technology can be used to draw the joint point position on the surface of the mesh model or near it to intuitively display the spatial relationship between the joint and the mesh. The bone tree structure represents the connection relationship between joints and can be visualized in the form of a bone chain, that is, the associated joint points are connected by straight lines or curves to reflect the hierarchical relationship between parent and child nodes. According to the bone tree structure, the color or thickness of the bone chain is dynamically adjusted to indicate the connection strength or specific level. Specifically, the bone tree structure can be superimposed on the mesh model, and the topological information can be displayed through dynamic rendering of the bone chain.

[0050] The user can modify the three-dimensional position of the joint by manual operation to correct the deviation in the automatic prediction or optimize the position layout of the joint. For example, using the drag operation method, the user drags the joint point to the target position through a mouse or a touch device; for example, using the numerical input method, the user directly inputs the joint position vector. At the same time, the user can also modify the connection relationship between the joints (such as adding a new connection, deleting a connection or adjusting the weight). For example, using the add and delete operation method, the user adds or deletes the connection between the joints by clicking the button on the interface; for example, using the drag operation method, the user dynamically changes the skeleton tree structure by dragging the joint or the connection line; for example, using the weight adjustment method, the connection weight value is adjusted in the interface to affect the performance of the skeleton chain. In this embodiment, a friendly user interface can be provided, including a three-dimensional display window, a control panel, a parameter input box, etc. The user's adjustment operation will be reflected in real time in the three-dimensional view, and the adjusted joint position vector and skeleton tree structure will be displayed. The adjusted joint position vector replaces the original joint position vector, and the skeleton tree structure is regenerated according to the connection information adjusted by the user. The modified joint position vector and skeleton tree structure are saved in the form of a file for use in the subsequent skeleton binding process.

[0051] By adopting the mesh model skeleton binding method provided in this embodiment, the user can manually adjust the joint position and connection relationship for a specific mesh model, correct the deviation in the automatic prediction, make the skeleton binding more in line with actual needs, and adapt to diverse model shapes and animation requirements. At the same time, the real-time display and adjustment functions enable the user to quickly verify and optimize the skeleton binding results and improve work efficiency.

[0052] Optionally, in one embodiment, the following steps are used to train the first prediction network and the second prediction network: obtain a sample grid model set, wherein the sample grid model set includes multiple sample grid models, and each sample grid model corresponds to a sample character; annotate the joint position vectors of the sample grid model to obtain the sample joint position vectors, and annotate the joint connection probability matrix of the sample grid model to obtain the sample joint connection probability matrix; construct an initial first prediction network and an initial second prediction network; use the sample grid model as input data of the initial first prediction network, use the sample joint position vector as target data of the initial first prediction network, use the output data of the sample grid model and the initial first prediction network as input data of the initial second prediction network, use the sample joint connection probability matrix as target data of the initial second prediction network, and iteratively train the initial first prediction network and the initial second prediction network to obtain the first prediction network and the second prediction network.

[0053] Specifically, when the first prediction network and the second prediction network are obtained through training, it is necessary to first obtain enough sample mesh models to construct a sample mesh model set. Each sample mesh model is a three-dimensional character mesh, which can be generated by three-dimensional modeling software or collected by scanning technology. Optionally, regular geometric mesh models of various types of 3D characters are obtained to form a sample mesh model set, and are divided into a training set and a test set. The sample mesh model set includes sample mesh models corresponding to sample characters of different types and different structures of the same type, such as human models, animal models or mechanical models. The diversity of samples in terms of size, posture, topological structure, etc. helps to improve the generalization ability of the prediction network for different characters.

[0054] After obtaining the sample mesh model set, add joint position information to the sample mesh model through manual annotation, automatic annotation algorithm or data acquisition equipment to generate a sample joint position vector. Specifically, the position of the skeletal joint can be determined in the sample mesh model, and then the offset of each point on the skeletal joint to the mesh surface is calculated as a first element. Multiple first elements are calculated and stored as the joint position vector corresponding to the skeletal joint. At the same time, determine which joints are connected and assign a connection probability value to each pair of joints. For example, the connection relationship of all joints in each network model is represented by a pair matrix of probability values. To express it, we get the sample joint connection probability matrix, where n represents the number of joints contained in the mesh model, and the connection probability between every two joints forms an element of the matrix, that is, the second element. Optionally, if two joints are connected, the probability value is marked as 1, otherwise it is marked as 0.

[0055] When constructing the initial first prediction network and the initial second prediction network, optionally, based on the graph convolution and multi-layer perceptron MLP structures in the neural network, a skeletal joint position prediction network (i.e., the initial first prediction network) and a skeletal joint connection prediction network (i.e., the initial second prediction network) are designed respectively. Among them, the skeletal joint position prediction network is mainly composed of a plurality of graph convolution layers stacked, each of which is followed by a global maximum pooling layer, and the features of each pooling layer are connected to form a global grid representation, which is then processed by a multi-layer MLP; the skeletal joint connection prediction network is mainly based on a multi-layer perceptron MLP structure stacked to predict the connection probability between every two joint points.

[0056] The sample mesh model is used as the input data of the skeletal joint position prediction network, the labeled sample joint position vector is used as the target data of the skeletal joint position prediction network, the sample mesh model and the actual output data of the skeletal joint position prediction network are used as the input data of the skeletal joint connection prediction network, and the sample joint connection probability matrix is ​​used as the target data of the skeletal joint connection prediction network. The two prediction networks are iteratively trained, and one or more sample mesh models are selected for small batch training in each iteration. The network weights are optimized by back propagation until the network performance reaches the expected level.

[0057] The skeleton binding method of the mesh model provided by the embodiment first obtains a diverse set of sample mesh models as training samples; then, in each sample mesh model, annotates its joint position vector, determines the offset from the point on the bone joint to the mesh surface, annotates the joint connection probability matrix, and records the connection relationship between the bone joints; then, constructs an initial first prediction network and an initial second prediction network, and defines their input and target data respectively, and optimizes the prediction network performance by using the sample mesh model set through iterative training, wherein the initial first prediction network learns the mapping relationship between the sample mesh model and the joint position vector during the training process, and the initial second prediction network learns the mapping relationship between the sample mesh model, the joint position vector and the joint connection probability matrix during the training process, and finally obtains the trained first prediction network and the second prediction network, so that in the process of skeleton binding, only the mesh model needs to be input and reasoned, without the need for complex subsequent manual adjustment, and the skeleton binding of the mesh model can be completed efficiently and accurately, which improves the binding accuracy and versatility compared with the traditional method.

[0058] Optionally, in one embodiment, iterative training of the initial first prediction network and the initial second prediction network includes: step S1: randomly obtaining a number of sample grid models from the sample grid model set, and training the initial first prediction network and the initial second prediction network; step S2: after each training, the total loss is calculated using the following formula : ,in, To control the first loss and the second loss The balance parameter between the two is in the range of [0, 1]. The first loss The initial first prediction network loss in current training, the second loss is the loss of the initial second prediction network in the current training; Step S3: Determine the total loss The value of decreases, where the total loss When the value of no longer decreases, execute step S4. When the value of still decreases, return to step S1; Step S4: stop training and output the first prediction network and the second prediction network.

[0059] Specifically, when iteratively training the initial first prediction network and the initial second prediction network, first randomly obtain a number of sample grid models from the sample grid model set as small batch training samples, so that the network can be exposed to various grid structures and geometric features during the training process, while preventing overfitting and enhancing the network's generalization ability for new inputs. Optionally, the sample grid model set is shuffled and grouped by batch size, and different sample grid models are selected for each iteration to ensure the diversity of data distribution. During the training process, the overall error of the initial first prediction network and the initial second prediction network in the current training stage is evaluated, that is, whether the total loss decreases to determine whether the training is completed. If the total loss value still decreases, it means that the network performance is still improving, and the training continues; if the total loss value no longer decreases, or the decrease is less than the preset threshold, it means that the network performance has converged, and the training is completed at this time, and the trained first prediction network and second prediction network are output.

[0060] The skeleton binding method of the mesh model provided in this embodiment makes the distribution of training data more diversified based on the random acquisition of small batch samples, thereby improving the generalization ability of the model; the joint optimization based on the total loss makes the performance of the first prediction network and the second prediction network complement each other, and by controlling the balance parameters, the loss weights of the two networks can be dynamically adjusted according to training requirements, thereby realizing dynamic control of the training process and automatically stopping training, improving training efficiency and accuracy, reducing the cost and complexity of manual intervention, providing effective guarantee for the stable training of the network, and thus improving the prediction effect of the network.

[0061] Optionally, in one embodiment, the first loss is calculated using the following formula: and the second loss :

[0062]

[0063]

[0064]

[0065] Among them, S is the number of sample grid models participating in the current training, is the first mean absolute error, is the first mean absolute error of the mth sample mesh model. The first mean absolute error is the predicted joint position vector of the skeletal joint for a sample mesh model. and the true joint position vector The mean absolute error is , N is the number of skeletal joints of the sample mesh model, is the second mean absolute error, is the second mean absolute error of the mth sample mesh model. The second mean absolute error is the predicted connection probability of two bone joints for a sample mesh model. The probability of connecting with the real The mean absolute error between .

[0066] Among them, the first loss measures the performance of the first prediction network, specifically the error between the predicted joint position vector (output by the first prediction network) and the true joint position vector (annotated), so as to ensure that the predicted joint position can be as close as possible to the true annotated joint position. The second loss measures the performance of the second prediction network, specifically the error between the predicted joint connection probability (output by the second prediction network) and the true connection probability (annotated), so as to ensure that the predicted joint connection probability can be as close as possible to the true annotated joint connection probability. The above formulas for calculating the first loss and the second loss are based on the mean absolute error, which is more tolerant to outliers in the prediction results, can improve the optimization efficiency of the first prediction network and the second prediction network, enhance the stability of training and the accuracy of prediction results, and provide reliable support for the bone binding of subsequent mesh models.

[0067] Figure 3 Schematic diagram of a first prediction network provided in Embodiment 1 of the present invention. Optionally, in one embodiment, the mesh model includes vertex data and face data, such as Figure 3 As shown, the first prediction network includes stacked multi-layer graph convolution layers, a global pooling layer connected to each graph convolution layer, and a first multi-layer perceptron connected to each global pooling layer respectively. Inputting the mesh model into the first prediction network includes: generating an initial vertex feature matrix according to vertex data; generating an adjacency matrix according to face data; inputting the initial vertex feature matrix and the adjacency matrix into the first graph convolution layer, and the input data of each subsequent graph convolution layer includes the adjacency matrix and the vertex feature matrix output by the previous graph convolution layer; inputting the vertex feature matrix output by each graph convolution layer into the global pooling layer, and each global pooling layer outputs a global feature vector corresponding to a graph convolution layer; splicing each global feature vector into the first multi-layer perceptron, wherein the first multi-layer perceptron is used to extract a nonlinear representation of the global feature vector to output a joint position vector.

[0068] Specifically, the core of the first prediction network is the graph convolution layer, which is combined with the global pooling layer and the multi-layer perceptron for feature extraction and nonlinear representation. The steps of inputting the mesh model into the first prediction network are described in detail as follows. The mesh model includes vertex data and face data. The vertex data is used to generate a two-dimensional array of size V×3 as the initial vertex feature matrix, where V is the number of vertices in the mesh model, and the initial feature of each vertex contains the three-dimensional coordinates of the vertex; the face data is used to generate a two-dimensional matrix of size V×V as the adjacency matrix of the mesh, which is used to describe the topological structure of the mesh. If there is a connection between vertex i and vertex j, the corresponding element in the adjacency matrix is ​​1, otherwise it is 0.

[0069] The initial vertex feature matrix and adjacency matrix are input into the first graph convolution layer, and the first graph convolution layer outputs the vertex feature matrix; the vertex feature matrix and adjacency matrix output by the first graph convolution layer are then input into the second graph convolution layer, and the second graph convolution layer outputs the vertex feature matrix; the vertex feature matrix and adjacency matrix output by the second graph convolution layer are then input into the third graph convolution layer, and the third graph convolution layer outputs the vertex feature matrix, and so on, each graph convolution layer will output a vertex feature matrix.

[0070] The vertex feature matrix output by each graph convolution layer is input into a global pooling layer. Each global pooling layer is only responsible for processing the output of the corresponding graph convolution layer to generate the global feature vector of the corresponding graph convolution layer. The global feature vectors corresponding to all graph convolution layers are concatenated to form a comprehensive feature vector. Through the concatenation operation, the features output by each layer of graph convolution layer are comprehensively retained, including both low-level local features and high-level global features. Finally, a multi-layer perceptron is used to perform nonlinear mapping on the comprehensive feature vector to extract higher-order global feature patterns, that is, joint position vectors.

[0071] Using the skeleton binding method of the mesh model provided by this embodiment, the features of each graph convolution layer in the first prediction network are processed separately to ensure that the first prediction network can retain the feature information extracted by each layer without being covered or lost by subsequent layers. The global feature vectors of different layers are used to reflect the local and global characteristics of the mesh model respectively. The spliced ​​comprehensive feature vector more comprehensively represents the overall information of the mesh. Through the splicing and nonlinear mapping of global features layer by layer, the first multi-layer perceptron can generate joint position vectors more accurately, thereby improving the accuracy of skeleton binding. Each global pooling layer is processed independently to avoid the degradation of global features caused by single-layer errors.

[0072] Figure 4 A schematic diagram of a second prediction network provided in Embodiment 1 of the present invention. Optionally, in one embodiment, as Figure 4As shown, the second prediction network includes a second multi-layer perceptron and an output conversion layer, and inputting the mesh model and the joint position vector into the second prediction network includes: generating offset vectors of two skeletal joints according to the joint position vector; splicing the offset vectors of the two skeletal joints and the mesh model to obtain a splicing feature matrix; inputting the splicing feature matrix into the second multi-layer perceptron, wherein the second multi-layer perceptron is used to extract the nonlinear features of the splicing feature matrix to output an intermediate representation of the connection probability; and inputting the intermediate representation of the connection probability into the output conversion layer to output a joint connection probability matrix.

[0073] Specifically, the second prediction network mainly includes a second multi-layer perceptron and an output conversion layer. The second multi-layer perceptron is used to extract the nonlinear features of the splicing feature matrix and generate an intermediate representation of the connection probability. The output conversion layer is used to convert the intermediate representation of the connection probability into a joint connection probability matrix. The detailed description of the steps of inputting the mesh model and the joint position vector into the second prediction network is as follows. First, the offset vectors of all joint pairs are calculated according to the joint position vector, specifically the spatial offset of the two joints, which represents the relative position relationship of the two joints. As an input feature, it reflects the geometric relationship between the joints and is the core basis for judging whether there is a connection. Then the offset vectors of the joint pairs are spliced ​​with the features of the mesh model to generate a splicing feature matrix. Then the splicing feature matrix is ​​input into the second multi-layer perceptron to extract nonlinear features and generate an intermediate representation of the connection probability. Finally, the intermediate representation is input into the output conversion layer, and the joint connection probability matrix is ​​generated through a fully connected network and activation function mapping.

[0074] The skeleton binding method of the mesh model provided in this embodiment is adopted, and the offset vectors of two skeleton joints are used to strengthen the modeling of the geometric relationship between the joints, so as to provide accurate structural features for the second prediction network. At the same time, combined with the mesh model, that is, the global information of the mesh model and the local geometric information between the joints are combined, so that the second prediction network can more comprehensively analyze the possibility of joint connection, so that the second multi-layer perceptron can more accurately generate an intermediate representation of the connection probability, and then the output conversion layer can output a more accurate joint connection probability matrix, thereby improving the accuracy of skeleton binding.

[0075] Embodiment 2 Corresponding to the above-mentioned embodiment 1, embodiment 2 of the present invention provides a skeleton binding device for a mesh model. The corresponding technical feature details and corresponding technical effects can be referred to the above-mentioned embodiment 1, and will not be repeated in this embodiment. Figure 5 A block diagram of a skeleton binding device for a mesh model provided in the second embodiment of the present invention, such as Figure 5 As shown, the device includes: a receiving module 201, a first processing module 202, a second processing module 203 and a binding module 204.

[0076] Among them, the receiving module 201 is used to receive the mesh model of the target character; the first processing module 202 is used to input the mesh model into the first prediction network, wherein the first prediction network is used to predict the joint position vectors of the skeletal joints of the target character based on the mesh model, and the joint position vectors include the offset of the points on the skeletal joints from the skin of the target character; the second processing module 203 is used to input the mesh model and the joint position vectors into the second prediction network, wherein the second prediction network is used to output the joint connection probability matrix based on the mesh model and the joint position vectors, and the joint connection probability matrix includes the connection probabilities between the skeletal joints; and the binding module 204 is used to perform skeletal binding on the mesh model using the joint position vectors and the joint connection probability matrix.

[0077] Optionally, in one embodiment, the device also includes a simplification module, which is used to convert the joint connection probability matrix into a weight matrix through a weight function before the binding module uses the joint connection probability to perform skeleton binding, use the skeleton joints as nodes, and use the weights corresponding to the two nodes in the weight matrix as the weights of the edges between the two nodes to construct a graph structure, remove redundant edges in the graph structure according to the weight size, and generate a skeleton tree structure, wherein the binding module uses the skeleton tree structure to perform skeleton binding.

[0078] Optionally, in one embodiment, the following steps are used to train the first prediction network and the second prediction network: obtain a sample grid model set, wherein the sample grid model set includes multiple sample grid models, and each sample grid model corresponds to a sample character; annotate the joint position vectors of the sample grid model to obtain the sample joint position vectors, and annotate the joint connection probability matrix of the sample grid model to obtain the sample joint connection probability matrix; construct an initial first prediction network and an initial second prediction network; use the sample grid model as input data of the initial first prediction network, use the sample joint position vector as target data of the initial first prediction network, use the output data of the sample grid model and the initial first prediction network as input data of the initial second prediction network, use the sample joint connection probability matrix as target data of the initial second prediction network, and iteratively train the initial first prediction network and the initial second prediction network.

[0079] Optionally, in one implementation, iteratively training the initial first prediction network and the initial second prediction network includes: step S1: randomly obtaining a number of sample grid models from the sample grid model set, and training the initial first prediction network and the initial second prediction network; step S2: after each training, calculating the total loss using the following formula : ,in, To control the first loss and the second loss The balance parameter between the two is in the range of [0, 1]. is the loss of the initial first prediction network in the current training, and the second loss is the loss of the initial second prediction network in the current training; Step S3: Determine the total loss The value of decreases, where the total loss When the value of no longer decreases, step S4 is executed. When the total loss When the value of still decreases, return to step S1; Step S4: stop training and output the first prediction network and the second prediction network.

[0080] Optionally, in one implementation, the first loss is calculated using the following formula: and the second loss :

[0081]

[0082]

[0083]

[0084] Among them, S is the number of sample grid models participating in the current training, is the first mean absolute error, is the first mean absolute error of the mth sample mesh model, and the first mean absolute error is the predicted joint position vector of the skeletal joint for a sample mesh model. and the true joint position vector The mean absolute error is, N is the number of skeletal joints of the sample mesh model, is the second mean absolute error, is the second mean absolute error of the mth sample mesh model, and the second mean absolute error is the predicted connection probability of two bone joints for one sample mesh model. The probability of connecting with the real The mean absolute error between .

[0085] Optionally, in one embodiment, the mesh model includes vertex data and face data, the first prediction network includes stacked multiple layers of graph convolution layers, a global pooling layer connected to each of the graph convolution layers, and a first multi-layer perceptron connected to each of the global pooling layers respectively, and the first processing module includes: a first preprocessing unit, used to generate an initial vertex feature matrix according to the vertex data, and to generate an adjacency matrix according to the face data, a first processing unit, used to input the initial vertex feature matrix and the adjacency matrix into the first layer of graph convolution layer, the input data of each subsequent layer of graph convolution layer includes the adjacency matrix and the vertex feature matrix output by the previous layer of graph convolution layer, the vertex feature matrix output by each of the graph convolution layers is input into the global pooling layer accordingly, each of the global pooling layers outputs a global feature vector corresponding to the graph convolution layer, and each of the global feature vectors is spliced ​​and input into the first multi-layer perceptron, wherein the first multi-layer perceptron is used to extract a nonlinear representation of the global feature vector to output the joint position vector.

[0086] Optionally, in one embodiment, the second prediction network includes a second multi-layer perceptron and an output conversion layer, and the second processing module includes: a second preprocessing unit, used to generate offset vectors of two skeletal joints according to the joint position vector, and splice the offset vectors of the two skeletal joints and the mesh model to obtain a splicing feature matrix; a second processing unit, used to input the splicing feature matrix into the second multi-layer perceptron, wherein the second multi-layer perceptron is used to extract nonlinear features of the splicing feature matrix to output an intermediate representation of the connection probability, and the intermediate representation of the connection probability is input into the output conversion layer to output the joint connection probability matrix.

[0087] Embodiment 3 This embodiment also provides a computer device, such as a smart phone, tablet computer, laptop computer, desktop computer, rack server, blade server, tower server or cabinet server (including an independent server or a server cluster composed of multiple servers) that can execute programs. Figure 6 As shown, the computer device 01 of this embodiment includes at least but is not limited to: a memory 012 and a processor 011 which can be interconnected through a system bus. Figure 6 It should be pointed out that Figure 6 Only a computer device 01 having components memory 012 and processor 011 is shown, but it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.

[0088] In this embodiment, the memory 012 (i.e., readable storage medium) includes flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 012 can be an internal storage unit of the computer device 01, such as a hard disk or memory of the computer device 01. In other embodiments, the memory 012 can also be an external storage device of the computer device 01, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the computer device 01. Of course, the memory 012 can also include both the internal storage unit of the computer device 01 and its external storage device. In this embodiment, the memory 012 is generally used to store the operating system and various reference software installed on the computer device 01, such as the program code of the skeleton binding device of the mesh model in the second embodiment. In addition, the memory 012 can also be used to temporarily store various types of data that have been output or are to be output.

[0089] In some embodiments, the processor 011 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips. The processor 011 is generally used to control the overall operation of the computer device 01. In this embodiment, the processor 011 is used to run the program code stored in the memory 012 or process data, such as the skeleton binding method of the mesh model.

[0090] Embodiment 4 This embodiment also provides a computer-readable storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory (for example, an SD or DX memory, etc.), a random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a disk, an optical disk, a server, an App reference mall, etc., on which a computer program is stored, and the program realizes corresponding functions when executed by a processor. The computer-readable storage medium of this embodiment is used to store a skeleton binding device of a mesh model, and when executed by a processor, the skeleton binding method of the mesh model of embodiment 1 is realized.

[0091] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0092] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0093] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method.

[0094] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A skeleton binding method for a mesh model, characterized in that: include: Receive the mesh model of the target character; Inputting the mesh model into a first prediction network, wherein the first prediction network is used to predict the joint position vector of the target character's skeletal joint according to the mesh model, wherein the joint position vector includes an offset of a point on the skeletal joint from the target character's skin; Inputting the mesh model and the joint position vector into a second prediction network, wherein the second prediction network is used to output a joint connection probability matrix according to the mesh model and the joint position vector, wherein the joint connection probability matrix includes connection probabilities between the skeletal joints; and The mesh model is skeleton-bound using the joint position vectors and the joint connection probability matrix.

2. The mesh model skeleton binding method according to claim 1, characterized in that: Before using the joint connection probability to perform skeleton binding, the method further includes: Converting the joint connection probability matrix into a weight matrix through a weight function; Using the skeletal joint as a node and the weights corresponding to the two nodes in the weight matrix as the weight of the edge between the two nodes, a graph structure is constructed; According to the weights, redundant edges in the graph structure are removed to generate a skeleton tree structure. Wherein, the skeleton tree structure is used for skeleton binding.

3. The mesh model skeleton binding method according to claim 2, characterized in that: The steps of performing skeleton binding on the mesh model include: Display the joint position vector and the skeleton tree structure; Receiving adjustment information of the joint position vector and / or the skeleton tree structure; Modify the joint position vector and / or the skeleton tree structure according to the adjustment information; The mesh model is subjected to skeleton binding using the modified joint position vectors and the skeleton tree structure.

4. The mesh model skeleton binding method according to claim 1, characterized in that: The first prediction network and the second prediction network are trained by the following steps: Acquire a sample grid model set, wherein the sample grid model set includes a plurality of sample grid models, and each sample grid model corresponds to a sample character; Annotating the joint position vectors of the sample mesh model to obtain sample joint position vectors, and annotating the joint connection probability matrix of the sample mesh model to obtain a sample joint connection probability matrix; constructing an initial first prediction network and an initial second prediction network; The sample mesh model is used as input data of the initial first prediction network, the sample joint position vector is used as target data of the initial first prediction network, the output data of the sample mesh model and the first prediction network is used as input data of the initial second prediction network, the sample joint connection probability matrix is ​​used as target data of the initial second prediction network, the initial first prediction network and the initial second prediction network are iteratively trained to obtain the first prediction network and the second prediction network.

5. The mesh model skeleton binding method according to claim 4, characterized in that: Iteratively training the initial first prediction network and the initial second prediction network includes: Step S1: randomly obtaining a number of sample grid models from the sample grid model set, and training the initial first prediction network and the initial second prediction network; Step S2: After each training, the total loss is calculated using the following formula : in, To control the first loss and the second loss The balance parameter between the two is in the range of [0, 1]. is the loss of the initial first prediction network in the current training, and the second loss The loss of the initial second prediction network in the current training; Step S3: Determine the total loss The value of decreases, where the total loss When the value of no longer decreases, step S4 is executed. When the total loss When the value of is still decreasing, return to step S1; Step S4: stop training and output the first prediction network and the second prediction network.

6. The skeleton binding method of the mesh model according to claim 5, characterized in that: The first loss is calculated using the following formula: and the second loss : Among them, S is the number of sample grid models participating in the current training, is the first mean absolute error, is the first mean absolute error of the mth sample mesh model, and the first mean absolute error is the predicted joint position vector of the skeletal joint for a sample mesh model. and the true joint position vector The mean absolute error is, N is the number of skeletal joints of the sample mesh model, is the second mean absolute error, is the second mean absolute error of the mth sample mesh model, and the second mean absolute error is the predicted connection probability of two bone joints for one of the sample mesh models. The probability of connecting with the real The mean absolute error between .

7. The skeleton binding method of the mesh model according to claim 4, characterized in that: The mesh model includes vertex data and face data, the first prediction network includes stacked multi-layer graph convolution layers, a global pooling layer connected to each of the graph convolution layers, and a first multi-layer perceptron connected to each of the global pooling layers, and inputting the mesh model into the first prediction network includes: Generate an initial vertex feature matrix according to the vertex data; generating an adjacency matrix according to the face data; Inputting the initial vertex feature matrix and the adjacency matrix into the first graph convolution layer, and the input data of each subsequent graph convolution layer includes the adjacency matrix and the vertex feature matrix output by the previous graph convolution layer; Inputting the vertex feature matrix output by each graph convolution layer into the global pooling layer, and each global pooling layer outputs a global feature vector corresponding to the graph convolution layer; The global feature vectors are concatenated and input into the first multi-layer perceptron, wherein the first multi-layer perceptron is used to extract a nonlinear representation of the global feature vector to output the joint position vector.

8. The mesh model skeleton binding method according to claim 7, characterized in that: The second prediction network includes a second multi-layer perceptron and an output conversion layer, and inputting the grid model and the joint position vector into the second prediction network includes: Generate offset vectors of two skeletal joints according to the joint position vector; Splicing the offset vectors of the two skeletal joints and the mesh model to obtain a splicing feature matrix; Inputting the concatenated feature matrix into the second multilayer perceptron, wherein the second multilayer perceptron is used to extract nonlinear features of the concatenated feature matrix to output an intermediate representation of connection probability; The intermediate representation of the connection probability is input to the output transformation layer to output the joint connection probability matrix.

9. A skeleton binding device for a mesh model, characterized in that: include: A receiving module, used for receiving a mesh model of a target character; A first processing module, configured to input the mesh model into a first prediction network, wherein the first prediction network is configured to predict a joint position vector of a skeletal joint of the target character according to the mesh model, wherein the joint position vector includes an offset of a point on the skeletal joint from the skin of the target character; A second processing module, configured to input the mesh model and the joint position vector into a second prediction network, wherein the second prediction network is configured to output a joint connection probability matrix according to the mesh model and the joint position vector, wherein the joint connection probability matrix includes connection probabilities between the skeletal joints; and The binding module is used to perform skeleton binding on the mesh model using the joint position vector and the joint connection probability matrix.

10. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.