Animation synthesis method and device, animation synthesis model training method and device
By extracting audio and image features and combining them with a generative adversarial network, the problem of stiff images and asynchronous lip sounds in virtual human technology is solved, the synchronous actions and style of virtual characters are unified, and the interaction of virtual humans in a variety of application scenarios is improved. experience.
Patent Information
- Application Number
- CN202310440855.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-21
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2043-04-21
AI Technical Summary
Existing virtual human technology has problems such as stiff images, out-of-sync lip sounds, rough images, and unclear textures, making virtual humans unrealistic and difficult to interact effectively in a variety of application scenarios.
By obtaining audio files and image files, we extract voice features, facial features and identity features, and combine them with a generative adversarial network to generate synchronized and stylized animations to ensure that the facial movements of virtual characters are consistent with voice information, and integrate identity features to unify the character style. .
It achieves improved authenticity of lip synchronization and facial movements of virtual characters, ensures the controllability and interactive experience of virtual characters in a variety of scenes, and avoids style differences in animation sequence frame images.
Smart Images

Figure CN116433807B
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence technology, specifically computer vision, augmented reality, virtual reality, deep learning and other technical fields, and can be applied to scenes such as the metaverse and digital humans. It specifically relates to an animation synthesis method and device, an animation synthesis model training method and device, an electronic device, a computer-readable storage medium and a computer program product. Background Art
[0002] Artificial intelligence (AI) is a discipline that studies how computers can simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.). It includes both hardware-level and software-level technologies. AI hardware technologies generally include technologies such as sensors, dedicated AI chips, cloud computing, distributed storage, and big data processing; AI 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, and knowledge graph technology.
[0003] With the booming development of artificial intelligence and big data technology, AI has or is infiltrating all aspects of life. As the core part of the metaverse, virtual human technology is an important sub-field of AI technology. It uses AI technology, especially deep learning technology, to construct a false human image. At the same time, it hopes that this virtual human can speak, nod, gesture and other actions vividly like a human. At the same time, it is combined with life fields such as finance, transportation, education and retail, so that virtual humans can interact with real people intelligently. From this, virtual object services such as digital intelligent customer service virtual humans, virtual hosts, virtual teachers, virtual idols and virtual tour guides can be derived. It has great development potential and will have a large market space in the future.
[0004] However, there are still many difficulties in virtual human technology. The technology is not mature enough and many aspects need to be overcome urgently, such as stiff image, lip sound asynchrony, rough image, unclear texture, and overall unreality.
[0005] The methods described in this section are not necessarily methods that have been previously conceived or employed. Unless otherwise indicated, it should not be assumed that any method described in this section is considered to be prior art simply because it is included in this section. Similarly, unless otherwise indicated, the issues mentioned in this section should not be considered to have been recognized in any prior art. Summary of the invention
[0006] The present disclosure provides an animation synthesis method and device, an animation synthesis model training method and device, an electronic device, a computer-readable storage medium, and a computer program product.
[0007] According to one aspect of the present disclosure, there is provided an animation synthesis method, comprising: obtaining an audio file and an image file, wherein the audio file includes voice information and the image file includes a facial image of a target person; based on the audio file, obtaining voice features; based on the image file, respectively obtaining facial features and identity features of the target person in the image file; and generating a synthesized animation about the target person based on the voice features, facial features and identity features, wherein the identity features are used to determine the appearance style of the target person in the synthesized animation.
[0008] According to another aspect of the present disclosure, a training method for an animation synthesis model is provided, comprising: obtaining a sample data set, wherein each sample data in the sample data set includes a sample audio file, a sample image file, and a real animation corresponding to the sample audio file and the sample image file, the sample audio file includes voice information, and the sample image file includes a facial image of a sample character; based on the sample audio file in each sample data, obtaining sample voice features; based on the sample image file in each sample data, respectively obtaining sample facial features and sample identity features of the sample character in the sample image file; inputting the sample voice features, the sample facial features, and the sample identity features into the animation synthesis model to generate a predicted animation about the sample character; calculating a loss value based on the difference between the generated predicted animation and the real animation in the sample data; and adjusting the parameters of the animation synthesis model based on the loss value.
[0009] According to another aspect of the present disclosure, an animation synthesis device is provided, including: a file acquisition unit, configured to acquire an audio file and an image file, wherein the audio file includes voice information and the image file includes a facial image of a target person; a first feature acquisition unit, configured to acquire voice features based on the audio file; a second feature acquisition unit, configured to acquire facial features and identity features of the target person in the image file, respectively, based on the image file; and a generation unit, configured to generate a synthesized animation about the target person based on the voice features, facial features and identity features, wherein the identity features are used to determine the appearance style of the target person in the synthesized animation.
[0010] According to another aspect of the present disclosure, a training device for an animation synthesis model is provided, comprising: a sample acquisition unit, configured to acquire a sample data set, wherein each sample data in the sample data set includes a sample audio file, a sample image file, and a real animation corresponding to the sample audio file and the sample image file, the sample audio file includes voice information, and the sample image file includes a facial image of a sample character; a first sample feature acquisition unit, configured to acquire sample voice features based on the sample audio file in each sample data; a second sample feature acquisition unit, configured to acquire sample facial features and sample identity features of the sample character in the sample image file, respectively, based on the sample image file in each sample data; a prediction generation unit, configured to input the sample voice features, the sample facial features, and the sample identity features into the animation synthesis model to generate a predicted animation about the sample character; a calculation unit, configured to calculate a loss value based on the difference between the generated predicted animation and the real animation in the sample data; and an adjustment unit, configured to adjust the parameters of the animation synthesis model based on the loss value.
[0011] 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; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above method.
[0012] According to yet another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable a computer to execute the above method.
[0013] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, wherein the computer program executes the above method when a processor executes the computer program.
[0014] According to one or more embodiments of the present disclosure, additional identity features of a person can be obtained from an image file, and the identity features mainly include the person's appearance information, such as eye size, eye spacing, tooth color, etc. The identity features of the person can be subsequently integrated into the generated synthetic animation, and the person in the synthetic animation can be stylized, thereby making the facial image style of the person in the synthetic animation unified, avoiding style differences in each animation sequence frame image.
[0015] 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
[0016] 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.
[0017] 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;
[0018] Figure 2 A flowchart of an animation synthesis method according to an embodiment of the present disclosure is shown;
[0019] Figure 3 A flow chart showing a method for acquiring facial features and identity features of a target person according to an embodiment of the present disclosure;
[0020] Figure 4 A flowchart of a method for outputting a synthetic animation using an animation synthesis model according to an embodiment of the present disclosure is shown;
[0021] Figure 5 A flowchart of a method for training an animation synthesis model according to an embodiment of the present disclosure is shown;
[0022] Figure 6 A structural block diagram of an animation synthesis model according to an embodiment of the present disclosure is shown;
[0023] Figure 7 A flow chart showing a method for calculating a synchronization loss value component according to an embodiment of the present disclosure;
[0024] Figure 8 A flowchart of a method for calculating a sequence loss value component according to an embodiment of the present disclosure is shown;
[0025] Fig. 9 A structural block diagram of an animation synthesis device according to an embodiment of the present disclosure is shown;
[0026] Fig.10 A structural block diagram of a training device for an animation synthesis model according to an embodiment of the present disclosure is shown; and
[0027] Fig.11 A structural block diagram of an exemplary electronic device that can be used to implement the embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0028] 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.
[0029] 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, temporal 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.
[0030] 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.
[0031] The embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.
[0032] 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.
[0033] In an embodiment of the present disclosure, the server 120 may run one or more services or software applications that enable execution of the animation synthesis method and the training method of the animation synthesis model.
[0034] 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.
[0035] 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.
[0036] The user may use client devices 101, 102, 103, 104, 105 and / or 106 to upload the audio files and image files to be synthesized. The client device may provide an interface that enables the 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.
[0037] 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.
[0038] 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.
[0039] 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.
[0040] 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.
[0041] In some embodiments, the server 120 may include one or more applications to analyze and merge data feeds and / or event updates received from users of the client devices 101, 102, 103, 104, 105, and / or 106. The 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 the client devices 101, 102, 103, 104, 105, and / or 106. In some embodiments, the server 120 may include one or more applications, such as applications for services such as target detection and recognition, signal conversion, etc. based on data such as images, videos, voices, texts, digital signals, etc., to process task requests such as voice interaction, text classification, image recognition, or key point detection received from the client devices 101, 102, 103, 104, 105, and / or 106. The server may train a neural network model using training samples according to a specific deep learning task, and may test each subnetwork in a supernetwork module of the neural network model, and determine the structure and parameters of the neural network model for performing the deep learning task according to the test results of each subnetwork. Various data can be used as training sample data for deep learning tasks, such as image data, audio data, video data or text data, etc. After the training of the neural network model is completed, the server 120 can also automatically search for the optimal model structure through model search technology to perform the corresponding task.
[0042] 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.
[0043] 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 image 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.
[0044] 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.
[0045] Figure 1 The system 100 may be configured and operated in various ways to enable the application of various methods and apparatuses described in the present disclosure.
[0046] Figure 2 FIG. 2 shows a flow chart of an animation synthesis method 200 implemented according to the present disclosure. Figure 2 As shown, the method 200 includes:
[0047] Step 210, obtaining an audio file and an image file, wherein the audio file includes voice information, and the image file includes a facial image of the target person;
[0048] Step 220, obtaining speech features based on the audio file;
[0049] Step 230, based on the image file, respectively obtaining facial features and identity features of the target person in the image file; and
[0050] Step 240, generating a synthetic animation about the target person based on the voice features, facial features and identity features, wherein the identity features are used to determine the appearance style of the target person in the synthetic animation.
[0051] The method disclosed in the present invention can obtain additional identity features of a person from an image file, and the identity features mainly include the person's appearance information, such as eye size, eye spacing, tooth color, etc. The identity features of the person are subsequently integrated into the generated synthetic animation, so that the person in the synthetic animation can be stylized. This makes the facial image style of the person in the synthetic animation uniform, avoiding style differences in each animation sequence frame image.
[0052] In step 210, the audio file may be pre-recorded voice data for a certain text. The text includes, but is not limited to, an introduction to a certain service or product, a conversation with other characters, etc. The image file may be a video shot for the same target person or a static image of the person. In the case where the image file is a video, the video shows the continuous facial movements of the target person, which mainly includes the facial image of the person. In order to achieve a better effect of subsequent extraction of facial features, the image file may mainly focus on the face of the person. The image file may also be a video image of a person reciting a certain text, so as to facilitate the subsequent acquisition of the facial features of the person when reciting, but the text recited by the target person in the image file may be different from the text recorded in the audio file.
[0053] In step 220, the speech feature (hereinafter referred to as audio_feat) may be a Mel-spectrogram feature of the speech. For each frame of the audio file, the dimension of the speech feature may be (1, 80, 16).
[0054] In the related art, the common animation synthesis method is to use speech features to drive a static facial image, for example, only obtain facial features from a static image. However, this method cannot meet the requirements of virtual human scenes because the generated animation cannot obtain the style of the static facial image, and thus cannot transfer the style characteristics of the character to these application scenes. In step 230, multiple frames of images in the image can be used as the driven template. Based on this, a general 0.2 second total of 5 frames can be used as the input unit, for example, 5 consecutive frames of facial images are selected for subsequent feature extraction.
[0055] In step 230, the facial features of the target person (hereinafter referred to as face_feat) mainly include features around the lips in the facial image, such as the lip muscle movements of the person when speaking, the degree of opening and closing of the lips or teeth, etc. The identity features of the target person mainly include the appearance information of the person, such as eye size, eye distance, tooth color, etc. The identity features can be determined, for example, based on the positions of several key points on the facial image.
[0056] The voice information in the audio file and the facial image in the final synthesized animation should be synchronized to ensure that the lip movements of the character in the final synthesized animation match the voice information. Therefore, in the final generated animation, the facial features and voice features should be close in the vector space. The identity features of the character can be separate features, which are completely decoupled from face_feat and audio_feat.
[0057] In step 240, a final synthetic animation can be generated based on the above-mentioned voice features, facial features and identity features, and the character in the final synthetic animation has the same style as the target character in the image file. In addition, the synthetic animation also includes the voice information in the audio file, so that when the facial image of the target character is played, the above-mentioned voice information is also played synchronously to give the user a real interactive experience with the virtual character.
[0058] Figure 3 FIG. 3 is a flow chart showing a method 300 for acquiring facial features and identity features of a target person according to an embodiment of the present disclosure. The above-mentioned image file includes a video file showing continuous facial movements of the target person, such as Figure 3 As shown, the method 300 includes:
[0059] Step 310, based on the video file, obtaining a first image set and a second image set, wherein the first image set is generated according to a continuous multi-frame image in the video file, and the second image set includes a random multi-frame image in the video file;
[0060] Step 320, acquiring facial features according to the first image set; and
[0061] Step 330: Acquire identity features according to the second image set.
[0062] As mentioned above, face_feat needs to be synchronized with audio_feat, and face_feat needs to have lip movement information. Therefore, facial features can be generated from a continuous multi-frame image, that is, the first image set, so that the extracted facial features contain information about the time span, so as to facilitate the subsequent more vivid simulation of lip movements.
[0063] The identity feature only focuses on the character's style, so there is only lip shape information, no lip movement information. When using the model to generate synthetic animation, the model can learn the lip shape features from the identity features without introducing lip movement information into the generated results. The lip movement will depend on the above face_feat and audio_feat, which together determine what kind of lip movement animation should be driven.
[0064] Therefore, the second image set used to extract identity features can be random, so that the model can only obtain lip shape information, such as what the person's teeth, lip color, and face should look like, but cannot obtain lip movement information. This completely decouples the lip movement information from the identity features, thereby avoiding interference of the lip movement information on the identity features.
[0065] In addition, the image in the second image set can be a complete facial image. Those skilled in the art can understand that in the face recognition task, only a complete face is needed to identify the identity of the current face. Therefore, the complete facial image in the second image set has strong appearance information and identity distinguishing characteristics. In other words, based on the appearance and other features of the person in the image in the second image set, the identity of the person can be determined, and the identity features extracted based on the second image set are the style features of the target person.
[0066] In this embodiment, identity features are generated from random multi-frame images, so that the extracted identity features can better reflect the character style. Facial features are generated from continuous multi-frame images, so that the extracted facial features contain information about the time span, which is more suitable for generating lip animations, making subsequent synthesis more accurate.
[0067] In some embodiments, the first image set is obtained by: for each frame of the continuous multiple frames of images in the image file, extracting the image of the area around the lips in the facial image of that frame; and taking the image of the area around the lips in the continuous multiple frames of images as the first image set.
[0068] For the first image set, the area around the lips in the image (e.g., the chin area of the face) can be masked to obtain the image of this part. The speech feature drive only modifies the face area mainly composed of the lip shape and the chin. Therefore, the trained model can only generate the face image in the mask area while ensuring that the non-masked area remains consistent. In this embodiment, since the synthesized animation is mainly the action around the lips, the facial features can be extracted only from the image of the area around the lips, thereby reducing the workload of the relevant feature encoder.
[0069] In some embodiments, voice features, facial features, and identity features may be input into an animation synthesis model, and the output synthesized animation may be obtained through the animation synthesis model. Figure 4 FIG. 4 is a flow chart showing a method 400 for outputting a synthesized animation using an animation synthesis model according to an embodiment of the present disclosure. Figure 4 As shown, the method 400 includes:
[0070] Step 410, generating lip movement animation according to the voice features and facial features; and
[0071] Step 420, using a generative adversarial network, transfers the identity features to the lip movement animation to generate a synthetic animation of the target person.
[0072] In step 410, the audio file is passed through the model's speech feature encoder to generate a high-order semantic feature audio_feat, whose dimension can be, for example, 512. Similarly, the first image set is passed through the model's facial feature encoder to obtain a high-order semantic feature face_feat, whose dimension is also 512. Both audio_feat and face_feat contain lip movement features, and we can combine the two features to generate a lip movement animation containing lip movement information.
[0073] In step 420, as described above, the identity features include high-level features such as eyes, eyebrows, and contours of a human face. The identity features can be obtained by mapping the facial images in the second image set to a high-order latent space, and the identity features are injected into the decoder of the animation synthesis model. The identity features are passed through the style-based generative adversarial network (StyleGAN) of the animation synthesis model to generate a facial animation sequence with lip movement animation. In this embodiment, the stylization of the generated animation is achieved by migrating the identity features containing the appearance style information to the lip movement animation through StyelGAN.
[0074] In some embodiments, the animation synthesis model has a first hyperparameter and a second hyperparameter, and generating a lip movement animation includes: generating a lip movement animation according to speech features and facial features and the set first hyperparameter and second hyperparameter, wherein the first hyperparameter represents the influence weight of the speech features on the generated synthetic animation, and the second hyperparameter represents the influence weight of the facial features on the generated synthetic animation, according to the speech features and facial features.
[0075] In this embodiment, the controllability of the facial style and voice style of the target person can be achieved by setting the hyperparameters of the model. Hyperparameters refer to parameters that are pre-set in the model, and the hyperparameters will not change during the training process of the model. In order to achieve controllability, a hyperparameter w can be introduced to adjust the combination of the two styles, and w can be the combination ratio of the two styles. For example, w=0.5 means that the combination ratio is 1:1, and the importance of facial style and voice style is the same. When more attention is paid to the voice style characteristics, w can be increased, and the speaking style of the synthesized animation is more flexible and changeable in voice style; similarly, w is reduced to enhance the facial style characteristics, and the speaking style of the synthesized animation is stronger in facial style. However, when w is very small, the driving ability of the voice feature becomes weaker, and when w=0, the synthesized animation will lose the ability to "speak".
[0076] In order to avoid the above problems, the above lantent layers can be set to multiple, corresponding to the influence from shallow to high layers in stylgan. In the animation synthesis task, the formation of lip animation is mainly concentrated in the first few layers, while the latter layers mainly affect the speaking style. Therefore, the first few layers can be injected into audio_feat, and the last few layers can be injected into identity features. Finally, we realize the stylization of the synthesized animation on the basis of ensuring the realization of lip animation. Through the above method, the stylization of the synthetic animation in face and voice is realized, and it is controllable.
[0077] Figure 5 A flowchart of a method 500 for training an animation synthesis model according to an embodiment of the present disclosure is shown. Figure 6 FIG. 4 shows a structural block diagram of an animation synthesis model according to an embodiment of the present disclosure. Figure 5 As shown, the method 500 includes:
[0078] Step 510, obtaining a sample data set, wherein each sample data in the sample data set includes a sample audio file, a sample image file, and a real animation corresponding to the sample audio file and the sample image file, the sample audio file includes voice information, and the sample image file includes a facial image of a sample person;
[0079] Step 520, obtaining sample speech features based on the sample audio files in each sample data;
[0080] Step 530, based on the sample image file in each sample data, respectively obtain the sample facial features and sample identity features of the sample person in the sample image file;
[0081] Step 540, inputting the sample speech features, the sample facial features and the sample identity features into an animation synthesis model to generate a predicted animation about the sample character;
[0082] Step 550, calculating a loss value according to the difference between the generated predicted animation and the real animation in the sample data; and
[0083] Step 560, adjusting the parameters of the animation synthesis model according to the loss value.
[0084] In step 510, the real animation can be a real video of the sample character including voice, or a virtual video animation synthesized later. In the above real animation, the facial image of the sample character and its lip movements are consistent with the voice information contained in the sample audio file. For example, if the voice information contained in the sample audio file is "Hello!", then the lip movements of the sample character shown in the real animation are the corresponding movements when the voice "Hello!" is uttered.
[0085] In steps 520 and 530, the method of obtaining the sample voice features, the sample facial features of the person, and the sample identity features can refer to steps 220 and 230 in method 200, which will not be repeated here. Figure 6 As shown, the animation synthesis model also includes a facial feature encoder, and the sample facial features include low-order facial features. Based on the sample image file in each sample data, the sample facial features of the sample characters in the sample image file are obtained respectively, including: the facial feature encoder uses skip connections (skip-connection) to obtain low-order facial features from the lower layers. It is difficult to generate high-quality facial images with only the high-order features of face_feat, so low-order features can be introduced by skip-connection, so that the model training is faster and the generated faces are clearer and more vivid.
[0086] In terms of using the model to generate predicted animations, a generative adversarial network can also be used. Specifically, the animation synthesis model includes a generative adversarial network, and the sample speech features, sample facial features, and sample identity features are input into the animation synthesis model to generate a predicted animation about a sample character, including: generating a predicted lip movement animation based on the sample speech features and the sample facial features; using a generative adversarial network, the sample identity features are transferred to the predicted lip movement animation to generate a predicted animation about the sample character. The specific content can be referred to the relevant description in method 400, which will not be repeated here.
[0087] The following will describe in detail how to calculate the loss value (Loss) in step 550. Figure 6 As shown in the figure, first, we can introduce the face reconstruction loss value component to repair the low-frequency information of the image; at the same time, we can introduce the content-aware loss value component to enhance the high-order information of the image; and use the generative adversarial loss component to improve the image clarity.
[0088] In some embodiments, Figure 6 As shown, the animation synthesis model also includes a synchronization detection network (SyncNet), and the loss value includes a synchronization loss value component. Figure 7 FIG. 7 is a flow chart showing a method 700 for calculating a synchronization loss value component according to an embodiment of the present disclosure. Figure 7 As shown, the method 700 includes:
[0089] Step 710, respectively obtaining facial features and speech features in the predicted animation;
[0090] Step 720, using a synchronization detection network to detect the degree of synchronization between facial features and speech features in the predicted animation; and
[0091] Step 730: determine a synchronization loss value component based on the detected synchronization degree.
[0092] In step 710, the predicted animation can be divided into an audio part and a video part, so as to obtain facial features and voice features respectively. The above method of obtaining facial features and voice features can refer to the above description (for example: method 300), which will not be repeated here. In step 720, the synchronization detection network can determine whether the facial features and voice features are synchronized by calculating the distance between the facial features and voice features in the feature space. The above degree of synchronization can be represented by a number between "1" and "0", "1" can represent complete synchronization; "0" can represent complete synchronization.
[0093] In this embodiment, a synchronization loss value component (sync_loss) can be introduced to generate lip movement animation in a supervised manner. The animation synthesis model is guided to learn the lip movement rules through the synchronization detection network SyncNet. SyncNet scores the generated predicted synthetic animation. If the synchronization between the facial image and the voice information is good, the score is high, otherwise the score is low. The lower the score, the greater the sync_loss, thereby guiding the model to train and optimize in the direction of low total loss value. By introducing sync_loss, ideal lip movement synchronization can be obtained. This method has advantages in making the model have lip and sound synchronization and can obtain high-precision lip and sound synchronization indicators.
[0094] In some embodiments, Figure 6 As shown, the animation synthesis model also includes a discriminator network (D), and the loss value includes a sequence loss value component. Figure 8 FIG. 8 is a flowchart of a method 800 for calculating a sequence loss value component according to an embodiment of the present disclosure. Figure 8 As shown, the method 800 includes:
[0095] Step 810, using at least one frame of image in the real animation to replace at least one corresponding frame of image in the predicted animation to obtain the animation to be detected; and
[0096] Step 820, using a discriminator network to determine whether the multiple frames of images in the animation to be detected are multiple frames of images in the same animation sequence; and
[0097] Step 830, determining the sequence loss value component based on the judgment result.
[0098] In this embodiment, a sequence loss value component (sequence_loss) can be introduced to maintain the style consistency and stability of the generated synthetic animation. For example, in step 810, it can be assumed that the real animation has 5 frames of real facial images gt_faces, and the predicted animation has 5 generated facial images g_faces, and then a facial image is selected from gt_face to replace the corresponding facial image in g_faces for adversarial training. During the training process, the replaced facial image plays a key role, which guides the model to generate 5 facial images with consistent style, maintains the unified style, and plays a role in temporal style coherence.
[0099] The final total loss value can be expressed as follows:
[0100]
[0101] in,
[0102]
[0103]
[0104]
[0105]
[0106]
[0107]
[0108] Formula (2) and Formula (3) respectively represent the reconstruction loss value components and content-aware loss value component The reconstruction loss component is based on the image I in the predicted animation gThe difference between the image I and the real image I is calculated. The calculation of the content-aware loss value component is determined by the VGG network.
[0109] In formula (4), I g Denotes the facial image in the predicted animation; D denotes the discriminator, which is used to score a sequence of facial images to evaluate whether the sequence is an image sequence of the same style. Represents the loss value component determined based on the style consistency of multiple frames in the predicted animation; It represents the loss value component determined according to the style consistency of multiple frames of images in the animation to be detected (for example, the animation to be detected obtained according to the above step 810) during the adversarial training process.
[0110] In formula (5), Dist(a,v) is the synchronous detection result calculated in the synchronous detection network, a is the speech feature, and v is the facial feature. Dist(a,v) represents the distance between the speech feature and the facial feature in the feature space. In formula (6), represents the synchronization loss value component, N represents the number of speech features and facial features, and the synchronization loss value component can be determined by calculating the distance of each speech feature and facial feature in the feature space respectively.
[0111] According to another aspect of the present disclosure, an animation synthesis device is also provided. Fig. 9 FIG. 1 shows a structural block diagram of an animation synthesis device 900 according to an embodiment of the present disclosure. Fig. 9 As shown, the device 900 includes: a file acquisition unit 910, configured to acquire an audio file and an image file, wherein the audio file includes voice information and the image file includes a facial image of a target person; a first feature acquisition unit 920, configured to acquire voice features based on the audio file; a second feature acquisition unit 930, configured to acquire facial features and identity features of the target person in the image file, respectively, based on the image file; and a generation unit 940, configured to generate a synthetic animation about the target person based on the voice features, facial features and identity features, wherein the identity features are used to determine the appearance style of the target person in the synthetic animation.
[0112] In some embodiments, the image file includes a video file showing continuous facial movements of the target person, and wherein the second feature acquisition unit 930 includes: an image acquisition module, configured to acquire a first image set and a second image set based on the video file, wherein the first image set is generated based on continuous multiple-frame images in the video file, and the second image set includes random multiple-frame images in the video file; a first feature acquisition module, configured to acquire facial features based on the first image set; and a second feature acquisition module, configured to acquire identity features based on the second image set.
[0113] In some embodiments, the first feature acquisition module is further configured to: extract an image of the area around the lips in the facial image of each frame of the continuous multiple frames of images in the video file; and use the images of the area around the lips in the continuous multiple frames of images as the first image set.
[0114] In some embodiments, the generation unit 940 is further configured to: input the voice features, facial features and identity features into the animation synthesis model to obtain the output synthetic animation. The animation synthesis model includes a generative adversarial network, and the generation unit 940 also includes: a first generation module configured to generate a lip movement animation based on the voice features and facial features; and a second generation module configured to use the generative adversarial network to transfer the identity features to the lip movement animation to generate a synthetic animation about the target person.
[0115] In some embodiments, the animation synthesis model has a first hyperparameter and a second hyperparameter, wherein the first hyperparameter represents the influence weight of the speech feature on the generated synthetic animation, and the second hyperparameter represents the influence weight of the facial feature on the generated synthetic animation, and wherein the first generation module is further configured to generate lip movement animation based on the speech feature and facial feature and the set first hyperparameter and second hyperparameter.
[0116] According to another aspect of the present disclosure, a training device for an animation synthesis model is also provided. Fig.10 FIG. 1 shows a structural block diagram of a training device 1000 for an animation synthesis model according to an embodiment of the present disclosure, as shown in FIG. Fig.10 As shown, the device 1000 includes: a sample acquisition unit 1010, configured to acquire a sample data set, wherein each sample data in the sample data set includes a sample audio file, a sample image file and a real animation corresponding to the sample audio file and the sample image file, the sample audio file includes voice information, and the sample image file includes a facial image of a sample character; a first sample feature acquisition unit 1020, configured to acquire a sample voice feature based on the sample audio file in each sample data; a second sample feature acquisition unit 1030, configured to acquire a sample facial feature and a sample identity feature of the sample character in the sample image file based on the sample image file in each sample data; a prediction generation unit 1040, configured to input the sample voice feature, the sample facial feature and the sample identity feature into an animation synthesis model to generate a predicted animation about the sample character; a calculation unit 1050, configured to calculate a loss value based on the difference between the generated predicted animation and the real animation in the sample data; and an adjustment unit 1060, configured to adjust the parameters of the animation synthesis model according to the loss value.
[0117] In some embodiments, the animation synthesis model includes a generative adversarial network, and the prediction generation unit 1040 also includes: a first prediction generation module, configured to generate a predicted lip movement animation based on sample speech features and sample facial features; and a second prediction generation module, configured to use the generative adversarial network to transfer the sample identity features to the predicted lip movement animation to generate a predicted animation about the sample character.
[0118] In some embodiments, the animation synthesis model further includes a facial feature encoder, and the sample facial features include low-order facial features. The second sample feature acquisition unit 1030 is further configured to: obtain low-order facial features from a lower layer using a skip connection by the facial feature encoder.
[0119] In some embodiments, the animation synthesis model also includes a synchronization detection network, and the computing unit 1050 also includes: a third feature acquisition module, configured to respectively acquire facial features and voice features in the predicted animation; a synchronization detection module, configured to use the synchronization detection network to detect the degree of synchronization of the facial features and voice features in the predicted animation; and a first loss value determination module, configured to determine the synchronization loss value component based on the detected degree of synchronization.
[0120] In some embodiments, the animation synthesis model also includes a discriminator network, and the computing unit 1050 also includes: a replacement module, configured to use at least one frame image in the real animation to replace at least one corresponding frame image in the predicted animation to obtain the animation to be detected; and a discrimination module, configured to use the discriminator network to determine whether multiple frames of images in the animation to be detected are multiple frames of images of the same animation sequence; and a second loss value determination module, configured to determine the sequence loss value component based on the judgment result.
[0121] 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.
[0122] According to an embodiment of the present disclosure, an electronic device, a readable storage medium and a computer program product are also provided.
[0123] refer to Fig.11, a block diagram of an electronic device 1100 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.
[0124] like Fig.11 As shown, the device 1100 includes a computing unit 1101, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 1102 or a computer program loaded from a storage unit 1108 into a random access memory (RAM) 1103. In the RAM 1103, various programs and data required for the operation of the device 1100 can also be stored. The computing unit 1101, the ROM 1102, and the RAM 1103 are connected to each other via a bus 1104. An input / output (I / O) interface 1105 is also connected to the bus 1104.
[0125] Multiple components in the device 1100 are connected to the I / O interface 1105, including: an input unit 1106, an output unit 1107, a storage unit 1108, and a communication unit 1109. The input unit 1106 can be any type of device that can input information to the device 1100. The input unit 1106 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 1107 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 1108 can include but is not limited to a disk and an optical disk. The communication unit 1109 allows the device 1100 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks, and may 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.
[0126] The computing unit 1101 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 1101 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 1101 performs the various methods and processes described above, such as an animation synthesis method or a training method for an animation synthesis model. For example, in some embodiments, the animation synthesis method or the training method for an animation synthesis model may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 1108. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 1100 via the ROM 1102 and / or the communication unit 1109. When the computer program is loaded into the RAM 1103 and executed by the computing unit 1101, one or more steps of the animation synthesis method or the training method for the animation synthesis model described above may be performed. Alternatively, in other embodiments, the computing unit 1101 may be configured to execute the animation synthesis method or the animation synthesis model training method in any other appropriate manner (eg, by means of firmware).
[0127] 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), load 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.
[0128] 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.
[0129] 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.
[0130] 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).
[0131] 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.
[0132] 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.
[0133] 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.
[0134] 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 equivalents. Various elements in the embodiments or examples may be omitted or may be replaced by their equivalent elements. In addition, each step may be performed in an order different from that described in the present disclosure. Further, the various elements in the embodiments or examples may be combined in various ways.
Claims
1. An animation synthesis method, comprising: Acquire an audio file and an image file, wherein the audio file includes voice information, and the image file includes a facial image of a target person; Based on the audio file, obtaining speech features; Based on the image file, respectively obtaining facial features and identity features of the target person in the image file; and generating a synthetic animation about the target person according to the voice feature, the facial feature and the identity feature, wherein the identity feature is used to determine the appearance style of the target person in the synthetic animation, The image file includes a video file showing continuous facial movements of the target person, the continuous facial movements include movements of the target person reading a text, and based on the image file, respectively acquiring facial features and identity features of the target person in the image file includes: Based on the video file, acquiring a first image set and a second image set, wherein the first image set is generated according to a continuous plurality of frames of images in the video file, and the second image set includes a random plurality of frames of images in the video file; acquiring the facial features according to the first image set; and acquiring the identity feature according to the second image set, The step of generating a synthetic animation about the target person according to the voice feature, the facial feature and the identity feature comprises: Inputting the voice feature, the facial feature, and the identity feature into an animation synthesis model to obtain an output synthesized animation, wherein the animation synthesis model includes a generative adversarial network, and wherein the inputting the voice feature, the facial feature, and the identity feature into the animation synthesis model to obtain an output synthesized animation includes: generating a lip movement animation according to the speech feature and the facial feature; and The generative adversarial network is used to transfer the identity features to the lip movement animation to generate a synthetic animation about the target person.
2. The method according to claim 1, wherein: The acquiring a first image set based on the video file comprises: For each of the multiple consecutive frames of images in the video file, extract an image of the area around the lips in the facial image of the frame; and The images of the area around the lips in the continuous multiple frames of images are used as the first image set.
3. The method according to claim 1, wherein: The animation synthesis model has a first hyperparameter and a second hyperparameter, wherein generating the lip movement animation according to the speech feature and the facial feature comprises: The lip movement animation is generated based on the speech features and the facial features as well as the set first and second hyperparameters, wherein the first hyperparameter represents the influence weight of the speech features on the generated synthetic animation, and the second hyperparameter represents the influence weight of the facial features on the generated synthetic animation.
4. A training method for an animation synthesis model, comprising: Acquire a sample data set, wherein each sample data in the sample data set includes a sample audio file, a sample image file, and a real animation corresponding to the sample audio file and the sample image file, the sample audio file includes voice information, and the sample image file includes a facial image of a sample person; Based on the sample audio file in each sample data, obtain the sample speech feature; Based on the sample image file in each sample data, respectively obtain the sample facial features and sample identity features of the sample person in the sample image file; Inputting the sample speech features, the sample facial features and the sample identity features into the animation synthesis model to generate a predicted animation about the sample character; Calculate a loss value based on the difference between the generated predicted animation and the true animation in the sample data; and adjusting the parameters of the animation synthesis model according to the loss value, The sample image file includes a sample video file showing continuous facial movements of the sample person, the continuous facial movements include movements of the sample person reading text, and the steps of respectively obtaining sample facial features and sample identity features of the sample person in the sample image file based on the sample image file in each sample data include: Based on the sample video file, obtaining a first sample image set and a second sample image set, wherein the first sample image set is generated according to a continuous multi-frame image in the sample video file, and the second sample image set includes a random multi-frame image in the sample video file; Acquiring the sample facial features according to the first sample image set; and According to the second sample image set, obtaining the sample identity feature, The animation synthesis model includes a generative adversarial network, and the step of inputting the sample speech feature, the sample facial feature, and the sample identity feature into the animation synthesis model to generate a predicted animation about the sample character includes: generating a predicted lip movement animation according to the sample speech features and the sample facial features; and The sample identity features are transferred to the predicted lip movement animation by using the generative adversarial network to generate a predicted animation about the sample character.
5. The training method according to claim 4, wherein: The animation synthesis model further includes a facial feature encoder, wherein the sample facial features include low-order facial features, and the acquiring of sample facial features of sample characters in the sample image files based on the sample image files in each sample data includes: The facial feature encoder obtains the low-level facial features from a lower layer using a skip connection.
6. The training method according to claim 4 or 5, wherein: The animation synthesis model further includes a synchronization detection network, the loss value includes a synchronization loss value component, and wherein the calculating the loss value according to the difference between the generated predicted animation and the real animation in the sample data includes: Respectively obtaining facial features and speech features in the predicted animation; Using the synchronization detection network to detect the degree of synchronization between facial features and speech features in the predicted animation; and The synchronization loss value component is determined based on the detected synchronization degree.
7. The training method according to claim 4 or 5, wherein: The animation synthesis model further includes a discriminator network, the loss value includes a sequence loss value component, and wherein the calculating the loss value according to the difference between the generated predicted animation and the real animation in the sample data includes: Using at least one frame of image in the real animation to replace at least one corresponding frame of image in the predicted animation to obtain the animation to be detected; and Using the discriminator network to determine whether the multiple frames of images in the animation to be detected are multiple frames of images in the same animation sequence; and The sequence loss value component is determined based on the judgment result.
8. An animation synthesis device, comprising: A file acquisition unit configured to acquire an audio file and an image file, wherein the audio file includes voice information and the image file includes a facial image of a target person; A first feature acquisition unit, configured to acquire speech features based on the audio file; A second feature acquisition unit is configured to respectively acquire facial features and identity features of a target person in the image file based on the image file; and a generating unit configured to generate a synthetic animation about the target person according to the voice feature, the facial feature and the identity feature, wherein the identity feature is used to determine the appearance style of the target person in the synthetic animation, The image file includes a video file showing continuous facial movements of the target person, the continuous facial movements include movements of the target person reading a text, and the second feature acquisition unit includes: An image acquisition module, configured to acquire a first image set and a second image set based on the video file, wherein the first image set is generated according to a continuous plurality of frames of images in the video file, and the second image set includes a random plurality of frames of images in the video file; A first feature acquisition module, configured to acquire the facial features according to the first image set; and A second feature acquisition module is configured to acquire the identity feature according to the second image set, Wherein, the generating unit is further configured to: The speech feature, the facial feature and the identity feature are input into an animation synthesis model to obtain an output synthesized animation, wherein the generation unit comprises: A first generating module, configured to generate a lip movement animation according to the speech feature and the facial feature; and The second generation module is configured to utilize a generative adversarial network to transfer the identity feature to the lip movement animation to generate a synthetic animation about the target person.
9. The device according to claim 8, wherein: The first feature acquisition module is further configured to: For each of the multiple consecutive frames of images in the video file, extract an image of the area around the lips in the facial image of the frame; and The images of the area around the lips in the continuous multiple frames of images are used as the first image set.
10. The device according to claim 8, wherein: The animation synthesis model has a first hyperparameter and a second hyperparameter, and wherein the first generation module is further configured to: The lip movement animation is generated based on the speech features and the facial features as well as the set first and second hyperparameters, wherein the first hyperparameter represents the influence weight of the speech features on the generated synthetic animation, and the second hyperparameter represents the influence weight of the facial features on the generated synthetic animation.
11. A training device for an animation synthesis model, comprising: A sample acquisition unit is configured to acquire a sample data set, wherein each sample data in the sample data set includes a sample audio file, a sample image file, and a real animation corresponding to the sample audio file and the sample image file, the sample audio file includes voice information, and the sample image file includes a facial image of a sample person; A first sample feature acquisition unit is configured to acquire sample speech features based on a sample audio file in each sample data; A second sample feature acquisition unit is configured to respectively acquire sample facial features and sample identity features of the sample person in the sample image file based on the sample image file in each sample data; A prediction generation unit configured to input the sample speech feature, the sample facial feature and the sample identity feature into the animation synthesis model to generate a predicted animation about the sample character; a calculation unit configured to calculate a loss value according to a difference between the generated predicted animation and a real animation in the sample data; and an adjusting unit, configured to adjust parameters of the animation synthesis model according to the loss value, The sample image file includes a sample video file showing continuous facial movements of the sample person, the continuous facial movements include movements of the sample person reading a text, and the second sample feature acquisition unit is configured as follows: Based on the sample video file, obtaining a first sample image set and a second sample image set, wherein the first sample image set is generated according to a continuous multi-frame image in the sample video file, and the second sample image set includes a random multi-frame image in the sample video file; Acquiring the sample facial features according to the first sample image set; and According to the second sample image set, the sample identity feature is obtained Wherein, the animation synthesis model includes a generative adversarial network, and the prediction generation unit also includes: A first prediction generation module, configured to generate a predicted lip movement animation according to the sample speech features and the sample facial features; and The second prediction generation module is configured to utilize the generative adversarial network to transfer the sample identity features to the predicted lip movement animation to generate a predicted animation about the sample character.
12. The training device according to claim 11, wherein: The animation synthesis model further includes a facial feature encoder, and wherein the sample facial features include low-order facial features, and the second sample feature acquisition unit is further configured to: The facial feature encoder obtains the low-level facial features from a lower layer using a skip connection.
13. The training device according to claim 11 or 12, wherein: The animation synthesis model also includes a synchronization detection network, and the computing unit includes: A third feature acquisition module, configured to respectively acquire facial features and speech features in the predicted animation; a synchronization detection module configured to detect the degree of synchronization between facial features and speech features in the predicted animation using the synchronization detection network; and The first loss value determination module is configured to determine a synchronization loss value component based on the detected synchronization degree.
14. The training device according to claim 11 or 12, wherein: The animation synthesis model further includes a discriminator network, and the computing unit further includes: a replacement module, configured to replace at least one frame of image in the predicted animation with at least one frame of image in the real animation, so as to obtain the animation to be detected; and a discriminator module configured to use the discriminator network to determine whether the multiple frames of images in the animation to be detected are multiple frames of images in the same animation sequence; and The second loss value determination module is configured to determine the sequence loss value component based on the judgment result.
15. 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 that can be executed 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 7.
16. 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-7.
17. A computer program product comprising a computer program, wherein: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
