A head animation generation method and device based on time correlation
By constructing audio covariance matrices and video covariance matrices, combined with the channel attention mechanism unit, the problem of low naturalness and realism in audio-driven visual content generation is solved, and high-quality capture of audio and video temporal correlations and animation generation are achieved. and consistency.
Patent Information
- Application Number
- CN202410604983.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-15
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2044-05-15
AI Technical Summary
Existing audio-driven visual content generation technologies ignore the interaction and correlation between audio and vision, resulting in generated animations with low naturalness and realism.
By constructing the audio covariance matrix and video covariance matrix, the time synchronization between audio and video is analyzed, and the channel attention mechanism unit is used to enhance the audio features, and the preset head animation generation model is input to generate high-quality Head animation.
Effectively capture and utilize audio and video timing correlation to improve the authenticity and naturalness of animation generation, ensure that the generated animation is highly consistent with the original audio, and significantly improve audio-driven head animation generation.
Smart Images

Figure CN118172452B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer vision technology, and more specifically, to a head animation generation method and device based on time correlation. Background Art
[0002] With the rapid development of information technology, audio-driven visual content generation has become a core component in the field of artificial intelligence. In particular, advances in computer vision and audio processing technologies have brought about significant changes in creating dynamic visual content with a high sense of reality. These technologies are widely used in many fields such as multimedia entertainment, virtual reality, and remote communications. For example, users can use audio signals to dynamically generate virtual characters or videos with rich expressions. For example, the audio-driven single-lens talking head animation (ADOS-THA) technology generates synchronized talking head animations by combining audio input and a single static image. Compared with traditional animation generation that relies on a large amount of visual data and complex processes, ADOS-THA can generate high-quality animations using only audio and a single image.
[0003] Existing audio-driven visual content generation techniques mainly focus on converting audio signals into semantic representations, such as facial key points, 3D deformable models, and motion models, and using rendering techniques to produce the final visual output. However, most of these techniques only consider the current and previous few audio clips as input, while ignoring the interaction and correlation between audio and vision, which will cause the defects of low naturalness and low realism of the generated animations. Summary of the invention
[0004] In order to overcome the defects of low naturalness and low realism of the generated animation in the existing audio-driven visual content generation technology, the present invention proposes the following technical solution:
[0005] In a first aspect, the present invention provides a head animation generation method based on time correlation, comprising:
[0006] Get the audio clip and the corresponding video clip.
[0007] Feature extraction is performed on the audio segment and the video segment respectively to obtain an audio feature vector and a video feature vector.
[0008] The time correlation between the audio feature vector and the video feature vector is calculated, and an audio covariance matrix and a video covariance matrix are constructed according to the time correlation.
[0009] The preset head animation generation model is trained according to the audio covariance matrix and the video covariance matrix to obtain a trained head animation generation model.
[0010] The video feature vector and the audio covariance matrix are input into a preset channel attention mechanism unit for feature enhancement processing to obtain an enhanced feature vector.
[0011] The enhanced feature vector is input into the trained head animation generation model to generate the corresponding head animation.
[0012] As a preferred technical solution, feature extraction is performed on the audio clip and the video clip respectively to obtain an audio feature vector and a video feature vector, including:
[0013] Use an audio encoder to extract features from the audio clip to obtain an audio feature vector, the expression of which is as follows:
[0014]
[0015]
[0016] in, Represents an audio clip No. i The feature vector corresponding to the frame, Represents an audio clip No. j The feature vector corresponding to the frame, Indicates that the audio encoder performs encoding processing.
[0017] Use a video encoder to extract features from the video clip to obtain a video feature vector, which is expressed as follows:
[0018]
[0019]
[0020] in, Indicates a video clip No. i The feature vector corresponding to the frame, Indicates a video clip No. j The feature vector corresponding to the frame, Indicates that the video encoder performs encoding processing.
[0021] As a preferred technical solution, the audio encoder is an Audio2Coeff encoder.
[0022] As a preferred technical solution, the video encoder is a visual feature extractor based on ResNet18.
[0023] As a preferred technical solution, construct an audio covariance matrix and the video covariance matrix , whose expression is as follows:
[0024]
[0025]
[0026] in, Indicates that the encoder is used for feature extraction.
[0027] As a preferred technical solution, the video feature vector and the audio covariance matrix are input into a preset channel attention mechanism unit for feature enhancement processing to obtain an enhanced feature vector, whose expression is as follows:
[0028]
[0029] in, and Represent two 1×1 convolution operations respectively, represents the covariance matrix of consecutive audio clips, A feature vector representing an arbitrary video segment.
[0030] As a preferred technical solution, a preset head animation generation model is trained according to the audio covariance matrix and the video covariance matrix to obtain a trained head animation generation model, including:
[0031] Identify and mark continuous audio and video segments, as well as non-contiguous audio and video segments.
[0032] The loss function of the preset head animation generation model is constructed by using the audio covariance matrix of the continuous audio clips, the video covariance matrix of the continuous video clips, the audio covariance matrix of the non-continuous audio clips and the video covariance matrix of the non-continuous video clips.
[0033] The loss function is converged using the gradient descent method to obtain a trained head animation generation model.
[0034] As a preferred technical solution, the expression of the loss function is as follows:
[0035]
[0036]
[0037] in, represents the covariance matrix of consecutive audio clips, represents the covariance matrix of consecutive video clips, represents the covariance matrix of non-contiguous audio segments, Indicates non-contiguous video segments The covariance matrix of is a random integer, N Indicates the total number of frames of the audio and video clips. represents the overall loss of temporal audiovisual correlation, represents the correlation-aware regularization loss.
[0038] As a preferred technical solution, the head animation generation model includes an autoencoder and a generative adversarial network, and the enhanced feature vector is input into the trained head animation generation model to generate the corresponding head animation, including:
[0039] The enhanced feature vector is input into the autoencoder for image space projection to generate an image feature vector.
[0040] The image feature vector is input into the generative adversarial network for animation generation to generate a corresponding head animation.
[0041] In a second aspect, the present invention further provides a head animation generation device based on time correlation, which is applied to the head animation generation method based on time correlation as described in any solution of the first aspect, comprising:
[0042] The acquisition module is used to acquire the audio clip and the corresponding video clip.
[0043] The extraction module is used to extract features from the audio segment and the video segment respectively to obtain an audio feature vector and a video feature vector.
[0044] The construction module is used to calculate the time correlation between the audio feature vector and the video feature vector, and construct an audio covariance matrix and a video covariance matrix according to the time correlation.
[0045] The training module is used to train the preset head animation generation model according to the audio covariance matrix and the video covariance matrix to obtain a trained head animation generation model.
[0046] The feature enhancement module is used to input the video feature vector and the audio covariance matrix into a preset channel attention mechanism unit for feature enhancement processing to obtain an enhanced feature vector.
[0047] The generation module is used to input the enhanced feature vector into the trained head animation generation model to generate the corresponding head animation.
[0048] The beneficial effects of the present invention include at least:
[0049] The present invention constructs an audio covariance matrix and a video covariance matrix to carefully analyze the time synchronization between audio and video, which can effectively capture and utilize the temporal association between audio and visual content, identify the temporal consistency of audio and video content, and enhance the learning effect of the animation generation network. In addition, the present application uses a channel attention mechanism unit to enhance the audio features, further ensuring a high degree of consistency between the generated animation and the original audio, greatly improving the audio-driven head animation generation, and providing a smoother and more realistic visual performance, thereby significantly improving the authenticity and naturalness of the animation. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 A schematic flow chart of a head animation generation method based on time correlation provided in an embodiment of the present application.
[0051] Figure 2 This is a principle block diagram of constructing an audio covariance matrix and a video covariance matrix and calculating the overall loss of temporal audiovisual correlation provided by an embodiment of the present application.
[0052] Figure 3 A block diagram of the principle of performing feature enhancement processing on video feature vectors and audio covariance matrices provided in an embodiment of the present application.
[0053] Figure 4 This is a principle block diagram of the head animation generation method based on time correlation proposed in an embodiment of the present application.
[0054] Figure 5 This is an architectural diagram of a head animation generation device based on time correlation provided in an embodiment of the present application.
[0055] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0056] The following will describe the implementation methods of the present application with reference to the accompanying drawings and preferred technical solutions. Those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. The present application can also be implemented or applied through other different specific implementation methods, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present application. It should be understood that the preferred technical solutions are only for illustrating the present application, not for limiting the scope of protection of the present application.
[0057] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present application, and thus the drawings only show components related to the present application rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed at will, and the component layout may also be more complicated.
[0058] In the following description, a large number of details are discussed to provide a more thorough explanation of the embodiments of the present application. However, it is obvious to those skilled in the art that the embodiments of the present application can be implemented without these specific details. In other embodiments, well-known structures and devices are shown in the form of block diagrams rather than in detail to avoid making the embodiments of the present application difficult to understand.
[0059] Specifically, Figure 1 The present invention provides a flowchart of a head animation generation method based on time correlation provided in an embodiment of the present invention. The head animation generation method based on time correlation includes the following steps:
[0060] S1: Obtain an audio clip and a corresponding video clip.
[0061] S2: Extract features from the audio clip and the video clip respectively to obtain an audio feature vector and a video feature vector.
[0062] Optionally, in one embodiment of the present application, an audio encoder is used to extract features from the audio segment to obtain an audio feature vector, the expression of which is as follows:
[0063]
[0064]
[0065] in, Represents an audio clip No. i The feature vector corresponding to the frame, Represents an audio clip No. j The feature vector corresponding to the frame, Indicates that the audio encoder performs encoding processing.
[0066] Use a video encoder to extract features from the video clip to obtain a video feature vector, which is expressed as follows:
[0067]
[0068]
[0069] in, Indicates a video clip No. i The feature vector corresponding to the frame, Indicates a video clip No. j The feature vector corresponding to the frame, Indicates that the video encoder performs encoding processing.
[0070] In the specific implementation process, first, the audio clip is collected and input into the audio encoder. The audio encoder uses a deep learning algorithm to encode the audio data and extract key features. These features include but are not limited to information such as pitch, rhythm, and timbre. The video clip is sent to the video encoder, which also uses deep learning technology to specifically extract features related to facial movements, such as the movement of the eyes, mouth, and head.
[0071] It can be understood that the acquisition of audio feature vectors and video feature vectors allows the calculation of the temporal correlation between the two. The calculation of this correlation is based on the similarity or difference between the feature vectors, so that it is effective to identify whether the audio and video are synchronized. When the audio and video data are highly synchronized, the generated head animation will be more natural and realistic, because the movement of the animation will completely correspond to the sound in the audio.
[0072] Optionally, in one embodiment of the present application, the audio encoder is an Audio2Coeff encoder.
[0073] Optionally, in one embodiment of the present application, the video encoder is a visual feature extractor based on ResNet18.
[0074] S3: Calculate the time correlation between the audio feature vector and the video feature vector, and construct an audio covariance matrix and a video covariance matrix according to the time correlation.
[0075] Optionally, in one embodiment of the present application, the time correlation between the audio feature vector and the video feature vector is calculated, and an audio covariance matrix is constructed based on the time correlation. and the video covariance matrix , whose expression is as follows:
[0076]
[0077]
[0078] in, Indicates that the encoder is used for feature extraction.
[0079] In the specific implementation process, the encoder is used to pair a certain feature of the audio with the corresponding feature of the video, and the correlation between them in the time series is calculated to construct the audio covariance matrix and the video covariance matrix. These matrices reflect the synergy of the changes in audio and video features at different time points. If the audio and video are highly correlated, the corresponding matrix element value will be large, reflecting strong time synchronization. If the correlation is low, the matrix value will be small.
[0080] It is understandable that by using these covariance matrices, the animation generation network can learn the detailed and precise time synchronization pattern between audio and video data, so as to generate animations that are highly synchronized with the original audio and video data. This not only improves the naturalness and realism of the animation, but also significantly improves the user experience, especially in application scenarios that require advanced visual correspondence.
[0081] S4: training a preset head animation generation model according to the audio covariance matrix and the video covariance matrix to obtain a trained head animation generation model.
[0082] Optionally, in one embodiment of the present application, a preset head animation generation model is trained according to the audio covariance matrix and the video covariance matrix to obtain a trained head animation generation model, including:
[0083] Identify and label continuous audio and video clips, as well as discontinuous audio and video clips. Synchronous clips (i.e., the audio and video data match each other, such as the dialogue sound and the character's mouth movement are consistent) are labeled as positive samples, while non-synchronous clips (such as background music and dialogue scenes do not match) are labeled as negative samples.
[0084] The loss function of the preset head animation generation model is constructed by using the audio covariance matrix of the continuous audio clips, the video covariance matrix of the continuous video clips, the audio covariance matrix of the non-continuous audio clips and the video covariance matrix of the non-continuous video clips.
[0085] The loss function is converged using the gradient descent method to obtain a trained head animation generation model.
[0086] It is understandable that this embodiment can efficiently distinguish the synchronization of audio and video clips, thereby providing more accurate annotations for training data. This sample screening and labeling method based on the correlation matrix optimizes the training process, ensuring that only samples that reflect real time relationships are used to train the head animation generation model. In this way, the trained network generates natural and realistic head animations more accurately, which is specifically manifested in improving the smoothness of the animation and the naturalness of the expression, so that the generated animation is visually highly consistent with the original audio. This not only improves the quality of the animation, but also enhances the audience's immersion and satisfaction, and is very suitable for multiple fields such as movie special effects, game animation, and virtual reality.
[0087] Optionally, in one embodiment of the present application, the expression of the loss function of the preset head animation generation model constructed is as follows:
[0088]
[0089]
[0090] in, represents the covariance matrix of consecutive audio clips, represents the covariance matrix of consecutive video clips, represents the covariance matrix of non-contiguous audio segments, Indicates non-contiguous video segments The covariance matrix of is a random integer, N Indicates the total number of frames of the audio and video clips. represents the overall loss of temporal audiovisual correlation, represents the correlation-aware regularization loss.
[0091] Among them, the overall loss of temporal audio-visual correlation Ensure audio-visual synchronization of animations, while correlation-aware regularization loss Help the network focus on important audio and video features and avoid overfitting. Figure 2 As shown, Figure 2 This is a principle block diagram of constructing an audio covariance matrix and a video covariance matrix and calculating the overall loss of temporal audiovisual correlation provided by an embodiment of the present application.
[0092] It can be understood that through the application of relevance-aware regularization loss, the network focuses more on the features that have the greatest impact on the generated animation and avoids wasting computing resources on unimportant variables, thereby improving the training efficiency and the generalization ability of the network.
[0093] S5: Input the video feature vector and the audio covariance matrix into a preset channel attention mechanism unit for feature enhancement processing to obtain an enhanced feature vector.
[0094] Optionally, in one embodiment of the present application, Figure 3 As shown, Figure 3 The principle block diagram of the feature enhancement processing of the video feature vector and the audio covariance matrix provided in the embodiment of the present application is as follows: the video feature vector and the audio covariance matrix are input into a preset channel attention mechanism unit for feature enhancement processing to obtain an enhanced feature vector, whose expression is as follows:
[0095]
[0096] in, and Represent two 1×1 convolution operations respectively, represents the covariance matrix of consecutive audio clips, A feature vector representing an arbitrary video segment.
[0097] In the specific implementation process, the video feature vector and audio covariance matrix are input into the preset channel attention mechanism unit. In this unit, two 1×1 convolution operations are performed to weight and fuse the features of the video feature vector and the audio covariance matrix respectively. This allows the importance of each channel to be properly allocated and emphasized to highlight those features that are more helpful for generating head animations. The result of the output of the channel attention mechanism unit is an enhanced feature vector that integrates the key information of the audio and video data and optimizes the expression of the input features through convolution operations.
[0098] It is understandable that the feature enhancement processing using the channel attention mechanism enables the animation generation network to more accurately understand and reproduce the dynamic changes of audio and video data, especially when expressing the fine movements of audio and video synchronization. Because the feature vectors have been enhanced and optimized, the generated head animation is more accurately synchronized with the original audio and video data in visual expression, and the naturalness and realism of the animation have been greatly improved.
[0099] S6: Input the enhanced feature vector into the trained head animation generation model to generate the corresponding head animation.
[0100] Optionally, in one embodiment of the present application, the head animation generation model includes an autoencoder and a generative adversarial network, and the enhanced feature vector is input into the trained head animation generation model to generate the corresponding head animation, including:
[0101] The enhanced feature vector is input into the autoencoder for image space projection to generate an image feature vector.
[0102] The image feature vector is input into the generative adversarial network for animation generation to generate a corresponding head animation.
[0103] In the specific implementation process, the generated enhanced feature vector is input into the pre-trained head animation generation model. The enhanced feature vector is projected into the image space in the autoencoder and converted into the corresponding image feature vector. This process is to convert the feature vector into a signal that can be used for image generation. The converted image feature vector is used to input it into a well-trained generative adversarial network (GAN). The generative adversarial network receives the image feature vector and generates the corresponding head animation image through the generator network. The generated head animation image will maintain good audio-visual synchronization based on the input feature vector, showing dynamics such as facial expressions and lip movements.
[0104] It can be understood that the use of enhanced feature vectors to generate head animations makes the generated animations more personalized and expressive. By using image feature vectors for generation, head animations can more accurately capture facial features and movements. Through the processing of generative adversarial networks, the generated head animation images will be of higher quality and more realistic. GAN is able to learn the complex mapping relationship between the input feature vectors and the image, thereby generating highly visually appealing head animations.
[0105] like Figure 4 As shown, Figure 4 The overall principle block diagram of the head animation generation method based on time correlation proposed in the embodiment of the present application is given a video frame source image and a driven audio. It first uses a visual feature extractor to extract image features from the video frame source image and predicts three-dimensional coefficients from the audio for correlation embedded learning. Then, it calculates the current ( i ) and before ( i -1) the temporal relationship between the audio clips, construct the audio covariance matrix and the video covariance matrix, and integrate them with the image features for correlation-aware regularization to enhance the feature representation. Afterwards, the head animation generation model is used as a facial renderer to generate the final head animation image from the image features and the mapped 3D coefficients. In addition, during the training process, the last real visual frame is used to calculate the temporal visual relationship with the generated animation image.
[0106] It can be understood that this application proposes a novel temporal audio-visual correlation embedding (TAVCE) framework to introduce temporal cross-modal correlation to guide the generation of conversation head images. Secondly, a temporal audio-visual correlation measure is designed to learn the temporal relationship correlation between audio and vision. In this framework, a channel attention mechanism is introduced to fully explore rich temporal information and enhance the ability of feature representation learning by weighting feature channels. The core idea of this mechanism is to weight feature channels according to the importance of temporal audio relationships.
[0107] In addition, this embodiment verifies the video quality through FID (Frechet Inception Distance) and CSIM (Cosine Similarity) indicators on the HDTF (High-definition Talking Face) dataset, LRW (Lip Reading in the Wild) dataset, VoxCeleb1 dataset, and VoxCeleb2 dataset through extensive experiments and qualitative and quantitative evaluations, and measures lip synchronization through LSE-D (Lip Sync Error-Distance) and LSE-C (Lip Sync Error-Confidence) indicators to verify the effectiveness of the TAVCE framework.
[0108] Table 1 Comparison results of other algorithms and the TAVCE framework of this application on different datasets
[0109]
[0110] As shown in Table 1, by measuring the FID index and the CSIM index, it is found that the TAVCE framework of this application achieves significant video quality improvement on the HDTF dataset compared to the current best performing SadTalker method. The FID index is reduced from 8.764 to 7.742, and the CSIM index is increased from 0.856 to 0.859, indicating that the authenticity of the generated video has been improved.
[0111] By measuring the LSE-D and LSE-C indicators, it was found that compared with SadTalker, LSE-D dropped from 7.690 to 7.562, and LSE-C increased from 7.376 to 7.399, indicating that the alignment between audio and visual elements is more precise.
[0112] Although the Audio2Head method focuses more on the simulation of lip shape and may perform better on the LSE-D and LSE-C indicators, the proposed framework shows better performance in lip synchronization based on video samples, which is also verified by user studies. In addition, the method significantly outperforms Audio2Head in the FID indicator. In the HDTF dataset, the FID indicator of Audio2Head is 14.234, while the FID indicator of the TAVCE framework of this application is 7.742. On the VoxCeleb1 dataset, the FID indicator of Audio2Head is 42.214, while the FID indicator of the TAVCE framework of this application is 22.732. On the VoxCeleb2 dataset, the FID indicator of Audio2Head is 36.504, while the FID indicator of the TAVCE framework of this application is 14.198.
[0113] These results show that the TAVCE framework of this application has significant improvements in video quality and lip synchronization, and shows advantages in comparison with other methods, providing strong support for research and application in this field.
[0114] It is understandable that by constructing the audio covariance matrix and the video covariance matrix to carefully analyze the time synchronization between audio and video, it is possible to effectively capture and utilize the temporal association between audio and visual content, not only to identify the temporal consistency of audio and video content, but also to further optimize the training data by marking positive and negative samples, thereby enhancing the learning effect of the animation generation network. In addition, the present application uses a channel attention mechanism unit to enhance the audio features, further ensuring a high degree of consistency between the generated animation and the original audio, greatly improving the audio-driven head animation generation, and providing a smoother and more realistic visual performance, thereby significantly improving the authenticity and naturalness of the animation.
[0115] Secondly, the head animation generation device based on time correlation proposed in an embodiment of the present application is described with reference to the accompanying drawings.
[0116] like Figure 5 As shown, Figure 5 The architecture diagram of the head animation generation device based on time correlation provided in an embodiment of the present application includes: an acquisition module 100, an extraction module 200, a construction module 300, a training module 400, a feature enhancement module 500 and a generation module 600.
[0117] Among them, the acquisition module 100 is used to obtain an audio clip and a corresponding video clip. The extraction module 200 is used to perform feature extraction on the audio clip and the video clip respectively to obtain an audio feature vector and a video feature vector. The construction module 300 is used to calculate the time correlation of the audio feature vector and the video feature vector, and construct an audio covariance matrix and a video covariance matrix based on the time correlation. The training module 400 is used to train a preset head animation generation model according to the audio covariance matrix and the video covariance matrix to obtain a trained head animation generation model. The feature enhancement module 500 is used to input the video feature vector and the audio covariance matrix into a preset channel attention mechanism unit for feature enhancement processing to obtain an enhanced feature vector. The generation module 600 is used to input the enhanced feature vector into the trained head animation generation model to generate the corresponding head animation.
[0118] It should be noted that the above explanations of the embodiment of the head animation generation method based on time correlation are also applicable to the head animation generation device based on time correlation of this embodiment, and will not be repeated here.
[0119] Figure 6 The electronic device 700 provided in the embodiment of the present application is a schematic diagram of the structure of the electronic device 700. The electronic device 700 includes: a memory 701, a processor 702, and a computer program stored in the memory 701 and executable on the processor 702.
[0120] When the processor 702 executes the program, the head animation generation method based on time correlation provided in the above embodiment is implemented.
[0121] Furthermore, the electronic device 700 also includes: a communication interface 703 for communication between the memory 701 and the processor 702 .
[0122] The memory 701 may include a high-speed RAM (Random Access Memory) memory, and may also include a non-volatile memory, such as at least one disk memory.
[0123] If the memory 701, the processor 702 and the communication interface 703 are implemented independently, the communication interface 703, the memory 701 and the processor 702 can be connected to each other through a bus and communicate with each other. The bus can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0124] Optionally, in a specific implementation, if the memory 701, the processor 702 and the communication interface 703 are integrated on a chip, the memory 701, the processor 702 and the communication interface 703 can communicate with each other through an internal interface.
[0125] The processor 702 may be a CPU (Central Processing Unit), or an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present application.
[0126] This embodiment provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the head animation generation method based on time correlation as described in the above embodiment is implemented.
[0127] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms are not necessarily directed to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or N embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0128] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "N" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0129] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.
[0130] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiment, the N steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array, a field programmable gate array, etc.
[0131] A person skilled in the art may understand that all or part of the steps in the above-mentioned embodiment method may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
[0132] Obviously, the above embodiments of the present application are merely examples for clearly illustrating the present application, and are not intended to limit the implementation methods of the present application. For those of ordinary skill in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all implementation methods here. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present application should be included in the protection scope of the claims of the present application.
Claims
1. A head animation generation method based on time correlation, characterized in that: include: Get the audio clip and the corresponding video clip; Extracting features from the audio clip and the video clip respectively to obtain an audio feature vector and a video feature vector; Calculating the time correlation between the audio feature vector and the video feature vector, and constructing an audio covariance matrix and a video covariance matrix according to the time correlation; Training a preset head animation generation model according to the audio covariance matrix and the video covariance matrix to obtain a trained head animation generation model; Inputting the video feature vector and the audio covariance matrix into a preset channel attention mechanism unit for feature enhancement processing to obtain an enhanced feature vector; The enhanced feature vector is input into the trained head animation generation model to generate the corresponding head animation.
2. The head animation generation method based on time correlation according to claim 1, characterized in that: Extracting features from the audio clip and the video clip respectively to obtain an audio feature vector and a video feature vector includes: Use an audio encoder to extract features from the audio clip to obtain an audio feature vector, the expression of which is as follows: in, Represents an audio clip No. i The feature vector corresponding to the frame, Represents an audio clip No. j The feature vector corresponding to the frame, Indicates that the audio encoder performs encoding processing; Use a video encoder to extract features from the video clip to obtain a video feature vector, which is expressed as follows: in, Indicates a video clip No. i The feature vector corresponding to the frame, Indicates a video clip No. j The feature vector corresponding to the frame, Indicates that the video encoder performs encoding processing.
3. The head animation generation method based on time correlation according to claim 2, characterized in that: The audio encoder is an Audio2Coeff encoder.
4. The head animation generation method based on time correlation according to claim 2, characterized in that: The video encoder is a visual feature extractor based on ResNet18.
5. The head animation generation method based on time correlation according to claim 2, characterized in that: Calculate the time correlation between the audio feature vector and the video feature vector, and construct an audio covariance matrix based on the time correlation and the video covariance matrix , whose expression is as follows: in, Indicates that the encoder is used for feature extraction.
6. The head animation generation method based on time correlation according to claim 5, characterized in that: The video feature vector and the audio covariance matrix are input into a preset channel attention mechanism unit for feature enhancement processing to obtain an enhanced feature vector, whose expression is as follows: in, and Represent two 1×1 convolution operations respectively, represents the covariance matrix of consecutive audio clips, A feature vector representing an arbitrary video segment.
7. The head animation generation method based on time correlation according to claim 5, characterized in that: According to the audio covariance matrix and the video covariance matrix, a preset head animation generation model is trained to obtain a trained head animation generation model, including: Identify and label continuous audio and video segments, as well as non-continuous audio and video segments; Constructing a loss function of a preset head animation generation model using an audio covariance matrix of a continuous audio segment, a video covariance matrix of a continuous video segment, an audio covariance matrix of a non-continuous audio segment, and a video covariance matrix of a non-continuous video segment; The loss function is converged using the gradient descent method to obtain a trained head animation generation model.
8. The head animation generation method based on time correlation according to any one of claims 1 to 7, characterized in that: The head animation generation model includes an autoencoder and a generative adversarial network, and the enhanced feature vector is input into the trained head animation generation model to generate the corresponding head animation, including: Inputting the enhanced feature vector into the autoencoder for image space projection to generate an image feature vector; The image feature vector is input into the generative adversarial network for animation generation to generate a corresponding head animation.
9. A head animation generation device based on time correlation, applied to the head animation generation method based on time correlation as claimed in any one of claims 1 to 8, characterized in that: include: An acquisition module, used to acquire audio clips and corresponding video clips; An extraction module, used to extract features from the audio clip and the video clip respectively to obtain an audio feature vector and a video feature vector; A construction module, used for calculating the time correlation between the audio feature vector and the video feature vector, and constructing an audio covariance matrix and a video covariance matrix according to the time correlation; A training module, used for training a preset head animation generation model according to the audio covariance matrix and the video covariance matrix to obtain a trained head animation generation model; A feature enhancement module, used for inputting the video feature vector and the audio covariance matrix into a preset channel attention mechanism unit for feature enhancement processing to obtain an enhanced feature vector; The generation module is used to input the enhanced feature vector into the trained head animation generation model to generate the corresponding head animation.
