Data processing method and device for virtual image, electronic equipment and medium

By extracting face key points and audio features, inputting key points to generate network models, and generating face key points image sequences corresponding to audio data, solving the problems of large computing resources and unstable training process in the prior art, and achieving efficient and stable video generation effects.

CN119648876AActive Publication Date: 2025-03-18BEIJING BAIDU NETCOM SCI & TECH CO LTD

Patent Information

Application Number
CN202411766312.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-03
Publication Date
2025-03-18
Estimated Expiration
2044-12-03

AI Technical Summary

Technical Problem

When the prior art generates high-quality, high-resolution and diverse portrait videos, computing resources are consumed more, and the training process is unstable, making it prone to pattern collapse.

Method used

By preprocessing the face image and driving audio of the target object, facial key points and audio features are extracted, and preset key points are input to generate a network model to obtain a sequence of face key points image corresponding to the audio data, thereby guiding video generation.

Benefits of technology

It realizes the video generation effect of the face key point image sequence and timely adjustments, saving computing resources and improving the efficiency and stability of video generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119648876A_ABST
    Figure CN119648876A_ABST
Patent Text Reader

Abstract

The invention provides a data processing method and device for a virtual image, electronic equipment, a computer readable storage medium and a computer program product, and relates to the field of artificial intelligence, in particular to the technical fields of deep learning, image processing and digital human. According to the implementation scheme, audio data including a first target image of the face of a target object is acquired; performing face key point extraction on the first target image to obtain a first face key point image; performing audio feature extraction based on the audio data to obtain audio features; inputting the first face key point image and the audio feature into a preset key point generation network model to obtain a face key point image sequence corresponding to the audio data; and based on the face key point image sequence and the first target image, obtaining a video which is generated based on the first target image and corresponds to the audio data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of artificial intelligence, in particular to the fields of deep learning, image processing, and digital human technology, and specifically to a data processing method, device, electronic device, computer-readable storage medium, and computer program product for virtual images. Background Art

[0002] Artificial intelligence is a discipline that studies how to use computers to simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.). It includes both hardware-level and software-level technologies. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, and big data processing. Artificial intelligence software technologies mainly include computer vision technology, speech recognition technology, natural language processing technology, as well as machine learning / deep learning, big data processing technology, knowledge graph technology, and other major directions.

[0003] With the development of artificial intelligence technology, virtual digital humans have been widely used in live broadcasts, news broadcasts, voice prompts and other fields. Usually, it is necessary to drive the virtual digital humans to make movements and expressions synchronized with the audio based on the audio you want to broadcast, and obtain the video driven by the audio. Generating realistic and expressive portrait videos from a single face image through audio drive has broad application prospects, covering multiple fields from digital media to games, film and television creation, etc. Summary of the invention

[0004] The present disclosure provides a data processing method, device, electronic device, computer-readable storage medium and computer program product for a virtual image.

[0005] According to one aspect of the present disclosure, there is provided a data processing method for a virtual image, comprising: acquiring audio data and a first target image including a target object's face; performing facial key point extraction based on the first target image to obtain a first facial key point image; performing audio feature extraction based on the audio data to obtain audio features; inputting the first facial key point image and the audio features into a preset key point generation network model to obtain a facial key point image sequence corresponding to the audio data; and based on the facial key point image sequence and the first target image, obtaining a video corresponding to the audio data generated based on the first target image.

[0006] According to another aspect of the present disclosure, a model training method is provided, including: acquiring an audio frame, a first target image including a face of a target object, a first label image, and a second label image, wherein the first label image is a first facial key point image corresponding to the audio frame generated based on the first target image, and the second label image is a first image corresponding to the audio frame generated based on the first target image; performing facial key point extraction based on the first target image to obtain a second facial key point image; performing audio feature extraction based on the audio frame to obtain audio features; inputting the second facial key point image and the audio features into a key point generation network model to obtain a third facial key point image corresponding to the audio frame; and determining a first loss value based on the third facial key point image and the first facial key point image by a preset first loss function; obtaining a second image corresponding to the audio frame generated based on the first target image by a video generation model based on the third facial key point image and the first target image; determining a second loss value based on the second image and the first image by a preset second loss function; adjusting a parameter value of the key point generation network model based on the first loss value; and adjusting a parameter value of the video generation model based on the second loss value.

[0007] According to another aspect of the present disclosure, there is provided a data processing device for a virtual image, comprising: a first acquisition unit, configured to acquire audio data and a first target image including a target object's face; a first key point extraction unit, configured to perform facial key point extraction based on the first target image to obtain a first facial key point image; a first feature extraction unit, configured to perform audio feature extraction based on the audio data to obtain audio features; a second feature extraction unit, configured to input the first facial key point image and the audio features into a preset key point generation network model to obtain a facial key point image sequence corresponding to the audio data; and a first video generation unit, configured to obtain a video corresponding to the audio data generated based on the first target image based on the facial key point image sequence and the first target image.

[0008] According to another aspect of the present disclosure, a model training device is provided, including: a second acquisition unit, configured to acquire an audio frame, a first target image including a target object's face, a first label image, and a second label image, wherein the first label image is a first facial key point image corresponding to the audio frame generated based on the first target image, and the second label image is a first image corresponding to the audio frame generated based on the first target image; a first key point extraction unit, configured to perform facial key point extraction based on the first target image to obtain a second facial key point image; a third feature extraction unit, configured to perform audio feature extraction based on the audio frame to obtain audio features; and a fourth feature extraction unit, configured to input the second facial key point image and the audio features into a key point generation unit. A facial key point generation network model is formed to obtain a third facial key point image corresponding to the audio frame; a first loss unit is configured to determine a first loss value based on the third facial key point image and the first facial key point image through a preset first loss function; a second video generation unit is configured to obtain a second image corresponding to the audio frame generated based on the first target image through a video generation model based on the third facial key point image and the first target image; a second loss unit is configured to determine a second loss value based on the second image and the first image through a preset second loss function; a first adjustment unit is configured to adjust the parameter value of the key point generation network model based on the first loss value; and a second adjustment unit is configured to adjust the parameter value of the video generation model based on the second loss value.

[0009] According to another aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method described in the present disclosure.

[0010] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided. The computer instructions are used to cause a computer to execute the method described in the present disclosure.

[0011] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, which implements the method described in the present disclosure when executed by a processor.

[0012] According to one or more embodiments of the present disclosure, the facial image and driving audio of the target object are preprocessed to extract facial key points and audio features, thereby obtaining a facial key point image sequence to guide the generation of a corresponding facial video. Since the time and resources consumed by the calculation of video generation are much greater than the generation of facial key point images, the facial key point image sequence can be used to judge the generation effect of the video in advance and make timely adjustments, thereby saving computing resources.

[0013] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] The accompanying drawings exemplarily illustrate the embodiments and constitute a part of the specification, and together with the text description of the specification, are used to explain the exemplary implementation of the embodiments. The embodiments shown are for illustrative purposes only and do not limit the scope of the claims. In all drawings, the same reference numerals refer to similar but not necessarily identical elements.

[0015] Figure 1 A schematic diagram showing an exemplary system in which the various methods described herein may be implemented according to an embodiment of the present disclosure;

[0016] Figure 2 A flow chart of a data processing method according to an embodiment of the present disclosure is shown;

[0017] Figure 3 A schematic diagram showing a data processing method according to an embodiment of the present disclosure is shown;

[0018] Figure 4 A schematic diagram of a facial key point image sequence generation model according to an embodiment of the present disclosure is shown;

[0019] Figure 5 A schematic diagram of a video generation model for generating a video according to an embodiment of the present disclosure is shown;

[0020] Figure 6 A flow chart of a model training method according to an embodiment of the present disclosure is shown;

[0021] Figure 7 A structural block diagram of a data processing device according to an embodiment of the present disclosure is shown;

[0022] Figure 8 A structural block diagram of a model training device according to an embodiment of the present disclosure is shown; and

[0023] Fig. 9A structural block diagram of an exemplary electronic device that can be used to implement the embodiments of the present disclosure is shown. DETAILED DESCRIPTION

[0024] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope of the present disclosure. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0025] In the present disclosure, unless otherwise specified, the use of the terms "first", "second", etc. to describe various elements is not intended to limit the positional relationship, timing relationship, or importance relationship of these elements, and such terms are only used to distinguish one element from another element. In some examples, the first element and the second element may refer to the same instance of the element, and in some cases, based on the description of the context, they may also refer to different instances.

[0026] The terms used in the description of various examples in this disclosure are only for the purpose of describing specific examples and are not intended to be limiting. Unless the context clearly indicates otherwise, if the number of elements is not specifically limited, the element can be one or more. In addition, the term "and / or" used in this disclosure covers any one of the listed items and all possible combinations.

[0027] The embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.

[0028] Figure 1 FIG. 1 is a schematic diagram of an exemplary system 100 in which various methods and apparatuses described herein may be implemented according to an embodiment of the present disclosure. Figure 1 , the system 100 includes one or more client devices 101, 102, 103, 104, 105, and 106, a server 120, and one or more communication networks 110 coupling the one or more client devices to the server 120. The client devices 101, 102, 103, 104, 105, and 106 may be configured to execute one or more applications.

[0029] In an embodiment of the present disclosure, the server 120 may run one or more services or software applications that enable the method of data processing to be performed.

[0030] In some embodiments, server 120 may also provide other services or software applications, which may include non-virtualized environments and virtualized environments. In some embodiments, these services may be provided as web-based services or cloud services, such as provided to users of client devices 101, 102, 103, 104, 105, and / or 106 under a software as a service (SaaS) model.

[0031] exist Figure 1 In the configuration shown, the server 120 may include one or more components that implement the functions performed by the server 120. These components may include software components, hardware components, or a combination thereof that can be executed by one or more processors. Users operating client devices 101, 102, 103, 104, 105, and / or 106 may in turn utilize one or more client applications to interact with the server 120 to utilize the services provided by these components. It should be understood that a variety of different system configurations are possible, which may differ from the system 100. Therefore, Figure 1 is one example of a system for implementing the various methods described herein and is not intended to be limiting.

[0032] The user may use client devices 101, 102, 103, 104, 105 and / or 106 to input a first target image, audio data, or display video, etc. The client device may provide an interface that enables a user of the client device to interact with the client device. The client device may also output information to the user via the interface. Figure 1 Only six client devices are depicted, but one skilled in the art will appreciate that the present disclosure may support any number of client devices.

[0033] Client devices 101, 102, 103, 104, 105 and / or 106 may include various types of computer devices, such as portable handheld devices, general-purpose computers (such as personal computers and laptop computers), workstation computers, wearable devices, smart screen devices, self-service terminal devices, service robots, game systems, thin clients, various messaging devices, sensors or other sensing devices, etc. These computer devices may run various types and versions of software applications and operating systems, such as MICROSOFT Windows, APPLE iOS, UNIX-like operating systems, Linux or Linux-like operating systems (such as GOOGLE Chrome OS); or include various mobile operating systems, such as MICROSOFT Windows Mobile OS, iOS, Windows Phone, Android. Portable handheld devices may include cellular phones, smart phones, tablet computers, personal digital assistants (PDAs), etc. Wearable devices may include head-mounted displays (such as smart glasses) and other devices. Game systems may include various handheld game devices, Internet-enabled game devices, etc. Client devices are capable of executing various different applications, such as various Internet-related applications, communication applications (such as email applications), short message service (SMS) applications, and may use various communication protocols.

[0034] The network 110 may be any type of network known to those skilled in the art that may support data communications using any of a variety of available protocols, including but not limited to TCP / IP, SNA, IPX, etc. By way of example only, the one or more networks 110 may be a local area network (LAN), an Ethernet-based network, a token ring, a wide area network (WAN), the Internet, a virtual network, a virtual private network (VPN), an intranet, an extranet, a blockchain network, a public switched telephone network (PSTN), an infrared network, a wireless network (e.g., Bluetooth, WIFI), and / or any combination of these and / or other networks.

[0035] Server 120 may include one or more general purpose computers, dedicated server computers (e.g., PC (personal computer) servers, UNIX servers, mid-range servers), blade servers, mainframe computers, server clusters, or any other suitable arrangement and / or combination. Server 120 may include one or more virtual machines running virtual operating systems, or other computing architectures involving virtualization (e.g., one or more flexible pools of logical storage devices that may be virtualized to maintain a server's virtual storage device). In various embodiments, server 120 may run one or more services or software applications that provide the functionality described below.

[0036] The computing units in the server 120 may run one or more operating systems including any of the above operating systems and any commercially available server operating systems. The server 120 may also run any of a variety of additional server applications and / or middle-tier applications, including HTTP servers, FTP servers, CGI servers, JAVA servers, database servers, etc.

[0037] In some implementations, server 120 may include one or more applications to analyze and consolidate data feeds and / or event updates received from users of client devices 101, 102, 103, 104, 105, and 106. Server 120 may also include one or more applications to display data feeds and / or real-time events via one or more display devices of client devices 101, 102, 103, 104, 105, and 106.

[0038] In some embodiments, the server 120 may be a server of a distributed system, or a server combined with a blockchain. The server 120 may also be a cloud server, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology. A cloud server is a host product in a cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and virtual private servers (VPS) services.

[0039] The system 100 may also include one or more databases 130. In some embodiments, these databases may be used to store data and other information. For example, one or more of the databases 130 may be used to store information such as audio files and video files. The databases 130 may reside in various locations. For example, the database used by the server 120 may be local to the server 120, or may be remote from the server 120 and may communicate with the server 120 via a network-based or dedicated connection. The databases 130 may be of different types. In some embodiments, the databases used by the server 120 may be, for example, relational databases. One or more of these databases may store, update, and retrieve data to and from the databases in response to commands.

[0040] In some embodiments, one or more of the databases 130 may also be used by applications to store application data. The databases used by the applications may be different types of databases, such as a key-value store, an object store, or a conventional store backed by a file system.

[0041] Figure 1The system 100 may be configured and operated in various ways to enable the application of various methods and apparatuses described in the present disclosure.

[0042] In early studies, researchers achieved face reconstruction by constructing a parametric face model (such as 3DMM). 3DMM can model features such as shape, expression, texture, and angle. However, the face model rendering algorithm based on 3DMM has poor performance and cannot generate high-precision texture, teeth and other detailed areas.

[0043] Recently, deep learning-based methods have been widely studied for their good video generation effects. The two most representative methods are: one is the GAN-based method (such as the StyleGAN series), and the other is the diffusion model-based method (such as Hallo, Follow-Your-Emoji, EchoMimic, Aniportrait, etc.). The portraits generated by the GAN-based method are more realistic, but the diversity is greatly affected by the data distribution, and the training process is unstable and prone to mode collapse. The diffusion model-based method can generate high-quality, high-resolution and more diverse portrait videos, but it requires more computing resources.

[0044] Therefore, according to an embodiment of the present disclosure, a data processing method for a virtual image is provided to generate a corresponding video based on an audio drive. Figure 2 A flow chart of a data processing method according to an embodiment of the present disclosure is shown. Figure 2 As shown, method 200 includes: acquiring audio data and a first target image including a target object's face (step 210); performing facial key point detection based on the first target image to obtain a first facial key point image (step 220); performing audio feature extraction based on the audio data to obtain audio features (step 230); inputting the first facial key point image and the audio features into a preset key point generation network model to obtain a facial key point image sequence corresponding to the audio data (step 240); based on the facial key point image sequence and the first target image, obtaining a video corresponding to the audio data generated based on the first target image (step 250).

[0045] Figure 3 FIG. 1 is a schematic diagram showing a data processing method according to an embodiment of the present disclosure. Figure 3 As shown, the generation of key point images is guided by inputting a target image and a driving audio. Here, exemplarily, based on a facial key point image sequence and a target image, a video corresponding to the audio data is generated by a video generation model (described in detail later).

[0046] According to the embodiments of the present disclosure, the facial image and driving audio of the target object are preprocessed to extract facial key points and audio features, and then a facial key point image sequence is obtained to guide the generation of the corresponding facial video. Since the time and resources consumed by the calculation of video generation are much greater than the generation of facial key point images, the facial key point image sequence can be used to judge the generation effect of the video in advance and make timely adjustments, thereby saving computing resources.

[0047] In step 210, audio data and a first target image including a face of a target object are acquired.

[0048] In the present disclosure, audio data refers to digitized voice data. For example, audio data may be a piece of voice data that needs to be broadcast or live, and the audio data is the audio that the virtual digital person needs to output. For example, the audio data may be voice data generated by reading a paragraph of text; further, the audio data may be voice data generated by reading the paragraph of text with corresponding emotions, such as joy, sadness, anger, etc. The virtual digital person is a digital person used to broadcast the audio data, and the virtual digital person may be a two-dimensional virtual digital person generated based on the target object.

[0049] In the present disclosure, the target object may not only be a person, but may also be an animal, or an anthropomorphic animal, an object, etc., which is not limited here.

[0050] Exemplarily, taking the target object as a real person, when the audio data is voice data generated by reading a passage of text, the generated video can be a video clip including the target object, wherein the expression changes of the target object in the video are consistent with the usual expression changes of the real person when reading the passage of text.

[0051] In some embodiments, the generated video may include not only the face of the target object, but may further include a background area in the first target image except the face of the target object.

[0052] In step 220, facial key point detection is performed based on the first target image to obtain a first facial key point image.

[0053] Specifically, in some examples, facial key point detection refers to locating the positions of key areas in a facial image through algorithms, such as eyebrows, eyes, nose, mouth, and facial contours. During the detection process, the system returns the coordinate information of these key points, thereby achieving detailed recognition and analysis of the target object's face.

[0054] In some examples, in the face key point detection, various suitable key point marking methods such as 68 points, 96 / 98 points, 106 / 186 points, etc. can be used for the face, which is not limited here. For example, when the face is marked with 68 points, the face key points are divided into internal key points and contour key points. The internal key points include eyebrows, eyes, nose, and mouth, a total of 51 key points, and the contour key points include 17 key points. Thus, a face key point image is obtained. The face key point image can include coordinate information or position information of each key point.

[0055] In some examples, pupil key points can be further included in the face key point detection. For eye-related application scenarios, such as face recognition, expression change, eye movement tracking, etc., the accurate positioning of the pupil position is very important. Using two key points to represent the left and right pupils can provide more accurate position information, which helps to perform more detailed expression change analysis and processing later.

[0056] In some examples, the first image may be reconstructed into a 3D face using a 3D face reconstruction technique to obtain a facial key point image of the target object. For example, the 3D coordinates of the facial key points may be extracted using open source plug-ins such as media pipe and facenet. Alternatively, it is understood that the 2D coordinates of the facial key points may also be extracted using opencv, etc., which is not limited here.

[0057] In step 230, audio feature extraction is performed based on the audio data to obtain audio features.

[0058] In the present disclosure, feature extraction can be performed on audio data by any suitable method to obtain audio features. For example, feature extraction can be performed on audio data by Mel Frequency Cepstral Coefficient (MFCC) method to obtain audio features, which can represent the spectral characteristics of audio data.

[0059] In some examples, feature extraction operations on audio data can also be implemented through trained neural networks, such as wav2vec, whisper, etc., which are not limited here.

[0060] In step 240, the first facial key point image and the audio feature are input into a preset key point generation network model to obtain a facial key point image sequence corresponding to the audio data.

[0061] According to some embodiments, the preset key point generation network model includes: a self-attention layer and a cross-attention layer. Inputting the first facial key point image and the audio feature into the preset key point generation network model to obtain a facial key point image sequence corresponding to the audio data includes: inputting the first facial key point image into the self-attention layer to obtain a first image feature; inputting the first image feature and the audio feature into the cross-attention layer to obtain a facial key point image sequence corresponding to the audio data.

[0062] In this embodiment, image features are extracted through a preset self-attention layer, and image features and audio features are fused through a cross-attention layer to obtain a facial key point image sequence.

[0063] According to some embodiments, inputting the first image feature and the audio feature into a preset cross-attention layer to obtain a facial key point image sequence corresponding to the audio data includes: generating a first expression image based on the first facial key point image, wherein the first expression image is generated based on the lines connecting facial key points related to expressions in the first facial key point image; channel-splicing the first expression image and the first target image to obtain a spliced ​​image; performing image feature extraction on the spliced ​​image to obtain a second image feature; and inputting the second image feature, the first image feature and the audio feature into a preset cross-attention layer to obtain a facial key point image sequence corresponding to the audio data.

[0064] In this embodiment, the first expression image generated based on the first target image and the target object are spliced, and the image of the spliced ​​image is further input into the cross-attention layer to more accurately identify the facial position (e.g., human face position) in the first target image and enhance the target facial features, thereby improving the accuracy of the subsequently generated video.

[0065] In some examples, the above-mentioned operation of obtaining the first image features and / or the facial key point image sequence can be implemented through the attention model in the Transformer model to complete the feature embedding of the audio data and the first target image, and can further guide the generation of the facial key point image.

[0066] According to some embodiments, inputting the second image feature, the first image feature and the audio feature into a preset cross-attention layer to obtain a facial key point image sequence corresponding to the audio data includes: inputting the first image feature and the audio feature into a preset first cross-attention layer to obtain a first output feature; inputting the first output feature and the second image feature into a preset second cross-attention layer to obtain a second output feature; and inputting the second output feature and the audio feature into a preset third cross-attention layer to obtain a facial key point image sequence corresponding to the audio data.

[0067] In step 250, based on the facial key point image sequence and the first target image, a video corresponding to the audio data and generated based on the first target image is obtained.

[0068] According to some embodiments, based on the facial key point image sequence and the first target image, obtaining a video corresponding to the audio data generated based on the first target image includes: generating an expression image sequence based on the facial key point image sequence, wherein the expression images in the expression image sequence are generated based on the lines connecting facial key points related to expressions in corresponding facial key point images; and based on the expression image sequence and the first target image, obtaining a video corresponding to the audio data generated based on the first target image.

[0069] Figure 4 FIG. 1 is a schematic diagram of a facial key point image sequence generation model according to an embodiment of the present disclosure. Figure 4As shown, the first target image is subjected to facial key point detection (i.e., key point extraction) to obtain a first facial key point image. Based on the first facial key point image, a first expression image can be obtained by drawing. The first expression image and the first target image are channel-joined to obtain a joint image. The joint image is subjected to image feature extraction through a face positioning module to obtain a second image feature; the first facial key point image is input into a self-attention layer to extract key point features to obtain a first image feature; the output first image feature and the extracted audio feature are input into a first cross-attention layer to calculate the cross-attention score of the key point feature (i.e., the first image feature) and the audio feature to achieve audio feature embedding to obtain a first output feature; the second image feature and the first output feature are input into a second cross-attention layer, and the image feature is further embedded in the same way to strengthen the facial region feature and supplement the identity, environment, and other additional information to obtain a second output feature; the second output feature and the audio feature are input into a third cross-attention layer, and finally the audio feature is embedded again to strengthen the audio driving effect, thereby obtaining a facial key point image sequence corresponding to the audio data. Finally, the corresponding expression images are drawn according to the generated facial key point image sequence to obtain the expression image sequence.

[0070] In some examples, the expression image may include lines connecting the key points of the eyes, mouth, eyebrows, and the facial contour below the eyebrows or eyes. Generally, the nose part hardly changes or changes slightly in the change of facial expressions, so the nose part can be ignored in the expression image, and the nose key points are not connected.

[0071] In the above example of facial key point detection including pupil key points, the expression image may further include pupil key point information, thereby providing more accurate facial position information and facilitating more detailed analysis and processing in the future.

[0072] According to some embodiments, based on the expression image sequence and the first target image, obtaining a video corresponding to the audio data generated based on the first target image includes: performing image feature extraction on the first target image to obtain a third image feature; performing image feature extraction on the expression images in the expression image sequence to obtain a fourth image feature sequence; inputting the third image feature and the fourth image feature sequence into a preset diffusion model to obtain a fifth image feature sequence; and obtaining a video corresponding to the audio data generated based on the first target image based on the fifth image feature sequence.

[0073] In the present disclosure, image feature extraction is the process of extracting useful information from an image. This information is usually expressed in the form of numerical values, vectors or symbols, and is not directly expressed as the image itself. These features can help computers "understand" the content of the image, thereby achieving image recognition and classification. Image features usually include geometric features, shape features, amplitude features, histogram features, and color features.

[0074] In some examples, image features are extracted from each expression image in the expression image sequence to obtain a fourth image feature sequence.

[0075] In some examples, the first target image can be subjected to image feature extraction by an image encoder to obtain a third image feature. An image encoder is a component for processing visual information, which converts image data into a format that can be further analyzed by a model. This usually involves feature extraction, which is to extract useful information from an image, such as color, texture, shape, and object location.

[0076] According to some embodiments, performing image feature extraction on the first target image to obtain a third image feature includes: inputting the first target image into a variational autoencoder to obtain the third image feature; and obtaining a video corresponding to the audio data generated based on the first target image based on the fifth image feature sequence includes: inputting the fifth image feature sequence into a variational autodecoder to obtain a video corresponding to the audio data generated based on the first target image.

[0077] In some examples, image feature extraction can be performed through a neural network based on deep learning, such as a convolutional neural network (CNN). CNN automatically learns features through a multi-layer network without manually setting feature extraction rules. VGG and ResNet are two well-known CNN architectures that extract image features through deep network structures.

[0078] It can be understood that in the embodiments of the present disclosure, image feature extraction can be achieved by any suitable method, which is not limited here.

[0079] According to some embodiments, the diffusion model includes an image generation module and a video synthesis module, wherein inputting the third image feature and the fourth image feature sequence into a preset diffusion model to obtain a fifth image feature sequence includes: inputting the third image feature and the fourth image feature sequence into the image generation module to obtain a sixth image feature sequence, wherein each image feature in the sixth image feature sequence is an image feature generated based on the first target image and corresponding to a corresponding image feature in the fourth image feature sequence; and inputting the sixth image feature sequence into the video synthesis module to obtain the fifth image feature sequence, wherein the video synthesis model is used to achieve the smoothness of the video generated based on the fifth image feature sequence.

[0080] According to some embodiments, performing image feature extraction on expression images in the expression image sequence to obtain a fourth image feature sequence includes: for corresponding expression images in the expression image sequence, inputting the expression images into a preset linear attention network to obtain corresponding image features; and obtaining the fourth image feature sequence based on the corresponding image features corresponding to the expression image sequence.

[0081] Figure 5 FIG. 2 shows a schematic diagram of a video generation model for generating a video according to an embodiment of the present disclosure. Figure 5 As shown, the first target image is input into the image encoder to obtain the third image feature; the expression image sequence is input into the key point encoder to obtain the fourth image feature sequence; the third image feature and the fourth image feature sequence are sequentially input into the image generation module and the video synthesis module in the diffusion model to obtain the fifth image feature sequence. The fifth image feature sequence is passed through the image decoder to obtain a video generated based on the first target image. In some examples, the diffusion model body can adopt the Unet framework, the image generation module is responsible for the target object generation and image background supplement of a single image, and the video synthesis module is responsible for the smoothness and stability of the entire video to be generated.

[0082] According to the embodiments of the present disclosure, Figure 6As shown, a model training method 600 is also provided, including: obtaining an audio frame, a first target image including a target object's face, a first label image, and a second label image (step 610); extracting facial key points based on the first target image to obtain a second facial key point image (step 620); extracting audio features based on the audio frame to obtain audio features (step 630); inputting the second facial key point image and the audio features into a key point generation network model to obtain a third facial key point image corresponding to the audio frame (step 640); extracting the facial key point image and the audio features based on the third facial key point image and the audio features; The first facial key point image is used to determine a first loss value by using a preset first loss function (step 650); based on the third facial key point image and the first target image, a second image corresponding to the audio frame generated based on the first target image is obtained by using a video generation model (step 660); based on the second image and the first image, a second loss value is determined by using a preset second loss function (step 670); based on the first loss value, a parameter value of the key point generation network model is adjusted (step 680); based on the second loss value, a parameter value of the video generation model is adjusted (step 690).

[0083] In an embodiment of the present disclosure, the first label image is a first facial key point image corresponding to the audio frame generated based on the first target image, and the second label image is a first image corresponding to the audio frame generated based on the first target image.

[0084] In the present disclosure, an audio frame can be obtained by framing a segment of audio data, and the audio data refers to digitized voice data. For example, the audio data may be a segment of voice data that needs to be broadcast or live, and the audio data is the audio that a virtual digital person needs to output. For example, the audio data may be voice data generated by reading a paragraph of text; further, the audio data may be voice data generated by reading the paragraph of text with corresponding emotions, such as joy, sadness, anger, etc.

[0085] In an embodiment according to the present disclosure, the self-attention layer and the cross-attention layer can be trained based on the first loss function, and then the video generation model can be trained based on the second loss function. That is, the self-attention layer and the cross-attention layer can be trained separately from the video generation model, or they can be trained together, which is not limited here.

[0086] According to some embodiments, the key point generation network model includes: a self-attention layer and a cross-attention layer. Inputting the second facial key point image and the audio feature into the key point generation network model to obtain a third facial key point image corresponding to the audio frame includes: inputting the second facial key point image into the self-attention layer to obtain a first image feature; and inputting the first image feature and the audio feature into the cross-attention layer to obtain a third facial key point image corresponding to the audio frame.

[0087] According to some embodiments, based on the third facial key point image and the first target image, obtaining, through a video generation model, a second image corresponding to the audio frame generated based on the first target image includes: generating a first expression image based on the third facial key point image, wherein the first expression image is generated based on the lines connecting facial key points related to expression in the third facial key point image; inputting the first expression image and the first target image into the video generation model to obtain a second image corresponding to the audio frame generated based on the first target image. According to some embodiments, inputting the first image feature and the audio feature into a cross-attention layer to obtain a third facial key point image corresponding to the audio frame includes: generating a second expression image based on the second facial key point image, wherein the second expression image is generated based on the lines connecting facial key points related to expression in the second facial key point image; channel-joining the second expression image and the first target image to obtain a joint image; inputting the joint image into a face localization module to obtain a second image feature; and inputting the first image feature, the second image feature and the audio feature into a cross-attention layer to obtain a third facial key point image corresponding to the audio frame.

[0088] According to some embodiments, adjusting the parameter values ​​of the key point generation network model based on the first loss value includes: adjusting the parameter values ​​of the self-attention layer, the cross-attention layer and the face localization module based on the first loss value.

[0089] According to some embodiments, the cross-attention layer includes a first cross-attention layer, a second cross-attention layer, and a third cross-attention layer. Inputting the first image feature and the audio feature into the cross-attention layer to obtain a third facial key point image corresponding to the audio frame includes: inputting the first image feature and the audio feature into the first cross-attention layer to obtain a first output feature; inputting the first output feature and the second image feature into the second cross-attention layer to obtain a second output feature; and inputting the second output feature and the audio feature into the third cross-attention layer to obtain a third facial key point image corresponding to the audio frame.

[0090] According to some embodiments, the video generation model includes a first image encoder, a second image encoder, a diffusion model, and an image decoder. Inputting the first expression image and the first target image into the video generation model to obtain a second image corresponding to the audio frame generated based on the first target image includes: inputting the first target image into the first image encoder to obtain a third image feature; inputting the first expression image into the second image encoder to obtain a fourth image feature; inputting the third image feature and the fourth image feature into the diffusion model to obtain a fifth image feature; and inputting the fifth image feature into the image decoder to obtain a second image corresponding to the audio frame generated based on the first target image.

[0091] According to some embodiments, adjusting the parameter value of the video generation model based on the second loss value comprises: adjusting the parameter values ​​of the second image encoder and the diffusion model based on the second loss value.

[0092] According to some embodiments, the diffusion model includes an image generation module and a video synthesis module, wherein inputting the third image feature and the fourth image feature into the diffusion model to obtain a fifth image feature comprises: inputting the third image feature and the fourth image feature into the image generation module to obtain a sixth image feature, wherein the sixth image feature is an image feature generated based on the first target image and corresponding to the fourth image feature; and inputting the sixth image feature into the video synthesis module to obtain the fifth image feature, wherein the video synthesis model is used to achieve the smoothness of the video when generating the video based on multiple fourth image features.

[0093] According to some embodiments, adjusting the parameter value of the video generation model based on the second loss value includes: adjusting the parameter values ​​of the second image encoder and the image generation module based on the second loss value.

[0094] According to some embodiments, the model training method according to the present disclosure also includes: obtaining multiple second expression images, a second target image including a target object's face, and multiple third label images corresponding one-to-one to the multiple second expression images, wherein each of the multiple second expression images is generated based on the connection lines of facial key points related to the expression in the corresponding facial key point image; inputting the second target image into the first image encoder to obtain a seventh image feature; inputting the multiple second expression images into the second image encoder to obtain a plurality of eighth image features; inputting the seventh image feature and the multiple eighth image features into the image generation module to obtain a plurality of ninth image features, wherein the multiple ninth image features correspond one-to-one to the multiple eighth image features; and inputting the multiple ninth image features into the video synthesis module to obtain a plurality of tenth image features; inputting the multiple tenth image features into the image decoder to obtain a plurality of third images; based on the multiple third images and the multiple third label images, determining a third loss value through a preset second loss function; and adjusting the parameter value of the video synthesis module based on the third loss value.

[0095] Specifically, in some examples, the training of the video generation model can be divided into two stages. That is, in the first stage, the second image encoder and the image generation module are trained based on a single-frame expression image; in the second stage, the video synthesis module is trained based on multiple-frame expression images to improve the fluency of the generated video.

[0096] According to some embodiments, the second image encoder comprises a linear attention network.

[0097] According to some embodiments, the preset first loss function loss1 is determined based on the following formula:

[0098]

[0099] in, represents the coordinate information of the ith facial key point in the first facial key point image, A i represents the coordinate information of the ith facial key point in the third facial key point image, n1 represents the number of facial key points in the first facial key point image and the third facial key point image, B j represents the coordinate information of the jth key point related to the mouth in the third facial key point image, represents the coordinate information of the jth key point related to the mouth in the first facial key point image, n2 represents the number of key points related to the mouth in the first facial key point image and the third facial key point image, and a1 and b1 are both preset hyperparameters.

[0100] According to some embodiments, the preset second loss function loss2 is determined based on the following formula:

[0101]

[0102] in, represents the first image or the corresponding third label image, C represents the second image or the corresponding third image, D represents the mouth mask image, and a2 and b2 are both preset hyperparameters.

[0103] In some examples, when When represents the corresponding third label image among the multiple third label images and C represents the corresponding third image among the multiple third images, the loss value corresponding to each image in the multiple third label images / third images can be calculated by the above formula, and the third loss value is obtained by adding the loss values ​​corresponding to the multiple third label images / third images, so as to adjust the parameter value of the video synthesis module based on the third loss value.

[0104] In this embodiment, in order to improve the clarity and stability of tooth generation, the mouth mask loss and the overall image loss are used to supervise the model training simultaneously. In addition, in some examples, by setting appropriate a2 and b2, the weight of the mouth mask loss can be increased to further improve the clarity and stability of tooth generation.

[0105] In the present disclosure, the model trained by the model training method described in any one of the above embodiments can be used to implement the data processing method described in any one of the embodiments of the present disclosure.

[0106] Here, the embodiments for implementing the model training method and the embodiments for implementing the data processing method, wherein the corresponding operations are similar, will not be described in detail here.

[0107] According to the embodiments of the present disclosure, Figure 7As shown, there is also provided a data processing device 700 for a virtual image, comprising: a first acquisition unit 710, configured to acquire audio data and a first target image including a target object's face; a first key point extraction unit 720, configured to perform facial key point extraction based on the first target image to obtain a first facial key point image; a first feature extraction unit 730, configured to perform audio feature extraction based on the audio data to obtain audio features; a second feature extraction unit 740, configured to input the first facial key point image and the audio features into a preset key point generation network model to obtain a facial key point image sequence corresponding to the audio data; and a first video generation unit 750, configured to obtain a video corresponding to the audio data generated based on the first target image based on the facial key point image sequence and the first target image.

[0108] Here, the operations of the above-mentioned units 710-750 of the data processing device 700 are similar to the operations of the above-described steps 210-250, and are not described in detail here.

[0109] According to the embodiments of the present disclosure, Figure 8As shown, a model training device 800 is also provided, including: a second acquisition unit 810, configured to acquire an audio frame, a first target image including a target object's face, a first label image, and a second label image, wherein the first label image is a first facial key point image corresponding to the audio frame generated based on the first target image, and the second label image is a first image corresponding to the audio frame generated based on the first target image; a first key point extraction unit 820, configured to perform facial key point extraction based on the first target image to obtain a second facial key point image; a third feature extraction unit 830, configured to perform audio feature extraction based on the audio frame to obtain audio features; a fourth feature extraction unit 840, configured to input the second facial key point image and the audio features into a key point generation network model type, to obtain a third facial key point image corresponding to the audio frame; a first loss unit 850, configured to determine a first loss value through a preset first loss function based on the third facial key point image and the first facial key point image; a second video generation unit 860, configured to obtain a second image corresponding to the audio frame generated based on the first target image through a video generation model based on the third facial key point image and the first target image; a second loss unit 870, configured to determine a second loss value through a preset second loss function based on the second image and the first image; a first adjustment unit 880, configured to adjust the parameter value of the key point generation network model based on the first loss value; and a second adjustment unit 890, configured to adjust the parameter value of the video generation model based on the second loss value.

[0110] Here, the operations of the above-mentioned units 810-890 of the model training device 800 are similar to the operations of the steps 610-690 described above, and will not be repeated here.

[0111] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0112] According to an embodiment of the present disclosure, an electronic device, a readable storage medium and a computer program product are also provided.

[0113] refer to Fig. 9, a block diagram of an electronic device 900 that can be used as a server or client of the present disclosure will now be described, which is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0114] like Fig. 9 As shown, the electronic device 900 includes a computing unit 901, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 902 or a computer program loaded from a storage unit 908 into a random access memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the electronic device 900 can also be stored. The computing unit 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.

[0115] Multiple components in the electronic device 900 are connected to the I / O interface 905, including: an input unit 906, an output unit 907, a storage unit 908, and a communication unit 909. The input unit 906 can be any type of device that can input information to the electronic device 900. The input unit 906 can receive input digital or character information and generate key signal input related to user settings and / or function control of the electronic device, and can include but is not limited to a mouse, a keyboard, a touch screen, a track pad, a track ball, a joystick, a microphone, and / or a remote controller. The output unit 907 can be any type of device that can present information, and can include but is not limited to a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 908 can include but is not limited to a disk, an optical disk. The communication unit 909 allows the electronic device 900 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks, and can include but is not limited to a modem, a network card, an infrared communication device, a wireless communication transceiver, and / or a chipset, such as a Bluetooth device, an 802.11 device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.

[0116] The computing unit 901 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 901 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 901 performs the various methods and processes described above, such as method 200 or 600. For example, in some embodiments, method 200 or 600 may be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 908. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 900 via ROM 902 and / or communication unit 909. When the computer program is loaded into RAM 903 and executed by the computing unit 901, one or more steps of the method 200 or 600 described above may be performed. Alternatively, in other embodiments, the computing unit 901 may be configured to execute the method 200 or 600 in any other appropriate manner (eg, by means of firmware).

[0117] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0118] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0119] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0120] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0121] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), the Internet, and a blockchain network.

[0122] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0123] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0124] Although the embodiments or examples of the present disclosure have been described with reference to the accompanying drawings, it should be understood that the above-mentioned methods, systems and devices are merely exemplary embodiments or examples, and the scope of the present invention is not limited by these embodiments or examples, but only by the claims after authorization and their equivalent scope. Various elements in the embodiments or examples can be omitted or replaced by their equivalent elements. In addition, each step can be performed in an order different from that described in the present disclosure. Further, the various elements in the embodiments or examples can be combined in various ways. It is important that with the evolution of technology, many elements described herein can be replaced by equivalent elements that appear after the present disclosure.

Claims

1. A data processing method for a virtual image, comprising: Acquire audio data and a first target image including a face of a target object; Extracting facial key points based on the first target image to obtain a first facial key point image; Performing audio feature extraction based on the audio data to obtain audio features; Inputting the first facial key point image and the audio feature into a preset key point generation network model to obtain a facial key point image sequence corresponding to the audio data; as well as Based on the facial key point image sequence and the first target image, a video corresponding to the audio data generated based on the first target image is obtained.

2. The method of claim 1, wherein: The preset key point generation network model includes: a self-attention layer and a cross-attention layer, wherein the first facial key point image and the audio feature are input into the preset key point generation network model to obtain a facial key point image sequence corresponding to the audio data, comprising: Inputting the first facial key point image into the self-attention layer to obtain a first image feature; and The first image feature and the audio feature are input into the cross attention layer to obtain a facial key point image sequence corresponding to the audio data.

3. The method of claim 1, wherein: Based on the facial key point image sequence and the first target image, obtaining a video corresponding to the audio data generated based on the first target image comprises: generating an expression image sequence based on the facial key point image sequence, wherein the expression images in the expression image sequence are generated based on lines connecting facial key points related to the expression in the corresponding facial key point images; and Based on the expression image sequence and the first target image, a video corresponding to the audio data generated based on the first target image is obtained.

4. The method of claim 2, wherein: Inputting the first image feature and the audio feature into a preset cross attention layer to obtain a facial key point image sequence corresponding to the audio data comprises: generating a first expression image based on the first facial key point image, wherein the first expression image is generated based on lines connecting facial key points related to expression in the first facial key point image; Perform channel stitching on the first expression image and the first target image to obtain a stitched image; performing image feature extraction on the stitched image to obtain a second image feature; and The second image feature, the first image feature and the audio feature are input into a preset cross attention layer to obtain a facial key point image sequence corresponding to the audio data.

5. The method of claim 4, wherein: The cross-attention layer includes a first cross-attention layer, a second cross-attention layer, and a third cross-attention layer, and wherein the second image feature, the first image feature, and the audio feature are input into a preset cross-attention layer to obtain a facial key point image sequence corresponding to the audio data, comprising: Inputting the first image feature and the audio feature into a preset first cross attention layer to obtain a first output feature; Inputting the first output feature and the second image feature into a preset second cross attention layer to obtain a second output feature; and The second output feature and the audio feature are input into a preset third cross-attention layer to obtain a facial key point image sequence corresponding to the audio data.

6. The method of claim 3, wherein: Based on the expression image sequence and the first target image, obtaining a video corresponding to the audio data generated based on the first target image includes: Performing image feature extraction on the first target image to obtain a third image feature; Extracting image features from the expression images in the expression image sequence to obtain a fourth image feature sequence; Inputting the third image feature and the fourth image feature sequence into a preset diffusion model to obtain a fifth image feature sequence; and A video corresponding to the audio data and generated based on the first target image is obtained based on the fifth image feature sequence.

7. The method of claim 6, wherein: The diffusion model includes an image generation module and a video synthesis module, wherein inputting the third image feature and the fourth image feature sequence into a preset diffusion model to obtain a fifth image feature sequence includes: inputting the third image feature and the fourth image feature sequence into the image generation module to obtain a sixth image feature sequence, wherein the image features in the sixth image feature sequence are image features generated based on the first target image and corresponding to the corresponding image features in the fourth image feature sequence; and The sixth image feature sequence is input into the video synthesis module to obtain the fifth image feature sequence, wherein the video synthesis model is used to achieve the smoothness of the video generated based on the fifth image feature sequence.

8. The method according to claim 6 or 7, wherein: Extracting image features from the first target image to obtain a third image feature includes: inputting the first target image into a variational autoencoder to obtain the third image feature; and Obtaining a video corresponding to the audio data generated based on the first target image based on the fifth image feature sequence includes: inputting the fifth image feature sequence into a variational self-decoder to obtain a video corresponding to the audio data generated based on the first target image.

9. The method according to claim 6 or 7, wherein: Extracting image features from the expression images in the expression image sequence to obtain a fourth image feature sequence includes: For a corresponding expression image in the expression image sequence, inputting the expression image into a preset linear attention network to obtain corresponding image features; and The fourth image feature sequence is obtained based on the corresponding image features corresponding to the expression image sequence.

10. A model training method, comprising: Acquire an audio frame, a first target image including a target object's face, a first label image, and a second label image, wherein the first label image is a first facial key point image corresponding to the audio frame generated based on the first target image, and the second label image is a first image corresponding to the audio frame generated based on the first target image; Extracting facial key points based on the first target image to obtain a second facial key point image; Performing audio feature extraction based on the audio frame to obtain audio features; Inputting the second facial key point image and the audio feature into a key point generation network model to obtain a third facial key point image corresponding to the audio frame; and Based on the third facial key point image and the first facial key point image, determining a first loss value by using a preset first loss function; Based on the third facial key point image and the first target image, obtaining, through a video generation model, a second image corresponding to the audio frame and generated based on the first target image; Based on the second image and the first image, determining a second loss value by using a preset second loss function; adjusting a parameter value of the key point generation network model based on the first loss value; and The parameter values ​​of the video generation model are adjusted based on the second loss value.

11. The method of claim 10, wherein: The key point generation network model includes: a self-attention layer and a cross-attention layer, wherein the second facial key point image and the audio feature are input into the key point generation network model to obtain a third facial key point image corresponding to the audio frame, comprising: Inputting the second facial key point image into the self-attention layer to obtain a first image feature; and The first image feature and the audio feature are input into the cross attention layer to obtain a third facial landmark image corresponding to the audio frame.

12. The method of claim 10, wherein: Based on the third facial key point image and the first target image, obtaining, by a video generation model, a second image corresponding to the audio frame and generated based on the first target image comprises: Generating a first expression image based on the third facial key point image, wherein the first expression image is generated based on the lines connecting facial key points related to expression in the third facial key point image; The first expression image and the first target image are input into the video generation model to obtain a second image corresponding to the audio frame that is generated based on the first target image.

13. The method of claim 11, wherein: Inputting the first image feature and the audio feature into a cross attention layer to obtain a third facial key point image corresponding to the audio frame includes: generating a second expression image based on the second facial key point image, wherein the second expression image is generated based on lines connecting facial key points related to expression in the second facial key point image; Perform channel stitching on the second expression image and the first target image to obtain a stitched image; Inputting the stitched image into a face positioning module to obtain a second image feature; and The first image feature, the second image feature, and the audio feature are input into a cross attention layer to obtain a third facial landmark image corresponding to the audio frame.

14. The method of claim 13, wherein: Adjusting the parameter values ​​of the key point generation network model based on the first loss value includes: adjusting the parameter values ​​of the self-attention layer, the cross-attention layer and the face positioning module based on the first loss value.

15. The method according to claim 13 or 14, wherein: The cross-attention layer includes a first cross-attention layer, a second cross-attention layer, and a third cross-attention layer, and wherein inputting the first image feature and the audio feature into the cross-attention layer to obtain a third facial key point image corresponding to the audio frame includes: Inputting the first image feature and the audio feature into a first cross attention layer to obtain a first output feature; Inputting the first output feature and the second image feature into a second cross attention layer to obtain a second output feature; and The second output feature and the audio feature are input into a third cross-attention layer to obtain a third facial landmark image corresponding to the audio frame.

16. The method of claim 12, wherein: The video generation model includes a first image encoder, a second image encoder, a diffusion model, and an image decoder, and wherein the first expression image and the first target image are input into the video generation model to obtain a second image corresponding to the audio frame generated based on the first target image, comprising: Inputting the first target image into the first image encoder to obtain a third image feature; Inputting the first expression image into the second image encoder to obtain a fourth image feature; inputting the third image feature and the fourth image feature into the diffusion model to obtain a fifth image feature; and The fifth image feature is input into the image decoder to obtain a second image corresponding to the audio frame generated based on the first target image.

17. The method of claim 16, wherein: Adjusting the parameter value of the video generation model based on the second loss value includes: adjusting the parameter values ​​of the second image encoder and the diffusion model based on the second loss value.

18. The method according to claim 16 or 17, wherein: The diffusion model includes an image generation module and a video synthesis module, wherein the third image feature and the fourth image feature are input into the diffusion model to obtain the fifth image feature, comprising: Inputting the third image feature and the fourth image feature into the image generation module to obtain a sixth image feature, wherein the sixth image feature is an image feature generated based on the first target image and corresponding to the fourth image feature; and The sixth image feature is input into the video synthesis module to obtain the fifth image feature, wherein the video synthesis model is used to achieve the smoothness of the video when the video is generated based on multiple fourth image features.

19. The method of claim 18, wherein: Adjusting the parameter value of the video generation model based on the second loss value includes: adjusting the parameter values ​​of the second image encoder and the image generation module based on the second loss value.

20. The method of any one of claims 16 to 19, further comprising: Acquire a plurality of second expression images, including a second target image of a target object's face, and a plurality of third label images corresponding one-to-one to the plurality of second expression images, wherein the second expression images in the plurality of second expression images are generated based on lines connecting facial key points related to the expression in corresponding facial key point images; Inputting the second target image into the first image encoder to obtain a seventh image feature; Inputting the plurality of second expression images into the second image encoder to obtain a plurality of eighth image features; Inputting the seventh image feature and the plurality of eighth image features into the image generation module to obtain a plurality of ninth image features, wherein the plurality of ninth image features correspond one-to-one to the plurality of eighth image features; and Inputting the plurality of ninth image features into the video synthesis module to obtain a plurality of tenth image features; inputting the plurality of tenth image features into the image decoder to obtain a plurality of third images; Based on the plurality of third images and the plurality of third label images, determining a third loss value by using a preset second loss function; and The parameter value of the video synthesis module is adjusted based on the third loss value.

21. The method of any one of claims 16-17 and 20, wherein: The second image encoder comprises a linear attention network.

22. The method of claim 10 or 14, wherein: The preset first loss function loss1 is determined based on the following formula: in, represents the coordinate information of the ith facial key point in the first facial key point image, A i represents the coordinate information of the ith facial key point in the third facial key point image, n1 represents the number of facial key points in the first facial key point image and the third facial key point image, B j represents the coordinate information of the jth key point related to the mouth in the third facial key point image, represents the coordinate information of the jth key point related to the mouth in the first facial key point image, n2 represents the number of key points related to the mouth in the first facial key point image and the third facial key point image, and a1 and b1 are both preset hyperparameters.

23. The method of claim 10 or 17 or 20, wherein: The preset second loss function loss2 is determined based on the following formula: in, represents the first image or the corresponding third label image, C represents the second image or the corresponding third image, D represents the mouth mask image, and a2 and b2 are both preset hyperparameters.

24. A data processing device for a virtual image, comprising: A first acquisition unit configured to acquire audio data and a first target image including a face of a target object; A first key point extraction unit, configured to extract facial key points based on the first target image to obtain a first facial key point image; A first feature extraction unit, configured to perform audio feature extraction based on the audio data to obtain audio features; a second feature extraction unit configured to input the first facial key point image and the audio feature into a preset key point generation network model to obtain a facial key point image sequence corresponding to the audio data; and ; The first video generating unit is configured to obtain, based on the facial key point image sequence and the first target image, a video corresponding to the audio data generated based on the first target image.

25. A model training device, comprising: a second acquisition unit, configured to acquire an audio frame, a first target image including a face of a target object, a first label image, and a second label image, wherein the first label image is a first facial key point image corresponding to the audio frame generated based on the first target image, and the second label image is a first image corresponding to the audio frame generated based on the first target image; A first key point extraction unit, configured to extract facial key points based on the first target image to obtain a second facial key point image; A third feature extraction unit is configured to perform audio feature extraction based on the audio frame to obtain an audio feature; a fourth feature extraction unit, configured to input the second facial key point image and the audio feature into a key point generation network model to obtain a third facial key point image corresponding to the audio frame; A first loss unit, configured to determine a first loss value by a preset first loss function based on the third facial key point image and the first facial key point image; A second video generating unit is configured to obtain, based on the third facial key point image and the first target image, a second image corresponding to the audio frame generated based on the first target image through a video generation model; A second loss unit, configured to determine a second loss value by a preset second loss function based on the second image and the first image; A first adjustment unit, configured to adjust a parameter value of the key point generation network model based on the first loss value; and A second adjustment unit is configured to adjust the parameter value of the video generation model based on the second loss value.

26. An electronic device comprising: at least one processor; as well as a memory communicatively coupled to the at least one processor; in The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 23.

27. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-23.

28. A computer program product comprising a computer program, wherein: The computer program implements the method of any one of claims 1 to 23 when executed by a processor.

Citation Information

Patent Citations

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

    CN113379877A

  • Key point detection method and device, neural network, electronic equipment and storage medium

    CN115063598A

  • Video generation method and device, computer equipment and storage medium

    CN115100325A

  • Digital face generation method and system based on audio and image

    CN117115310A

  • Digital human video generation method and device, equipment and medium

    CN118842975A

Cited By

  • Digital human video generation method and system based on audio driving

    CN120602740A