A method and system for generating high-quality talking face videos based on RDDM
Through the RDDM-based method, Deep3DFace and speech features are combined for forward and reverse diffusion to generate high-quality talking face videos, which solves the problems of poor low-light and blurred image processing and neglect of facial dynamics in the existing technology, and achieves It provides natural and realistic facial expression presentation and improved video quality.
Patent Information
- Application Number
- CN202410941000.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-15
- Publication Date
- 2024-09-17
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing talking face video generation methods are not effective when processing low-light and blurry images, resulting in limited quality and visual effects of the generated videos, and ignore the dynamic changes of head posture and facial features such as eyes and eyebrows, resulting in video The effect is stiff and lacks personalization.
Using an RDDM-based method, the style reference video is processed through Deep3DFace to extract expression coefficients, and forward and reverse diffusion are combined with speech features to generate high-quality 3D facial motion data. The image renderer is used to render the data into a video to ensure that the face Expression details and movement trajectories are clearly presented.
It improves the generation quality and visual effects of talking face videos, ensures the naturalness and realism of facial expressions, and simultaneously handles low-light and blurry images, improving the overall quality and application value of the video.
Smart Images

Figure CN118488266B
Abstract
Description
Technical Field
[0001] The invention relates to a video generation method, in particular to a high-quality speaking face video generation method based on RDDM, and belongs to the technical field of multimedia and artificial intelligence. Background Art
[0002] RDDM, or Residual Denoising Diffusion Models, is a generative model that learns how to generate denoised data given noisy data. This model is particularly useful in denoising tasks for images, audio, and other types of data.
[0003] The task of generating a video of a talking face is to input any audio segment and a reference image or video of the target object as a visual information source, and then generate a speaking video of the target object with audio and video synchronization. This technology has broad application prospects for various multimodal generation tasks such as virtual digital humans, visual dubbing, and online speeches, greatly optimizing the display effect of virtual reality and broadening the boundaries of human-computer interaction.
[0004] Since the subjects are very sensitive to any tiny audio and video asynchrony and artifacts, extremely fine-grained generation effects are required. Therefore, how to generate accurate lip synchronization and high-quality visual effects in the time domain (such as vivid facial details, natural postures and movements without obvious jitter) is the main challenge for the current speaking face video generation task. Among facial features, the slight opening and closing of the lips, subtle muscle movements, such as the slight upturn or droop of the corners of the mouth, and the tension or relaxation of the chin and cheek muscles, all greatly affect the naturalness and realism of facial expressions. Existing methods and technologies, such as the generation method based on lip synchronization matching and the generation method based on intermediate structure feature representation, although they focus on the movement changes of the human face mouth shape or can generate faces with a frontal perspective, they often ignore the changes in head posture and the subtle dynamics of other key facial features such as eyes and eyebrows, resulting in the generated video being relatively rigid in visual effects, lacking personalized information, and the unnatural overall video effect also greatly reduces the practical application value of speaking face video generation.
[0005] Patent application CN116980697A discloses a method for generating a talking face video, which includes: when a talking face video generation request is received, obtaining a face reference image of a target object and a corresponding posture source video and target audio, respectively processing the face reference image, the posture source video and the target audio to obtain corresponding head posture features, identity features and voice features, performing feature fusion on the head posture features, identity features and voice features to obtain target fusion features, and generating a talking face video based on the target fusion features through a pre-trained talking face video generation model composed of a generator network based on a styleGAN2 structure and a discriminator network including a visual quality discriminator.
[0006] However, although this method improves the natural coherence and flexibility of the target object's head posture when speaking in the generated talking face video, and improves the generation quality and visual effect of the talking face video, it ignores the restoration of weak light and blurred images, resulting in dim light and blurred video visual effects in the talking face video, which limits the quality and visual effect of the final generated face video. Therefore, a high-quality talking face video generation method and system based on RDDM is proposed. Summary of the invention
[0007] In view of this, the present invention provides a method and system for generating high-quality speaking face videos based on RDDM to solve or alleviate the technical problems existing in the prior art and at least provide a beneficial choice.
[0008] The technical solution of the embodiment of the present invention is implemented as follows: a method for generating high-quality speaking face video based on RDDM, comprising the following steps:
[0009] S1, obtain face reference images, style reference videos and audio clips;
[0010] S2, using Deep3DFace to process the style reference video to obtain expression coefficients, and using the style encoder to obtain style features based on the expression coefficients;
[0011] S3, extracting phonemes from the audio clips through a speech recognition tool, and obtaining speech features using an audio encoder based on the phoneme labels;
[0012] S4, input the style features and speech features into the RDDM-based decoder, perform forward and backward diffusion, and obtain the predicted 3D facial motion;
[0013] S5, using the 3D facial motion and the face reference image as input through the image renderer to generate a high-quality speaking face;
[0014] Among them, forward diffusion is to gradually introduce residuals of facial distortion and detail blurring into a noisy data by adding Gaussian noise to the initial state;
[0015] Back diffusion is to gradually remove the residual and noise from the noisy data with residual, gradually restore the clarity of the face, and at the same time introduce the input feature information to make the reconstructed 3D facial motion data clear and without residual, showing the required facial expression details and motion trajectory.
[0016] Further preferably, in S2, the step of Deep3DFace processing the style reference video includes:
[0017] S21, crop and resize the style reference video to 256*256 pixels and sample at 25 FPS;
[0018] S22, input the style reference video into Deep3DFace frame by frame, and extract the expression coefficient in the 3DMM coefficient.
[0019] Further preferably, in S22, a single frame of the style reference video is input into ResNet-50 of Deep3DFace for feature extraction to obtain the expression coefficient in the 3DMM coefficient;
[0020] Among them, the 3DMM coefficients include identity coefficient, expression coefficient, texture coefficient, illumination coefficient and posture coefficient.
[0021] Further preferably, in S2, the style feature is a Transformer-based style encoder, and the expression coefficient is obtained as input, and the specific steps include:
[0022] S221, initialize the style encoder, set the model dimension of the encoder, the number of multi-head attention heads and the number of encoder layers;
[0023] S222, increasing the dimension of the input data to a predetermined model dimension through a linear transformation layer, and introducing position encoding;
[0024] S223, sending the dimensionally expanded and positionally encoded data to an encoder;
[0025] S224. Use the self-attention pooling layer of the encoder to assign weights to each element in the sequence and calculate the weighted average to aggregate the style information and obtain the style features.
[0026] Further preferably, in S3, the speech feature is obtained by converting the phoneme label into a word embedding and inputting it into a Transformer-based audio encoder, and the specific steps include:
[0027] S31. Use the DeepSpeech model to extract phoneme tags from a given speech segment and convert the phoneme tags into corresponding word embeddings through the Word2Vec model.
[0028] S32, input the word embedding into the Transformer-based audio encoder, and reduce the dimension of the features through the linear layer of the encoder;
[0029] S33, introducing the reduced-dimensional features into position coding, inputting them into the Transformer coding layer for processing, and obtaining the encoded speech features.
[0030] Further preferably, in S32, the input window of the audio encoder is composed of 11 continuous speech features, and the dimension of each feature is 1024; the dimension reduction is to reduce the feature dimension to 256 through a linear layer;
[0031] In S33, the Transformer encoding layer has 8 attention heads and the hidden layer size is 256.
[0032] Further preferably, the step S4 comprises the following steps:
[0033] S41, using sine embedding for each time step of the decoder to convert the current time step t into a time embedding;
[0034] S42, concatenating the style features, speech features and time embedding and inputting them into the RDDM-based decoder;
[0035] S43, performing a forward diffusion-RDDM model to simulate a natural transition from a current state to a next state. In the forward process, the residual represents a small change between facial action states, and the current state is updated through a directional mean drift to achieve a transition from the current state to the target state.
[0036] S44, perform reverse diffusion - gradually remove the residual and noise from the noisy data with residual, gradually restore the clarity of the face, and introduce the input feature information at the same time, so that the reconstructed 3D facial motion data can clearly and accurately present the required facial expression details and motion trajectory, and in each time step, reversely update the facial action state according to the predicted residual and noise until it iterates to t=0, and finally obtain the reconstructed 3D facial motion at t=0.
[0037] The forward diffusion and backward diffusion processes simulate the transition from initial rough features to more precise and clear expression features. This approach enables the model to learn to capture and correct information degradation caused by incomplete features or noise, thereby accurately simulating the specific changes in facial expressions.
[0038] Further preferably, in S5, the 3D facial motion and the reference image are rendered into the video as input by an image renderer to generate a final face.
[0039] On the other hand, the present invention provides a high-quality speaking face video generation system based on RDDM, comprising:
[0040] The RDDM-based face generation network module is configured to obtain a face reference image, a style reference video, and an audio clip, and use RDDM to process and fuse style features and speech features to generate a target fusion feature;
[0041] Style source video and audio acquisition module: used to obtain the corresponding style source video and audio clips;
[0042] Style processing module: used to process style reference videos using Deep3DFace, extract expression coefficients, and obtain style features through the style encoder;
[0043] Audio processing module: used to extract phonemes from audio clips using speech recognition tools, convert them into word embeddings, and then obtain speech features through the Transformer encoder;
[0044] RDDM decoder module: used to combine style features and speech features, use RDDM to perform forward diffusion and backward diffusion processing, and generate predicted 3D facial motion;
[0045] Image rendering module: used to combine 3D facial motion with reference images to generate a facial video of the speaker.
[0046] Preferably, the specific steps of generating the speaker's facial image frame by frame using the face generation network module of RDDM include:
[0047] The style features, speech features and time embedding are concatenated and input into the RDDM-based decoder;
[0048] RDDM performs forward diffusion, which simulates the natural transition from the current state to the next state. The residual represents the slight change between the facial action states. The current state is directional mean shifted by the residual to obtain the next state. In forward diffusion, Gaussian noise is gradually added to the spliced features, and it is updated according to, and the residual from to is recorded at each time step t;
[0049] At each time step, the facial action state is updated inversely according to the predicted residual and noise until it iterates to t=0, and finally the reconstructed 3D facial motion is obtained at t=0.
[0050] The 3D facial motion and the reference image are rendered into a video as input through an image renderer to obtain a final face video.
[0051] Since the embodiment of the present invention adopts the above technical solution, it has the following advantages: the present invention obtains a facial reference image and a corresponding style source video and audio clip, and processes the style reference video and audio clip accordingly to obtain corresponding style features and voice features; then the style features and voice features are input into a decoder based on RDDM, and forward diffusion and backward diffusion are performed to obtain predicted 3D facial motion, so that the reconstructed 3D facial motion data is clear and has no residual, and accurately presents the required facial expression details and motion trajectory; finally, the 3D facial motion and the reference image are used as input by an image renderer to generate a speaking face, thereby improving the generation quality and visual effect of the speaking face video.
[0052] The above summary is for illustrative purposes only and is not limiting in any way. In addition to the illustrative aspects, embodiments and features described above, further aspects, embodiments and features of the present invention will be readily apparent by reference to the accompanying drawings and the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0054] Figure 1 is a flow chart of the steps of the present invention;
[0055] Figure 2 A flow chart of the processing steps of the style reference video of the present invention;
[0056] Figure 3 A flowchart of the steps of style feature extraction and encoding of the present invention;
[0057] Figure 4 A flowchart of the steps of speech feature extraction and encoding of the present invention;
[0058] Figure 5 A flow chart of the steps of predicting 3D facial motion according to the present invention;
[0059] Figure 6 Schematic diagram of the system structure of Example 2 of the present invention. DETAILED DESCRIPTION
[0060] In the following, only some exemplary embodiments are briefly described. As those skilled in the art will appreciate, the described embodiments may be modified in various ways without departing from the spirit or scope of the present invention. Therefore, the drawings and descriptions are considered to be exemplary and non-restrictive in nature.
[0061] It should be noted that the terms "first", "second", "symmetrical", "array", etc. are only used to distinguish between description and position description purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the definition of "first", "symmetrical", etc. can explicitly or implicitly include one or more of these features; similarly, when the number of certain features is not limited in the form of words such as "two" or "three", it should be noted that this feature also explicitly or implicitly includes one or more feature quantities.
[0062] Technical term explanation:
[0063] Deep3DFace: is a deep learning method for reconstructing a 3D face model from a single image. This method usually uses a convolutional neural network or other deep learning architecture to learn the mapping relationship between an image and a 3D face. Through training, this model can predict the 3D structure of a face, including the position and shape of features such as the facial contour, eyes, nose, and mouth.
[0064] RDDM (Rapid Data Dictionary Mining): is an algorithm for quickly building a data dictionary from a large amount of data. A data dictionary is a data structure used to describe the attributes of each field (variable) in a data set (such as data type, value range, etc.). It plays an important role in data management tasks such as data preprocessing, data quality inspection, data analysis, and data mining.
[0065] 3DMM (3D Morphable Model): is a mathematical model used to describe and generate the shape and texture of a 3D face. This model is based on statistical methods and learns the geometric properties and appearance characteristics of a face by analyzing a large amount of 3D face scan data.
[0066] DeepSpeech model: is an end-to-end speech recognition system based on neural networks, which can predict text directly from raw audio signals. The model uses two main methods: an acoustic model based on a recurrent neural network (RNN) and a phoneme recognition model based on a convolutional neural network (CNN).
[0067] Transformer: is a deep learning model based on the self-attention mechanism, which allows the model to consider all other elements in a sequence while processing an element of a sequence. This mechanism enables the model to capture long-distance dependencies within the sequence, thereby improving the performance of the model.
[0068] The embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0069] Embodiment 1
[0070] like Figure 1-Figure 5 As shown, the embodiment of the present invention provides a method for generating high-quality speaking face videos based on RDDM, comprising the following steps:
[0071] A face reference image, a style reference video and an audio clip are obtained, and the style reference video and the audio clip are processed accordingly to obtain corresponding face features and voice features.
[0072] The style reference video is processed using Deep3DFace to obtain the expression coefficient, which specifically includes the following steps:
[0073] (1) Crop and resize the style reference video to 256*256 pixels and sample it at 25 FPS to obtain the primary video sequence ;
[0074] (2) The primary video frame sequence Input each frame into Deep3DFace to extract expression coefficients .
[0075] Since speaking styles involve dynamic facial movement patterns, we mainly focus on the expression coefficients here, regardless of the identity, texture, illumination and posture coefficients in the 3DMM coefficients.
[0076] Expression coefficient Input to Transformer-based style encoder , the steps to obtain style features include:
[0077] (1) Initialize the style encoder Parameters of , including model dimensions, number of multi-head attention heads, and number of encoder layers;
[0078] (2) Input data Transform the dimension to get , The shape is , where B is the batch size, L is the sequence length, is the characteristic dimension of the expression coefficient.
[0079] (3) In order to enhance the expressiveness of the model and better capture the complex features and patterns in the data, Perform dimension expansion and position encoding. Dimension expansion is achieved through a linear transformation, the purpose of which is to map the data from its original feature space to a higher-dimensional feature space in order to adapt to the internal dimension of the encoder:
[0080] ;
[0081] in, and are the weights and biases of the linear layer respectively.
[0082] In order to enable the model to understand the position information in the sequence, position encoding is introduced , using sine and cosine functions to generate positional encodings:
[0083] ;
[0084] ;
[0085] Among them, pos is the position index of the element in the sequence, is the feature dimension of the expression coefficient, and the position encoding P can provide the model with the relative or absolute position information of each time step in the sequence.
[0086] Encode the position Directly add to the linearly transformed On, so that Now it contains the position information and the shape is ,and The shape should be ,and align at each time step.
[0087] (4) After the data is positionally encoded, it is fed into a series of encoder layers. Each layer includes a multi-head self-attention mechanism and a feedforward network, which enables the model to capture the characteristics of the data from different representation spaces. Each encoder layer of the model contains the following two main components:
[0088] 1. Multi-head self-attention mechanism:
[0089] ;
[0090] Where Q, K, and V represent query, key, and value matrices, respectively. is the dimension of the key, which allows the model to focus on different information in the sequence at different positions.
[0091] 2. Feed-Forward Network (FFN), which includes a self-attention pooling layer:
[0092] ;
[0093] in , , , are network parameters, and the feed-forward network provides a nonlinear transformation for each position.
[0094] The speaking style in a video clip can be identified by several typical frames, so a Self-Attention pooling layer is used to aggregate the style information on the style vector. A self-attention mechanism is used to assign a weight to each element in the sequence, and then a weighted average is calculated based on these weights, which can be expressed as:
[0095] ;
[0096] in For the The attention weight of each element, For the sequence The feature vector of elements.
[0097] Finally, the model outputs the style feature s, which has the shape of .
[0098] Input the audio clip to the audio encoder The steps of obtaining speech features include:
[0099] (1) In order to remove some information in the audio that is not related to pronunciation (such as emotion and intensity), phoneme labels are used instead of Mel spectrograms to represent the audio signal. The audio clip is put into the speech recognition tool DeepSpeech to extract the phoneme labels. , Refers to the time Around, including front and back Such a representation can provide the model with contextual information about the current pronunciation, which helps to better understand and process audio data.
[0100] (2) Convert to word embeddings via Word2Vec , the shape is ,in is the batch size, is the sequence length, is the audio window size, is the characteristic dimension.
[0101] (3) Embedding words Input to audio encoder , using a linear layer Convert to , and add position encoding, and obtain the encoded speech features through three Transformer encoding layers with 8 attention heads and hidden layer size of 256 , the shape is .
[0102] The style feature s and the speech feature c are input into the RDDM-based decoder to obtain the predicted 3D facial motion. The steps include:
[0103] (1) RDDM uses forward and backward diffusion processes. The diffusion process is modeled as a Markov noise process. Starting from the beginning, gradually introduce Gaussian noise, similar to For each time step, use sine embedding to convert the current time step t into a time embedding, concatenate the style feature s, speech feature c and time embedding, and obtain the concatenated feature ,The purpose of time embedding is to convert the time step t into a vector of fixed ,dimension.
[0104] (2) In order to simulate the gradual decline in image quality and the increase in noise, a single forward diffusion processing step is defined in RDDM: ,in Represents the state arrive A directional mean shift (residual diffusion) in The residual in yes and The difference between ,in is the initial facial features randomly sampled from a normal distribution, and two independent coefficients and Control residual and noise diffusion respectively.
[0105] In the forward diffusion process, according to the expression In fact, it can be concluded from Medium Sampling :
[0106] ;
[0107] ;
[0108] ;
[0109] ;
[0110] in , , In the forward diffusion process and noise Gradually join Finally get .
[0111] from arrive The backward diffusion process involves estimating the residual and noise added during the forward diffusion process. The residual is used in the backward diffusion process to train two models at the same time. and To predict the residuals and noise . Use the above formula to obtain the estimated target feature , given and , the generation process is defined as follows:
[0112] ;
[0113] For from arrive The inverse generation process can be expressed as Bayes' rule:
[0114] ;
[0115] Among them, the following formula comes from the forward diffusion formula:
[0116] ;
[0117] ;
[0118] So we have:
[0119] ;
[0120] ;
[0121] ;
[0122] in, and They are arrive The mean and variance calculated during the back diffusion process are expressed as follows:
[0123] ;
[0124] ;
[0125] ;
[0126] ;
[0127] so arrive The transition probability It can be expressed as:
[0128] ;
[0129] in , is the standard deviation of the noise, where determines whether the generation process is random or deterministic.
[0130] During the reconstruction process, the residuals predicted by the trained network are used and noise You can start from Recovery ;
[0131] when , the sampling process is random, as follows:
[0132] ;
[0133] ;
[0134] ;
[0135] when When , the sampling process is deterministic:
[0136] ;
[0137] (3) Using the above formula, we can get the noise vector Step by step, we can remove the residual and noise to get , which is the resulting 3D facial motion. The bidirectional diffusion process simulates the change from the baseline or clear expression state to the impaired (blurred or low-light) expression state. In this way, the model learns to capture and simulate the specific way in which the quality of the expression coefficients degrades. During expression restoration, this process is reversed, and the model uses the learned residual information to gradually restore the original state of the expression.
[0138] Finally, the 3D facial motion is transformed into The reference image is rendered into the video as input to obtain the final face.
[0139] In the present invention, the objective function is implemented by the following steps: Design:
[0140] (1) The RDDM-based denoising network calculates facial motion based on speech clips and style reference videos, and the lip shape expert discriminator provides lip movement guidance under different expressions, enabling RDDM to achieve accurate lip synchronization while ensuring style expressiveness.
[0141] The lip movements and audio are encoded into embeddings conditioned on the style reference, and then the cosine similarity is calculated to represent the synchronization probability. To obtain the lip movement information from the face motion m, m is first converted to a face mesh and the vertices of the mouth area are selected as the lip movement representation. The training loss of the lip sync expert discriminator is
[0142] ;
[0143] Among them, BCE is Binary Cross-Entropy (BCE); and Embedding vectors representing facial features and audio respectively; is a small number used to avoid division by zero errors.
[0144] (2) In order to be able to recognize and process low-light, blurred, and degraded images, the training data contains sufficient samples of these situations. When training the model, labeled data (3D facial motion data labeled as low-light or blurred) is used to help the model better learn to handle these specific situations. The training method of the RDDM-based denoising network is to sample random tuples from the dataset. ,in By adding Gaussian noise and residual connections, Damage ,right Perform the residual denoising step and optimize the loss. The loss function is as follows:
[0145] ;
[0146] ;
[0147] The overall training objectives are: ,in is the weight coefficient.
[0148] Embodiment 2:
[0149] like Figure 6 As shown, the embodiment of the present invention also provides a system for generating a speaking face video of RDDM, including:
[0150] The RDDM-based face generation network module is configured to obtain face reference images, style reference videos and audio clips, use RDDM to process and fuse style features and speech features, and generate target fusion features; including:
[0151] Style source video and audio acquisition module: used to obtain the corresponding style source video and audio clips;
[0152] Style processing module: Use Deep3DFace to process the style reference video, extract the expression coefficient, and use the style encoder to obtain the style features;
[0153] Audio processing module: Use speech recognition tools to extract phonemes from audio clips, convert them into word embeddings, and then use the Transformer encoder to obtain speech features;
[0154] RDDM decoder module: used to combine style features and speech features, use RDDM to perform forward diffusion and backward diffusion processing, and generate predicted 3D facial motion;
[0155] Image rendering module: Combines 3D facial motion with reference images to generate a facial video of the speaker.
[0156] The specific steps of using the RDDM face generation network module to generate the speaker's facial image frame by frame include:
[0157] The style features, speech features and time embedding are concatenated and input into the RDDM-based decoder;
[0158] RDDM performs forward diffusion processing, which simulates the natural transition from the current state to the next state. The residual represents the slight change between the facial action states. The residual is used to perform a directional mean shift on the current state to obtain the next state. In the forward diffusion, Gaussian noise is gradually added to the splicing features. according to Update, and record at each time step t arrive The residual ;
[0159] At each time step, the facial action state is updated inversely according to the predicted residual and noise until it iterates to t=0, and finally the reconstructed 3D facial motion is obtained at t=0.
[0160] The 3D facial motion and the reference image are rendered into the video as input through the image renderer to obtain the final face video.
[0161] The steps and methods involved in the above embodiment 2 all correspond to the embodiment 1. For the specific implementation method, please refer to the relevant description part of the embodiment 1.
[0162] Those skilled in the art should understand that the modules or steps of the present invention described above can be implemented by a general-purpose computer device, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device. The present invention is not limited to any specific combination of hardware and software.
[0163] The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of various changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A method for generating high-quality speaking face videos based on RDDM, characterized in that: The following steps are involved: S1, obtain face reference images, style reference videos and audio clips; S2, using Deep3DFace to process the style reference video to obtain expression coefficients, and using the style encoder to obtain style features based on the expression coefficients; S3, extracting phonemes from the audio clips through a speech recognition tool, and obtaining speech features using an audio encoder based on the phoneme labels; S4, input the style features and speech features into the RDDM-based decoder, perform forward and backward diffusion, and obtain the predicted 3D facial motion; S5, using the 3D facial motion and the face reference image as input through the image renderer to generate a high-quality speaking face; Among them, forward diffusion is to gradually introduce residuals of facial distortion and detail blurring into a noisy data by adding Gaussian noise to the initial state; Back diffusion is to gradually remove the residual and noise from the noisy data with residual, gradually restore the clarity of the face, and at the same time introduce the input feature information to make the reconstructed 3D facial motion data clear and without residual, showing the required facial expression details and motion trajectory.
2. The method for generating high-quality speaking face videos based on RDDM according to claim 1, characterized in that: In S2, the processing steps of Deep3DFace on the style reference video include: S21, crop and resize the style reference video to 256*256 pixels and sample at 25 FPS; S22, input the style reference video into Deep3DFace frame by frame, and extract the expression coefficient in the 3DMM coefficient.
3. The method for generating high-quality speaking face videos based on RDDM according to claim 2, characterized in that: In S22, a single frame of the style reference video is input into the ResNet-50 of Deep3DFace for feature extraction to obtain the expression coefficient in the 3DMM coefficient; Among them, the 3DMM coefficients include identity coefficient, expression coefficient, texture coefficient, illumination coefficient and posture coefficient.
4. The method for generating high-quality speaking face videos based on RDDM according to claim 1, characterized in that: In S2, the style feature is a style encoder based on Transformer, and the expression coefficient is obtained as input. The specific steps include: S221, initialize the style encoder, set the model dimension of the encoder, the number of multi-head attention heads and the number of encoder layers; S222, increasing the dimension of the input data to a predetermined model dimension through a linear transformation layer, and introducing position encoding; S223, sending the dimensionally expanded and positionally encoded data to an encoder; S224. Use the self-attention pooling layer of the encoder to assign weights to each element in the sequence and calculate the weighted average to aggregate the style information and obtain the style features.
5. The method for generating high-quality speaking face videos based on RDDM according to claim 1, characterized in that: In S3, the speech features are obtained by converting the phoneme labels into word embeddings and inputting them into the Transformer-based audio encoder. The specific steps include: S31. Use the DeepSpeech model to extract phoneme tags from a given speech segment and convert the phoneme tags into corresponding word embeddings through the Word2Vec model. S32, input the word embedding into the Transformer-based audio encoder, and reduce the dimension of the features through the linear layer of the encoder; S33, introducing the reduced-dimensional features into position coding, inputting them into the Transformer coding layer for processing, and obtaining the encoded speech features.
6. The method for generating high-quality speaking face videos based on RDDM according to claim 5, characterized in that: In S32, the input window of the audio encoder consists of 11 continuous speech features, each feature has a dimension of 1024; the dimension reduction is to reduce the feature dimension to 256 through a linear layer; In S33, the Transformer encoding layer has 8 attention heads and the hidden layer size is 256.
7. The method for generating high-quality speaking face videos based on RDDM according to claim 1, characterized in that: The S4 comprises the following steps: S41, using sine embedding for each time step of the decoder to convert the current time step t into a time embedding; S42, concatenating the style features, speech features and time embedding and inputting them into the RDDM-based decoder; S43, performing a forward diffusion-RDDM model to simulate a natural transition from a current state to a next state. In the forward process, the residual represents a small change between facial action states, and the current state is updated through a directional mean drift to achieve a transition from the current state to the target state. S44, perform reverse diffusion - gradually remove the residual and noise from the noisy data with residual, gradually restore the clarity of the face, and introduce the input feature information at the same time, so that the reconstructed 3D facial motion data can clearly and accurately present the required facial expression details and motion trajectory, and in each time step, reversely update the facial action state according to the predicted residual and noise until it iterates to t=0, and finally obtain the reconstructed 3D facial motion at t=0.
8. The method for generating high-quality speaking face videos based on RDDM according to claim 1, characterized in that: In S5, the 3D facial motion and the reference image are rendered into the video as input by an image renderer to generate a final face.
9. A high-quality speaking face video generation system based on RDDM, characterized in that: The system comprises: The RDDM-based face generation network module is configured to obtain a face reference image, a style reference video, and an audio clip, and use RDDM to process and fuse style features and speech features to generate a target fusion feature; Style source video and audio acquisition module: used to obtain the corresponding style source video and audio clips; Style processing module: used to process style reference videos using Deep3DFace, extract expression coefficients, and obtain style features through the style encoder; Audio processing module: used to extract phonemes from audio clips using speech recognition tools, convert them into word embeddings, and then obtain speech features through the Transformer encoder; RDDM decoder module: used to combine style features and speech features, use RDDM to perform forward diffusion and backward diffusion processing, and generate predicted 3D facial motion; Image rendering module: used to combine 3D facial motion with reference images to generate a facial video of the speaker.
