A brain-inspired text-driven 3D face approach
By establishing a text-speech shared feature space and using a large-scale pre-trained language model to generate 3D dynamic faces and synthetic voices, the problem of information loss and noise in the existing technology is solved, and the authenticity of the 3D animation and user interaction experience are improved, in line with Mechanisms by which the human brain controls facial movements.
Patent Information
- Application Number
- CN202410674527.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-29
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2044-05-29
AI Technical Summary
Existing text-driven three-dimensional dynamic face technology has problems with information loss and noise, resulting in insufficient realism and continuity of three-dimensional animation, and the voice-driven method is not in line with the human brain's mechanism for controlling facial movements.
Using a brain-based heuristic method, a text-speech shared feature space is established through text encoders, text-synthesized speech models and text-generated 3D face animation models, and large-scale pre-trained language models are used to generate 3D dynamic faces and synthesized speech. Improve authenticity and interactivity.
The basic phonemes of the text are retained in the text-speech shared feature space and the speaker's unique voice characteristics are added to improve the authenticity of the three-dimensional virtual digital face and the user interaction experience.
Smart Images

Figure CN118279457B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a three-dimensional face animation driving technology, and in particular to a text-driven three-dimensional face method based on brain inspiration. Background Art
[0002] 3D digital human technology, as a product of the intersection of artificial intelligence and computer graphics, has attracted widespread attention in the academic community. 3D digital human facial animation has always been an active research topic and has been widely used in virtual reality, filmmaking, and games. In these applications, realistic 3D digital human facial animation needs to be generated by inputting signals such as text or voice. With the emergence of large-scale pre-trained language models such as GPT, people have begun to use these models to extract answers in text form from huge data sets to meet various query needs. Considering the continuous rise of the metaverse, text data can be combined with digital human technology to generate more realistic and vivid digital humans with the help of large-scale pre-trained language models to respond to various user queries. This fusion will help integrate large-scale pre-trained language models with the concept of metaverse digital humans to enhance the user's interactive experience.
[0003] The existing method of text-driven 3D dynamic face has not been specifically studied in the prior art. Instead, the existing text-to-speech technology is used to convert the text into synthetic speech, and then the speech is used to drive the 3D dynamic face. Although this method can convert the text-driven problem into a speech-driven problem that has been studied in a large number of advanced studies, there are many problems with this technical route. First, from the perspective of the human brain mechanism, speech is not a prerequisite for facial movement. The human brain should control facial muscle movement and generate speech at the same time; secondly, if the existing technical route is adopted, it means that synthetic speech is used to drive facial movement, but the current voice-driven 3D face input is high-quality lossless audio without noise in a recording studio environment. The synthetic speech generated by the text-to-speech technology with information loss and noise as input and then voice-driven will further weaken the realism of the final 3D dynamic face.
[0004] Therefore, using large-scale pre-trained language models to enhance the user's interactive experience and improve the authenticity and continuity of text-driven 3D facial animation is an urgent problem to be solved in text-driven 3D facial animation driving technology. Summary of the invention
[0005] The present invention aims to provide a brain-inspired text-driven three-dimensional face method to solve the problems existing in the above-mentioned prior art.
[0006] The brain-inspired text-driven three-dimensional face method described in the present invention comprises the following steps:
[0007] S1. Obtain 3D face mesh sequence samples, audio files, and corpus corresponding to the audio files, and divide them into a training set and a test set;
[0008] S2 establishes a text-driven 3D facial animation overall model, the text-driven 3D facial animation overall model includes a text encoder, a text-synthesized speech model, a text-generated 3D facial animation model, and a speech feature extractor;
[0009] Training a text-driven 3D face animation model to simultaneously generate 3D dynamic faces and synthesized speech;
[0010] S3. Measure the performance of the overall text-driven 3D facial animation model based on the test set samples and obtain the model with the best performance;
[0011] S4. Connect the best performing text-driven 3D facial animation overall model with a large-scale pre-trained language model to build a brain-inspired text-driven 3D facial animation model;
[0012] S5. Input the text description into the brain-inspired text-driven 3D facial animation model, and output the specified 3D facial animation.
[0013] The brain-inspired text-driven three-dimensional face method described in the present invention has the advantage of finding a text-speech shared feature space in the process of converting text to speech, and using a large-scale pre-trained language model and text-speech shared features to simultaneously regress and generate three-dimensional dynamic faces and synthetic speech. In the text-speech shared feature space, the text-speech shared features retain the basic phonemes of the text while adding the exclusive voice characteristics of the designated speaker. Thereby achieving the purpose of increasing the authenticity of the three-dimensional virtual digital face generated by the text. With the help of a large-scale pre-trained language model, text data is combined with digital human technology to enhance the user's interactive experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 It is a schematic diagram of the training steps of a brain-inspired text-driven three-dimensional face method described in the present invention.
[0015] Figure 2 It is a schematic diagram of the training process of the text-driven three-dimensional facial animation overall model described in the present invention.
[0016] Figure 3 It is a schematic diagram of the workflow of a brain-inspired text-driven three-dimensional face processing method described in the present invention. DETAILED DESCRIPTION
[0017] like Figure 1 and Figure 2As shown, the brain-inspired text-driven 3D face method described in the present invention utilizes a large-scale pre-trained language model to generate the required text, extracts text-speech shared features, and then inputs the text-driven 3D face animation overall model to simultaneously synthesize the text into a dynamic 3D face and the corresponding speech, thereby improving the authenticity and interactivity of the text-driven 3D face animation.
[0018] The specific steps include:
[0019] S1. Obtain 3D face mesh sequence samples, audio files, and corpus corresponding to the audio files, and divide them into a training set and a test set;
[0020] The obtained database contains text modality, speech modality and 3D facial animation visual modality, and the speech modality and 3D facial animation visual modality are temporal.
[0021] Taking a single sentence as an example, each set of sample data consists of the following parts:
[0022] (1) The audio is a wav file, and the speech waveform is obtained after reading it; the corpus corresponding to the audio file is a txt file, which is obtained by converting speech to text.
[0023] (2) The 3D face animation sequence is an npy file. After reading, the time series Y={y 1 ,…,y T} of the 3D space coordinates of 5023 vertices in the face mesh is obtained, where T is the time frame number of the 3D face animation sequence, and yi (i∈{1,…,T})∈R 5023×3 represents the 3D space coordinates of 5023 vertices in a single frame face mesh. After rendering y, the real face can be obtained.
[0024] In this embodiment, the VOCASET dataset is used as the 3D facial animation data. The VOCASET dataset contains 480 audio-3D facial animation mesh pairs from 12 subjects. For each subject, 40 facial mesh sequences with a length of 3 to 5 seconds and corresponding speech with a sampling rate of 22,000 Hz are captured at a speed of 60 fps. The 3D digital human head mesh is represented by 5,023 vertices and 9,976 faces. In this embodiment, it is necessary to reduce the speech sampling rate of the VOCASET dataset to 16,000 Hz and downsample the 3D head mesh to 30 fps. In this embodiment, it is necessary to convert the speech of the VOCASET dataset into text to construct a corpus.
[0025] The dataset is divided into training and test sets according to the speaking object and sentence content, including: a training set VOCASET-Train divided into 288 sequences and two test sets VOCASET-Test-A and VOCASET-Test-B. The 288 sequences include 8 subjects × 36 sentences; VOCASET-Test-A contains 32 sequences, such as 8 subjects × 4 sentences; VOCASET-Test-B contains 32 sequences, such as the remaining 4 unseen subjects × 8 sentences.
[0026] S2. Establish a text-driven 3D facial animation overall model, which includes a text encoder, a text-synthesized speech model, a text-generated 3D facial animation model, and a speech feature extractor; the text encoder includes an embedding layer, a periodic position encoding module, and a variance adapter; the text-synthesized speech model includes a Mel-spectrogram decoder and a vocoder; the text-generated 3D facial animation model includes a Transformer-based encoder and decoder, a context-rich codebook, and a motion decoder;
[0027] Training a text-driven 3D facial animation overall model to simultaneously generate a 3D dynamic face and synthetic speech includes the following steps:
[0028] S21 inputs the corpus into the text encoder to obtain text-speech shared features;
[0029] S22 Input the shared features of text and speech into the text-to-speech model to obtain the synthesized speech waveform. Construct a loss function between the synthesized speech and the original speech sample, and continuously train and optimize the model through the gradient descent method to obtain the text-to-speech model;
[0030] S23 Input the text-speech shared features into the text to generate a 3D face animation model, further purify the text-speech shared features, and autoregressively predict the 3D face mesh sequence. Construct a loss function between the predicted 3D face mesh sequence and the original 3D face mesh sequence samples, and continuously train and optimize the model through the gradient descent method to obtain the text-generated 3D face animation model;
[0031] S24 inputs the original speech into the pre-trained speech feature extractor to obtain speech features; calculates the KL divergence loss of the speech features and the text-speech shared features further purified in the text-generated 3D face animation model, and continuously trains and optimizes the model through the gradient descent method;
[0032] In step 21, the corpus is input into the text encoder, and the corpus input is first tokenized to break the text into smaller units. After tokenization, the text is converted into a phoneme sequence. The phoneme sequence is input into the embedding layer, and each phoneme is converted into an embedding vector. Through periodic position encoding, the embedding vector is added with position encoding to provide the position information of the word in the text. Additional voice change information, such as pitch, energy, and duration, is added to the only phoneme features in the text through the variance adapter to obtain text-speech shared features. Voice change information is extracted from the target speech waveform during training and directly used as conditional input; in the inference stage, duration predictors, pitch predictors, and energy predictors are used to predict these values.
[0033] In step 22, the text-speech shared features are input into a mel-spectrogram decoder and converted into a mel-spectrogram sequence. The mel-spectrogram is then converted into a speech waveform using a pre-trained vocoder Parallel WaveGAN.
[0034] In step 23, the codebook and motion decoder of the text-generated 3D face animation model are obtained from the pre-trained VQ-VAE model. The VQ-VAE model includes an encoder, a codebook and a motion decoder. The training process is as follows: the original 3D face mesh of T frame Input encoder to get features , and then Map to the closest point in the codebook space ; The predicted face sequence is obtained by decoding the motion decoder . In the original 3D face mesh and predict facial sequences The reconstruction loss is minimized between them, that is, minimizing the difference between the input facial motion sequence and the facial motion sequence reconstructed by the decoder.
[0035] Minimize the reconstruction loss, specifically:
[0036] ;
[0037] The first term is the reconstruction loss, and the latter two terms are used to reduce the codebook Z and embedding features. The distance between.
[0038] The VQ-VAE model is continuously trained and optimized through the gradient descent method to obtain a pre-trained context-rich codebook and motion decoder, and the codebook and motion decoder are frozen during the training process of the text-generated 3D facial animation model.
[0039] The training process of the text-generated 3D face animation model is as follows:
[0040] First, the text-speech shared features are input into the Transformer encoder to further purify the text-speech shared features; for the t-th frame, t is greater than or equal to 2, the 3D face mesh sequence predicted by the previous t-1 frame is And the further purified text-speech shared features are input into the Transformer decoder to obtain motion features ; Movement characteristics The quantized features are obtained by codebook quantization , After decoding by the motion decoder, the predicted 3D face mesh of the tth frame is obtained ; Repeat the operation until the autoregression predicts the last frame of the three-dimensional face mesh; splice all the predicted three-dimensional face meshes together to obtain a predicted three-dimensional face mesh sequence.
[0041] Then, a loss function is constructed between the predicted 3D face mesh sequence and the original 3D face mesh sequence samples. The loss function includes feature regularity loss and motion loss ; Feature regularity loss Measuring and predicting motion characteristics and the quantized features from the codebook The deviation between Measuring predicted motion and real motion The final loss function is: ;
[0042] S3. Measure the performance of the overall text-driven 3D facial animation model based on the test set samples and obtain the model with the best performance.
[0043] Optionally, the quantitative measurement indicators adopted are lip synchronization error and overall synchronization error. Among them, the lip synchronization error is to calculate the maximum L2 error of all lip area face mesh vertices in each frame and take the average of all frames, and the overall synchronization error is to calculate the average L2 error of all vertices of the entire three-dimensional human body mesh. The lip synchronization error is to judge the synchronization between the lip movement and the synthesized speech and its own authenticity, and the overall synchronization error is to evaluate the synthesis performance of the overall face. Finally, the parameters and structure of the entire model with the best performance under the indicator are saved.
[0044] S4. Connect the best-performing text-driven 3D facial animation overall model with a large-scale pre-trained language model to establish a brain-inspired text-driven 3D facial animation model.
[0045] In this embodiment, the large-scale pre-trained language model uses ChatGPT 4.0. ChatGPT 4.0 is a large multimodal model that can accept image and text input and generate text output. It performs well in dialogue generation and can smoothly conduct instant conversations and answer various questions, including historical questions, story writing, business plans, and industry analysis. The overall model of text-driven three-dimensional facial animation is connected to ChatGPT 4.0 to establish a brain-inspired text-driven three-dimensional facial animation model. The user inputs text to describe the required three-dimensional facial animation, and ChatGPT 4.0 outputs the corresponding text, the content of which is the corpus of the required three-dimensional facial animation, which enhances the user's interactive experience.
[0046] S5. According to actual needs, the text description is input into the brain-inspired text-driven 3D facial animation model, and the specified 3D facial animation is output.
[0047] Workflow like Figure 3 As shown in the figure, the user first writes a text description, inputs the text description into a large-scale pre-trained language model, and the large-scale pre-trained language model processes the text description and outputs a corpus. The corpus is input into a text encoder, and the text-language shared features are encoded. The text-language shared features are input into a text-to-speech model and a text-to-3D facial animation model, and finally a 3D facial animation corresponding to the text description is obtained.
[0048] For those skilled in the art, various other corresponding changes and deformations can be made according to the technical solutions and concepts described above, and all of these changes and deformations should fall within the protection scope of the claims of the present invention.
Claims
1. A brain-inspired text-driven 3D face method, characterized in that: The following steps are involved: S1. Obtain 3D face mesh sequence samples, audio files, and corpus corresponding to the audio files, and divide them into a training set and a test set; S2 establishes a text-driven 3D facial animation overall model, the text-driven 3D facial animation overall model includes a text encoder, a text-synthesized speech model, a text-generated 3D facial animation model, and a speech feature extractor; Training a text-driven 3D face animation model to simultaneously generate 3D dynamic faces and synthesized speech; S3. Measure the performance of the overall text-driven 3D face animation model based on the test set samples and obtain the model with the best performance; S4. Connect the best performing text-driven 3D facial animation overall model with a large-scale pre-trained language model to build a brain-inspired text-driven 3D facial animation model; S5. Input the text description into the brain-inspired text-driven 3D facial animation model, and output the specified 3D facial animation; The step S2 comprises the following sub-steps: S21. Input the corpus into a text encoder to obtain text-speech shared features; S22. Input the text-speech shared features into the text-to-speech model to obtain a synthesized speech waveform; construct a loss function between the synthesized speech and the original speech sample, continuously train and optimize the model through the gradient descent method, and obtain a text-to-speech model; S23. Input the text-speech shared features into the text to generate a 3D face animation model, further purify the text-speech shared features, and autoregressively predict the 3D face mesh sequence; construct a loss function between the predicted 3D face mesh sequence and the original 3D face mesh sequence samples, continuously train and optimize the model through the gradient descent method, and obtain the text-generated 3D face animation model; S24. Input the original speech into the pre-trained speech feature extractor to obtain speech features; calculate the KL divergence loss of the speech features and the text-speech shared features further purified in the text-generated three-dimensional face animation model, and continuously train and optimize the model through the gradient descent method.
2. According to claim 1, a brain-inspired text-driven 3D face method, characterized in that: The three-dimensional face mesh sequence sample is an npy file, corresponding to the audio; after reading, a time series of three-dimensional space coordinates of 5023 vertices of the corresponding face is obtained; The audio is a wav file, and a speech waveform is obtained after reading; the corpus corresponding to the audio file is a txt file, which is obtained by converting speech to text; The text encoder includes an embedding layer, a periodic position encoding module and a variance adapter.
3. According to claim 2, a brain-inspired text-driven 3D face method, characterized in that: The sub-step 21 is specifically as follows: The corpus input is first segmented to break the text into smaller units; after segmentation, the text is converted into a phoneme sequence; the phoneme sequence is input into the embedding layer, and each phoneme is converted into an embedding vector; through periodic position encoding, the embedding vector is added with position encoding to provide the position information of the word in the text; through the variance adapter, additional voice change information, including pitch, energy and duration, is added to the only phoneme features in the text to obtain text-speech shared features; The variance adapter includes a duration predictor, a pitch predictor and an energy predictor; The voice variation information is extracted from the target speech waveform during training and directly used as a conditional input; in the inference phase, duration predictors, pitch predictors, and energy predictors are used to predict these values; The text-to-speech model includes a mel-spectrogram decoder and a vocoder.
4. According to claim 3, a brain-inspired text-driven 3D face method, characterized in that: In sub-step 22, the text-speech shared feature is input into the text-to-speech model to obtain a synthesized speech waveform, specifically: The text-speech shared features are input into a mel-spectrogram decoder and converted into a mel-spectrogram sequence; the mel-spectrogram is converted into a speech waveform using a pre-trained vocoder Parallel WaveGAN; the text-generated three-dimensional face animation model includes a Transformer-based encoder and decoder, a context-rich codebook, and a motion decoder.
5. The brain-inspired text-driven 3D face method according to claim 4, characterized in that: The context-rich codebook is obtained by the pre-trained VQ-VAE model, specifically: The VQ-VAE model includes an encoder, a codebook, and a motion decoder; the original three-dimensional face mesh of T frames is transformed into Input encoder to get features , and then Map to the closest point in the codebook space ; The predicted face sequence is obtained by decoding the motion decoder ; In the original 3D face mesh and predict facial sequences The reconstruction loss is minimized, that is, the difference between the input facial motion sequence and the facial motion sequence reconstructed by the decoder is minimized; the VQ-VAE model is continuously trained and optimized through the gradient descent method to obtain the pre-trained context-rich codebook and motion decoder.
6. The brain-inspired text-driven 3D face method according to claim 5, characterized in that: The pre-trained context-rich codebook and motion decoder are frozen during the training process of the text-generated 3D facial animation model.
7. The brain-inspired text-driven 3D face method according to claim 6, characterized in that: In sub-step 23, the text-speech shared features are input into the text to generate a three-dimensional face animation model, and the text-speech shared features are further purified, and the three-dimensional face mesh sequence is predicted by autoregression, specifically: Input the text-speech shared features into the Transformer encoder to further purify the text-speech shared features; For the tth frame, t is greater than or equal to 2, the 3D face mesh sequence predicted by the previous t-1 frame And the further purified text-speech shared features are input into the Transformer decoder to obtain motion features ; Movement characteristics The quantized features are obtained by codebook quantization , After decoding by the motion decoder, the predicted 3D face mesh of the tth frame is obtained ; Repeat the operation until the autoregression predicts the last frame of the three-dimensional face mesh; splice all the predicted three-dimensional face meshes together to obtain a predicted three-dimensional face mesh sequence.
8. The brain-inspired text-driven 3D face method according to claim 7, characterized in that: In sub-step 23, a loss function is constructed between the predicted three-dimensional face mesh sequence and the original three-dimensional face mesh sequence samples, and the model is continuously trained and optimized by the gradient descent method to obtain a text-generated three-dimensional face animation model, specifically: The loss function of the text-generated 3D face animation model includes feature regularity loss and motion loss ; Feature regularity loss Measuring and predicting motion characteristics and the quantized features from the codebook The deviation between Measuring predicted motion and real motion The difference between.
9. The brain-inspired text-driven 3D face method according to claim 1, characterized in that: The step 5 is specifically as follows: Input the text description into a large-scale pre-trained language model and output the corpus; input the corpus into the text-driven 3D facial animation overall model and output the specified 3D facial animation.
