Digital human animation generation and its driving model training method, device, and electronic equipment
By training the digital human speech-driven model and using the natural language model to extract speech and semantic information, the accuracy problem of digital human animation generation in complex scenes is solved, and efficient speech-driven effects in noisy environments are achieved.
Patent Information
- Application Number
- CN202410835743.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-26
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2044-06-26
AI Technical Summary
In complex scenes, existing technology is difficult to achieve accurate digital human voice-driven animation generation, especially when there are multiple people talking and background noise exists, and it cannot effectively drive digital human animation.
By obtaining a face training sample data set containing audio signals of multiple character types, encoding processing is performed, combined with a pre-trained natural language model, extracting speech and semantic information, and fine-tuning to generate digital human mesh data features, thereby achieving speech Drive model training and animation generation.
It improves the accuracy and robustness of speech-driven digital human animation generation in complex scenes, can more accurately predict mouth shapes in the presence of noise, and improves the naturalness and fidelity of digital human animation.
Smart Images

Figure CN118397155B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a digital human animation driving model training method and a digital human animation generation method, device, electronic equipment, non-volatile storage medium and computer program product. Background Art
[0002] With the development of artificial intelligence technology, digital humans that are close to human images and given specific character settings are created through computer graphics technology and can be used to simulate, study and apply various human behaviors and emotions. Digital human animation generation is an indispensable part of digital human technology.
[0003] In the process of generating digital human animation, the digital human needs to be driven. The related technology uses a digital human animation generation method based on voice drive, but in complex scenes with noise such as multiple people talking and background sound, it is impossible to accurately drive and realize the generation of digital human animation.
[0004] In view of this, achieving precise driving in complex scenes to generate digital human animation is a technical problem that technicians in this field need to solve.
[0005] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present application, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0006] The present invention provides a digital human animation driving model training method and a digital human animation generation method, device, electronic device, non-volatile storage medium and computer program product, which can accurately perform digital human voice driving in complex scenes.
[0007] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0008] A first aspect of the present invention provides a digital human animation driving model training method, comprising:
[0009] Acquire a face training sample data set containing multiple character types and audio signals that meet preset dimensional conditions; wherein the preset dimensional conditions are determined based on a face modeling model of a digital human;
[0010] Encoding the facial expression sequences of each character type in the face training sample data set to obtain character type encoding features;
[0011] Input the audio training data of each face training sample into the speech coding module of the pre-built speech-driven model to obtain speech coding features;
[0012] Input the character type coding features, the voice coding features in each face training sample and the vertex coordinate process features into the digital human mesh information generation module of the voice-driven model, and input the digital human mesh data features output by the digital human mesh information generation module into the vertex sequence generation module to obtain the vertex coordinate data of the digital human mesh;
[0013] Among them, the vertex coordinate process feature is the feature after converting the vertex coordinate data of the digital human mesh output by the previous round of parameter update process; the digital human mesh information generation module is a pre-trained natural language model.
[0014] In a first exemplary embodiment, the speech coding module includes a padding layer and a coding layer;
[0015] The filling layer fills the audio training data of each face training sample into an audio signal to be processed with a preset duration, and adds starting position identification information and ending position identification information to the audio signal to be processed;
[0016] The encoding layer includes a plurality of convolutional neural network modules and a layer normalization layer with the same structure in sequence according to the data processing order;
[0017] Among them, the output of the previous convolutional neural network module is the input of the next convolutional neural network module; the convolutional neural network module includes a convolution layer, a group normalization layer and an activation layer.
[0018] In a second exemplary implementation, the digital human grid information generation module includes a plurality of decoding submodules using skip-layer connections; each decoding submodule has the same structure;
[0019] Each decoding submodule includes a multi-head attention mechanism module, a first residual connection and normalization layer, a linear transformation network layer, and a second residual connection and normalization layer;
[0020] The linear transformation network layer includes a first linear layer, a linear activation layer and a second linear layer.
[0021] In a third exemplary embodiment, the vertex sequence generation module is an output multilayer perceptron;
[0022] Wherein, the output multi-layer perceptron is used to convert the digital human mesh data features into a preset number of vertex coordinates.
[0023] In a fourth exemplary embodiment, the speech-driven model further comprises an input multi-layer perceptron;
[0024] The input multi-layer perceptron is used to convert the vertex coordinate data of the digital human mesh output by the previous round of parameter updating process into vertex coordinate process features.
[0025] In a fifth exemplary implementation, the step of obtaining a face training sample data set containing multiple character types and audio signals satisfying a preset dimension condition includes:
[0026] Acquire a four-dimensional face data set containing voice, and downsample each video data of the four-dimensional face data set;
[0027] The audio data contained in the downsampled video data is downsampled at a preset sampling rate and converted into single-channel data to obtain an initial speech training signal;
[0028] The normalized initial speech training signal is flattened to obtain audio training data that meets the preset dimensionality conditions.
[0029] In a sixth exemplary implementation, the character type coding features, the voice coding features in each face training sample, and the vertex coordinate process features are input into the digital human mesh information generation module of the voice-driven model, including:
[0030] In a parameter update process of the voice-driven model, the current voice coding feature corresponding to the current face training sample is input into the digital human mesh information generation module of the voice-driven model;
[0031] When the digital human mesh information generation module completes extracting the semantic information and voice information of the current voice coding feature, the character type coding feature is input into the digital human mesh information generation module;
[0032] When the digital human mesh information generation module extracts the three-dimensional facial features of the character type coding features, the output facial historical feature information and vertex coordinate process features are spliced and input into the digital human mesh information generation module. The digital human mesh information generation module processes the spliced features to obtain the digital human mesh data features of the current parameter update process.
[0033] In a seventh exemplary implementation, the digital human grid information generation module extracts the semantic information and voice information of the current voice coding feature, including:
[0034] Performing multi-head attention calculation on the current speech coding feature to obtain a speech semantic attention calculation result;
[0035] Performing residual connection and layer normalization processing on the current speech coding feature and the speech semantic attention calculation result to obtain first speech semantic feature process data;
[0036] The first speech semantic feature process data is linearly transformed to obtain second speech semantic feature process data, and the second speech semantic feature process data is again subjected to residual connection and layer normalization processing.
[0037] In an eighth exemplary implementation, performing multi-head attention calculation on the current speech coding feature to obtain a speech semantic attention calculation result includes:
[0038] Performing multiple linear changes on the current speech coding features to obtain a speech query matrix, a speech key matrix and a speech value matrix;
[0039] Adding the mask value to the matrix multiplication result of the voice query matrix and the transposed matrix of the voice key matrix, and converting the product of the matrix multiplication result and the hidden layer size into probability distribution information;
[0040] Based on the probability distribution information and the speech numerical matrix, a speech semantic attention calculation result of the current speech coding feature is obtained.
[0041] In a ninth exemplary implementation, performing linear conversion processing on the first speech semantic feature process data includes:
[0042] The preset linear conversion relation is called to process the first speech semantic feature process data, and the preset linear conversion relation is:
[0043] ;
[0044] In the formula, F g ( x g ) represents the preset linear conversion relationship, x g represents the first speech semantic feature process data, W 1g Represents the weight matrix of the first layer of the neural network model, W 2g Represents the weight matrix of the second layer neural network model, b 1 represents the bias of the first layer of the neural network model, b 2 represents the bias of the second layer neural network model.
[0045] In a tenth exemplary implementation, the step of inputting the audio training data of each face training sample into a speech coding module of a pre-built speech-driven model to obtain speech coding features includes:
[0046] The audio training data of each face training sample is filled to form an audio signal to be processed with a preset duration, and the start position identification information and the end position identification information are added to the audio signal to be processed;
[0047] The audio signal to be processed is processed in turn by multiple convolutional neural network modules with the same structure, and then the speech coding features are obtained by layer normalization.
[0048] In an eleventh exemplary implementation, the process of processing the audio signal to be processed by the first convolutional neural network model includes:
[0049] Performing a one-dimensional convolution operation on the audio signal to be processed to obtain a convolution result;
[0050] Performing a group normalization operation on the data points of each feature map of the convolution result to obtain a normalized processing result;
[0051] The target activation function relationship is called to process the normalization result to obtain the output feature of the first convolutional neural network model; the target activation function relationship is:
[0052] ;
[0053] In the formula, G( x 3) is the output feature of the first convolutional neural network model, x 3 is the normalization result, erf is the cumulative probability density function of the normal distribution.
[0054] In a thirteenth exemplary implementation, performing a one-dimensional convolution operation on the audio signal to be processed to obtain a convolution result includes:
[0055] The audio signal processing equation is called to perform a one-dimensional convolution operation on the audio signal to be processed; the audio signal processing equation is:
[0056] ;
[0057] in, F ( s ) is the convolution result, x The audio signal to be processed, f :{0, ···, k-1} represents the convolution kernel, k is the convolution kernel size, siFor the direction of historical information.
[0058] In a thirteenth exemplary implementation, performing a group normalization operation on the data points of each feature map of the convolution result to obtain a normalized processing result includes:
[0059] The feature map processing relational expression is called to perform group normalization processing on the data points of each feature map of the convolution result; the feature map processing relational expression is:
[0060] ;
[0061] in, S n Indicates n The normalized processing result of feature maps is N is the total number of feature maps, G is the number of groups, C / G is the number of channels in each group, and K represents any data point in the same group.
[0062] In a fourteenth exemplary implementation, the voice-driven model calls a linear learning rate relationship to determine the learning rate in the current iterative update process; the linear learning rate relationship is:
[0063] ;
[0064] In the formula, lr represents the current learning rate, lr 0 is the initial learning rate, e is the training period, and λ is the decay factor.
[0065] In a fifteenth exemplary implementation, the loss function of the speech-driven model is:
[0066] ;
[0067] In the formula, Lm represents the loss function, v is the vertex coordinate of the digital human mesh, V is the total number of vertex coordinates, T is the time series, is the predicted value of the vertex coordinates of the digital human mesh at time t and vertex v, is the true value of the vertex coordinate of the digital human mesh at time t and vertex v.
[0068] A second aspect of the present invention provides a method for generating digital human animation, comprising:
[0069] Preliminarily using the digital human animation driving model training method as described in any one of the above items to train a voice driving model;
[0070] Obtaining original voice signals for driving digital humans;
[0071] Converting the original speech signal into a target speech signal that meets a preset dimensionality condition, and inputting the target speech signal into the speech-driven model;
[0072] Based on the polygon mesh vertex sequence of the three-dimensional digital human output by the voice-driven model, the three-dimensional digital human voice-driven animation is rendered.
[0073] In a first exemplary implementation, converting the original speech signal into a target speech signal that satisfies a preset dimensionality condition includes:
[0074] Downsampling the original voice signal according to a preset sampling rate and converting it into single-channel data to obtain an initial voice signal;
[0075] The normalized initial speech signal is flattened to obtain the target speech signal.
[0076] A third aspect of the present invention provides a digital human animation driving model training device, comprising:
[0077] A training data acquisition module, which voice acquires a face training sample data set containing multiple character types and audio signals that meet preset dimensional conditions; wherein the preset dimensional conditions are determined based on a face modeling model of a digital human;
[0078] A type encoding module, used for encoding the facial expression sequences of each character type in the face training sample data set to obtain character type encoding features;
[0079] A speech coding module, used to input the audio training data of each face training sample into the speech coding module of the pre-built speech-driven model to obtain speech coding features;
[0080] The face data generation module is used to input the character type coding features, the voice coding features in each face training sample and the vertex coordinate process features into the digital human mesh information generation module of the voice-driven model, and input the digital human mesh data features output by the digital human mesh information generation module into the vertex sequence generation module to obtain the vertex coordinate data of the digital human mesh; wherein the vertex coordinate process features are the features after converting the vertex coordinate data of the digital human mesh output by the previous round of parameter update process; the digital human mesh information generation module is a pre-trained natural language model.
[0081] A fourth aspect of the present invention provides a digital human animation driving device, comprising:
[0082] A model training module, used to train a voice-driven model using the digital human animation-driven model training method described in any one of the above items in advance;
[0083] A driving signal acquisition module, used to acquire an original voice signal for driving a digital human;
[0084] A speech signal processing module, used for converting the original speech signal into a target speech signal satisfying a preset dimensionality condition, and inputting the target speech signal into the speech driving model;
[0085] The driving module is used to render the three-dimensional digital human voice-driven animation based on the polygonal mesh vertex sequence of the three-dimensional digital human output by the voice-driven model.
[0086] The fifth aspect of the present invention also provides an electronic device, comprising a processor, wherein the processor is used to implement the steps of the digital human animation driving model training method as described in any of the preceding items and / or the digital human animation generation method as described in any of the preceding items when executing a computer program stored in a memory.
[0087] The sixth aspect of the present invention also provides a non-volatile storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the digital human animation driving model training method as described in any of the preceding items and / or the digital human animation generation method as described in any of the preceding items are implemented.
[0088] The seventh aspect of the present invention also provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the digital human animation driving model training method as described in any of the preceding items and / or the digital human animation generation method as described in any of the preceding items.
[0089] The technical solution provided by the present invention has the advantage that the voice-driven model uses a pre-trained natural language model as a generation module for vertex position information of a face mesh, and converts facial expression sequences and audio signals of various character types into feature vectors and inputs them into the voice-driven model for fine-tuning, so that the model can not only utilize voice information but also semantic information. When there is strong background noise in the audio used to drive the digital human, that is, the voice information characteristics of the voice-driven information are not obvious, the voice-driven model can better infer the semantics of the current fuzzy audio through its learned semantic understanding ability and give the correct predicted lip shape, and denoise the voice-driven signal with noise, effectively improve the strength of the voice feature signal of the driving effect, and improve the accuracy of voice-driven digital humans of various styles in complex scenes, so that the animation generation process of the voice-driven digital human has better robustness, which is conducive to the efficient and accurate generation of three-dimensional facial animation of the digital human.
[0090] In addition, the present invention also provides a corresponding digital human animation generation method for the digital human animation driving model training method, a corresponding implementation device, an electronic device, a non-volatile storage medium and a computer program product, which further makes the method more practical. The digital human animation generation method, device, electronic device, non-volatile storage medium and computer program product have corresponding advantages.
[0091] The technical features mentioned above, the technical features to be mentioned below, and the technical features shown separately in the drawings can be arbitrarily combined with each other, as long as the combined technical features are not contradictory. All feasible feature combinations are technical contents clearly recorded in this article. Any of the multiple sub-features contained in the same sentence can be applied independently, and does not have to be applied together with other sub-features. It should be understood that the above general description and the detailed description below are only exemplary and cannot limit the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0092] In order to more clearly illustrate the technical solutions of the present invention or related technologies, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0093] Figure 1 A schematic diagram of a flow chart of a digital human animation driving model training method provided by the present invention;
[0094] Figure 2 A schematic diagram of the framework structure of the voice-driven model provided by the present invention in an exemplary application scenario;
[0095] Figure 3 A schematic diagram of the framework structure of the voice-driven model provided by the present invention in another exemplary application scenario;
[0096] Figure 4 A schematic diagram of the framework structure of the coding layer provided by the present invention in an exemplary application scenario;
[0097] Figure 5 A schematic diagram of the framework structure of a convolutional neural network module provided by the present invention in an exemplary application scenario;
[0098] Figure 6 A schematic diagram of the framework structure of a digital human grid information generation module provided by the present invention in an exemplary application scenario;
[0099] Figure 7 A schematic diagram of the framework structure of a decoding submodule provided by the present invention in an exemplary application scenario;
[0100] Figure 8 A schematic diagram of the framework structure of the multi-head attention mechanism module provided by the present invention in an exemplary application scenario;
[0101] Fig. 9 A schematic diagram of the multi-head attention calculation process provided by the present invention;
[0102] Fig.10 An exemplary mask operation schematic diagram provided by the present invention;
[0103] Fig.11 A schematic diagram of the framework structure of the linear conversion network layer provided by the present invention in an exemplary application scenario;
[0104] Fig.12 A schematic diagram of a flow chart of a method for generating digital human animation provided by the present invention;
[0105] Fig.13 A schematic diagram of the framework structure of a digital human animation generation system in an exemplary application scenario is provided for the present invention;
[0106] Fig.14 A structural diagram of a specific implementation method of the digital human animation driving model training provided by the present invention;
[0107] Fig.15 A structural diagram of a specific implementation of the digital human animation generation device provided by the present invention;
[0108] Fig.16 A structural diagram of a specific implementation of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0109] In order to enable those skilled in the art to better understand the technical solution of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. Among them, the terms "first", "second", "third", "fourth", etc. in the specification and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations of the two are intended to cover non-exclusive inclusions. The term "exemplary" means "used as an example, embodiment or illustrative". Any embodiment described here as "exemplary" is not necessarily interpreted as being superior or better than other embodiments.
[0110] The goal of virtual humans, digital humans, and virtual digital humans is to create digital images that are close to human images through computer graphics technology, and give them specific character settings, visually narrow the psychological distance with humans, and bring more realistic emotional interactions to humans. Virtual humans usually refer to virtual characters with human appearance, voice, behavior, thoughts and other characteristics generated by computer programs. They are widely used in games, animations, virtual reality and other fields to provide interactive and entertainment experiences. Digital humans are digital entities that are similar to humans in the real world. They are more complex and advanced artificial intelligence entities. They usually have the ability to make autonomous decisions, act autonomously, learn and interact, and can be used to simulate, study and apply various human behaviors and emotions. Usually, digital humans can include virtual humans, and virtual humans can further include virtual digital humans.
[0111] With the development of the concept of the metaverse, in addition to being used to simulate real human images, the development technology of digital humans can make character expressions more vivid and interact with the audience. In the technology stack of digital humans, digital human animation generation is an indispensable part of the metaverse. The digital human animation generation process includes three steps: virtual human modeling, virtual human binding, and virtual human driving. With the rapid development of neural network technology, related technologies use neural network models to generate digital human animation through voice drive. Among them, because the voice-based digital human vertex drive method can make the driven digital human more refined and more smooth and natural, compared with the voice-based digital human key points, the voice-based digital human vertex drive is more widely used.
[0112] Related technologies, such as audio2mesh (converting audio data into a mesh model), VOCA (Voice Operated Character Animation), MeshTalk (generating realistic 3D facial animation from audio using cross-modal disentanglement technology) and FaceFormer (facial modeling), use neural network models to generate digital human animation by driving digital human vertices through voice. Among them, audio2mesh uses a convolutional network to implement the algorithm of voice-driven lip shape, which requires targeted training for specific people and cannot be applied to virtual human driving of different styles. VOCA solves the problem of virtual human driving of different styles by introducing one-hot encoding, but requires a large amount of training sample data for training, which is obviously not applicable to scenes with few training samples. MeshTalk uses a branch network to enable people of different styles to be directly migrated for driving, without the need for large-scale training samples, but the driving effect is not good for some closed-mouth sounds. Although FaceFormer can make the character driving more generalized and effective, there are still certain defects in voice driving in complex scenes, and even voice driving of digital humans in complex scenes cannot be realized. It can be seen from this that the relevant technology cannot solve the problem of realizing voice-driven digital humans of any style in complex scenarios without requiring the scale of training samples.
[0113] In view of this, the present invention utilizes the semantic inference ability of the pre-trained natural language model, converts the facial data and audio signals of the character type into feature vectors, inputs them into the model and performs fine-tuning, so as to achieve the purpose of voice-driven face mesh in complex scenarios without the need for large-scale training samples. After introducing the technical scheme of the present invention, various non-limiting embodiments of the present invention are described in detail below. In order to better illustrate the present invention, numerous specific details are given in the specific embodiments below. Those skilled in the art should understand that the present invention can also be implemented without these specific details. In other examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present invention.
[0114] First see Figure 1 , Figure 1 A flowchart of a digital human animation driving model training method provided in this embodiment may include the following contents:
[0115] S101: Obtain a face training sample data set containing multiple character types and audio signals that meet preset dimensional conditions.
[0116] In this step, the face training sample dataset is a downstream task dataset for fine-tuning the voice-driven model to meet the downstream task that the voice-driven model can drive the mesh vertices of the digital human based on the audio signal. The total number of face training samples contained in the face training sample dataset can be selected according to the actual application scenario, and it is not necessary to meet the condition of large-scale training samples, but the face training sample dataset must at least meet the requirement of containing at least two types of facial data of characters and correspondingly containing audio data. Among them, the audio signal of the face training sample set needs to meet the preset dimension condition, which is determined based on the face modeling model of the digital human. For example, if the digital human is modeled based on FLAM (human head model), the dimension of the audio signal data is 15069. Among them, the audio signal corresponding to the face training sample contained in the face training sample dataset can be directly obtained, that is, directly obtaining the face training sample containing the audio signal that meets the preset dimension condition, or obtaining any face training sample containing the audio signal, and then processing these audio signals into audio data that meets the preset dimension condition.
[0117] S102: Encoding the facial expression sequences of each character type in the face training sample data set to obtain character type encoding features.
[0118] In order to enable the voice-driven model provided in this embodiment to drive digital humans of any style, the human face training sample data set may include many types of characters, such as adult male faces, adult female faces, child faces, baby faces, and elderly faces. The facial expression sequences of each character type in the human face training sample data set are encoded, such as using a one-hot encoding method, and the encoded features are used as input through any network model structure that can achieve dimensionality increase and decrease operations, such as an MLP (Multilayer Perceptron) layer, to obtain an embedding vector of the character type used for input into the voice-driven model, and then a unique driving video for each character type can be generated. Similarly, taking the modeling of digital humans based on FLAM as an example, the dimension of the processed embedding vector of the character type is ( n p , 1024), where n p Indicates the total number of character types contained in the face training sample dataset.
[0119] S103: Input the audio training data of each face training sample into the speech coding module of the pre-built speech-driven model to obtain speech coding features.
[0120] In this embodiment, the voice-driven model is a neural network model for realizing voice-driven digital human animation. After obtaining a training sample data set, that is, a face training sample data set in S101, a voice-driven model will be built. The voice-driven model in this embodiment is a pre-trained neural network model, such as Figure 2 As shown, it at least includes an input layer, a digital human mesh information generation module and an output layer. The input layer is used to receive training data or a voice signal used to drive the digital human to generate animation during the inference process, such as the target voice signal of the present invention. The training data at least includes audio training data of each face training sample, and accordingly, the input layer includes a voice encoding module for processing audio training data. In this embodiment, the voice encoding module is a module for encoding the audio training data of the face training sample, and the audio training data of the face training sample is the audio signal contained in the face training sample set of S101. The voice encoding module encodes the original voice signal in the face training sample set into features, which are input into the voice-driven network model as prompts (prompt information) of the digital human mesh information generation module for inference.
[0121] S104: Input the character type coding features, the voice coding features in each face training sample and the vertex coordinate process features into the digital human mesh information generation module of the voice-driven model, and input the digital human mesh data features output by the digital human mesh information generation module into the vertex sequence generation module to obtain the vertex coordinate data of the digital human mesh.
[0122] For the voice-driven model constructed by the present invention, in addition to the voice encoding module for processing audio training data, the input layer also includes an input position for inputting character type coding features. For the convenience of description, it can be defined as a type embedding module, an input position for receiving the vertex coordinate data of the digital human mesh output by the previous round of parameter update process, and for the convenience of description, it can be defined as a process data processing module. The process data processing module is used to convert the vertex coordinate data of the digital human mesh output by the previous round of parameter update process into vertex coordinate process features. The vertex coordinate process features are features after converting the vertex coordinate data of the digital human mesh output by the previous round of parameter update process, and use them as input for a new round of parameter update process. Similarly, the purpose of the process data processing module converting the vertex coordinate data of the digital human mesh is to meet the preset dimensional conditions, that is, to meet the requirements of digital human face modeling. Taking FLAM modeling of the face as an example, the vertex coordinate data of the digital human mesh is converted into vertex coordinate process features, and the vertex coordinate process features are vectors of (15069, 1024). Exemplarily, as a simple dimension increase and decrease operation, the process data processing module can adopt an MLP (multi-layer perceptron) grid model structure. Accordingly, for ease of description, the process data processing module is an input multi-layer perceptron, which can be used to convert the vertex coordinate data of the digital human mesh output by the previous round of parameter update process into vertex coordinate process features. After the input layer processes the input data accordingly, its output features are input into the digital human mesh information generation module. The digital human mesh information generation module adopts any pre-trained natural language model, including but not limited to GPT (Generative Pre-Trained Transformer, Generative Pre-Trained Transformer Model)-2, GPT-3, Llama (Large Language Model Meta Artificial Intelligence, Meta (company name) large language model), Qwen (open source Tongyi Qianwen large model), Baichuan (open source Baichuan large model), Chatglm (open source dialogue pre-training model name). The digital human mesh information generation module processes the input data to obtain the vertex position information of the digital human mesh, and then inputs the vertex position information of the digital human mesh into the output layer. The output layer is used to convert the vertex position information of the digital human mesh into the vertex coordinates of the mesh model that conforms to the digital human face modeling. For the convenience of description, the output layer is defined as a vertex sequence generation module. Taking the FLAM face modeling as an example, the digital human mesh data features are finally converted into 5023 vertex coordinates, that is, the vertex coordinate data of the output digital human mesh is a vector of (1024, 15069).The vertex sequence generation module is an output multi-layer perceptron; as a simple dimension increase and reduction operation, the vertex sequence generation module can adopt the MLP (multi-layer perceptron) grid model structure. Correspondingly, for the convenience of description, the vertex sequence generation module is an output multi-layer perceptron, which is used to convert the digital human mesh data features into a preset number of vertex coordinates. The preset number is also determined by the digital human face modeling model. For example, taking the FLAM modeling face as an example, the preset number is 5023.
[0123] In the process of fine-tuning the voice-driven model using the face training sample data set of S101, the batch stochastic gradient descent method can be used to train the voice-driven model. Before the gradient update iteration, the model needs to initialize the gradient descent algorithm, set the epoch (training cycle), batch_size (batch size), weight update cycle t, and iteration number iteration. For example, the total number of face training sample data sets can be 3200, and the voice-driven model is trained for at least 100 training cycles. One training cycle refers to the non-repetitive use of all training samples of the face training sample data set to update the model parameters of the voice-driven model. Each time, a batch of data is taken to update the model parameters of the voice-driven model to complete a training process. In the gradient update iteration process, 32 face training samples are used for each iteration update. The face training samples and their audio training data are processed according to the above S102-S104. These 32 training samples are called a batch of data, that is, batch_size samples. The number of iterations refers to the number of times batch_size samples are used for training. The number of iterations to complete an epoch is iteration = 3200 / 32 = 100. The weight update cycle refers to updating the weight every t iterations during voice-driven model training. During the fine-tuning of the voice-driven model, the model parameters of the voice-driven model are updated to continuously narrow the gap between the predicted value of the digital human network vertex coordinate data sequence of the voice-driven model and its corresponding true value or label value until the model iteration end condition of the voice-driven model is met, and a trained voice-driven model is obtained. The model iteration end condition can be, for example, the number of iterations reaching a preset value, the prediction accuracy of the voice-driven model reaching a preset accuracy threshold, or the convergence of the voice-driven model.
[0124] In the technical solution provided in this embodiment, the voice-driven model uses a pre-trained natural language model as a generation module for the vertex position information of the face mesh. By converting facial expression sequences and audio signals of various types of characters into feature vectors and inputting them into the voice-driven model for fine-tuning, the model can not only utilize voice information but also semantic information. When there is strong background noise in the audio used to drive the digital human, that is, the voice information characteristics of the voice-driven information are not obvious, the voice-driven model can better infer the semantics of the current fuzzy audio through its learned semantic understanding ability and give the correct predicted lip shape, and denoise the noisy voice-driven signal, effectively improve the strength of the voice feature signal of the driving effect, and improve the accuracy of the voice-driven digital human in complex scenes, so that the animation generation process of the voice-driven digital human has better robustness, which is conducive to the efficient and accurate generation of three-dimensional facial animation of the digital human.
[0125] In the above embodiment, there is no limitation on the encoding method of the audio training data of each face training sample. Based on the above embodiment, this embodiment further provides an exemplary method for generating speech coding features, which may include the following contents:
[0126] The audio training data of each face training sample is filled to form an audio signal to be processed with a preset duration, and the starting position identification information and the ending position identification information are added to the audio signal to be processed; the audio signal to be processed is processed in turn through multiple convolutional neural network modules with the same structure, and then the speech coding features are obtained through layer normalization.
[0127] In this embodiment, the preset duration can be selected according to actual needs, such as 20s, 30s, 10s, etc., and the filled audio training data is defined as the audio signal to be processed. Any data filling method can be used for filling, such as adding a blank audio signal, and a copy filling method can also be used. For example, the audio training data can be composed of a 20-second audio signal by adding patch embedding. Similarly, in order to facilitate matching, the output label value needs to be copied and filled. In order to facilitate the processing of the audio signal to be processed, the starting position identification information and the ending position identification information can also be added to the audio signal to be processed. For example, tokens [seq] (starting mark) and [eos] (ending mark) can be added to the starting position and the ending position of the audio signal to be processed respectively. After filling it, the encoding of the audio signal can be achieved in sequence through multiple convolutional neural network modules and layer normalization layers with the same structure, and finally the audio signal to be processed is encoded into an input vector dimension that meets the requirements of digital human face modeling. Taking FLAM as an example, the speech coding feature is a matrix of [1000, 1023].
[0128] This embodiment also provides an exemplary encoding process of an audio signal to be processed. The audio signal to be processed passes through multiple convolutional neural network models in sequence. The input and output of these multiple convolutional neural network models connected in sequence are connected. The number of convolutional neural network models can be flexibly selected according to the actual scenario, that is, the output of the previous convolutional neural network model is the input of the next convolutional neural network model. Since the structures of the convolutional neural network models are the same, the data processing process of each convolutional neural network model is the same. This embodiment takes the data processing process of the first convolutional neural network model as an example. Except for the different input data, the data processes of other convolutional neural network models are the same. The processing process of the audio signal to be processed in this embodiment after the first convolutional neural network model includes:
[0129] Perform a one-dimensional convolution operation on the audio signal to be processed to obtain the convolution result; perform a group normalization operation on the data points of each feature map of the convolution result to obtain the normalized processing result; call the target activation function relationship to process the normalized processing result to obtain the output feature of the first convolutional neural network model. The output feature of the first convolutional neural network model is used as the input of the second convolutional neural network model, and a one-dimensional convolution operation is performed on the output feature to obtain the corresponding convolution result; perform a group normalization operation on the data points of each feature map of the convolution result to obtain the corresponding normalized processing result; call the target activation function relationship to process the normalized processing result to obtain the output feature of the second convolutional neural network model, and repeat the above process until the last convolutional neural network model is output. The output feature of the last convolutional neural network model is input to the layer normalization layer, and the layer normalization layer performs layer normalization on it to obtain the final speech coding feature.
[0130] In order to further improve the efficiency of the convolution operation, the present embodiment may pre-construct an audio signal processing relational expression that can be used to implement the convolution operation on the audio signal to be processed, and store the audio signal processing relational expression locally, and then directly call the audio signal processing relational expression to perform a one-dimensional convolution operation on the audio signal to be processed; the audio signal processing relational expression may be expressed as:
[0131] ;
[0132] in, F ( s ) is the convolution result, x The audio signal to be processed, is the convolution kernel, k is the convolution kernel size, si For the direction of historical information. It means to compare x with the function Find the convolution, Represents the convolution symbol.
[0133] Among them, in order to further improve the efficiency of group normalization, this embodiment can pre-construct a feature map processing relationship that can be used to implement group normalization processing on the data points of each feature map in the convolution result output in the previous step, and store the feature map processing relationship locally, and then directly call the feature map processing relationship to perform group normalization processing on the data points of each feature map of the convolution result; the feature map processing relationship can be expressed as:
[0134] .
[0135] in, S n Indicates n The normalized processing result of feature maps is N is the total number of feature maps, and K represents any data point in the same group. Indicates that all calculations are performed on the feature graph of a graph. Indicates points that are in the same group. G is the number of groups, C / G is the number of channels in each group. When training all channels in the same group, the Norm operation can be performed according to the following relationship:
[0136] ;
[0137] The above relationship indicates that the standard deviation and variance operations are performed on each element in the group. μ i It means to find the standard deviation of the data of group i, and x k Represents each element in the group, are the standard deviation and variance within the group, m is the number of elements in the group, and ε is the correction factor, which is 1e -9 , S i represents the i-th group in all groups S. Furthermore, in the process of voice-driven model training, in order to improve the model performance, the standard deviation and variance obtained by training can also be used to call the following relationship to regularize the input data:
[0138] ;
[0139] In the formula, represents the element value in the group after regularization, is the element value in the original group. In order to improve the model performance, the standard deviation and variance within the group obtained through training can also be used to perform linear transformation by calling the following relationship, which is the inverse transformation of the regularization change obtained during training:
[0140] ;
[0141] In the formula, represents the output value obtained by the kth element in the group, Represents the original value of the input.
[0142] In order to further improve the convergence speed and performance of the speech-driven model, this embodiment adopts a smoother target activation function, which can alleviate the problem of neuron death to a certain extent and help improve the convergence speed and performance of the training process. The target activation function relationship can be expressed as:
[0143] ;
[0144] In the formula, G( x 3) is the output feature of the first convolutional neural network model, is the cumulative probability of the standard normal distribution function, x 3 is the normalized processing result. erf is the cumulative probability density function of the normal distribution.
[0145] Exemplarily, in practical applications, a network structure of a speech coding module may be directly constructed to implement the corresponding method steps recorded in the above embodiment. This embodiment provides an exemplary implementation of the speech coding module, which may include the following contents:
[0146] like Figure 3 As shown, the speech coding module may include a padding layer and a coding layer; wherein the padding layer fills the audio training data of each face training sample to form a to-be-processed audio signal of a preset duration, and adds start position identification information and end position identification information to the to-be-processed audio signal; the coding layer includes multiple convolutional neural network modules and layer normalization layers with the same structure in the order of data processing, and the output of the previous convolutional neural network module is the input of the next convolutional neural network module. For example, Figure 4As shown, the encoding layer may include a first convolutional neural network module, a second convolutional neural network module, a third convolutional neural network module, a fourth convolutional neural network module, a fifth convolutional neural network module, a sixth convolutional neural network module, a seventh convolutional neural network module and a layer normalization layer. The step size of each convolutional neural network module can be set to (5, 2, 2, 2, 2, 2, 2), the convolution kernel bandwidth can be set to (10, 3, 3, 3, 3, 2, 2), and the channels size can be (1024, 1024, 1024, 1024, 1024, 1024, 1024). Correspondingly, for the audio signal to be processed with a dimension of 16000, the time dimension of the output of each convolutional neural network module is: the first convolutional neural network module (16000-10) / 5+1=3199, the second convolutional neural network module (3199-3) / 2+1=1599, the third convolutional neural network module (1599-3) / 2+1=799, the fourth convolutional neural network module (799-3) / 2+1=399, the fifth convolutional neural network module (399-3) / 2+1=199, the sixth convolutional neural network module (199-2) / 2+1=99 (division has decimals, round down), the seventh convolutional neural network module (99-2) / 2+1=49 (division has decimals, round down). It can be seen that for 1s of speech with a sampling rate of 16k, the corresponding matrix is (1, 16000), and the corresponding output is (1024, 49). In terms of time dimension, it is equivalent to generating a 1024-dimensional feature vector every 20ms.
[0147] In this embodiment, each convolutional neural network module has the same structure, such as Figure 5 As shown, they all include convolutional layers, group normalization layers, and activation layers. Exemplarily, the convolutional layer can embed an audio signal processing formula or set a function to call the audio signal processing formula to realize the convolution operation on the processed audio signal, the group normalization layer can embed a feature map processing formula or set a function to call the feature map processing formula to realize group normalization processing of the data points of each feature map of the convolution result; the activation layer can embed a target activation function formula or set a function to call the target activation function formula to realize processing of the normalized processing result and obtain the output of each convolutional neural network module.
[0148] It can be seen from the above that the structure of the speech encoding module improved by this embodiment and the functions implemented can process audio training data more efficiently and accurately, and is also conducive to improving the convergence speed and performance of the speech-driven model.
[0149] The above embodiment does not define the method for obtaining the face training sample dataset. As a simple, fast and practical method for obtaining the face training sample dataset, this embodiment can also construct the face training sample dataset in the following manner, which may include the following contents:
[0150] A four-dimensional face data set (VOCASET) containing speech is obtained, and each video data of the four-dimensional face data set is downsampled; the audio data contained in the downsampled video data is downsampled at a preset sampling rate and converted into single-channel data to obtain an initial speech training signal; the normalized initial speech training signal is flattened to obtain audio training data that meets the preset dimensionality conditions.
[0151] The VOCASET dataset contains 480 facial expression sequences of 12 types of people (six women and six men). The frames in each sequence contain the normalized three-dimensional coordinates of 5023 vertices, and each sequence contains 3-4 seconds of video at 60fps. The entire dataset has about 29 minutes of four-dimensional face scans, the synchronized audio comes from a 12-bit speaker, and the four-dimensional face scans are recorded at a speed of 60 fps (Fast Packet Switching). The preset sampling rate can be selected according to actual needs, and this embodiment does not impose any restrictions on this. For example, in order to obtain audio training data that meets the preset dimensional conditions, the 60 fps video can be converted into a 30 fps video by downsampling, and the audio is downsampled at a sampling rate of 16000Hz and converted into single-channel data; the downsampled and single-channel audio data is normalized. The downsampled audio data is flattened to become a vector with a dimension of 15069.
[0152] It is understandable that the digital human grid information generation module of the present invention adopts any pre-trained natural language model. The data input and data processing process of the digital human grid information generation module can refer to the implementation method recorded in any relevant technology of the pre-trained natural language model adopted. The above embodiments do not impose any restrictions on the data input and data processing flow of the digital human grid information generation module. Those skilled in the art can flexibly choose according to actual conditions. In order to extract more accurate voice features and realize more sophisticated digital human driving, based on the above embodiments, the present invention also provides an exemplary data input and data processing flow, which may include the following contents:
[0153] In a parameter update process of the voice-driven model, the current voice coding features corresponding to the current face training sample are input into the digital human mesh information generation module of the voice-driven model; when the digital human mesh information generation module completes the extraction of semantic information and voice information of the current voice coding features, the character type coding features are input into the digital human mesh information generation module; when the digital human mesh information generation module completes the extraction of the three-dimensional face features of the character type coding features, the output face history feature information and vertex coordinate process features are spliced and input into the digital human mesh information generation module, which processes the spliced features to obtain the digital human mesh data features of the current parameter update process.
[0154] In this embodiment, the speech coding feature can be first input into the digital human mesh information generation module of the speech driving model, and semantic information can be obtained through the pre-trained digital human mesh information generation module. After the speech feature coding input is completed, for example, by encountering the termination position identification information of the speech coding feature, such as the [eos] sign. The character type coding feature is input into the digital human mesh information generation module, and the digital human mesh information generation module calculates and processes the character type coding feature to obtain face data of different character types, which is used as historical feature information, and is spliced with the features converted from the vertex coordinates output in the previous round, and then the obtained spliced features are input again, and the digital human mesh information generation module calculates and processes the spliced features, and finally outputs a vertex coordinate sequence for driving the digital human. By adopting this fine-tuning method to generate talking heads, the voice-driven model can not only utilize voice information but also semantic information. When there is strong background noise in the audio, that is, the voice information features are not obvious, by utilizing the semantic understanding ability of the digital human mesh information generation module, it is possible to better infer the semantics of the current ambiguous audio and give the correct predicted lip shape, thereby making the face mesh of the voice-driven digital human more robust.
[0155] The above embodiment does not impose any limitation on how the digital human mesh information generation module processes various input data. Since the digital human mesh information generation module is a fixed network model structure, the data calculation method of different input data is the same. The present invention takes the input data as voice coding features as an example to illustrate the data processing process of the digital human mesh information generation module, the processing process of the character type coding features and the splicing features, and only needs to replace the voice coding features accordingly.
[0156] Among them, the process of extracting the semantic information and voice information of the current voice coding feature by the digital human grid information generation module includes: performing multi-head attention calculation on the current voice coding feature to obtain the voice semantic attention calculation result; performing residual connection and layer normalization processing on the current voice coding feature and the voice semantic attention calculation result to obtain the first voice semantic feature process data; calling the preset linear conversion relationship to process the first voice semantic feature process data to obtain the second voice semantic feature process data, and performing residual connection and layer normalization processing on the second voice semantic feature process data again; correspondingly, when the input is a character type coding feature, performing multi-head attention calculation on the current character type coding feature to obtain the type feature attention calculation result; performing residual connection and layer normalization processing on the current character type coding feature and the type feature attention calculation result to obtain the first type feature process data; calling the preset linear conversion relationship to process the first type feature process data to obtain the second type feature process data, and performing residual connection and layer normalization processing on the second type feature process data again, and the final output is the historical feature information of the face. When the input is the concatenation feature of the historical feature information of the face and the vertex coordinate process feature, the current concatenation feature is subjected to multi-head attention calculation to obtain the concatenation feature attention calculation result; the current concatenation feature and the concatenation feature attention calculation result are subjected to residual connection and layer normalization processing to obtain the first concatenation feature process data; the preset linear transformation relationship is called to process the first concatenation feature process data to obtain the second concatenation feature process data, and the second concatenation feature process data is subjected to residual connection and layer normalization processing again, and the final output is the digital human mesh data feature. Exemplarily, the multi-head attention calculation process of the current speech coding feature may include the following contents: the current speech coding feature is subjected to multiple linear changes to obtain the speech query matrix, the speech key matrix and the speech value matrix; the mask value is added to the matrix multiplication result of the transposed matrix of the speech query matrix and the speech key matrix, and the product of the matrix multiplication result and the hidden layer size is converted into probability distribution information; based on the probability distribution information and the speech value matrix, the speech semantic attention calculation result of the current speech coding feature is obtained. The process of multi-head attention calculation of character type coding features may include the following: performing multiple linear changes on the current character type coding features to obtain a type query matrix, a type key matrix and a type value matrix; adding the mask value to the matrix multiplication result of the transposed matrix of the type query matrix and the type key matrix, and converting the product of the matrix multiplication result and the hidden layer size into probability distribution information; based on the probability distribution information and the type value matrix, obtaining the type feature attention calculation result of the current character type coding feature.The process of multi-head attention calculation of splicing features may include the following: performing multiple linear changes on the current splicing features to obtain a splicing query matrix, a splicing key matrix and a splicing numerical matrix; adding the mask value to the matrix multiplication result of the transposed matrix of the splicing query matrix and the splicing key matrix, and converting the product of the matrix multiplication result and the hidden layer size into probability distribution information; based on the probability distribution information and the splicing numerical matrix, obtaining the splicing feature attention calculation result of the current splicing feature.
[0157] Among them, the preset linear conversion relationship can be expressed as:
[0158] ;
[0159] In the formula, F g ( x g ) represents the preset linear conversion relationship, x g represents the first speech semantic feature process data, W 1g Represents the weight matrix of the first layer of the neural network model, W 2g Represents the weight matrix of the second layer neural network model, b 1 represents the bias of the first layer of the neural network model, b 2 represents the bias of the second layer neural network model.
[0160] Exemplarily, in practical applications, the network structure of the digital human grid information generation module can be directly constructed to implement the corresponding method steps recorded in the above embodiment. This embodiment provides an exemplary implementation network model structure of the digital human grid information generation module, which may include the following contents:
[0161] like Figure 6 As shown, the digital human mesh information generation module may include multiple decoding submodules using skip-layer connection, that is, the current feature vector is skipped and input to the decoding submodule of the next layer. Each decoding submodule is based on the relation x 4(i+1) = x 4i +DecoderBlock( x 4i ) are connected, i is the network layer number, that is, the i-th decoding submodule, DecoderBlock( x 4i ) is the output of the i-th decoding submodule, x 4i is the input of the i-th decoding submodule, x 4(i+1)It is the input of the i+1th decoding submodule.
[0162] The structures of the decoding submodules in this embodiment are the same. Figure 7 As shown, each decoding submodule may include a multi-head attention mechanism module, a first residual connection and normalization layer, a linear transformation network layer, and a second residual connection and normalization layer. The multi-head attention mechanism module includes 16 scaled dot-product attention modules, and the structure of each scaled dot-product attention module is as follows: Figure 8 As shown, such basic units are stacked to form a multi-head attention mechanism module. Q, K, and V are the three inputs of the multi-head attention mechanism, which can be defined as query matrix, key matrix, and value matrix respectively. The transposed matrices of Q and K are subjected to MatMul (Matrix Multiplication) to generate a similarity matrix. Scale operation is performed on each element of the similarity matrix according to the square root matrix multiplication of the hidden layer size. When the matrix multiplication is large, the variance of the multiplication result of QK becomes larger. Scaling can reduce the variance and make the gradient update more stable during training. In order to use historical features to infer the impact of historical features on future features, mask operation is also required, and then an activation function such as SoftMax (name of activation function) is passed, and finally a MatMul operation is performed with V to obtain the result. As a more convenient way, the scaled dot product attention module can be implemented based on the following relationship:
[0163] ;
[0164] Among them, Attention(Q, K, V) represents the attention function, where v n represents the row vector of the nth row, and d k Represents the dimension value, which is the size of the hidden size (hidden layer). The result of the calculation is the attention score. By calculating Attention, we can calculate the two related embedding vectors, Q and K, and calculate the similarity between them. The similarity can be measured using cosine similarity, for example.
[0165] After the Attention calculation is completed, the multi-head attention calculation is performed through the following relationship, and the obtained features are split into dimensions to form channels:
[0166] ;
[0167] Among them, MultiHead(Q, K, V) is the multi-head attention function. For example, when the hidden layer size (hiddensize) of the matrix is 4096 and the head num (number of heads) of the multi-head attention is 32, it means that there are 32 channels, and the matrix dimension of each channel is 4096 / 32=32. The split attention is calculated separately and spliced. It means to concatenate the obtained multi-head attention functions. Indicates the calculation of the attention of the i-th channel, , They respectively represent linear transformation of the original Q, K, and V into the same space for attention calculation. is the space transformation matrix. It is also a spatial transformation matrix to transform the obtained multi-head attention values into the same space as output. Fig. 9 As shown, the calculation of multi-head attention is as follows. When the speech coding features or character type coding features or splicing features are used as the input of Q, K, V of the multi-head attention mechanism module, the speech coding features or character type coding features or splicing features are used as the multi-head attention mechanism module to obtain the corresponding Q, K, V after multiple linear changes. For the convenience of description, they are defined as speech query matrix, speech key matrix and speech numerical matrix; type query matrix, type key matrix and type numerical matrix; splicing query matrix, splicing key matrix and splicing numerical matrix. Then the current input feature is embedded to obtain X. When the input feature is received next time, the next input feature is embedded to obtain R, and so on. Due to the limited number of drawings, only 2 input features are drawn. In the figure, the X vector is [2, 4], and in the real voice drive, when the length of the speech is 150 features and the embedding vector dimension of the sparse feature is 1024, X is [150, 1024]. Split the matrix into multiple heads, and calculate the matrix product of each matrix with X and R respectively to obtain , , , , , … , , , use Q, K, V to calculate attention and get , , , , , … , , Finally, the multi-head attention calculation results are concatenated, and the concatenated results are combined with The product operation is performed, and the product result is the final result Z. Before the attention score is calculated by softmax, the attention score scores need to be masked. Fig.10 Taking the 4*4 matrix shown as an example, mask -inf is added to the second column to the fourth column of the first row, the third column and the fourth column of the second row, and the fourth column of the third row of the original matrix. Taking the face sample data set modeled by FLAM and using VOCASET as an example, a 1000*1000 matrix mask operation is required when performing masking in this embodiment. Through the masking operation, historical features can be used to infer the impact of historical features on future features.
[0168] Among them, the first residual connection and normalization layer and the second residual connection and normalization layer both include residual connection and normalization, and the two can process the input data by calling the following relationship:
[0169] ;
[0170] in, represents the linear transformation network layer, X represents the input, and LayerNorm can be calculated by the following relationship:
[0171] ;
[0172] In the formula, LayerNorm(x) represents the result of Layer Normalization on input x, γ and β are learnable parameter vectors with dimension d, and μ represents the mean of input x in feature dimension, which can be calculated as , σ represents the standard deviation of the input x in the feature dimension, which is calculated as , ε=10 -5 , used to avoid division by zero.
[0173] Among them, Fig.11As shown, the linear conversion network layer may include a first linear layer, a linear activation layer, and a second linear layer, which may adopt FFN (Feed-Forward Neural Network, feedforward neural network model), and the linear activation layer may adopt RELU (Linear rectification function, linear rectification function). For example, if the linear conversion network layer is a feedforward neural network model, each decoding submodule has a total of 24 layers, and the speech coding feature is [1000, 1024] as an example, and the output feature vector dimension of each layer of decoding submodule is 1024. Correspondingly, the two-layer neural network model in the preset linear conversion relationship is the first linear layer and the second linear layer, and max() is the relu function operation after calculating the first linear layer.
[0174] It can be seen from the above that, through the structure and data processing flow of the digital human mesh information generation module provided in this embodiment, it is possible to more accurately extract audio features, remove noise in complex voice signals, and improve the driving accuracy of the digital human.
[0175] It is understandable that the learning rate used by the voice-driven model during training will affect the training performance of the voice-driven model. This embodiment uses the AdamW (optimizer name) optimizer and the initial learning rate is 6.25*10 -5 In this case, fine-tuning can be performed by using a linear learning rate decay method and setting the warmup (learning rate warm-up) to 0.2% of the entire training iteration number, λ=0.5, and the network parameters can be obtained after convergence. That is, during the training process of the voice-driven model, the linear learning rate relationship can be called to determine the learning rate in the current iterative update process; the linear learning rate relationship can be expressed as:
[0176] ;
[0177] In the formula, lr represents the current learning rate, lr 0 is the initial learning rate, e is the training period, and λ is the decay factor.
[0178] Furthermore, the loss function can be used to quantify the difference between the predicted value and the actual value of the model, which can be used as a standard to measure the performance of the speech-driven model. In addition, during the training process, the value of the loss function is used to calculate the gradient, which indicates how the model parameters should be updated to reduce the prediction error. By minimizing the loss function, the model can learn the patterns and features in the data, thereby better guiding the model training. In addition, a suitable loss function can also avoid overfitting of the speech-driven model. Based on this, in order to improve the training performance of the speech-driven model and obtain a speech-driven model with better performance, based on the above embodiment, the present invention also provides an exemplary loss function of the speech-driven model, which can be expressed as:
[0179] ;
[0180] In the formula, Lm represents the loss function, v is the vertex coordinate of the digital human mesh, V is the total number of vertex coordinates, T is the time series, is the predicted value of the vertex coordinates of the digital human mesh at time t and vertex v, is the true value of the vertex coordinate of the digital human mesh at time t and vertex v.
[0181] After the voice-driven model is trained using the voice-driven model training method described in any of the above embodiments, a mesh vertex sequence of the digital human driven by the voice can be obtained given an input voice. Based on the above embodiments, the present invention also provides a process of how to drive the digital human to generate animation in an actual application process, please refer to Fig.12 , which may include the following:
[0182] S121: Pre-training to obtain a voice-driven model.
[0183] The voice-driven model is trained using the digital human animation-driven model training method described in any one of the above embodiments.
[0184] S122: Acquire an original voice signal for driving the digital human.
[0185] The original voice signal in this embodiment is the collected voice signal for driving the digital human, that is, the voice signal including the noise signal.
[0186] S123: Convert the original speech signal into a target speech signal that meets preset dimensional conditions, and input the target speech signal into the speech-driven model.
[0187] S124: Based on the polygon mesh vertex sequence of the three-dimensional digital human output by the voice-driven model, rendering is performed to obtain a three-dimensional digital human voice-driven animation.
[0188] The polygon mesh vertex sequence of this embodiment is the mesh vertex sequence, and the mesh is composed of vertices, edges, faces, and possible texture coordinates. The vertex sequence generally refers to a linear order of vertices in the mesh, which may be clockwise or counterclockwise. When processing a digital human model, it is usually necessary to operate the vertex sequence. For example, when you need to traverse all the faces of the mesh, you can use the vertex sequence to determine the vertex order of each face. When the polygon mesh vertex sequence is obtained, any relevant technology can be used to produce facial animation data and expression animation data, and the mouth animation data determined based on the polygon network vertex sequence is fused with the facial animation data and the expression animation data to render a natural three-dimensional digital human voice-driven animation. In the actual application process, when performing animation fusion, for different scenes and different atmospheres, the mouth animation data can be fused with facial data (eyebrows, eyes, etc.) and expression animation data (happy, sad, fear, etc.) according to the actual situation, and the naturalness and fidelity of the three-dimensional digital human voice drive are further improved by rendering the fused animation data. The fused output animation is suitable for various rendering engines, such as UE (engine name), iClone (engine name), etc.
[0189] Exemplarily, in order to meet the needs of digital human face modeling, the original voice signal needs to be converted into a target voice signal that meets preset dimensional conditions. This embodiment also provides an exemplary conversion method: the original voice signal is downsampled according to a preset sampling rate and converted into single-channel data to obtain an initial voice signal; the normalized initial voice signal is flattened to obtain a target voice signal.
[0190] As can be seen from the above, this embodiment can improve the accuracy of voice-driven digital humans in complex scenarios, which is conducive to efficiently and accurately generating three-dimensional facial animations of digital humans.
[0191] It should be noted that there is no strict order of execution between the steps in the present invention. As long as they comply with the logical order, these steps can be executed simultaneously or in a certain preset order. Figure 1 and Fig.12 This is just a schematic and does not mean that this is the only execution order.
[0192] Finally, based on the technical solution of the present invention, Fig.13 Some possible application scenarios involved in the technical solution of the present invention are introduced by way of example, which may include the following contents:
[0193] The hardware composition framework applicable to the digital human animation generation method can be defined as a digital human animation generation system for the convenience of description, which may include a first electronic device 131 and a second electronic device 132, which are connected via a network 133. The first electronic device 131 is deployed with a processor for executing the digital human animation drive model training method described in any of the above embodiments, and sends the trained voice drive model to the second electronic device 132, and the second electronic device 132 is deployed with a user end for providing a human-computer interaction interface. The user can drive the voice drive signal through the audio acquisition module of the second electronic device 132 to drive the digital human that he wants to drive, and can generate user-specific facial animation by customizing and adding expression features and facial features.
[0194] It should be noted that the above application scenarios are only shown to facilitate understanding of the concept and principle of the present invention, and the embodiments of the present invention are not limited in this respect. On the contrary, the embodiments of the present invention can be applied to any applicable scenario.
[0195] As can be seen from the above, this embodiment can improve the accuracy of voice-driven digital humans in complex scenarios, which is conducive to efficiently and accurately generating three-dimensional facial animations of digital humans.
[0196] The present invention also provides a corresponding device for the digital human animation driving model training method and the digital human animation generating method, which further makes the method more practical. Among them, the device can be described from the perspective of functional modules and hardware. The following is an introduction to the digital human animation driving model training device and the digital human animation generating device provided by the present invention. The device is used to implement the digital human animation driving model training method and the digital human animation generating method provided by the present invention. In this embodiment, the digital human animation driving model training device and the digital human animation generating device can include or be divided into one or more program modules, and the one or more program modules are stored in a storage medium and executed by one or more processors to complete the digital human animation driving model training method and the digital human animation generating method disclosed in the first embodiment. The program module referred to in this embodiment refers to a series of computer program instruction segments that can complete specific functions, which is more suitable for describing the execution process of the digital human animation driving model training device and the digital human animation generating device in the storage medium than the program itself. The following description will specifically introduce the functions of each program module of this embodiment. The digital human animation driving model training device and the digital human animation generating device described below can be referenced to each other with the digital human animation driving model training method and the digital human animation generating method described above.
[0197] From the perspective of functional modules, see Fig.14 , Fig.14The structure diagram of the digital human animation driving model training device provided in this embodiment under a specific implementation mode, the device may include:
[0198] The training data acquisition module 141 acquires a face training sample data set containing multiple character types and audio signals satisfying a preset dimension condition by voice; wherein the preset dimension condition is determined based on a face modeling model of a digital human;
[0199] A type encoding module 142 is used to encode the facial expression sequence of each character type in the face training sample data set to obtain a character type encoding feature;
[0200] The speech coding module 143 is used to input the audio training data of each face training sample into the speech coding module of the pre-built speech-driven model to obtain speech coding features;
[0201] The face data generation module 144 is used to input the character type coding features, the voice coding features in each face training sample and the vertex coordinate process features into the digital human mesh information generation module of the voice-driven model, and input the digital human mesh data features output by the digital human mesh information generation module into the vertex sequence generation module to obtain the vertex coordinate data of the digital human mesh; wherein the vertex coordinate process features are the features after converting the vertex coordinate data of the digital human mesh output by the previous round of parameter update process; the digital human mesh information generation module is a pre-trained natural language model.
[0202] Exemplarily, in some implementations of this embodiment, the speech encoding module 143 may also be used for:
[0203] The audio training data of each face training sample is filled to form an audio signal to be processed with a preset duration, and the start position identification information and the end position identification information are added to the audio signal to be processed;
[0204] The audio signal to be processed is processed in sequence through multiple convolutional neural network modules with the same structure, and then the speech coding features are obtained through layer normalization.
[0205] As an exemplary implementation of the above embodiment, the above speech encoding module 143 may be further used for:
[0206] Perform a one-dimensional convolution operation on the audio signal to be processed to obtain a convolution result;
[0207] Perform group normalization operation on the data points of each feature map of the convolution result to obtain a normalized processing result;
[0208] The target activation function relationship is called to process the normalized results to obtain the output features of the first convolutional neural network model; the target activation function relationship is:
[0209] ;
[0210] In the formula, G( x ) is the output feature of the first convolutional neural network model, x 3 is the normalized processing result. erf is the cumulative probability density function of the normal distribution.
[0211] As an exemplary implementation of the above embodiment, the above speech encoding module 143 may be further used for:
[0212] Call the audio signal processing equation to perform a one-dimensional convolution operation on the audio signal to be processed; the audio signal processing equation is:
[0213] ;
[0214] in, F ( s ) is the convolution result, x The audio signal to be processed, f :{0, ···, k-1} is the convolution kernel, k is the convolution kernel size, si For the direction of historical information.
[0215] As another exemplary implementation of the above embodiment, the above speech encoding module 143 may be further used for:
[0216] Call the feature map processing formula to perform group normalization on the data points of each feature map of the convolution result; the feature map processing formula is:
[0217] ;
[0218] in, S n Indicates n The normalized processing result of feature maps is N is the total number of feature maps, G is the number of groups, C / G is the number of channels in each group, and K represents any data point in the same group.
[0219] Exemplarily, in some other implementations of this embodiment, the above-mentioned speech encoding module 143 may include a padding layer and an encoding layer;
[0220] Among them, the filling layer fills the audio training data of each face training sample to form a to-be-processed audio signal of a preset duration, and adds the starting position identification information and the ending position identification information to the to-be-processed audio signal;
[0221] The encoding layer includes multiple convolutional neural network modules and layer normalization layers with the same structure in the order of data processing;
[0222] Among them, the output of the previous convolutional neural network module is the input of the next convolutional neural network module; the convolutional neural network module includes a convolution layer, a group normalization layer and an activation layer.
[0223] Exemplarily, in some other implementations of this embodiment, the above-mentioned vertex sequence generation module is an output multi-layer perceptron; wherein the output multi-layer perceptron is used to convert the digital human mesh data features into a preset number of vertex coordinates.
[0224] Exemplarily, in some other implementations of this embodiment, the voice-driven model further includes an input multi-layer perceptron;
[0225] Among them, a multi-layer perceptron is input to convert the vertex coordinate data of the digital human mesh output by the previous round of parameter update process into vertex coordinate process features.
[0226] Illustratively, in some other implementations of this embodiment, the training data acquisition module 141 may also be used to:
[0227] Acquire a four-dimensional face data set containing voice, and downsample each video data of the four-dimensional face data set;
[0228] The audio data contained in the downsampled video data is downsampled at a preset sampling rate and converted into single-channel data to obtain an initial speech training signal;
[0229] The normalized initial speech training signal is flattened to obtain audio training data that meets the preset dimensionality conditions.
[0230] Exemplarily, in some other implementations of this embodiment, the above-mentioned face data generation module 144 may also be used for:
[0231] In a parameter update process of the speech-driven model, the current speech coding feature corresponding to the current face training sample is input into the digital human mesh information generation module of the speech-driven model;
[0232] When the digital human mesh information generation module extracts the semantic information and voice information of the current voice coding feature, the character type coding feature is input into the digital human mesh information generation module;
[0233] When the digital human mesh information generation module extracts the three-dimensional facial features of the character type coding features, the output facial historical feature information and vertex coordinate process features are spliced and input into the digital human mesh information generation module. The digital human mesh information generation module processes the spliced features to obtain the digital human mesh data features of the current parameter update process.
[0234] As an exemplary implementation of the above embodiment, the above face data generation module 144 may be further used for:
[0235] Perform multi-head attention calculation on the current speech coding features to obtain the speech semantic attention calculation result;
[0236] Perform residual connection and layer normalization processing on the current speech coding feature and speech semantic attention calculation results to obtain first speech semantic feature process data;
[0237] The preset linear transformation relationship is called to process the first speech semantic feature process data to obtain the second speech semantic feature process data, and the second speech semantic feature process data is again subjected to residual connection and layer normalization processing; the preset linear transformation relationship is:
[0238] ;
[0239] In the formula, F g ( x g ) represents the preset linear conversion relationship, x g represents the first speech semantic feature process data, W 1g Represents the weight matrix of the first layer of the neural network model, W 2g Represents the weight matrix of the second layer neural network model, b 1 represents the bias of the first layer of the neural network model, b 2 represents the bias of the second layer neural network model.
[0240] As another exemplary implementation of the above embodiment, the above face data generation module 144 may be further used for:
[0241] Perform multiple linear changes on the current speech coding features to obtain a speech query matrix, a speech key matrix and a speech value matrix;
[0242] Add the mask value to the matrix multiplication result of the transposed matrix of the voice query matrix and the voice key matrix, and convert the product of the matrix multiplication result and the hidden layer size into probability distribution information;
[0243] Based on the probability distribution information and the speech numerical matrix, the speech semantic attention calculation results of the current speech coding features are obtained.
[0244] Exemplarily, in some implementations of this embodiment, the digital human grid information generation module includes a plurality of decoding submodules using skip-layer connections; the structures of the decoding submodules are the same;
[0245] Each decoding submodule includes a multi-head attention mechanism module, a first residual connection and normalization layer, a linear transformation network layer, and a second residual connection and normalization layer;
[0246] The linear transformation network layer includes a first linear layer, a linear activation layer and a second linear layer.
[0247] Exemplarily, in some other implementations of this embodiment, the above device may further include a model training module, which may be used to:
[0248] The speech-driven model calls the linear learning rate relationship to determine the learning rate in the current iterative update process; the linear learning rate relationship is:
[0249] ;
[0250] In the formula, lr represents the current learning rate, lr 0 is the initial learning rate, e is the training period, and λ is the decay factor.
[0251] Exemplarily, in some other implementations of this embodiment, the above-mentioned model training module can also be used to: during the speech-driven model training process, call the loss function of the speech-driven model to guide the model training process, and the loss function of the speech-driven model is:
[0252] ;
[0253] In the formula, Lm represents the loss function, v is the vertex coordinate of the digital human mesh, V is the total number of vertex coordinates, T is the time series, is the predicted value of the vertex coordinates of the digital human mesh at time t and vertex v, is the true value of the vertex coordinate of the digital human mesh at time t and vertex v.
[0254] From the perspective of functional modules, see Fig.15 , Fig.15 This is a structural diagram of a digital human animation driving device provided in this embodiment in a specific implementation manner. The device may include:
[0255] A model training module 151 is used for pre-training to obtain a voice-driven model;
[0256] A driving signal acquisition module 152, used to acquire an original voice signal for driving the digital human;
[0257] The speech signal processing module 153 is used to convert the original speech signal into a target speech signal that meets the preset dimensionality condition, and input the target speech signal into the speech driving model;
[0258] The driving module 154 is used to render the three-dimensional digital human voice-driven animation based on the polygon mesh vertex sequence of the three-dimensional digital human output by the voice-driven model.
[0259] Exemplarily, in some implementations of this embodiment, the voice signal processing module 153 may also be used for:
[0260] The original speech signal is downsampled according to a preset sampling rate and converted into single-channel data to obtain an initial speech signal;
[0261] The normalized initial speech signal is flattened to obtain the target speech signal.
[0262] The functions of the functional modules of the digital human animation driving device of this embodiment can be specifically implemented according to the method in the above method embodiment. The specific implementation process can refer to the relevant description of the above method embodiment, which will not be repeated here.
[0263] As can be seen from the above, this embodiment can improve the accuracy of voice-driven digital humans in complex scenarios, which is conducive to efficiently and accurately generating three-dimensional facial animations of digital humans.
[0264] The digital human animation driving model training device and the digital human animation generating device mentioned above are described from the perspective of functional modules. Furthermore, the present invention also provides an electronic device, which is described from the perspective of hardware. Fig.16 The following is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention in one implementation manner. Fig.16 As shown, the electronic device includes a memory 160 for storing computer programs; a processor 161 for implementing the steps of the digital human animation driving model training method and the digital human animation generation method mentioned in any of the above embodiments when executing the computer program.
[0265] Among them, the processor 161 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the processor 161 may also be a controller, a microcontroller, a microprocessor or other data processing chip. The processor 161 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 161 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 161 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 161 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0266] The memory 160 may include one or more computer non-volatile storage media, which may be non-transitory. The memory 160 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices and flash memory storage devices. In some embodiments, the memory 160 may be an internal storage unit of an electronic device, such as a hard disk of a server. In other embodiments, the memory 160 may also be an external storage device of an electronic device, such as a plug-in hard disk equipped on a server, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Further, the memory 160 may also include both an internal storage unit of an electronic device and an external storage device. The memory 160 may not only be used to store application software and various types of data installed in the electronic device, such as: the code of the program in the process of executing the digital human animation driving model training method and the digital human animation generation method, but also be used to temporarily store data that has been output or is to be output. In this embodiment, the memory 160 is used to store at least the following computer program 1601, wherein after the computer program is loaded and executed by the processor 161, the relevant steps of the digital human animation driving model training method and the digital human animation generation method disclosed in any of the above embodiments can be implemented. In addition, the resources stored in the memory 160 may also include an operating system 1602 and data 1603, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 1602 may include Windows, Unix, Linux, etc. The data 1603 may include but is not limited to the data corresponding to the digital human animation driving model training results and the digital human animation generation results.
[0267] In some embodiments, the electronic device may further include a display screen 162, an input / output interface 163, a communication interface 164 or a network interface, a power supply 165 and a communication bus 166. Among them, the display screen 162 and the input / output interface 163, such as a keyboard, belong to the user interface, and exemplary user interfaces may also include standard wired interfaces, wireless interfaces, and the like. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device, and the like. The display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device and to display a visual user interface. The communication interface 164 may exemplarily include a wired interface and / or a wireless interface, such as a WI-FI interface, a Bluetooth interface, and the like, which are generally used to establish a communication connection between the electronic device and other electronic devices. The communication bus 166 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, and the like. The bus may be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, Fig.16 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0268] Those skilled in the art will understand that Fig.16 The structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, for example, it may also include a sensor 167 to implement various functions.
[0269] The functions of the functional modules of the electronic device described in this embodiment can be specifically implemented according to the method in the above method embodiment. The specific implementation process can refer to the relevant description of the above method embodiment, which will not be repeated here.
[0270] As can be seen from the above, this embodiment can improve the accuracy of voice-driven digital humans in complex scenarios, which is conducive to efficiently and accurately generating three-dimensional facial animations of digital humans.
[0271] It is understandable that if the digital human animation generation and model training method in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile storage medium. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the relevant technology or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium to execute all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes but is not limited to: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), electrically erasable programmable ROM, register, hard disk, multimedia card, card-type memory (such as SD or DX memory, etc.), magnetic memory, removable disk, CD-ROM, disk or optical disk, etc. Various media that can store program codes. Based on this, the present invention also provides a non-volatile storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the digital human animation driving method and the digital human animation driving model training method recorded in any of the above embodiments are performed.
[0272] It is understandable that if the digital human animation generation and model training method in the above-mentioned embodiments are implemented in the form of software functional units and sold or used as independent products, the computer software product may not need to be stored in a physical storage medium. For example, it can be directly transmitted to a computer or other device with information processing capabilities through a wired network or a wireless network to execute all or part of the steps of the methods of each embodiment of the present invention. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the relevant technology or all or part of the technical solution can be embodied in the form of a software product. Based on this, the present invention also provides a computer program product storing a computer program. When the computer program is executed by a processor, the steps of the digital human animation driving method and the digital human animation driving model training method recorded in any of the above embodiments are performed.
[0273] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the hardware disclosed in the embodiments, including devices, electronic devices, non-volatile storage media, and computer program products, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method part description.
[0274] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
Claims
1. A digital human animation driving model training method, characterized in that: include: Acquire a face training sample data set containing multiple character types and audio signals that meet preset dimensional conditions; wherein the preset dimensional conditions are determined based on a face modeling model of a digital human; Encoding the facial expression sequences of each character type in the face training sample data set to obtain character type encoding features; Input the audio training data of each face training sample into the speech coding module of the pre-built speech driving model to obtain speech coding features; the speech driving model includes an input layer, a digital human mesh information generation module and an output layer, the input layer is used to receive training data or a speech signal used to drive the digital human to generate animation during the inference process, and the input layer includes a speech coding module for processing audio training data; the digital human mesh information generation module processes the input data to obtain the digital human mesh vertex position information, and inputs the digital human mesh vertex position information into the output layer, the output layer is used to convert the digital human mesh vertex position information into vertex coordinates of a mesh model that conforms to the face modeling of the digital human, and the output layer is defined as a vertex sequence generation module, and the vertex sequence generation module is used to perform dimensionality increase and dimensionality reduction operations on the input data; Input the character type coding features, the voice coding features in each face training sample and the vertex coordinate process features into the digital human mesh information generation module of the voice-driven model, and input the digital human mesh data features output by the digital human mesh information generation module into the vertex sequence generation module to obtain the vertex coordinate data of the digital human mesh; The vertex coordinate process feature is a feature obtained by converting the vertex coordinate data of the digital human mesh output by the previous round of parameter update process; the digital human mesh information generation module is a pre-trained natural language model; The step of inputting the character type coding features, the voice coding features and the vertex coordinate process features in each face training sample into the digital human mesh information generation module of the voice-driven model comprises: In a parameter update process of the voice-driven model, the current voice coding feature corresponding to the current face training sample is input into the digital human mesh information generation module of the voice-driven model; When the digital human mesh information generation module completes extracting the semantic information and voice information of the current voice coding feature, the character type coding feature is input into the digital human mesh information generation module; When the digital human mesh information generation module extracts the three-dimensional facial features of the character type coding features, the output facial historical feature information and vertex coordinate process features are spliced and input into the digital human mesh information generation module. The digital human mesh information generation module processes the spliced features to obtain the digital human mesh data features of the current parameter update process.
2. The digital human animation driving model training method according to claim 1, characterized in that: The speech coding module includes a filling layer and a coding layer; The filling layer fills the audio training data of each face training sample into an audio signal to be processed with a preset duration, and adds starting position identification information and ending position identification information to the audio signal to be processed; The encoding layer includes a plurality of convolutional neural network modules and a layer normalization layer with the same structure in sequence according to the data processing order; Among them, the output of the previous convolutional neural network module is the input of the next convolutional neural network module; the convolutional neural network module includes a convolution layer, a group normalization layer and an activation layer.
3. The digital human animation driving model training method according to claim 1, characterized in that: The digital human grid information generation module includes a plurality of decoding submodules using skip-layer connection; each decoding submodule has the same structure; Each decoding submodule includes a multi-head attention mechanism module, a first residual connection and normalization layer, a linear transformation network layer, and a second residual connection and normalization layer; The linear transformation network layer includes a first linear layer, a linear activation layer and a second linear layer.
4. The digital human animation driving model training method according to claim 1, characterized in that: The vertex sequence generation module is an output multi-layer perceptron; Wherein, the output multi-layer perceptron is used to convert the digital human mesh data features into a preset number of vertex coordinates.
5. The digital human animation driving model training method according to claim 1, characterized in that: The speech-driven model also includes an input multi-layer perceptron; The input multi-layer perceptron is used to convert the vertex coordinate data of the digital human mesh output by the previous round of parameter updating process into vertex coordinate process features.
6. The digital human animation driving model training method according to claim 1, characterized in that: The step of obtaining a face training sample data set containing multiple character types and audio signals that meet preset dimension conditions includes: Acquire a four-dimensional face data set containing voice, and downsample each video data of the four-dimensional face data set; The audio data contained in the downsampled video data is downsampled at a preset sampling rate and converted into single-channel data to obtain an initial speech training signal; The normalized initial speech training signal is flattened to obtain audio training data that meets the preset dimensionality conditions.
7. The digital human animation driving model training method according to claim 1, characterized in that: The digital human grid information generation module extracts the semantic information and voice information of the current voice coding feature, including: Performing multi-head attention calculation on the current speech coding feature to obtain a speech semantic attention calculation result; Performing residual connection and layer normalization processing on the current speech coding feature and the speech semantic attention calculation result to obtain first speech semantic feature process data; The first speech semantic feature process data is linearly transformed to obtain second speech semantic feature process data, and the second speech semantic feature process data is again subjected to residual connection and layer normalization processing.
8. The digital human animation driving model training method according to claim 7, characterized in that: Perform multi-head attention calculation on the current speech coding feature to obtain speech semantic attention calculation results, including: Perform multiple linear changes on the current speech coding features to obtain a speech query matrix, a speech key matrix and a speech value matrix; Adding the mask value to the matrix multiplication result of the voice query matrix and the transposed matrix of the voice key matrix, and converting the product of the matrix multiplication result and the hidden layer size into probability distribution information; Based on the probability distribution information and the speech numerical matrix, a speech semantic attention calculation result of the current speech coding feature is obtained.
9. The digital human animation driving model training method according to claim 7, characterized in that: The first speech semantic feature process data is subjected to linear conversion processing, comprising: The preset linear conversion relation is called to process the first speech semantic feature process data, and the preset linear conversion relation is: ; In the formula, F g ( x g ) represents the preset linear conversion relationship, x g represents the first speech semantic feature process data, W 1g Represents the weight matrix of the first layer of the neural network model, W 2g Represents the weight matrix of the second layer neural network model, b 1 represents the bias of the first layer of the neural network model. b 2 represents the bias of the second layer neural network model.
10. The digital human animation driving model training method according to claim 1, characterized in that: The audio training data of each face training sample is input into the speech coding module of the pre-built speech-driven model to obtain the speech coding features, including: The audio training data of each face training sample is filled to form an audio signal to be processed with a preset duration, and the start position identification information and the end position identification information are added to the audio signal to be processed; The audio signal to be processed is processed in turn by multiple convolutional neural network modules with the same structure, and then the speech coding features are obtained by layer normalization.
11. The digital human animation driving model training method according to claim 10, characterized in that: The audio signal to be processed is processed by a first convolutional neural network model, including: Performing a one-dimensional convolution operation on the audio signal to be processed to obtain a convolution result; Performing a group normalization operation on the data points of each feature map of the convolution result to obtain a normalized processing result; The target activation function relationship is called to process the normalization result to obtain the output feature of the first convolutional neural network model; the target activation function relationship is: ; In the formula, G( x 3) is the output feature of the first convolutional neural network model, x 3 is the normalization result, erf is the cumulative probability density function of the normal distribution.
12. The digital human animation driving model training method according to claim 11, characterized in that: The performing a one-dimensional convolution operation on the audio signal to be processed to obtain a convolution result includes: The audio signal processing equation is called to perform a one-dimensional convolution operation on the audio signal to be processed; the audio signal processing equation is: ; in, F ( s ) is the convolution result, x The audio signal to be processed, f :{0, ···, k-1} represents the convolution kernel, k is the convolution kernel size, si For the direction of historical information.
13. The digital human animation driving model training method according to claim 11, characterized in that: Performing a group normalization operation on the data points of each feature map of the convolution result to obtain a normalized processing result, including: The feature map processing relational expression is called to perform group normalization processing on the data points of each feature map of the convolution result; the feature map processing relational expression is: ; in, S n Indicates n The normalized processing result of feature maps is N is the total number of feature maps, G is the number of groups, C / G is the number of channels in each group, and K represents any data point in the same group.
14. The digital human animation driving model training method according to claim 1, characterized in that: The speech-driven model calls a linear learning rate relationship to determine the learning rate in the current iterative update process; the linear learning rate relationship is: ; In the formula, lr represents the current learning rate, lr 0 is the initial learning rate, e is the training period, and λ is the decay factor.
15. The digital human animation driving model training method according to any one of claims 1 to 14, characterized in that: The loss function of the speech-driven model is: ; In the formula, L mse represents the loss function, v is the vertex coordinate of the digital human mesh, V is the total number of vertex coordinates, T is the time series, is the predicted value of the vertex coordinates of the digital human mesh at time t and vertex v, is the true value of the vertex coordinate of the digital human mesh at time t and vertex v.
16. A method for generating digital human animation, characterized in that: Preliminarily using the digital human animation driving model training method as described in any one of claims 1 to 15 to train a voice driving model; Obtaining original voice signals for driving digital humans; Converting the original speech signal into a target speech signal that meets a preset dimensionality condition, and inputting the target speech signal into the speech-driven model; Based on the polygon mesh vertex sequence of the three-dimensional digital human output by the voice-driven model, the three-dimensional digital human voice-driven animation is rendered.
17. The method for generating digital human animation according to claim 16, characterized in that: The converting the original speech signal into a target speech signal that meets a preset dimensionality condition comprises: Downsampling the original voice signal according to a preset sampling rate and converting it into single-channel data to obtain an initial voice signal; The normalized initial speech signal is flattened to obtain the target speech signal.
18. A digital human animation driving model training device, characterized in that: include: A training data acquisition module, which voice acquires a face training sample data set containing multiple character types and audio signals that meet preset dimensional conditions; wherein the preset dimensional conditions are determined based on a face modeling model of a digital human; A type encoding module, used for encoding the facial expression sequences of each character type in the face training sample data set to obtain character type encoding features; A speech coding module, used to input the audio training data of each face training sample into the speech coding module of the pre-built speech-driven model to obtain speech coding features; The face data generation module is used to input the character type coding features, the voice coding features in each face training sample and the vertex coordinate process features into the digital human mesh information generation module of the voice-driven model, and input the digital human mesh data features output by the digital human mesh information generation module into the vertex sequence generation module to obtain the vertex coordinate data of the digital human mesh; wherein the vertex coordinate process features are the features after the vertex coordinate data of the digital human mesh output by the previous round of parameter update process is converted; the digital human mesh information generation module is a pre-trained natural language model; the voice-driven model includes an input layer, a digital human mesh information generation module, and a vertex sequence generation module. Module and output layer, the input layer is used to receive training data or receive voice signals used to drive the digital human to generate animation during the inference process, and the input layer includes a voice encoding module for processing audio training data; the digital human mesh information generation module processes the input data to obtain the digital human mesh vertex position information, and inputs the digital human mesh vertex position information to the output layer, the output layer is used to convert the digital human mesh vertex position information into vertex coordinates of a mesh model that conforms to the face modeling of the digital human, the output layer is defined as a vertex sequence generation module, and the vertex sequence generation module is used to perform dimensionality increase and dimensionality reduction operations on the input data; Wherein, the face data generation module is further used for: In a parameter update process of the voice-driven model, the current voice coding feature corresponding to the current face training sample is input into the digital human mesh information generation module of the voice-driven model; when the digital human mesh information generation module completes the extraction of semantic information and voice information of the current voice coding feature, the character type coding feature is input into the digital human mesh information generation module; when the digital human mesh information generation module completes the extraction of the three-dimensional face feature of the character type coding feature, the output face history feature information and vertex coordinate process feature are spliced and input into the digital human mesh information generation module, and the digital human mesh information generation module processes the spliced features to obtain the digital human mesh data features of the current parameter update process.
19. A digital human animation driving device, characterized in that: include: A model training module, used to train a voice-driven model in advance using the digital human animation-driven model training method according to any one of claims 1 to 14; A driving signal acquisition module, used to acquire an original voice signal for driving a digital human; A speech signal processing module, used for converting the original speech signal into a target speech signal satisfying a preset dimensionality condition, and inputting the target speech signal into the speech driving model; The driving module is used to render the three-dimensional digital human voice-driven animation based on the polygonal mesh vertex sequence of the three-dimensional digital human output by the voice-driven model.
20. An electronic device, characterized in that: It comprises a processor and a memory, wherein the processor is used to implement the steps of the digital human animation driving model training method as described in any one of claims 1 to 15 and / or the digital human animation generation method as described in claim 16 or 17 when executing the computer program stored in the memory.
21. A non-volatile storage medium, characterized in that: The non-volatile storage medium stores a computer program, which, when executed by a processor, implements the steps of the digital human animation driving model training method as described in any one of claims 1 to 15 and / or the digital human animation generation method as described in claim 16 or 17.
22. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the steps of the digital human animation driving model training method as described in any one of claims 1 to 15 and / or the digital human animation generation method as described in claim 16 or 17 are implemented.
