Audio-driven video generation method, device, computer equipment and storage medium

By combining audio feature extraction and facial animation recognition models with variational autoencoders, the problem of insufficient facial expression changes in audio-driven video generation is solved, achieving more natural and diverse facial expression expressions and enhancing the expression of audio content. Effect.

CN118413722BActive Publication Date: 2024-10-18HANGZHOU FUYUN NETWORK TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410880137.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-02
Publication Date
2024-10-18
Estimated Expiration
2044-07-02

AI Technical Summary

Technical Problem

Existing audio-driven video generation methods only focus on the lip movements of the video characters when performing speaking actions, and fail to effectively express facial expressions and emotional information in the audio. As a result, the facial expressions of the generated videos have small changes and cannot accurately express the audio. emotional information in.

Method used

By obtaining audio features, using Mel filter bank and deep learning speech recognition model for preprocessing and feature extraction, combined with facial animation recognition model and variational autoencoder, dynamic speech video is generated, enriching the selection flexibility of facial animation and characterization Audio perception information, and dynamic speech video generation through facial animation discrete probability distribution sequences and target portrait pictures.

Benefits of technology

It improves the naturalness and diversity of facial expressions of digital people when speaking, enabling facial expressions to accurately express the emotional information in the driving audio and enhancing users' understanding of the audio content.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118413722B_ABST
    Figure CN118413722B_ABST
Patent Text Reader

Abstract

The present application relates to an audio-driven video generation method, device, computer equipment and storage medium. It includes: obtaining driving audio, performing feature preprocessing on the driving audio to determine the target audio features of the driving audio; determining an audio feature sequence according to the target audio features, inputting the audio feature sequence into a facial animation recognition model, and determining a facial animation discrete probability distribution sequence; determining a facial animation parameter sequence according to the facial animation discrete probability distribution sequence; inputting the facial animation parameter sequence and the target portrait image into a target variational autoencoder to generate a video frame sequence, and generating a dynamic voice video according to the video frame sequence and the driving audio. The above scheme can enrich the facial expressions of digital people in the dynamic voice video during the vocalization process, improve the naturalness and diversity of the portrait face speaking, and enable the digital people to express the emotional information in the driving audio through facial expressions when speaking, so that users can better understand the audio content.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of video processing technology, and in particular to an audio-driven video generation method, device, computer equipment and storage medium. Background Art

[0002] In some AI application scenarios, anthropomorphic AI video images are often set to perform voice broadcasting tasks, and in this process, audio is required to drive the AI ​​video images to perform actions. However, when the existing audio drives the video images to perform speaking actions, only the lip movements of the characters in the video images are focused on, and the facial expressions that are closely related to the audio are not focused on. In actual conversation scenarios, the facial animations of the characters are usually closely linked to the corresponding voices, which contain strong non-verbal information and help users understand the content of the speech. When the existing audio drives the video images to perform conversation actions, the audio-to-visual mapping is generally modeled in a deterministic way, which will cause the audio drive to regress to the average facial expression, so that the facial expression of the generated video images changes little, and cannot accurately express the emotional information in the audio. Therefore, how to drive the video images to perform accurate speaking actions through audio so that users can better understand the audio content is a problem that needs to be solved. Summary of the invention

[0003] Based on this, it is necessary to provide an audio-driven video generation method, device, computer equipment and storage medium that can drive video images to perform accurate speaking actions through audio and enrich the facial expressions of video characters when they speak, in order to address the above technical problems.

[0004] In a first aspect, the present application provides an audio-driven video generation method, the method comprising:

[0005] Acquire driving audio, perform audio preprocessing on the driving audio through a Mel filter bank to determine a Mel spectrum, and perform feature extraction on the Mel spectrum through a deep learning speech recognition model to determine a target audio feature of the driving audio;

[0006] Determine an audio feature sequence according to the target audio feature, input the audio feature sequence into a facial animation recognition model, and determine a facial animation discrete probability distribution sequence;

[0007] Determining a facial animation parameter sequence according to the facial animation discrete probability distribution sequence;

[0008] The facial animation parameter sequence and the target portrait image are input into a target variational autoencoder to generate a video frame sequence, and a dynamic speech video is generated according to the video frame sequence and the driving audio.

[0009] In one embodiment, determining a facial animation parameter sequence according to the facial animation discrete probability distribution sequence comprises:

[0010] Sampling the facial animation discrete probability distribution sequence to determine a facial animation discrete feature sequence;

[0011] The facial animation discrete feature sequence is numerically converted to determine a discrete feature function, and the discrete feature function is interpolated to determine a facial animation parameter sequence.

[0012] In one embodiment, the audio driven video generation method further includes:

[0013] Obtaining a first sample video, and extracting a sample audio feature from the first sample video;

[0014] identifying sample facial action units of a first sample video by using an action unit recognition model, and labeling sample head actions of the first sample video by using a posture estimation model;

[0015] The sample audio features, the sample facial action units and the sample head actions are used to perform model training on a deep learning model to determine a facial animation recognition model.

[0016] In one embodiment, the sample audio features, the sample facial action units, and the sample head actions are used to train a deep learning model to determine a facial animation recognition model, including:

[0017] Input the sample audio feature into a deep learning model, and determine sample probability distribution data corresponding to the sample audio feature according to the model output; the sample probability distribution data includes a facial action unit probability distribution and a head action probability distribution;

[0018] Determine a model loss function of the deep learning model according to the sample probability distribution data, the sample facial action unit, and the sample head action;

[0019] If the model loss function satisfies a preset loss function condition, it is determined that the deep learning model training is completed, and the trained deep learning model is used as a facial animation recognition model.

[0020] In one embodiment, the audio driven video generation method further includes:

[0021] Obtaining a second sample video, and determining sample video representation information of the second sample video by using a to-be-trained encoder in the to-be-trained variational autoencoder;

[0022] Using a decoder to be trained in the variational autoencoder to be trained, reconstructing video frames based on the sample video representation information, and determining reconstructed video information;

[0023] Determine sample video loss data according to the second sample video and the reconstructed video information;

[0024] Based on the sample video loss data, the decoder parameters of the decoder to be trained and the encoder parameters of the encoder to be trained in the variational autoencoder to be trained are optimized to determine a target variational autoencoder.

[0025] In one embodiment, the encoder to be trained includes a first encoder and a second encoder, and the obtaining of the second sample video and determining the sample video representation information of the second sample video by the encoder to be trained in the variational autoencoder to be trained include:

[0026] Acquire a second sample video, sample the second sample video, and determine a sampled video frame;

[0027] Encoding the sampled video frame by a first encoder in the variational autoencoder to be trained to determine video static representation information;

[0028] Extract facial animation parameters of each video frame in the second sample video, and encode the facial animation parameters through the second encoder in the variational autoencoder to determine a video dynamic representation sequence, and use the video static representation information and the video dynamic representation sequence as sample video representation information of the second sample video.

[0029] In one embodiment, the facial animation parameter sequence and the target portrait image are input into a target variational autoencoder to generate a video frame sequence, including:

[0030] Inputting the facial animation parameter sequence and the target portrait picture into a target variational autoencoder, so as to determine target static representation information according to the target portrait picture and determine a target dynamic representation sequence according to the facial animation parameter sequence through the target variational autoencoder;

[0031] A video frame sequence is generated according to the target static representation information and the target dynamic representation sequence.

[0032] In a second aspect, the present application further provides an audio-driven video generation device, the device comprising:

[0033] An audio feature determination module is used to obtain driving audio, perform audio preprocessing on the driving audio through a Mel filter bank to determine a Mel spectrum, and perform feature extraction on the Mel spectrum through a deep learning speech recognition model to determine a target audio feature of the driving audio;

[0034] A discrete probability distribution determination module, used to determine an audio feature sequence according to the target audio feature, input the audio feature sequence into a facial animation recognition model, and determine a facial animation discrete probability distribution sequence;

[0035] A facial parameter sequence determination module, used to determine a facial animation parameter sequence according to the facial animation discrete probability distribution sequence;

[0036] The dynamic speech video determination module is used to input the facial animation parameter sequence and the target portrait image into the target variational autoencoder to generate a video frame sequence, and generate a dynamic speech video according to the video frame sequence and the driving audio.

[0037] In a third aspect, the present application further provides a computer device, the computer device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the following steps when executing the computer program:

[0038] Acquire driving audio, perform audio preprocessing on the driving audio through a Mel filter bank to determine a Mel spectrum, and perform feature extraction on the Mel spectrum through a deep learning speech recognition model to determine a target audio feature of the driving audio;

[0039] Determine an audio feature sequence according to the target audio feature, input the audio feature sequence into a facial animation recognition model, and determine a facial animation discrete probability distribution sequence;

[0040] Determining a facial animation parameter sequence according to the facial animation discrete probability distribution sequence;

[0041] The facial animation parameter sequence and the target portrait image are input into a target variational autoencoder to generate a video frame sequence, and a dynamic speech video is generated according to the video frame sequence and the driving audio.

[0042] In a fourth aspect, the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0043] Acquire driving audio, perform audio preprocessing on the driving audio through a Mel filter bank to determine a Mel spectrum, and perform feature extraction on the Mel spectrum through a deep learning speech recognition model to determine a target audio feature of the driving audio;

[0044] Determine an audio feature sequence according to the target audio feature, input the audio feature sequence into a facial animation recognition model, and determine a facial animation discrete probability distribution sequence;

[0045] Determining a facial animation parameter sequence according to the facial animation discrete probability distribution sequence;

[0046] The facial animation parameter sequence and the target portrait image are input into a target variational autoencoder to generate a video frame sequence, and a dynamic speech video is generated according to the video frame sequence and the driving audio.

[0047] The above-mentioned audio-driven video generation method, device, computer equipment and storage medium obtain driving audio, perform feature preprocessing on the driving audio to determine the target audio features of the driving audio; determine the audio feature sequence according to the target audio features, input the audio feature sequence into the facial animation recognition model, determine the facial animation discrete probability distribution sequence; determine the facial animation parameter sequence according to the facial animation discrete probability distribution sequence; input the facial animation parameter sequence and the target portrait image into the target variational autoencoder to generate a video frame sequence, and generate a dynamic voice video according to the video frame sequence and the driving audio. It solves the problem that when audio drives video images to perform conversational actions, the mapping from audio to vision is generally modeled in a deterministic way, which will cause the audio drive to regress to the average facial expression, resulting in a small change in the facial expression of the generated video image, and cannot accurately express the emotional information in the audio. The above scheme determines the discrete probability distribution sequence of facial animation by the target audio features of the driving audio, which can enrich the flexibility of facial animation selection, and can obtain facial animation that can represent audio perception information. Based on the discrete probability distribution sequence of facial animation and the target portrait image, dynamic voice video is generated, which can enrich the facial expressions of the digital human in the dynamic voice video during the voice production process, improve the naturalness and diversity of the portrait face speaking, and enable the digital human to express the emotional information in the driving audio through facial expressions when speaking, so that users can better understand the audio content. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 A diagram of an application environment of an audio-driven video generation method in an embodiment;

[0049] Figure 2 A schematic diagram of a flow chart of an audio-driven video generation method in one embodiment;

[0050] Figure 3 A schematic diagram of a flow chart of an audio-driven video generation method in another embodiment;

[0051] Figure 4 A schematic diagram of a flow chart of an audio-driven video generation method in another embodiment;

[0052] Figure 5 A schematic diagram of a flow chart of an audio-driven video generation method in another embodiment;

[0053] Figure 6is a structural block diagram of an audio-driven video generation device in one embodiment;

[0054] Figure 7 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0055] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application 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 application and are not used to limit the present application.

[0056] The audio-driven video generation method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The server 104 obtains the driving audio, performs audio preprocessing on the driving audio through the Mel filter group, determines the Mel spectrum, and extracts the features of the Mel spectrum through the deep learning speech recognition model to determine the target audio features of the driving audio; determines the audio feature sequence according to the target audio features, inputs the audio feature sequence into the facial animation recognition model, and determines the facial animation discrete probability distribution sequence; determines the facial animation parameter sequence according to the facial animation discrete probability distribution sequence; inputs the facial animation parameter sequence and the target portrait picture into the target variational autoencoder to generate a video frame sequence, and generates a dynamic voice video according to the video frame sequence and the driving audio, and sends the dynamic voice video to the terminal 102 through the communication network. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablets, Internet of Things devices and portable wearable devices, and the Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. The portable wearable device may be a smart watch, a smart bracelet, a head-mounted device, etc. The server 104 may be implemented as an independent server or a server cluster consisting of multiple servers.

[0057] In one embodiment, Figure 2 As shown, an audio-driven video generation method is provided. This embodiment takes the method applied to a terminal as an example for illustration. It can be understood that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:

[0058] S210, obtaining driving audio, performing audio preprocessing on the driving audio through a Mel filter group to determine a Mel spectrum, and performing feature extraction on the Mel spectrum through a deep learning speech recognition model to determine a target audio feature of the driving audio.

[0059] Among them, the driving audio refers to the audio used to drive the character image in the video to perform speaking actions, and the target audio features include the phoneme features, rhythm, intensity, emotion and intonation of the driving audio. Phoneme features include phoneme information related to pronunciation, rhythm and intensity help to generate head movements and facial action units later, emotion and intonation are used to adjust the emotional expression of the generated facial dynamics, and the target audio features can be aligned with the video frames. The deep learning speech recognition model is the DeepSpeech model. The target audio features of the driving audio can form an audio feature sequence.

[0060] Specifically, the driving audio is sampled based on a preset sampling frequency to obtain a sampled audio signal, and the sampling frequency may be 16kHz. The sampled audio signal is fast Fourier transformed to convert the sampled audio signal from the time domain to the frequency domain, and the sampled audio signal after the fast Fourier transform is processed by a Mel (melody) filter group, and the sampled audio signal after the fast Fourier transform is mapped to the Mel frequency scale to determine the Mel spectrum. The formula for determining the Mel spectrum is shown in formula (1):

[0061] (1)

[0062] Among them, Mel-Spectrogram S is the Mel spectrum, represents the Mel filter bank, is the sampled audio signal after fast Fourier transform.

[0063] The mel spectrum is input into the deep learning speech recognition model, and the target audio features of the driving audio are determined according to the output data of the deep learning speech recognition model.

[0064] S220. Determine an audio feature sequence according to the target audio feature, input the audio feature sequence into a facial animation recognition model, and determine a facial animation discrete probability distribution sequence.

[0065] Among them, the facial animation recognition model M ( ) is obtained by training a deep learning model. The deep learning model can be a Transformer model, that is, M( ) is a probability mapping network trained based on the transformer architecture. is its network parameter, which is used to convert the target audio feature into a discrete probability distribution sequence of facial animation corresponding to the duration. The discrete probability distribution sequence of facial animation refers to the probability that the target audio feature corresponds to different facial animations, that is, the discrete probability distribution sequence of facial animation is a data sequence composed of discrete probability distribution data of facial animation. For example, the target audio feature may correspond to multiple facial animations, and the probability of association between each facial animation corresponding to the target audio feature is different. The discrete probability distribution sequence of facial animation includes the facial animation corresponding to the target audio feature, and the probability of association between the target audio feature and each facial animation corresponding to it. Facial animation includes action units representing mouth animation and facial expressions, and degree of freedom motion vectors representing head movements, that is, the discrete probability distribution sequence of facial animation includes a discrete probability distribution sequence of action units and a discrete probability distribution sequence of head movements. The discrete probability distribution sequence of action units includes the probability of association between the target audio feature and each facial action unit, and the discrete probability distribution sequence of head movements includes the probability of association between the target audio feature and each head movement.

[0066] It should be noted that the model structure of the facial animation recognition model includes an input layer, a transformer encoder, and an output layer. The input layer receives the audio feature sequence A 1:T and a facial animation sequence corresponding to an audio feature sequence, wherein the facial animation sequence corresponding to the audio feature sequence is composed of facial animations corresponding to target audio features; the transformer encoder includes several encoder modules, namely, Block modules, each Block module is composed of a self-attention layer, a feedforward neural network layer, a residual connection layer and a normalization layer; the output layer is used to convert the output of the transformer encoder into probability distribution data of facial animation, and the output layer includes a fully connected layer and a normalized exponential function, and the normalized exponential function is the softmax function.

[0067] Specifically, the format of the audio feature sequence composed of the target audio features can be: 1:T (A1, A2, ..., A T ), where T represents the number of audio frames driving the audio, A tThe target audio feature represents the time frame t, 1≤t≤T, and t and T are both integers. The audio feature sequence is input into the facial animation recognition model, and the probability of the target audio feature in the audio feature sequence being associated with the preset facial action unit and the probability of the target audio feature being associated with the preset degree of freedom motion vector of the head action are determined. The probability of the target audio feature being associated with the preset facial action unit is integrated to determine the discrete probability distribution sequence of the action unit, the probability of the target audio feature being associated with the preset degree of freedom motion vector of the head action is integrated to determine the discrete probability distribution sequence of the head action, and the discrete probability distribution sequence of the facial animation is determined according to the discrete probability distribution sequence of the action unit and the discrete probability distribution sequence of the head action.

[0068] It should be noted that the discrete facial animation features corresponding to a time frame are determined based on the target audio features corresponding to the time frame and the historical facial animation corresponding to the historical time period before the time frame. When time frame t=1, there is no historical facial animation corresponding to the historical time period. At this time, the discrete facial animation features corresponding to time frame t=1 can be determined based on the preset facial animation initial state and the target audio features corresponding to time frame t=1.

[0069] Specifically, the method of mapping the target audio features in the audio feature sequence into a discrete probability distribution sequence of facial animation through the facial animation recognition model is shown in formula (2):

[0070] (2)

[0071] in, Given the target audio feature ,as well as The facial animation sequence of up to n time frames before the corresponding time frame t Under the condition of, the discrete probability distribution data of facial animation corresponding to time frame t is Sampling is performed to determine the corresponding discrete facial animation feature data ,in 1,2,…,D), D is the number of categories into which the facial animation features are discretized, and the value of D can be set according to actual needs, for example, D=500 can be set. It should be noted that if time frame t=1, the facial animation recognition model only relies on the target audio features at time frame t=1 to predict the first facial animation discrete probability distribution data, or a facial animation initial state can be set, and the facial animation discrete probability distribution data at time frame t=1 can be determined according to the preset facial animation initial state and the target audio features. Through the above method for generating facial animation discrete probability distribution data, the discrete probability distribution data related to the time frame can be obtained. The corresponding complete discrete facial animation feature sequence .

[0072] S230: Determine a facial animation parameter sequence according to the facial animation discrete probability distribution sequence.

[0073] The facial animation parameter sequence refers to a data sequence composed of continuous facial animation parameter data, and the facial animation parameter sequence includes a head action parameter sequence and a facial action unit parameter sequence.

[0074] Specifically, a facial animation discrete feature sequence is determined from a facial animation discrete probability distribution sequence, and the facial animation discrete feature sequence is processed continuously to obtain a continuous facial animation parameter sequence.

[0075] S240, inputting the facial animation parameter sequence and the target portrait image into the target variational autoencoder to generate a video frame sequence, and generating a dynamic speech video according to the video frame sequence and the driving audio.

[0076] Among them, the target variational autoencoder refers to the variational autoencoder that has been trained. The target variational autoencoder includes a target encoder and a target decoder.

[0077] Specifically, the facial animation parameter sequence and the target portrait image are input into the target variational autoencoder, so as to generate a video frame sequence according to the facial animation parameter sequence and the target portrait image through the target variational autoencoder. The video frame sequence is data of the person image corresponding to the target portrait image performing language actions, that is, a facial image sequence with continuous time frames. The video frame sequence and the driving audio are aligned to determine the dynamic voice video.

[0078] In the above audio-driven video generation method, the driving audio is obtained, and the driving audio is preprocessed by a Mel filter group to determine the Mel spectrum, and the Mel spectrum is feature extracted by a deep learning speech recognition model to determine the target audio features of the driving audio; the audio feature sequence is determined according to the target audio features, and the audio feature sequence is input into the facial animation recognition model to determine the facial animation discrete probability distribution sequence; the facial animation parameter sequence is determined according to the facial animation discrete probability distribution sequence; the facial animation parameter sequence and the target portrait image are input into the target variational autoencoder to generate a video frame sequence, and a dynamic voice video is generated according to the video frame sequence and the driving audio. The problem that when audio drives video images to perform conversation actions, the mapping from audio to vision is generally modeled in a deterministic way, which will cause the audio drive to regress to the average facial expression, resulting in a small change in the facial expression of the generated video image, and the emotional information in the audio cannot be accurately expressed. The above scheme determines the discrete probability distribution sequence of facial animation by the target audio features of the driving audio, which can enrich the flexibility of facial animation selection, and can obtain facial animation that can represent audio perception information. Based on the discrete probability distribution sequence of facial animation and the target portrait image, dynamic voice video is generated, which can enrich the facial expressions of the digital human in the dynamic voice video during the voice production process, improve the naturalness and diversity of the portrait face speaking, and enable the digital human to express the emotional information in the driving audio through facial expressions when speaking, so that users can better understand the audio content.

[0079] In one embodiment, Figure 3 As shown, the facial animation parameter sequence is determined according to the facial animation discrete probability distribution sequence, including:

[0080] S310: Sampling the facial animation discrete probability distribution sequence to determine the facial animation discrete feature sequence.

[0081] The facial animation discrete feature sequence is a data sequence composed of facial animation discrete features, and the facial animation discrete features include head movement discrete features and action unit discrete features.

[0082] Specifically, the facial animation discrete probability distribution sequence is sampled based on a preset sampling strategy to determine the facial animation discrete feature sequence, wherein the preset sampling strategy may be a Top-K sampling strategy or a random sampling strategy.

[0083] Exemplarily, if the preset sampling strategy is the Top-K sampling strategy, based on the discrete probability distribution sequence of facial animation, K facial action units with higher probabilities associated with the target audio features are collected as target action units, and the action unit discrete feature sequence is determined based on the target action units; K head movements with higher probabilities associated with the target audio features are collected as target head movements, and the head movement discrete feature sequence is determined based on the target head movements, and the action unit discrete feature sequence and the head movement discrete feature sequence are used as facial animation discrete feature sequences, where K is an integer greater than or equal to 1.

[0084] S320, numerically converting the facial animation discrete feature sequence to determine a discrete feature function, interpolating the discrete feature function to determine a facial animation parameter sequence.

[0085] It should be noted that the probability mass function in the discrete distribution is only defined at discrete value points, while the probability density function in the continuous distribution can be defined continuously over the entire domain. Therefore, the facial animation discrete features in the facial animation discrete feature sequence can be discretized into a series of points, and then the probability density function of the continuous distribution is interpolated at these points to obtain an approximate continuous distribution. This transformation can make the analysis and calculation of discrete distributions more convenient and accurate, especially when performing some numerical calculations and statistical inferences, the properties of continuous distributions are easier to handle and use.

[0086] Specifically, the facial animation discrete feature sequence is processed continuously, the facial animation discrete features in the facial animation discrete feature sequence are converted into numerical values, the discrete feature functions corresponding to the facial animation discrete features are determined, the discrete feature functions are interpolated using the probability density function of the continuous distribution, and the continuous facial animation parameter sequence is determined.

[0087] Exemplarily, a method for numerically converting facial animation discrete features may be to determine the category of the facial animation discrete features in a facial animation discrete feature sequence, convert the facial animation discrete features into facial feature values ​​based on the category of the facial animation discrete features, thereby determining the eigenvalue interval of the facial feature values ​​corresponding to each facial animation discrete feature in the facial animation discrete feature sequence, and determining a discrete feature function based on the eigenvalue interval, wherein the discrete feature function may be the center value or mean of the eigenvalue interval of the facial feature values.

[0088] It should be noted that facial expressions are not strongly correlated with the corresponding audio, that is, for the same audio signal, possible facial expressions often vary considerably, and when extended to the time dimension, this variation may further expand. The above method samples the discrete probability distribution sequence of facial animation through a preset sampling strategy, and can obtain a preset number of discrete feature sequences of facial animation, so that the video frames generated by the discrete feature sequences of facial animation that meet the needs of the user can be selected according to actual needs to process and generate dynamic voice videos. Subsequently, the Transformer network is used to capture the uncertainty mapping of audio and facial expressions and head movements. Based on a driving audio, according to different sampling strategies, digital human videos with diverse facial expressions can be generated, thereby improving the flexibility of dynamic voice videos and the accuracy of emotional expression.

[0089] It can be understood that, based on this embodiment, the facial animation parameter sequence and the target portrait picture are input into the target variational autoencoder to generate a video frame sequence, and a dynamic voice video is generated according to the video frame sequence and the driving audio, which can be:

[0090] The facial animation parameter sequence and the target portrait image are input into the target variational autoencoder to generate a video frame sequence, and feature extraction and image analysis are performed on each video frame in the video frame sequence to determine the emotional information corresponding to each video frame. According to the key emotional feature information corresponding to the preset driving audio and the emotional information corresponding to each video frame, the video frames in the video frame sequence are selected and arranged to combine into a new video frame sequence, and dynamic speech video is generated according to the new video frame sequence and the driving audio.

[0091] The above scheme can select and reorganize the video frames in each video frame sequence according to actual needs, so as to obtain a dynamic voice video that can more accurately express the driving audio emotion information.

[0092] In one embodiment, Figure 4 As shown, the above audio-driven video generation method further includes:

[0093] S410: Obtain a first sample video, and extract sample audio features from the first sample video.

[0094] The first sample video is a plurality of randomly selected videos with audio.

[0095] Specifically, a preset number of historical videos stored in the voice and video database may be randomly selected as first sample videos, and sample audio features may be extracted from the first sample videos using an audio processing tool.

[0096] S420: Identify sample facial action units of the first sample video using an action unit recognition model, and annotate sample head actions of the first sample video using a posture estimation model.

[0097] Among them, the action unit recognition model is a machine learning model used to identify facial action units of character images in videos, and the posture estimation model refers to a machine learning model used to identify and annotate head movements of character images in videos.

[0098] Specifically, the first sample video is input into a pre-trained action unit recognition model, and facial action recognition is performed on the first sample video through the action unit recognition model to obtain a sample facial action unit of the first sample video. The first sample video is input into a pre-trained posture estimation model, and head action recognition and labeling is performed on the first sample video through the posture estimation model to determine and label the sample head action of the first sample video.

[0099] S430: Use sample audio features, sample facial action units, and sample head movements to train a deep learning model to determine a facial animation recognition model.

[0100] Specifically, the Transformer model is trained using sample audio features, sample facial action units, and sample head movements until the loss data of the Transformer model converges, and the training of the Transformer model is determined to be completed. The trained Transformer model is used as a facial animation recognition model.

[0101] The above scheme provides a training method for a facial animation recognition model, which trains the Transformer model through sample audio features, sample facial action units and sample head movements of sample videos to determine the facial animation recognition model, and determines the facial action units and head movements of the target audio features through the facial animation recognition model, so as to obtain a discrete probability distribution sequence of facial animation according to the facial action units and head movements of the target audio features, thereby improving the efficiency and accuracy of obtaining the discrete probability distribution sequence of facial animation.

[0102] In one embodiment, a deep learning model is trained using sample audio features, sample facial action units, and sample head movements to determine a facial animation recognition model, including:

[0103] The sample audio features are input into the deep learning model, and the sample probability distribution data corresponding to the sample audio features are determined according to the model output; the sample probability distribution data includes the probability distribution of facial action units and the probability distribution of head movements; the model loss function of the deep learning model is determined according to the sample probability distribution data, the sample facial action units and the sample head movements; if the model loss function meets the preset loss function conditions, it is determined that the deep learning model training is completed, and the trained deep learning model is used as the facial animation recognition model.

[0104] Specifically, the sample audio features are input into the deep learning model, the probability distribution of facial action units and the probability distribution of head actions are determined according to the model output data, the first loss function is determined according to the probability distribution of facial action units and the sample facial action units, the second loss function is determined according to the probability distribution of head actions and the sample head actions, and the model loss function of the deep learning model is determined according to the first loss function and the second loss function. If the model loss function converges, it is determined that the model loss function meets the preset loss function condition, the deep learning model training is completed, and the trained deep learning model is used as the facial animation recognition model.

[0105] Exemplarily, if the model loss function does not meet the preset loss function conditions, the deep learning model continues to be iteratively trained until the model loss function converges, and the deep learning model training is determined to be completed, and the trained deep learning model is used as the facial animation recognition model.

[0106] The above scheme determines the facial action unit probability distribution and head action probability distribution corresponding to the sample audio features through a deep learning model, calculates the model loss function of the deep learning model according to the facial action unit probability distribution, the head action probability distribution, the sample facial action units and the sample head actions, and when the model loss function meets the preset function loss condition, uses the trained deep learning model as a facial animation recognition model, which can improve the model performance of the facial animation model, thereby improving the accuracy of the subsequently acquired discrete probability distribution sequence of facial animation.

[0107] In one embodiment, Figure 5 As shown, the above audio-driven video generation method also includes:

[0108] S510: Obtain a second sample video, and determine sample video representation information of the second sample video by using a to-be-trained encoder in the to-be-trained variational autoencoder.

[0109] The second sample video is a high-quality conversation video collected from a high-quality public data set. The sample video representation information refers to the facial action information and facial contour information of the digital person represented by the sample video.

[0110] Specifically, a second sample video is collected, the second sample video is screened based on a preset video screening strategy, and the sample video representation information of the second sample video is determined by the to-be-trained encoder in the to-be-trained variational autoencoder. The preset video screening strategy may include: the head of the video character in the screened second sample video is complete as a whole, the facial features are not blocked, the portrait faces the camera, the lip movement is clearly visible, the facial movement in the video clip is stable, no fast or large-angle shaking occurs, the voice lip shape remains consistent, and the number of consecutive silent frames is less than the preset number of frames.

[0111] S520: Using the decoder to be trained in the variational autoencoder to be trained, reconstructing video frames based on the sample video representation information, and determining reconstructed video information.

[0112] The reconstructed video information refers to a reconstructed video frame obtained after the decoder to be trained in the variational autoencoder to be trained reconstructs the video frame of the second sample video.

[0113] Specifically, a decoder to be trained in the variational autoencoder to be trained is used to reconstruct a video frame of the second sample video based on the sample video representation information to determine the reconstructed video information.

[0114] S530: Determine sample video loss data according to the second sample video and the reconstructed video information.

[0115] Specifically, the sample video loss data is determined according to the difference between the reconstructed video frame in the reconstructed video information and the sample video frame in the second sample video.

[0116] S540: Optimize decoder parameters of a decoder to be trained and encoder parameters of an encoder to be trained in the variational autoencoder to be trained based on the sample video loss data, and determine a target variational autoencoder.

[0117] Specifically, determine whether the sample video loss data meets the preset loss data condition. If so, determine that the training of the variational autoencoder to be trained is completed, and use the trained variational autoencoder as the target variational autoencoder; if not, continue to iteratively train the variational autoencoder to be trained.

[0118] The above scheme provides a method for training a variational autoencoder, wherein a second sample video is encoded by the variational autoencoder to be trained, sample video representation information that can characterize the facial action information and facial contour information of a digital person is determined, and the video frame of the second sample video is reconstructed based on the sample video representation information by the variational autoencoder to be trained, so as to determine a loss function based on the second sample video and the reconstructed video frame, and to determine whether the variational autoencoder to be trained is trained by using the loss function, thereby improving the performance of the target variational autoencoder, and thereby obtaining accurate dynamic speech video based on the target variational autoencoder.

[0119] In one embodiment, the encoder to be trained includes a first encoder and a second encoder. Further, obtaining a second sample video, and determining sample video representation information of the second sample video by the encoder to be trained in the variational autoencoder to be trained includes:

[0120] The second sample video is sampled to determine a sampled video frame; the sampled video frame is encoded by the first encoder in the variational autoencoder to be trained to determine the video static representation information; facial animation parameters of each video frame in the second sample video are extracted, and the facial animation parameters are encoded by the second encoder in the variational autoencoder to determine the video dynamic representation sequence, and the video static representation information and the video dynamic representation sequence are used as the sample video representation information of the second sample video.

[0121] The video static representation information refers to the facial information that does not change when the digital person in the video performs the talking action, such as the facial contour and hairstyle. The video dynamic representation sequence includes the video dynamic representation information of each frame of the video, which refers to the facial information that may change when the digital person in the video performs the talking action, such as the lips and eyes.

[0122] In the above scheme, two encoders and one decoder are set in the variational autoencoder, the first encoder is used to determine the video static representation information of the second sample video, the second encoder is used to obtain the video dynamic representation sequence, and the decoder is used to reconstruct the video frame of the second sample video based on the video static representation information and the video dynamic representation sequence. This can make the digital person in the dynamic voice video constructed by the trained variational autoencoder based on the facial animation parameter sequence and the target portrait picture more in line with the actual conversation action standards when performing conversation actions.

[0123] In one embodiment, the facial animation parameter sequence and the target portrait image are input into a target variational autoencoder to generate a video frame sequence, including:

[0124] The facial animation parameter sequence and the target portrait image are input into a target variational autoencoder to determine target static representation information according to the target portrait image and determine a target dynamic representation sequence according to the facial animation parameter sequence through the target variational autoencoder; and a video frame sequence is generated according to the target static representation information and the target dynamic representation sequence.

[0125] The target static representation information may include information such as the person's outline and hairstyle corresponding to the target portrait image, which will not change when the conversation action is performed. The target dynamic representation sequence refers to a parameter sequence composed of parameters of facial movements and head movements that the digital human needs to perform when performing the conversation action.

[0126] The above scheme, through the target variational autoencoder, determines the target static representation information according to the target portrait image, determines the target dynamic representation sequence according to the facial animation parameter sequence, and thus generates a video frame sequence according to the target static representation information and the target dynamic representation sequence, thereby improving the acquisition efficiency and reliability of the video frame sequence.

[0127] Exemplarily, based on the above embodiment, the audio-driven video generation method includes:

[0128] A preset number of historical videos are randomly selected from the historical videos stored in the voice and video database as the first sample video, and a sample audio feature is extracted from the first sample video using an audio processing tool. The first sample video is input into a pre-trained action unit recognition model, and facial action recognition is performed on the first sample video through the action unit recognition model to obtain a sample facial action unit of the first sample video. The first sample video is input into a pre-trained posture estimation model, and head action recognition and labeling is performed on the first sample video through the posture estimation model to determine and label the sample head action of the first sample video.

[0129] Input the sample audio features into the deep learning model, determine the probability distribution of facial action units and the probability distribution of head actions according to the model output data, determine the first loss function according to the probability distribution of facial action units and sample facial action units, determine the second loss function according to the probability distribution of head actions and sample head actions, and determine the model loss function of the deep learning model according to the first loss function and the second loss function. If the model loss function converges, it is determined that the model loss function meets the preset loss function conditions, the deep learning model training is completed, and the trained deep learning model is used as the facial animation recognition model. If the model loss function does not meet the preset loss function conditions, the deep learning model is iteratively trained until the model loss function converges, and it is determined that the deep learning model training is completed, and the trained deep learning model is used as the facial animation recognition model.

[0130] A second sample video is collected, the second sample video is screened based on a preset video screening strategy, and the sample video representation information of the second sample video is determined by the to-be-trained encoder in the to-be-trained variational autoencoder. The preset video screening strategy may include: the head of the video character in the screened second sample video is complete as a whole, the facial features are not blocked, the portrait faces the camera, the lip movement is clearly visible, the facial movement in the video clip is stable, no fast or large-angle shaking occurs, the voice lip shape remains consistent, and the number of consecutive silent frames is less than the preset number of frames.

[0131] The second sample video is sampled to determine a sampled video frame; the sampled video frame is encoded by the first encoder in the variational autoencoder to be trained to determine the video static representation information; facial animation parameters of each video frame in the second sample video are extracted, and the facial animation parameters are encoded by the second encoder in the variational autoencoder to determine the video dynamic representation sequence, and the video static representation information and the video dynamic representation sequence are used as the sample video representation information of the second sample video.

[0132] The sample video loss data is determined based on the difference between the reconstructed video frame in the reconstructed video information and the sample video frame in the second sample video. It is determined whether the sample video loss data meets the preset loss data condition. If so, it is determined that the training of the variational autoencoder to be trained is completed, and the trained variational autoencoder is used as the target variational autoencoder; if not, the variational autoencoder to be trained is continued to be iteratively trained.

[0133] The driving audio is obtained, and the driving audio is sampled and processed based on a preset sampling frequency to obtain a sampled audio signal, and the sampling frequency can be 16kHz. The sampled audio signal is fast Fourier transformed to convert the sampled audio signal from the time domain to the frequency domain, and the sampled audio signal after the fast Fourier transform is processed by a Mel (melody) filter group, and the sampled audio signal after the fast Fourier transform is mapped to the Mel frequency scale to determine the Mel spectrum, and the Mel spectrum is input into the deep learning speech recognition model. The target audio feature of the driving audio is determined according to the output data of the deep learning speech recognition model, and the target audio feature can be aligned with the video frame. The target audio feature is input into the facial animation recognition model to determine the probability of the target audio feature being associated with the preset facial action unit, and the probability of the target audio feature being associated with the preset degree of freedom motion vector of the head action. The facial animation discrete probability distribution sequence is sampled based on the preset sampling strategy to determine the facial animation discrete feature sequence. The facial animation discrete feature sequence is processed continuously, the facial animation discrete features in the facial animation discrete feature sequence are converted numerically, the discrete feature function corresponding to the facial animation discrete feature is determined, and the discrete feature function is interpolated using the probability density function of the continuous distribution to determine the continuous facial animation parameter sequence. The facial animation parameter sequence and the target portrait image are input into the target variational autoencoder to determine the target static representation information according to the target portrait image and the target dynamic representation sequence according to the facial animation parameter sequence through the target variational autoencoder; and a video frame sequence is generated according to the target static representation information and the target dynamic representation sequence.

[0134] In the above audio-driven video generation method, the driving audio is obtained, and the driving audio is preprocessed by a Mel filter group to determine the Mel spectrum, and the Mel spectrum is feature extracted by a deep learning speech recognition model to determine the target audio features of the driving audio; the audio feature sequence is determined according to the target audio features, and the audio feature sequence is input into the facial animation recognition model to determine the facial animation discrete probability distribution sequence; the facial animation parameter sequence is determined according to the facial animation discrete probability distribution sequence; the facial animation parameter sequence and the target portrait image are input into the target variational autoencoder to generate a video frame sequence, and a dynamic voice video is generated according to the video frame sequence and the driving audio. The problem that when audio drives video images to perform conversation actions, the mapping from audio to vision is generally modeled in a deterministic way, which will cause the audio drive to regress to the average facial expression, resulting in a small change in the facial expression of the generated video image, and the emotional information in the audio cannot be accurately expressed. The above scheme determines the discrete probability distribution sequence of facial animation by the target audio features of the driving audio, which can enrich the flexibility of facial animation selection, and can obtain facial animation that can represent audio perception information. Based on the discrete probability distribution sequence of facial animation and the target portrait image, dynamic voice video is generated, which can enrich the facial expressions of the digital human in the dynamic voice video during the voice production process, improve the naturalness and diversity of the portrait face speaking, and enable the digital human to express the emotional information in the driving audio through facial expressions when speaking, so that users can better understand the audio content.

[0135] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0136] Based on the same inventive concept, the embodiment of the present application also provides an audio-driven video generation device for implementing the audio-driven video generation method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the one or more audio-driven video generation device embodiments provided below can refer to the limitations of the audio-driven video generation method above, and will not be repeated here.

[0137] In one embodiment, Figure 6 As shown, an audio-driven video generation device is provided, comprising: an audio feature determination module 601, a discrete probability distribution determination module 602, a facial parameter sequence determination module 603 and a dynamic voice video determination module 604, wherein:

[0138] The audio feature determination module 601 is used to obtain driving audio, perform audio preprocessing on the driving audio through a Mel filter bank to determine a Mel spectrum, and perform feature extraction on the Mel spectrum through a deep learning speech recognition model to determine a target audio feature of the driving audio;

[0139] A discrete probability distribution determination module 602 is used to determine an audio feature sequence according to the target audio feature, input the audio feature sequence into a facial animation recognition model, and determine a facial animation discrete probability distribution sequence;

[0140] A facial parameter sequence determination module 603, configured to determine a facial animation parameter sequence according to the facial animation discrete probability distribution sequence;

[0141] The dynamic speech video determination module 604 is used to input the facial animation parameter sequence and the target portrait image into the target variational autoencoder to generate a video frame sequence, and generate a dynamic speech video according to the video frame sequence and the driving audio.

[0142] Exemplarily, the facial parameter sequence determination module 603 is specifically used for:

[0143] Sampling the facial animation discrete probability distribution sequence to determine a facial animation discrete feature sequence;

[0144] The facial animation discrete feature sequence is numerically converted to determine a discrete feature function, and the discrete feature function is interpolated to determine a facial animation parameter sequence.

[0145] Exemplarily, the audio-driven video generation device further includes:

[0146] A sample feature determination module, used to obtain a first sample video and extract a sample audio feature from the first sample video;

[0147] A sample head action determination module, used to identify the sample facial action unit of the first sample video by using the action unit recognition model, and to label the sample head action of the first sample video by using the posture estimation model;

[0148] The model training module is used to train the deep learning model using sample audio features, sample facial action units and sample head movements to determine the facial animation recognition model.

[0149] Exemplarily, the model training module is specifically used for:

[0150] Input the sample audio features into the deep learning model, and determine the sample probability distribution data corresponding to the sample audio features according to the model output; the sample probability distribution data includes the probability distribution of facial action units and the probability distribution of head actions;

[0151] Determine a model loss function of a deep learning model based on sample probability distribution data, sample facial action units, and sample head movements;

[0152] If the model loss function meets the preset loss function conditions, it is determined that the deep learning model training is completed, and the trained deep learning model is used as the facial animation recognition model.

[0153] Exemplarily, the above audio-driven video generation device further includes:

[0154] A video representation information determination module, used to obtain a second sample video, and determine the sample video representation information of the second sample video through a to-be-trained encoder in the to-be-trained variational autoencoder;

[0155] A reconstructed video information determination module is used to use a decoder to be trained in the variational autoencoder to be trained, reconstruct video frames based on sample video representation information, and determine the reconstructed video information;

[0156] A video loss data determination module, used to determine sample video loss data according to the second sample video and the reconstructed video information;

[0157] The encoder training module is used to optimize the decoder parameters of the decoder to be trained and the encoder parameters of the encoder to be trained in the variational autoencoder to be trained based on the sample video loss data, and determine the target variational autoencoder.

[0158] Exemplarily, the encoder to be trained includes a first encoder and a second encoder. Further, the video representation information determination module is specifically used for:

[0159] Acquire a second sample video, sample the second sample video, and determine a sampled video frame;

[0160] The sampled video frame is encoded by a first encoder in the variational autoencoder to be trained to determine the video static representation information;

[0161] The facial animation parameters of each video frame in the second sample video are extracted, and the facial animation parameters are encoded by the second encoder in the variational autoencoder to determine the video dynamic representation sequence, and the video static representation information and the video dynamic representation sequence are used as the sample video representation information of the second sample video.

[0162] Exemplarily, the dynamic voice and video determination module 604 is specifically used for:

[0163] Inputting the facial animation parameter sequence and the target portrait image into a target variational autoencoder, so as to determine the target static representation information according to the target portrait image and determine the target dynamic representation sequence according to the facial animation parameter sequence through the target variational autoencoder;

[0164] A video frame sequence is generated according to the target static representation information and the target dynamic representation sequence.

[0165] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 7 As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, an audio-driven video generation method is realized. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.

[0166] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0167] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0168] Step 1: obtain driving audio, perform audio preprocessing on the driving audio through a Mel filter bank to determine a Mel spectrum, and perform feature extraction on the Mel spectrum through a deep learning speech recognition model to determine target audio features of the driving audio;

[0169] Step 2: determine an audio feature sequence according to the target audio feature, input the audio feature sequence into a facial animation recognition model, and determine a facial animation discrete probability distribution sequence;

[0170] Step 3, determining a facial animation parameter sequence according to a facial animation discrete probability distribution sequence;

[0171] Step 4: Input the facial animation parameter sequence and the target portrait image into the target variational autoencoder to generate a video frame sequence, and generate a dynamic speech video based on the video frame sequence and the driving audio.

[0172] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0173] Step 1: obtain driving audio, perform audio preprocessing on the driving audio through a Mel filter bank to determine a Mel spectrum, and perform feature extraction on the Mel spectrum through a deep learning speech recognition model to determine target audio features of the driving audio;

[0174] Step 2: determine an audio feature sequence according to the target audio feature, input the audio feature sequence into a facial animation recognition model, and determine a facial animation discrete probability distribution sequence;

[0175] Step 3, determining a facial animation parameter sequence according to a facial animation discrete probability distribution sequence;

[0176] Step 4: Input the facial animation parameter sequence and the target portrait image into the target variational autoencoder to generate a video frame sequence, and generate a dynamic speech video based on the video frame sequence and the driving audio.

[0177] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:

[0178] Step 1: obtain driving audio, perform audio preprocessing on the driving audio through a Mel filter bank to determine a Mel spectrum, and perform feature extraction on the Mel spectrum through a deep learning speech recognition model to determine target audio features of the driving audio;

[0179] Step 2: determine an audio feature sequence according to the target audio feature, input the audio feature sequence into a facial animation recognition model, and determine a facial animation discrete probability distribution sequence;

[0180] Step 3, determining a facial animation parameter sequence according to a facial animation discrete probability distribution sequence;

[0181] Step 4: Input the facial animation parameter sequence and the target portrait image into the target variational autoencoder to generate a video frame sequence, and generate a dynamic speech video based on the video frame sequence and the driving audio.

[0182] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0183] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0184] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0185] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. An audio driven video generation method, characterized in that: include: Acquire driving audio, perform audio preprocessing on the driving audio through a Mel filter bank to determine a Mel spectrum, and perform feature extraction on the Mel spectrum through a deep learning speech recognition model to determine a target audio feature of the driving audio; Determine an audio feature sequence according to the target audio feature, input the audio feature sequence into a facial animation recognition model, and determine a facial animation discrete probability distribution sequence; Determining a facial animation parameter sequence according to the facial animation discrete probability distribution sequence; Inputting the facial animation parameter sequence and the target portrait image into a target variational autoencoder to generate a video frame sequence, and generating a dynamic voice video based on the video frame sequence and the driving audio; The acquisition process of the facial animation recognition model includes: Obtaining a first sample video, and extracting a sample audio feature from the first sample video; identifying sample facial action units of a first sample video by using an action unit recognition model, and labeling sample head actions of the first sample video by using a posture estimation model; Input the sample audio feature into a deep learning model, and determine sample probability distribution data corresponding to the sample audio feature according to the model output; the sample probability distribution data includes a facial action unit probability distribution and a head action probability distribution; Determine a model loss function of the deep learning model according to the sample probability distribution data, the sample facial action unit, and the sample head action; If the model loss function satisfies a preset loss function condition, it is determined that the deep learning model training is completed, and the trained deep learning model is used as a facial animation recognition model.

2. The method according to claim 1, characterized in that Determining a facial animation parameter sequence according to the facial animation discrete probability distribution sequence includes: Sampling the facial animation discrete probability distribution sequence to determine a facial animation discrete feature sequence; The facial animation discrete feature sequence is numerically converted to determine a discrete feature function, and the discrete feature function is interpolated to determine a facial animation parameter sequence.

3. The method according to claim 1, characterized in that Also includes: Obtaining a second sample video, and determining sample video representation information of the second sample video by using a to-be-trained encoder in the to-be-trained variational autoencoder; Using a decoder to be trained in the variational autoencoder to be trained, reconstructing video frames based on the sample video representation information, and determining reconstructed video information; Determine sample video loss data according to the second sample video and the reconstructed video information; Based on the sample video loss data, the decoder parameters of the decoder to be trained and the encoder parameters of the encoder to be trained in the variational autoencoder to be trained are optimized to determine a target variational autoencoder.

4. The method according to claim 3, characterized in that The encoder to be trained includes a first encoder and a second encoder, and the obtaining of the second sample video and determining the sample video representation information of the second sample video by the encoder to be trained in the variational autoencoder to be trained include: Acquire a second sample video, sample the second sample video, and determine a sampled video frame; Encoding the sampled video frame by a first encoder in the variational autoencoder to be trained to determine video static representation information; Extract facial animation parameters of each video frame in the second sample video, and encode the facial animation parameters through the second encoder in the variational autoencoder to determine a video dynamic representation sequence, and use the video static representation information and the video dynamic representation sequence as sample video representation information of the second sample video.

5. The method according to claim 1, characterized in that Inputting the facial animation parameter sequence and the target portrait image into a target variational autoencoder to generate a video frame sequence, including: Inputting the facial animation parameter sequence and the target portrait picture into a target variational autoencoder, so as to determine target static representation information according to the target portrait picture and determine a target dynamic representation sequence according to the facial animation parameter sequence through the target variational autoencoder; A video frame sequence is generated according to the target static representation information and the target dynamic representation sequence.

6. An audio-driven video generation device, characterized in that: The audio-driven video generation device comprises: An audio feature determination module is used to obtain driving audio, perform audio preprocessing on the driving audio through a Mel filter bank to determine a Mel spectrum, and perform feature extraction on the Mel spectrum through a deep learning speech recognition model to determine a target audio feature of the driving audio; A discrete probability distribution determination module, used to determine an audio feature sequence according to the target audio feature, input the audio feature sequence into a facial animation recognition model, and determine a facial animation discrete probability distribution sequence; A facial parameter sequence determination module, used to determine a facial animation parameter sequence according to the facial animation discrete probability distribution sequence; A dynamic voice video determination module, used for inputting the facial animation parameter sequence and the target portrait picture into a target variational autoencoder to generate a video frame sequence, and generating a dynamic voice video according to the video frame sequence and the driving audio; The audio-driven video generation device further includes: a sample feature determination module, configured to obtain a first sample video and extract a sample audio feature from the first sample video; a sample head action determination module, configured to identify a sample facial action unit of a first sample video by using an action unit recognition model, and to annotate the sample head action of the first sample video by using a posture estimation model; A model training module is used to input the sample audio features into a deep learning model, and determine the sample probability distribution data corresponding to the sample audio features according to the model output; the sample probability distribution data includes the probability distribution of facial action units and the probability distribution of head actions; the model loss function of the deep learning model is determined according to the sample probability distribution data, the sample facial action units and the sample head actions; if the model loss function meets the preset loss function conditions, it is determined that the deep learning model training is completed, and the trained deep learning model is used as the facial animation recognition model.

7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.

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

Citation Information

Patent Citations

  • Portrait video generation method and device, electronic equipment and storage medium

    CN112750185A

  • Speaking face synthesis method and device based on generative adversarial network

    CN115908659A