A digital human lip movement generation method and model training method for face identity perception
Through facial identity perception technology, voice and facial features are extracted and fused to generate synthetic facial feature maps, which solves the problems of poor generalization and high training resources of existing digital lip movement models, and achieves more natural video synthesis effects and More efficient training process.
Patent Information
- Application Number
- CN202410358554.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-27
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2044-03-27
AI Technical Summary
The existing 2D digital human lip movement model has poor generalization and high training resource requirements, resulting in the generated video being low-realism and time-consuming.
The digital lip movement generation method with facial identity awareness is used to obtain the driving voice and video, extract voice features and face features, fuse them and inject them into the feature map to generate a synthetic face feature map, which is spliced frame by frame to form a synthetic video. Use alternating training methods to reduce the amount of data and training cycles.
It improves the model's utilization of face images, improves generalization and stability of video synthesis, generates more natural and realistic lip and facial movements, and uses less data and training cycles in the customization process to achieve the same results as Same effect as traditional methods.
Smart Images

Figure CN118262015B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of artificial intelligence, and in particular relates to a digital human lip movement generation method and a model training method for face identity perception. Background Art
[0002] 2D digital human technology has a wide range of application scenarios, such as short video production, digital human live broadcast, human-computer dialogue, etc. Its core technology lies in the matching of the generated character's facial movements and voice. In facial movements, the most critical problem is the matching of lips and voice, which is the so-called digital human lip movement problem. The lip movements of digital humans are changed and synthesized by new voice-driven digital human lip movements, so that the lip movements can match the driving voice. Only by achieving a high-precision lip movement model can the realism and affinity of digital humans be enhanced, so that digital humans can be widely accepted by people in various actual application scenarios.
[0003] The current 2D digital human lip movement models are mainly divided into two categories, one is the general lip movement model, and the other is the customized lip movement model.
[0004] As the name implies, the universal lip movement model can achieve lip shape synthesis under zero-sample conditions. Given a video of a person speaking, without learning for the person, the model can directly modify the video of the person according to the new voice, modify its lip movements, and make the lips match the voice. This type of model needs to be trained in advance with a large amount of diverse speaker video data to enhance the generalization ability of the model. Since there is no training and learning for a specific image, in practice, for characters other than the training data, the synthesized video often has poor realism, with problems such as stiff facial movements, poor lip shape matching, and facial shaking. After analysis, it was found that various previous universal lip movement models did not really learn to use the reference image in the input, and the inference of the person's identity information only came from the unobstructed area in the original image, so there were serious problems with their generalization.
[0005] A customized lip movement model requires collecting speech video data of the target person based on their image, and then training the model on the data to learn the correlation between the person's lip and facial movements and speech, and to use new speech to drive the regeneration of the person's lips and face. As data of a specific image needs to be collected specifically, existing methods generally require more than 3 minutes of speaker data, which requires a large amount of data. At the same time, it is often necessary to conduct fine-tuning training for more than 30 training cycles based on the pre-trained model, which is relatively time-consuming. Summary of the invention
[0006] In order to solve the problems of poor generalization and high training resource requirements of existing 2D digital human lip movement models, the present invention proposes a digital human lip movement generation method and model training method for face identity awareness. The generated synthetic face video has higher stability, and the lip and facial movements are more natural and realistic. It can realize a customized lip movement model with less data and fewer training cycles, and achieve the same digital human video synthesis effect as the traditional method.
[0007] In order to achieve the above object, the technical solution adopted by the present invention is as follows:
[0008] In a first aspect, the present invention provides a method for generating digital human lip movements for face identity perception, comprising:
[0009] Acquire driving voice and video of the digital human to be driven;
[0010] Calculate and encode the original speech features of the driving speech to obtain the encoded speech features corresponding to each frame of the digital human video;
[0011] Extracting the original face feature map, face identity vector and face 3D identity vector of each frame of the digital human video frame by frame, splicing the face identity vector, face 3D identity vector and encoded voice features and converting them into fusion features with the same number of channels as the original face feature map, injecting the fusion features into the original face feature map to generate a synthetic face feature map, and decoding to generate a synthetic face map;
[0012] The synthesized face image is placed back to the corresponding position of the original frame of the digital human video to obtain a synthesized video frame, and the synthesized video frames are spliced frame by frame to generate a synthesized new digital human video.
[0013] Furthermore, the frame-by-frame extraction of the original face feature map, face identity vector and face 3D identity vector of each frame of the digital human video includes:
[0014] Taking the face image as input, the pre-trained identity feature extraction model calculates the face identity vector and 3D face identity vector;
[0015] A face segmentation mask corresponding to the face image is obtained, the face image is processed using the face segmentation mask to generate an original face input image that masks the face, and an original face feature image is generated using a face encoder.
[0016] Furthermore, the pre-trained identity feature extraction model includes a pre-trained arcface model and a pre-trained 3DMM model.
[0017] Furthermore, the original speech features of the driving speech are calculated and encoded to obtain the encoded speech features corresponding to each frame of the digital human video, including:
[0018] The original speech points of the driving speech are extracted by the pre-trained wav2vec model. According to the frame length of the digital human video frame, a certain length is taken before and after each frame as the center as the speech window, and the original speech points in the speech window are extracted as the original speech features. The original speech features are encoded using a speech encoder to generate the encoded speech features corresponding to each frame image of the digital human video.
[0019] Furthermore, the fused feature is injected into the original face feature map using a feature injection model to generate a synthetic face feature map; the feature injection model is composed of a plurality of AdaIN residual modules, each AdaIN residual module includes a first input feature and a second input feature; the first input feature of the AdaIN residual module is the fused feature, the second input feature is the output feature of the previous AdaIN residual module, and the second input feature of the first AdaIN residual module is the original face feature map.
[0020] Furthermore, the AdaIN residual module includes two AdaIN modules and three convolutional layers. The first input feature and the second input feature are input into the first AdaIN module together. The output result of the first AdaIN module is input into the first convolutional layer after passing through a ReLU activation function. The output result of the first convolutional layer is respectively input into the second AdaIN module and the second convolutional layer. The output result of the second AdaIN module is input into the third convolutional layer after passing through a ReLU activation function. The output result of the third convolutional layer is added to the output result of the second convolutional layer as the output feature of the AdaIN residual module.
[0021] In a second aspect, the present invention provides a method for training a digital human lip movement model for face identity perception, wherein the trained digital human lip movement model is used to implement the above-mentioned digital human lip movement generation method, wherein the digital human lip movement model comprises a speech encoder, a face encoder, a feature injection model, a decoder, a discriminator, and a pre-trained identity feature extraction model;
[0022] The training method comprises:
[0023] Step 1, collect a large number of speakers’ facial videos and their audios;
[0024] Step 2, crop the face area image of each frame image in the speaker's face video and scale it to a uniform size to obtain a face image, and obtain a face segmentation mask corresponding to each face image; extract the original speech features corresponding to each frame image in the speaker's face video in the audio; and form a training data set with the face image and the original speech features;
[0025] Step 3, initializing the digital human lip movement model for face identity perception;
[0026] Step 4, alternately sampling different batches of data from the training data set, the sampling content includes the reference face image R and its corresponding original voice feature AR, the original face image I and its corresponding original voice feature AI, and the face segmentation masks MR and MI corresponding to the reference face image R and the original face image I; when alternately sampling, each sample in the previous batch of data is data with the same identity as the reference face image R and the original face image I, and each sample in the next batch of data is data with different identities as the reference face image R and the original face image I;
[0027] Step 5, input the current batch data into the digital human lip movement model, extract the face identity vector and face 3D identity vector of the reference face image R through the pre-trained identity feature extraction model, calculate the encoded voice features of the original voice features AI through the voice encoder, and splice the face identity vector and face 3D identity vector of the reference face image R and the encoded voice features of the original voice features AI to obtain spliced features;
[0028] The original face image I is processed by the face segmentation mask MI to obtain the original face input image I′ with the face blocked. The original face input image I is obtained by the face encoder. ′ The corresponding original face feature map;
[0029] Convert the spliced features into fused features with the same number of channels as the original face feature map, inject the fused features into the original face feature map through a feature injection model to generate a synthetic face feature map, and decode the synthetic face feature map through a decoder to generate a synthetic face image S;
[0030] Step 6, determine whether the reference face image R in the current batch of data is the same as the original face image I. If they are the same, calculate the reconstruction loss, discriminator loss and perception loss between the synthesized face image S and the original face image I, update the digital human lip movement model parameters according to the total loss, and execute step 8;
[0031] If different, go to step 7;
[0032] Step 7, extracting the face identity vector and face 3D identity vector of the synthetic face image S through the pre-trained identity feature extraction model, and calculating the identity loss of the synthetic face image according to the difference between the face identity vector and face 3D identity vector of the reference face image R and the face identity vector and face 3D identity vector of the synthetic face image S;
[0033] Obtain the face segmentation mask MS corresponding to the synthesized face image S, take S as the reference face image, MS as the segmentation mask corresponding to the reference face image, R as the original face image, MR as the face segmentation mask corresponding to the original face image, AR as the original speech feature corresponding to the original face image, re-execute the calculation process according to the method in step 5 to generate a secondary synthesized face image S′; calculate the reconstruction loss, discriminator loss and perception loss between the secondary synthesized face image S′ and image R, and calculate the total loss in combination with the identity loss of the synthesized face image, update the digital human lip movement model parameters according to the total loss, and execute step 8;
[0034] Step 8, return to step 5, use the new batch data to update the parameters of the digital human lip movement model, and complete a training cycle after traversing all batches of data;
[0035] Step 9, determine whether the total number of training cycles reaches the preset requirement. If so, complete the training of the digital human lip movement model and generate a universal lip movement model; otherwise, return to step 4 and start a new round of training cycles.
[0036] Furthermore, the reconstruction loss includes two parts:
[0037] The first part is the L1 distance loss between the original face image and the synthesized image;
[0038] The second part is the L1 distance loss between the region where the segmentation mask corresponding to the reference face image extracted from the original face image is not 0 and the synthesized image;
[0039] The discriminator loss is the cross entropy loss between the discriminator output results corresponding to the original face image and the synthesized image;
[0040] The perceptual loss is the L1 loss between the output results of the VGG model corresponding to the original face image and the synthesized image.
[0041] Furthermore, customized training steps are also included, including:
[0042] Collect the facial video and audio of the target speaker to be customized, and obtain a fine-tuning training data set according to the method in step 2;
[0043] Training batches are sampled from the fine-tuning training data set, and each sample in each batch of data is data with the same identity as the reference face image R and the original face image I. The universal lip movement model is trained according to each batch of data to generate a customized lip movement model.
[0044] In a third aspect, the present invention provides a machine-readable storage medium storing machine-executable instructions, which, when called and executed by a processor, are used to implement the above-mentioned method for generating digital human lip movements for facial identity perception, or the above-mentioned method for training digital human lip movement models for facial identity perception.
[0045] The beneficial effects of the present invention are:
[0046] (1) The present invention proposes a method for generating digital human lip movements based on face identity awareness. Face identity information in a reference face image is introduced into the lip movement generation process. This can significantly improve the model's utilization of the reference face image, enhance the model's generalization, and improve the model's synthesis effect on human images outside the training set. Compared with traditional methods, the synthesized digital human video no longer has jittery facial movements and has higher stability. The manually evaluated lip and facial movements are also more natural and realistic.
[0047] (2) The present invention adopts an alternating training method when training the digital human lip movement model, by alternately sampling different batches of data from the training data set. During the alternating sampling, each sample in the previous batch of data is data with the same identity as the reference face image R and the original face image I, and each sample in the latter batch of data is data with different identities as the reference face image R and the original face image I, thereby achieving a better training effect.
[0048] (3) The universal lip movement model obtained after training in the present invention can be further customized. In addition, due to the introduction of facial identity information in the reference facial image during the customization process, a smaller amount of data (approximately one eighteenth of the traditional method) and a smaller number of training cycles (approximately one fifteenth of the traditional method) can be used to achieve the same digital human video synthesis effect as the traditional method. The customized lip movement model can achieve a basically unchanged lip-sync rate, and the manually evaluated facial realism and naturalness remain consistent. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 1 is a schematic diagram of a framework of a method for generating digital human lip movements based on face identity perception according to an embodiment of the present invention;
[0050] Figure 2 is a schematic diagram of a face encoder shown in an embodiment of the present invention;
[0051] Figure 3 is a schematic diagram of a speech encoder shown in an embodiment of the present invention;
[0052] Figure 4 is a schematic diagram of a feature injection model shown in an embodiment of the present invention;
[0053] Figure 5It is a schematic diagram of a decoder shown in an embodiment of the present invention. DETAILED DESCRIPTION
[0054] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0055] On the contrary, the present invention covers any substitution, modification, equivalent method and scheme made on the essence and scope of the present invention as defined by the claims. Further, in order to make the public have a better understanding of the present invention, some specific details are described in detail in the detailed description of the present invention below. Those skilled in the art can fully understand the present invention without the description of these details.
[0056] Unless otherwise defined, all technical and scientific terms used in the present invention have the same meaning as those commonly understood by those skilled in the art to which the present invention belongs. The terms used in the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "or / and" used in the present invention includes any and all combinations of one or more of the related listed items.
[0057] like Figure 1 As shown, a face identity perception lip movement model proposed in this embodiment can be used to implement a digital human lip movement method for face identity perception. Combined with the training process of the model, the overall process includes:
[0058] Step 1: Collect a large number of speakers’ facial videos and audios.
[0059] Step 2: Process the speaker's facial video and audio as a training data set.
[0060] Crop the face area image in each frame and scale it to a uniform size, such as 256, to obtain a face image; use the pre-trained face parsing face segmentation model to generate a face segmentation mask corresponding to each face image;
[0061] The pre-trained wav2vec model is used to extract speech features, which contains 50 speech feature points per second, that is, there is an original speech feature point every 20ms. Taking the time of each frame of face image as the center, 100ms in length are taken forward and backward as a 200ms speech window, and 10 speech feature points in the speech window are taken to form the original speech features corresponding to the frame of face image.
[0062] Step 3: Initialize the face identity-aware lip movement model, including the speech encoder, face encoder, decoder, feature injection model, and discriminator.
[0063] like Figure 2 As shown, the face encoder is composed of several coding layers, each of which includes a two-dimensional convolution layer, a normalization layer, and an activation function. In this embodiment, the number of coding layers is 5, and the two-dimensional convolution layer in each coding layer is followed by a normalization and ReLU activation function. The input original face image is converted from 3 channels to 512 channels through five coding layers, and the original face feature map is output.
[0064] like Figure 3 As shown, the speech encoder includes a linear layer, several Transformer encoder blocks and a maximum pooling layer. In this embodiment, the number of Transformer encoder blocks is 3. The linear layer converts the input speech feature 10×768 into 10×512, which is then processed by three Transformer encoder blocks, and finally the maximum pooling layer outputs the encoded speech feature 1×512.
[0065] like Figure 4 As shown, the feature injection model is composed of a plurality of AdaIN residual modules, each of which includes a first input feature and a second input feature. In this embodiment, the number of AdaIN residual modules is 9, the first input feature of the AdaIN residual module is a fusion feature based on a reference face image and original speech data, the second input feature is the output feature of the previous AdaIN residual module, and the second input feature of the first AdaIN residual module is the original face feature map.
[0066] In a specific implementation of the present invention, the AdaIN residual module includes two AdaIN modules and three two-dimensional convolutional layers, two input features are input into the first AdaIN module, the output of the first AdaIN module is input into the first two-dimensional convolutional layer after passing through the ReLU activation function, the output of the first two-dimensional convolutional layer is respectively input into the second AdaIN module and the second two-dimensional convolutional layer, the output of the second AdaIN module is input into the third two-dimensional convolutional layer after passing through the ReLU activation function, and the output of the third two-dimensional convolutional layer is added to the output of the second two-dimensional convolutional layer as the output of the AdaIN residual module. In this embodiment, the number of AdaIN residual modules is 9.
[0067] like Figure 5 As shown, the decoder is composed of several decoding layers, each of which includes an upsampling layer, a two-dimensional convolution layer, a normalization layer and an activation function. In this embodiment, the number of decoding layers is 5, and the upsampling layer in each decoding layer upsamples the size of the input feature map. The two-dimensional convolution layer is used to restore the number of channels of the input feature map to 3 layer by layer, and output a synthetic face image.
[0068] In addition, the discriminator adopts a two-classification network, which consists of 1 ordinary convolution module that increases the number of channels to 256, 10 residual convolution modules (the input and output channels are both 256) and 2 linear layers, and the activation function used between layers is ReLU.
[0069] Step 4: Use the training data set to train the face identity-aware lip movement model, and save the model as a universal lip movement model.
[0070] In a specific implementation of the present invention, the step is specifically:
[0071] Step 4.1: Sample a batch of data from the training data set (including the reference face image R and the corresponding original speech feature AR, the original face image I and the corresponding original speech feature AI, and the face segmentation masks MR and MI corresponding to the images R and I), and alternately sample different batches of data in the following manner: each sample in one batch sampling is data with the same identity as the reference face image R and the original face image I, and each sample in the next batch sampling is data with different identities from the reference face image R and the original face image I, but at any time, the original speech features AI and AR must correspond to the original face image I and the reference face image R, respectively. Alternate in this way.
[0072] Step 4.2: Input the sampled batch data into the face identity-aware lip movement model for forward calculation. First, the reference face identity vector f of the reference face image R is calculated by the pre-trained arcface model and the pre-trained 3DMM model. id and the reference 3D face identity vector f 3d .
[0073] Step 4.3: Input the original speech feature AI corresponding to the original face image I, and use the speech encoder to calculate the speech feature v.
[0074] Step 4.4: Concatenate the face identity vector f id , 3D face identity vector f 3d And the speech feature v, the concatenated feature is transformed through a linear layer to obtain the updated concatenated feature f.
[0075] Step 4.5: Use the face segmentation mask MI to process the original face image I to obtain the original face input image I′ with the face masked. Input the original face input image I′ and the spliced feature f into the model composed of the face encoder, feature injection model and decoder to generate a synthetic face image S.
[0076] Step 4.6: If the reference face image R and the original face image I in this training batch have the same identity, calculate the reconstruction loss, discriminator loss, and perceptual loss, otherwise jump to step 4.7.
[0077] The reconstruction loss includes two parts, namely, the L1 distance between the synthesized face image S and the original face image I, i.e., the reconstruction loss L recon ; The L1 distance between the area where the face segmentation mask MR corresponding to I is not 0 and the area corresponding to S, that is, the face reconstruction loss L face .
[0078] Input I and S into the discriminator respectively and calculate the discriminator loss L of the two discrim In this embodiment, the discriminator loss adopts the cross entropy loss function; at the same time, the image features of the synthesized face image S and the original face image I are extracted based on the pre-trained VGG model, and the perceptual loss L is calculated based on the image features. pips ,In this embodiment, the perceptual loss adopts the L1 loss function.
[0079] Add these losses together to form the final loss function:
[0080] L=L recon +L face +L pips +L discrim
[0081] Skip to step 4.9.
[0082] Step 4.7: For the case where the reference face image R and the original face image I in this batch have different identities, calculate the synthetic face identity vector f of the synthetic face image S through the pre-trained arcface model sid , the synthetic face 3D identity vector f of the synthetic face image S is calculated through the pre-trained 3DMM model s3d , calculate the identity loss of the synthetic face image:
[0083] L id =||f sid -f id || 2 +||f s3d -f 3d || 2
[0084] The face segmentation mask MS corresponding to the synthetic face image S is obtained through the pre-trained face parsing model. S is used as the reference face image, MS as the segmentation mask corresponding to the reference face image, R as the original face image, MR as the segmentation mask corresponding to the original face image, AR as the speech feature corresponding to the original face image, and a new forward calculation is performed according to steps 4.2 to 4.5 to obtain the secondary face synthetic image S′.
[0085] Step 4.8: Calculate the reconstruction loss L between the secondary face synthesis image S′ and R recon , face reconstruction loss L face , discriminator loss L discrim and the perceptual loss L pips , the calculation process is the same as step 4.6, then the total loss is:
[0086] L=L recon +L face +L pips +L discrim +L id
[0087] Step 4.9: Back propagate L, calculate the gradients of each model parameter, and use the ADAM optimizer to update the parameters. Note that the parameters of the pre-trained arcface model, 3DMM model, VGG model, and face segmentation face parsing model are fixed so that they are not updated. Repeat steps 4.1 to 4.9 until 20 cycles of training are completed. Save the model parameters as a universal lip movement model.
[0088] Step 5: If it is necessary to use it as a customized lip movement model, collect a 10-second facial video of the target speaker, process the data according to the method in step 2, generate the target speaker's facial image and original speech features, and obtain a fine-tuning training data set.
[0089] Step 6: Load the general lip movement model in step 4 as the initial model, use the fine-tuning training dataset in step 5 to fine-tune the model for 2 training cycles, and save the model as a customized lip movement model.
[0090] In a specific implementation of the present invention, the step is specifically:
[0091] Step 6.1: Initialize the face-aware digital human lip movement model and load the universal lip movement model parameters obtained in step 4.
[0092] Step 6.2: Sample a batch from the fine-tuning training dataset. At this time, each sample must be data with the same identity as the reference face image R and the original face image I. Follow steps 4.2 to 4.6 and step 4.9 to train the model until two cycles of training are completed. Save the model as a customized lip movement model.
[0093] Step 7: For the video to be driven, input new speech, use the lip movement model in step 4 or step 6 to synthesize the lip shape of the video to be driven frame by frame, and output it as a synthesized video.
[0094] If a general lip movement model is required, load the general lip movement model, otherwise load a customized lip movement model. For new voice input, calculate the original voice features required for each frame of video; and select the original frames in the continuous video in turn, capture the face area image and use it as the source of the reference face image and the original face image at the same time. Perform pure forward calculations according to steps 4.2 to 4.5 to obtain a synthesized face image. Scale the synthesized face image to the size of the captured face area image and put it back to the corresponding position of the original frame to obtain a re-synthesized video frame. Splice these video frames to get the final synthesized new digital human speaking video.
[0095] In order to verify the effect of the present invention, the general model and customized model trained by the method of the present invention are compared with the general lip movement model without face perception and the customized lip movement model without face perception. A total of 120 digital human videos with different images are synthesized and multi-angle crowdsourcing evaluation is carried out, as shown in Table 1.
[0096] Table 1 Comparison results
[0097]
[0098] As shown in Table 1, it can be seen that the method proposed in the present invention improves the lip synchronization accuracy of the general lip movement model, while reducing the jitter rate of the synthesized video and improving the authenticity of the digital human synthesized video. In the customized scenario, the method proposed in the present invention can achieve or even exceed the effect of the previous customized model with very little data and training cycles.
[0099] The embodiment of the present invention further provides a computer-readable storage medium on which a program is stored. When the program is executed by a processor, the synthesis process of the new digital human speaking video is implemented.
[0100] The computer-readable storage medium may be an internal storage unit of any device with data processing capability described in any of the aforementioned embodiments, such as a hard disk or a memory. The computer-readable storage medium may also be an external storage device of any device with data processing capability, such as a plug-in hard disk, a smart media card (SMC), an SD card, a flash card, etc. equipped on the device. Furthermore, the computer-readable storage medium may also include both an internal storage unit and an external storage device of any device with data processing capability. The computer-readable storage medium is used to store the computer program and other programs and data required by any device with data processing capability, and may also be used to temporarily store data that has been output or is to be output.
[0101] Obviously, the above-described embodiments and drawings are only some examples of the present application. For those of ordinary skill in the art, the present application can also be applied to other similar situations based on these drawings without creative work. In addition, it is understandable that, although the work done in this development process may be complicated and lengthy, for those of ordinary skill in the art, certain changes in design, manufacturing or production based on the technical content disclosed in this application are only conventional technical means and should not be regarded as insufficient content disclosed in this application. Without departing from the concept of the present application, several variations and improvements can also be made, which all belong to the scope of protection of the present application. Therefore, the scope of protection of the present application shall be subject to the attached claims.
Claims
1. A method for generating digital human lip movements with face identity awareness, characterized in that: include: Acquire driving voice and video of the digital human to be driven; Calculate and encode the original speech features of the driving speech to obtain the encoded speech features corresponding to each frame of the digital human video; Extracting the original face feature map, face identity vector and face 3D identity vector of each frame of the digital human video frame by frame, splicing the face identity vector, face 3D identity vector and encoded speech features and converting them into fusion features with the same number of channels as the original face feature map, injecting the fusion features into the original face feature map by using a feature injection model, generating a synthetic face feature map, and decoding to generate a synthetic face map; the feature injection model is composed of a plurality of AdaIN residual modules, each AdaIN residual module includes a first input feature and a second input feature; the first input feature of the AdaIN residual module is the fusion feature, the second input feature is the output feature of the previous AdaIN residual module, and the second input feature of the first AdaIN residual module is the original face feature map; The synthesized face image is placed back to the corresponding position of the original frame of the digital human video to obtain a synthesized video frame, and the synthesized video frames are spliced frame by frame to generate a synthesized new digital human video.
2. The method for generating digital human lip movements for face identity perception according to claim 1, characterized in that: The frame-by-frame extraction of the original face feature map, face identity vector and face 3D identity vector of each frame of the digital human video includes: Taking the face image as input, the pre-trained identity feature extraction model calculates the face identity vector and 3D face identity vector; A face segmentation mask corresponding to the face image is obtained, the face image is processed using the face segmentation mask to generate an original face input image that masks the face, and an original face feature image is generated using a face encoder.
3. The method for generating digital human lip movements for face identity perception according to claim 2, characterized in that: The pre-trained identity feature extraction model includes a pre-trained arcface model and a pre-trained 3DMM model.
4. The method for generating digital human lip movements for face identity perception according to claim 1, characterized in that: The calculation and encoding of the original speech features of the driving speech to obtain the encoded speech features corresponding to each frame of the digital human video includes: The original speech points of the driving speech are extracted by the pre-trained wav2vec model. According to the frame length of the digital human video frame, a certain length is taken before and after each frame as the center as the speech window, and the original speech points in the speech window are extracted as the original speech features. The original speech features are encoded using a speech encoder to generate the encoded speech features corresponding to each frame image of the digital human video.
5. The method for generating digital human lip movements for face identity perception according to claim 1, characterized in that: The AdaIN residual module includes two AdaIN modules and three convolutional layers. The first input feature and the second input feature are input into the first AdaIN module together. The output result of the first AdaIN module is input into the first convolutional layer after passing through the ReLU activation function. The output result of the first convolutional layer is respectively input into the second AdaIN module and the second convolutional layer. The output result of the second AdaIN module is input into the third convolutional layer after passing through the ReLU activation function. The output result of the third convolutional layer is added to the output result of the second convolutional layer as the output feature of the AdaIN residual module.
6. A method for training a digital human lip movement model for face identity perception, characterized in that: The trained digital human lip movement model is used to implement the digital human lip movement generation method described in claim 1, wherein the digital human lip movement model includes a speech encoder, a face encoder, a feature injection model, a decoder, a discriminator, and a pre-trained identity feature extraction model; The training method comprises: Step 1, collect a large number of speakers’ facial videos and their audios; Step 2, crop the face area image of each frame image in the speaker's face video and scale it to a uniform size to obtain a face image, and obtain a face segmentation mask corresponding to each face image; extract the original speech features corresponding to each frame image in the speaker's face video in the audio; and form a training data set with the face image and the original speech features; Step 3, initializing the digital human lip movement model for face identity perception; Step 4, alternately sampling different batches of data from the training data set, the sampling content includes the reference face image R and its corresponding original voice feature AR, the original face image I and its corresponding original voice feature AI, and the face segmentation masks MR and MI corresponding to the reference face image R and the original face image I; when alternately sampling, each sample in the previous batch of data is data with the same identity as the reference face image R and the original face image I, and each sample in the next batch of data is data with different identities as the reference face image R and the original face image I; Step 5, input the current batch data into the digital human lip movement model, extract the face identity vector and face 3D identity vector of the reference face image R through the pre-trained identity feature extraction model, calculate the encoded voice features of the original voice features AI through the voice encoder, and splice the face identity vector and face 3D identity vector of the reference face image R and the encoded voice features of the original voice features AI to obtain spliced features; The original face image I is processed by the face segmentation mask MI to obtain the original face input image I′ with the face masked. The original face input image I is obtained by the face encoder. ′ The corresponding original face feature map; Convert the spliced features into fused features with the same number of channels as the original face feature map, inject the fused features into the original face feature map through a feature injection model to generate a synthetic face feature map, and decode the synthetic face feature map through a decoder to generate a synthetic face image S; Step 6, determine whether the reference face image R in the current batch of data is the same as the original face image I. If they are the same, calculate the reconstruction loss, discriminator loss and perception loss between the synthesized face image S and the original face image I, update the digital human lip movement model parameters according to the total loss, and execute step 8; If different, go to step 7; Step 7, extracting the face identity vector and face 3D identity vector of the synthetic face image S through the pre-trained identity feature extraction model, and calculating the identity loss of the synthetic face image according to the difference between the face identity vector and face 3D identity vector of the reference face image R and the face identity vector and face 3D identity vector of the synthetic face image S; Obtain the face segmentation mask MS corresponding to the synthesized face image S, take S as the reference face image, MS as the segmentation mask corresponding to the reference face image, R as the original face image, MR as the face segmentation mask corresponding to the original face image, AR as the original speech feature corresponding to the original face image, re-execute the calculation process according to the method in step 5 to generate a secondary synthesized face image S′; calculate the reconstruction loss, discriminator loss and perception loss between the secondary synthesized face image S′ and image R, and calculate the total loss in combination with the identity loss of the synthesized face image, update the digital human lip movement model parameters according to the total loss, and execute step 8; Step 8, return to step 5, use the new batch data to update the parameters of the digital human lip movement model, and complete a training cycle after traversing all batches of data; Step 9, determine whether the total number of training cycles reaches the preset requirement. If so, complete the training of the digital human lip movement model and generate a universal lip movement model; otherwise, return to step 4 and start a new round of training cycles.
7. The method for training a digital human lip movement model for face identity perception according to claim 6, characterized in that: The reconstruction loss consists of two parts: The first part is the L1 distance loss between the original face image and the synthesized image; The second part is the L1 distance loss between the region where the segmentation mask corresponding to the reference face image extracted from the original face image is not 0 and the synthesized image; The discriminator loss is the cross entropy loss between the discriminator output results corresponding to the original face image and the synthesized image; The perceptual loss is the L1 loss between the output results of the VGG model corresponding to the original face image and the synthesized image.
8. The method for training a digital human lip movement model for face identity perception according to claim 6, characterized in that: It also includes customized training steps, including: Collect the facial video and audio of the target speaker to be customized, and obtain a fine-tuning training data set according to the method in step 2; Training batches are sampled from the fine-tuning training data set, and each sample in each batch of data is data with the same identity as the reference face image R and the original face image I. The universal lip movement model is trained according to each batch of data to generate a customized lip movement model.
9. A machine-readable storage medium, characterized in that: The machine-readable storage medium stores machine executable instructions, which, when called and executed by a processor, are used to implement the digital human lip movement generation method for face identity perception as described in any one of claims 1 to 5, or to implement the digital human lip movement model training method for face identity perception as described in any one of claims 6 to 8.
Citation Information
Patent Citations
Voice-driven target person video generation method and device and storage medium
CN114202604A
Voice-driven speaking video generation method, system and equipment and storage medium
CN116634242A
