Digital human generation method, device, equipment and storage medium
Through the Audio2Face model and the neural radiation field network of the Transformer structure, the expression coefficient and head posture corresponding to the audio of the digital human are generated, which solves the problem of the lack of realism and single expression of the digital human in the existing technology, and achieves high quality and high real-time performance. of digital human generation.
Patent Information
- Application Number
- CN202410869883.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-01
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2044-07-01
AI Technical Summary
Existing digital human generation methods have poor generalization and lack of realism. The generated digital human expressions are single, and the head posture of the character has nothing to do with the audio, resulting in head movements that are inconsistent with the audio.
The Audio2Face model is used to generate expression coefficients and head postures from the digital human audio input, combined with the neural radiation field network of the Transformer structure, to determine the color and transparency of the target image, and generate the digital human through volume rendering.
It realizes the generation of digital people with high real-time performance, high character picture quality and rich expressions, and improves the realism and consistency of digital human generation.
Smart Images

Figure CN118411452B
Abstract
Description
Technical Field
[0001] The present application relates to the field of digital human technology, and in particular to a method, device, equipment and storage medium for generating a digital human. Background Art
[0002] Audio-driven digital human generation is an important and challenging problem. It aims to generate a speaking video of a specified character corresponding to the audio by inputting an arbitrary audio segment. It is widely used in scenarios such as virtual reality, augmented reality, filmmaking, medical simulation, human-computer interaction, education and training, etc.
[0003] The traditional method of digital human generation is based on manual modeling, which is a method of manually creating a digital human model through 3D modeling software and giving it expressions, movements and other attributes. This method has the following characteristics: (1) High degree of freedom in production: various styles and types of digital humans can be created according to needs, and every detail can be fine-tuned; (2) Controllable quality of work: experienced artists can produce highly realistic and lifelike digital humans; (3) Applicable to complex scenes: digital humans with complex expressions and movements can be produced for use in scenes such as performances and speeches. Although digital human generation methods have been widely used, existing methods still have the following problems: poor generalization, lack of realism, and can only produce expressions such as blinking or simple frowning, resulting in a single expression of the generated digital human. In addition, in existing methods, the head posture of the character is extracted from the specified video and is irrelevant to the audio in the actual application scene, which results in the generated character having head movements inconsistent with the audio. Therefore, how to improve the efficiency of digital human generation has become a technical problem that needs to be solved urgently. Summary of the invention
[0004] The main purpose of this application is to provide a method, device, equipment and storage medium for generating a digital human, aiming to solve the technical problem that the digital human generated by the prior art lacks realism and has a single expression.
[0005] To achieve the above purpose, the present application proposes a method for generating a digital human, the method comprising:
[0006] Acquire digital human audio, input the digital human audio into a preset Audio2Face model, obtain the expression coefficient and head posture output by the preset Audio2Face model, and the Audio2Face model is used to generate corresponding expression coefficients and head posture according to the input audio file;
[0007] Determine the color and transparency of the target image according to the expression coefficient and the head posture;
[0008] A target image is rendered based on the color and transparency of the target image, and a digital human is generated according to the rendered target image.
[0009] Optionally, before the step of acquiring the digital human audio, inputting the digital human audio into a preset Audio2Face model, and obtaining the expression coefficient and head posture output by the preset Audio2Face model, the method further includes:
[0010] Acquire a sample person data set, and extract a first expression coefficient and a first head posture of a target person in the sample person data set;
[0011] Determining audio features corresponding to the target person;
[0012] Determining a second head posture and a second expression coefficient corresponding to the audio feature based on an initial Audio2Face model;
[0013] determining a model loss value according to the first expression coefficient, the first head posture, the second head posture, and the second expression coefficient;
[0014] The model parameters in the initial Audio2Face model are updated based on the model loss value to obtain a preset Audio2Face model.
[0015] Optionally, the step of updating the model parameters in the initial Audio2Face model based on the model loss value to obtain a preset Audio2Face model includes:
[0016] Inputting the second expression coefficient and the audio feature into a preset lip shape identifier to obtain a lip shape loss value output by the preset lip shape identifier;
[0017] The model parameters in the initial Audio2Face model are updated based on the lip shape loss value and the model loss value to obtain a preset Audio2Face model.
[0018] Optionally, before the step of inputting the second expression coefficient and the audio feature into a preset lip shape identifier to obtain the lip shape loss value output by the preset lip shape identifier, the method further includes:
[0019] Get the pre-trained lip shape discriminator dataset;
[0020] Extracting audio features of the target audio in the pre-trained lip shape discriminator dataset according to the Wav2Vec algorithm;
[0021] Extracting the FaceVerse expression coefficient of the video frame corresponding to the target audio according to the FaceVerse algorithm;
[0022] An initial lip shape identifier is trained according to the audio features and the FaceVerse expression coefficient to obtain a preset lip shape identifier.
[0023] Optionally, the step of determining the color and transparency of the target image according to the expression coefficient and the head posture includes:
[0024] Inputting the expression coefficient and the head posture into a head Transformer model to obtain the color and transparency of the head sampling points output by the head Transformer model;
[0025] Inputting the head posture into the torso Transformer model, and obtaining the color and transparency of the torso sampling points output by the torso Transformer model;
[0026] The color and transparency of the target image are determined according to the color and transparency of the head sampling point and the color and transparency of the trunk sampling point.
[0027] Optionally, before the step of determining the color and transparency of the target image according to the expression coefficient and the head posture, the step further includes:
[0028] Acquire a sample person data set, and extract a first head posture of a target person in the sample person data set;
[0029] Segment the first head posture using a BiSeNet segmentation algorithm to obtain a head image and a torso image;
[0030] Based on the head image, the torso image and the expression coefficient and head posture output by the preset Audio2Face model, a neural radiation field network based on a Transformer structure is trained to obtain a target neural radiation field network, wherein the target neural radiation field network includes a head Transformer model and a torso Transformer model.
[0031] Optionally, the step of rendering a target image based on the color and transparency of the target image, and generating a digital human according to the rendered target image comprises:
[0032] Rendering the target image using volume rendering based on the color and transparency of the target image;
[0033] A digital human is generated according to the rendered target image and the digital human audio.
[0034] In addition, to achieve the above-mentioned purpose, the present application also proposes a digital human generation device, the digital human generation device comprising:
[0035] An acquisition module, used to acquire digital human audio, input the digital human audio into a preset Audio2Face model, and obtain the expression coefficient and head posture output by the preset Audio2Face model, wherein the Audio2Face model is used to generate corresponding expression coefficients and head posture according to the input audio file;
[0036] A determination module, used to determine the color and transparency of the target image according to the expression coefficient and the head posture;
[0037] The digital human generation module is used to render a target image based on the color and transparency of the target image, and generate a digital human according to the rendered target image.
[0038] In addition, to achieve the above-mentioned purpose, the present application also proposes a digital human generation device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the digital human generation method as described above.
[0039] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the digital human generation method described above are implemented.
[0040] This application obtains digital human audio, inputs the digital human audio into a preset Audio2Face model, obtains the expression coefficient and head posture output by the preset Audio2Face model, and the Audio2Face model is used to generate corresponding expression coefficients and head postures according to the input audio file; determines the color and transparency of the target image according to the expression coefficients and the head posture; renders the target image based on the color and transparency of the target image, and generates a digital human according to the rendered target image. Since this application uses the preset Audio2Face model to output the expression coefficients and head postures corresponding to the digital human audio, and then determines the color and transparency of the target image according to the expression coefficients and the head posture, and then renders the digital human. Compared with the existing method of manually creating digital human models through three-dimensional modeling software, the above method of this application can generate digital humans with high real-time performance, high character picture quality, and rich expressions. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0042] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0043] Figure 1 A flowchart of the first embodiment of the method for generating a digital human according to the present application;
[0044] Figure 2 A schematic diagram of neural radiation field network training provided in Example 1 of the digital human generation method of the present application;
[0045] Figure 3 A neural radiation field network reasoning flow chart provided for the first embodiment of the digital human generation method of the present application;
[0046] Figure 4 A flow chart of the second embodiment of the method for generating a digital human according to the present application;
[0047] Figure 5 A structural diagram of the preset Audio2Face model provided in Example 2 of the digital human generation method of this application;
[0048] Figure 6 A flow chart of a pre-trained lip shape identifier provided in Example 2 of the digital human generation method of the present application;
[0049] Figure 7 This is a schematic diagram of the module structure of the digital human generation device according to the embodiment of the present application;
[0050] Figure 8 Schematic diagram of the device structure of the hardware operating environment involved in the digital human generation method in the embodiment of the present application.
[0051] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0052] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0053] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0054] The main solution of the embodiment of the present application is: obtaining digital human audio, inputting the digital human audio into a preset Audio2Face model, obtaining the expression coefficient and head posture output by the preset Audio2Face model, and the Audio2Face model is used to generate corresponding expression coefficients and head posture according to the input audio file; determining the color and transparency of the target image according to the expression coefficients and the head posture; rendering the target image based on the color and transparency of the target image, and generating a digital human according to the rendered target image.
[0055] Since this application uses the preset Audio2Face model to output the expression coefficient and head posture corresponding to the digital human audio, and then determines the color and transparency of the target image based on the expression coefficient and head posture, and then renders the digital human. Compared with the existing method of manually creating digital human models through 3D modeling software, the above method of this application can generate digital humans with high real-time performance, high character image quality and rich expressions.
[0056] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, a digital human generation device, etc. The following takes the digital human generation device as an example to illustrate this embodiment and the following embodiments.
[0057] Based on this, the present application embodiment provides a method for generating a digital human, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the digital human generation method of the present application.
[0058] In this embodiment, the digital human generation method includes steps S10 to S30:
[0059] Step S10, obtaining digital human audio, inputting the digital human audio into a preset Audio2Face model, obtaining the expression coefficient and head posture output by the preset Audio2Face model, wherein the Audio2Face model is used to generate corresponding expression coefficients and head posture according to the input audio file;
[0060] It should be noted that the digital human audio may be an audio file corresponding to the digital human to be generated. For example, if a digital human introducing a product is to be generated, the digital human audio may be the audio of the product introduction. The preset Audio2Face model may be a pre-trained model that can generate a model of expression coefficients and head posture corresponding to the digital human according to the input audio file.
[0061] Step S20, determining the color and transparency of the target image according to the expression coefficient and the head posture;
[0062] It should be noted that the color and transparency of the target image determined according to the expression coefficient and the head posture may be inputting the expression coefficient and the head posture into a pre-trained neural radiation field network based on a Transformer structure, and the neural radiation field network based on the Transformer structure determines the color and transparency of the target image according to the expression coefficient and the head posture. The target image may be a digital human image corresponding to the digital human audio to be generated.
[0063] Furthermore, in order to make the generated digital human more realistic, the step S20 may include: inputting the expression coefficient and the head posture into a head Transformer model to obtain the color and transparency of the head sampling points output by the head Transformer model;
[0064] Inputting the head posture into the torso Transformer model, and obtaining the color and transparency of the torso sampling points output by the torso Transformer model;
[0065] The color and transparency of the target image are determined according to the color and transparency of the head sampling point and the color and transparency of the trunk sampling point.
[0066] It should be noted that in order to make the generated digital human more realistic, a neural radiation field network based on the Transformer structure is also trained in this embodiment. Figure 2 , Figure 2 A neural radiation field network training diagram provided for the first embodiment of the digital human generation method of the present application; the head Transformer model and the torso Transformer model can be models in the neural radiation field network based on the Transformer structure, and the head Transformer model is used to predict the color and transparency of the head sampling points according to the input expression coefficient and the head posture. The torso Transformer model is used to predict the color and transparency of the torso sampling points according to the input head posture.
[0067] Furthermore, in order to accurately determine the color and transparency of each pixel of the target image and make the digital human more realistic, before the step of determining the color and transparency of the target image according to the expression coefficient and the head posture, the method further includes:
[0068] Acquire a sample person data set, and extract a first head posture of a target person in the sample person data set;
[0069] Segment the first head posture using a BiSeNet segmentation algorithm to obtain a head image and a torso image;
[0070] Based on the head image, the torso image and the expression coefficient and head posture output by the preset Audio2Face model, a neural radiation field network based on a Transformer structure is trained to obtain a target neural radiation field network, wherein the target neural radiation field network includes a head Transformer model and a torso Transformer model.
[0071] It should be noted that the sample person data set may be a data set for model training, including audio and corresponding person image information, and may be a person video with audio. The extraction of the first head posture of the target person in the sample person data set may be to estimate the head posture of the target person in each frame of the image through an open source three-dimensional face reconstruction model, that is, the first head posture. The training of the neural radiation field network based on the Transformer structure based on the expression coefficient and head posture output by the head image, the torso image and the preset Audio2Face model may be a reference Figure 2 , the expression coefficient and head posture output by the preset Audio2Face model are input into the head Transformer to calculate the color and transparency of the head sampling points. The head posture information is input into the torso Transformer to calculate the color and transparency of the torso sampling points. The head and torso images are synthesized respectively by using the volume rendering method, and the loss values of the synthesized head and torso images are calculated respectively by using the first head posture to segment the head image and torso image.
[0072] Among them, the calculation method of volume rendering is:
[0073]
[0074] in, is the color value of the pixel, and They represent the color and transparency of the rays in the observation direction, r(t) is the position of the sampling point in volume rendering, is the opacity, calculated as:
[0075]
[0076] The color and transparency of the sampling points of the character's head related to the expression coefficient are:
[0077]
[0078] The color and transparency of the sampling points of the torso that are independent of the expression coefficient are:
[0079]
[0080] in, represents the location of the head sampling point, represents the position of the trunk sampling point, p represents the head posture, and e represents the expression coefficient.
[0081] After generating the images of the head and torso, the losses of the head and torso are calculated separately. For the head loss:
[0082]
[0083] in, is the head image loss value, For the original picture, This is the head image predicted by the model.
[0084] For trunk loss:
[0085]
[0086] in, is the torso image loss value, For the original picture, The image predicted by the model.
[0087] When both the head image loss value and the torso image loss value meet the preset loss requirements, the training of the neural radiation field network based on the Transformer structure is terminated to obtain the target neural radiation field network.
[0088] In the specific implementation, please refer to Figure 3 , Figure 3 A neural radiation field network inference flow chart is provided for Example 1 of the digital human generation method of the present application; for a specified audio input, the expression coefficient and head posture of the character are first output through the preset Audio2Face model, and then the expression coefficient and head posture information are input into the head Transformer to calculate the color and transparency of the head sampling point, and the head posture information is input into the torso Transformer to calculate the color and transparency of the torso sampling point, and then the volume rendering method is used to synthesize the head and torso images respectively, and finally the head and torso images are synthesized into the overall image of the character, and then the obtained multiple character images and audio are synthesized to obtain a digital human.
[0089] Step S30, rendering a target image based on the color and transparency of the target image, and generating a digital human according to the rendered target image.
[0090] It should be noted that the rendering of the target image based on the color and transparency of the target image may be rendering the target image based on the color and transparency of the target image using volume rendering. The generating of the digital human based on the rendered target image may be generating the digital human based on the rendered target image and the digital human audio. Specifically, the rendered target images are spliced in the order of the corresponding audio to obtain the target video, and then the target video and the digital human audio are synthesized to obtain a digital human video with the audio output of the digital human audio.
[0091] This embodiment obtains the digital human audio, inputs the digital human audio into the preset Audio2Face model, obtains the expression coefficient and head posture output by the preset Audio2Face model, and the Audio2Face model is used to generate the corresponding expression coefficient and head posture according to the input audio file; determines the color and transparency of the target image according to the expression coefficient and the head posture; renders the target image based on the color and transparency of the target image, and generates the digital human according to the rendered target image. Since this embodiment uses the preset Audio2Face model to output the expression coefficient and head posture corresponding to the digital human audio, and then determines the color and transparency of the target image according to the expression coefficient and the head posture, and then renders the digital human. Compared with the existing method of manually creating a digital human model through three-dimensional modeling software, the above method of this embodiment can generate a digital human with high real-time performance, high character picture quality, and rich expressions.
[0092] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 4 , the step S20 further includes steps S101 to S105:
[0093] Step S101: obtaining a sample person data set, and extracting a first expression coefficient and a first head posture of a target person in the sample person data set;
[0094] It should be noted that the sample person data set may be a data set for model training, including audio and corresponding person image information, and may be a person video with audio. The target person may be a person in the person video in the sample person data set. The extraction of the first expression coefficient and the first head posture of the target person in the sample person data set may be to use the open source algorithm FaceVerse to extract the FaceVerse expression coefficient of the person, i.e., the first expression coefficient, for each video frame of the video, and to use the open source three-dimensional face reconstruction model to estimate the head posture of the target person in each frame of the image, i.e., the first head posture, and to use a segmentation algorithm to extract the head and torso images of the person in the video frame.
[0095] Step S102: Determine the audio features corresponding to the target person;
[0096] It should be noted that the determining of the audio features corresponding to the target person may be performed by extracting the audio features corresponding to the target person through an open source algorithm Wav2Vec.
[0097] Step S103: determining a second head posture and a second expression coefficient corresponding to the audio feature based on the initial Audio2Face model;
[0098] It should be noted that, please refer to Figure 5 , Figure 5 The structure diagram of the preset Audio2Face model provided in the second embodiment of the digital human generation method of the present application; the initial Audio2Face model may be an initial model for training the preset Audio2Face model, and its structure may refer to Figure 5 . The second head posture and second expression coefficient corresponding to the audio feature determined based on the initial Audio2Face model can be that the initial Audio2Face model is encoded by two independent Transformer encoders to obtain head posture features and expression features respectively, and then the head posture features and expression features as well as the character identity code are input into the Transformer decoder in the Audio2Face model for decoding, and the decoded output is further decoded by the Audio2Face decoder to obtain the head posture and FaceVerse expression coefficient output by the Audio2Face decoder, that is, the second head posture and the second expression coefficient. The two independent Transformer encoders are the head posture encoder and the expression feature encoder.
[0099] Step S104: determining a model loss value according to the first expression coefficient, the first head posture, the second head posture and the second expression coefficient;
[0100] It should be noted that the determining of the model loss value according to the first expression coefficient, the first head posture, the second head posture and the second expression coefficient may be calculating the loss by adding the second head posture and the second expression coefficient to the first expression coefficient and the first head posture in step S101, wherein the function for calculating the model loss value may refer to the following formula:
[0101]
[0102] in, is used to represent the model loss value, T is used to represent the total number of frames (the preset Audio2Face model can accept training and prediction of multiple video frames at the same time), is the model output, i.e., the second head posture and the second expression coefficient, y is the true value, i.e., the first expression coefficient and the first head posture, and E is used to represent the sum of the number of FaceVerse expression coefficients and the number of head postures, which can be 468 and 4 respectively.
[0103] Step S105: updating the model parameters in the initial Audio2Face model based on the model loss value to obtain a preset Audio2Face model.
[0104] It should be noted that updating the model parameters in the initial Audio2Face model based on the model loss value to obtain the preset Audio2Face model may be updating the model parameters in the initial Audio2Face model by back propagating the model loss value to obtain the preset Audio2Face model.
[0105] Furthermore, in order to make the expression coefficient and head posture predicted by the preset Audio2Face model more accurate and obtain a more realistic digital human, the step S105 may include: inputting the second expression coefficient and the audio feature into a preset lip shape identifier to obtain a lip shape loss value output by the preset lip shape identifier;
[0106] The model parameters in the initial Audio2Face model are updated based on the lip shape loss value and the model loss value to obtain a preset Audio2Face model.
[0107] It should be noted that the preset lip shape identifier can be a pre-trained lip shape identifier that can evaluate the matching degree between the generated second expression coefficient and the audio feature. By inputting the second expression coefficient and the audio feature into the preset lip shape identifier, the lip shape loss value output by the preset lip shape identifier can be obtained. If the lip shape loss value is large, it means that the second expression coefficient and the audio feature do not match well. At this time, it is necessary to continue to train the initial Audio2Face model so that the predicted second expression coefficient is more matched with the audio feature, that is, the lip shape loss value is not greater than the preset lip shape loss value threshold. The preset lip shape loss value can be a preset threshold. When the lip shape loss value is greater than the preset lip shape loss value threshold, the model parameters in the initial Audio2Face model can be updated according to the lip shape loss value to obtain the preset Audio2Face model.
[0108] Furthermore, before the step of inputting the second expression coefficient and the audio feature into a preset lip shape identifier to obtain the lip shape loss value output by the preset lip shape identifier, the method further includes:
[0109] Get the pre-trained lip shape discriminator dataset;
[0110] Extracting audio features of the target audio in the pre-trained lip shape discriminator dataset according to the Wav2Vec algorithm;
[0111] Extracting the FaceVerse expression coefficient of the video frame corresponding to the target audio according to the FaceVerse algorithm;
[0112] An initial lip shape identifier is trained according to the audio features and the FaceVerse expression coefficient to obtain a preset lip shape identifier.
[0113] It should be noted that the pre-trained lip shape discriminator dataset may be a dataset used to train a lip shape discriminator, and may include an audio file and a corresponding character image. Figure 6 , Figure 6 A flow chart of the pre-trained lip shape discriminator provided for the second embodiment of the digital human generation method of the present application; the audio features in the pre-trained lip shape discriminator data set are extracted through the open source algorithm Wav2Vec, the extracted audio features are input into the audio feature encoder, and a 1×512-dimensional audio feature vector is output. The FaceVerse expression coefficients extracted from the video frame corresponding to the audio are input into the expression coefficient encoder, and a 1×512-dimensional expression coefficient feature vector, i.e., the FaceVerse expression coefficient, is output. The loss of the two, i.e., the loss of the audio feature vector and the FaceVerse expression coefficient, is calculated, and the model parameters are updated by back propagation. Among them, the lip shape identification loss function is:
[0114]
[0115] in, It is used to represent the lip shape identification loss, N is used to represent the total number of frames, The formula is as follows:
[0116]
[0117] Among them, v and s are used to represent the expression coefficient feature vector and audio feature vector respectively.
[0118] This embodiment obtains a sample character data set, extracts the first expression coefficient and the first head posture of the target character in the sample character data set; determines the audio features corresponding to the target character; determines the second head posture and the second expression coefficient corresponding to the audio features based on the initial Audio2Face model; determines the model loss value according to the first expression coefficient, the first head posture, the second head posture and the second expression coefficient; updates the model parameters in the initial Audio2Face model based on the model loss value to obtain a preset Audio2Face model. This embodiment trains a preset Audio2Face model according to the sample data set, and then generates the expression coefficient and head posture corresponding to the digital human audio according to the preset Audio2Face model, so that the generated digital human has high picture quality, rich expressions, clear and stable lips, and is more realistic.
[0119] This application also provides a digital human generation device, please refer to Figure 7 , the digital human generation device comprises:
[0120] An acquisition module 10 is used to acquire digital human audio, input the digital human audio into a preset Audio2Face model, and obtain the expression coefficient and head posture output by the preset Audio2Face model, wherein the Audio2Face model is used to generate corresponding expression coefficients and head posture according to the input audio file;
[0121] A determination module 20, configured to determine the color and transparency of a target image according to the expression coefficient and the head posture;
[0122] The digital human generation module 30 is used to render a target image based on the color and transparency of the target image, and generate a digital human according to the rendered target image.
[0123] This embodiment obtains the digital human audio, inputs the digital human audio into the preset Audio2Face model, obtains the expression coefficient and head posture output by the preset Audio2Face model, and the Audio2Face model is used to generate the corresponding expression coefficient and head posture according to the input audio file; determines the color and transparency of the target image according to the expression coefficient and the head posture; renders the target image based on the color and transparency of the target image, and generates the digital human according to the rendered target image. Since this embodiment uses the preset Audio2Face model to output the expression coefficient and head posture corresponding to the digital human audio, and then determines the color and transparency of the target image according to the expression coefficient and the head posture, and then renders the digital human. Compared with the existing method of manually creating a digital human model through three-dimensional modeling software, the above method of this embodiment can generate a digital human with high real-time performance, high character picture quality, and rich expressions.
[0124] The digital human generation device provided by the present application adopts the digital human generation method in the above embodiment, which can solve the technical problems that the digital human generated by the prior art lacks realism and has a single expression. Compared with the prior art, the beneficial effects of the digital human generation device provided by the present application are the same as those of the digital human generation method provided by the above embodiment, and the other technical features in the digital human generation device are the same as those disclosed in the above embodiment method, which will not be repeated here.
[0125] The present application provides a digital human generation device, which includes: at least one processor; and a memory that is communicatively connected to the at least one processor; wherein 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 so that the at least one processor can execute the digital human generation method in the above-mentioned embodiment one.
[0126] Reference below Figure 8 , which shows a schematic diagram of the structure of a digital human generation device suitable for implementing the embodiment of the present application. The digital human generation device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 8 The digital human generation device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0127] like Figure 8As shown, the digital human generation device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the digital human generation device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the digital human generation device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a digital human generation device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or provided instead.
[0128] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0129] The digital human generation device provided by the present application adopts the digital human generation method in the above embodiment, which can solve the technical problems that the digital human generated by the prior art lacks realism and has a single expression. Compared with the prior art, the beneficial effects of the digital human generation device provided by the present application are the same as the beneficial effects of the digital human generation method provided by the above embodiment, and the other technical features in the digital human generation device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0130] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0131] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0132] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the digital human generation method in the above-mentioned embodiment.
[0133] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM: Random Access Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.
[0134] The computer-readable storage medium mentioned above may be included in the digital human generating device; or may exist independently without being assembled into the digital human generating device.
[0135] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the digital human generation device, the digital human generation device executes the digital human generation method.
[0136] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0137] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0138] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0139] The readable storage medium provided in the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned digital human generation method, and can solve the technical problems that the digital human generated by the prior art lacks realism and has a single expression. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in the present application are the same as the beneficial effects of the digital human generation method provided in the above-mentioned embodiment, and will not be elaborated here.
[0140] The present application also provides a computer program product, including a computer program, which implements the steps of the digital human generation method as described above when executed by a processor.
[0141] The computer program product provided by this application can solve the technical problems of the lack of realism and single expression of digital humans generated by the prior art. Compared with the prior art, the beneficial effects of the computer program product provided by this application are the same as those of the digital human generation method provided by the above embodiment, which will not be elaborated here.
[0142] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A method for generating a digital human, characterized in that: The digital human generation method comprises the following steps: Acquire digital human audio, input the digital human audio into a preset Audio2Face model, obtain the expression coefficient and head posture output by the preset Audio2Face model, and the Audio2Face model is used to generate corresponding expression coefficients and head posture according to the input audio file; Determine the color and transparency of the target image according to the expression coefficient and the head posture; Rendering a target image based on the color and transparency of the target image, and generating a digital human according to the rendered target image; Before the step of obtaining the digital human audio, inputting the digital human audio into a preset Audio2Face model, and obtaining the expression coefficient and head posture output by the preset Audio2Face model, the method further includes: Acquire a sample person data set, and extract a first expression coefficient and a first head posture of a target person in the sample person data set; Determining audio features corresponding to the target person; Determining a second head posture and a second expression coefficient corresponding to the audio feature based on an initial Audio2Face model; determining a model loss value according to the first expression coefficient, the first head posture, the second head posture, and the second expression coefficient; Updating the model parameters in the initial Audio2Face model based on the model loss value to obtain a preset Audio2Face model; The step of updating the model parameters in the initial Audio2Face model based on the model loss value to obtain a preset Audio2Face model includes: Inputting the second expression coefficient and the audio feature into a preset lip shape identifier to obtain a lip shape loss value output by the preset lip shape identifier; The model parameters in the initial Audio2Face model are updated based on the lip shape loss value and the model loss value to obtain a preset Audio2Face model.
2. The method for generating a digital human as claimed in claim 1, characterized in that: Before the step of inputting the second expression coefficient and the audio feature into a preset lip shape identifier to obtain the lip shape loss value output by the preset lip shape identifier, the method further includes: Get the pre-trained lip shape discriminator dataset; Extracting audio features of the target audio in the pre-trained lip shape discriminator dataset according to the Wav2Vec algorithm; Extracting the FaceVerse expression coefficient of the video frame corresponding to the target audio according to the FaceVerse algorithm; An initial lip shape identifier is trained according to the audio features and the FaceVerse expression coefficient to obtain a preset lip shape identifier.
3. The method for generating a digital human as claimed in any one of claims 1 to 2, characterized in that: The step of determining the color and transparency of the target image according to the expression coefficient and the head posture comprises: Inputting the expression coefficient and the head posture into a head Transformer model to obtain the color and transparency of the head sampling points output by the head Transformer model; Inputting the head posture into the torso Transformer model, and obtaining the color and transparency of the torso sampling points output by the torso Transformer model; The color and transparency of the target image are determined according to the color and transparency of the head sampling point and the color and transparency of the trunk sampling point.
4. The method for generating a digital human as claimed in claim 3, characterized in that: Before the step of determining the color and transparency of the target image according to the expression coefficient and the head posture, the method further includes: Acquire a sample person data set, and extract a first head posture of a target person in the sample person data set; Segment the first head posture using a BiSeNet segmentation algorithm to obtain a head image and a torso image; Based on the head image, the torso image and the expression coefficient and head posture output by the preset Audio2Face model, a neural radiation field network based on a Transformer structure is trained to obtain a target neural radiation field network, wherein the target neural radiation field network includes a head Transformer model and a torso Transformer model.
5. The method for generating a digital human as claimed in any one of claims 1 to 2, characterized in that: The step of rendering a target image based on the color and transparency of the target image and generating a digital human according to the rendered target image comprises: Rendering the target image using volume rendering based on the color and transparency of the target image; A digital human is generated according to the rendered target image and the digital human audio.
6. A digital human generation device, characterized in that: The digital human generation device comprises: An acquisition module, used to acquire digital human audio, input the digital human audio into a preset Audio2Face model, and obtain the expression coefficient and head posture output by the preset Audio2Face model, wherein the Audio2Face model is used to generate corresponding expression coefficients and head posture according to the input audio file; A determination module, used to determine the color and transparency of the target image according to the expression coefficient and the head posture; A digital human generation module, used for rendering a target image based on the color and transparency of the target image, and generating a digital human according to the rendered target image; The acquisition module is used to acquire a sample person data set, and extract a first expression coefficient and a first head posture of a target person in the sample person data set; Determining audio features corresponding to the target person; Determining a second head posture and a second expression coefficient corresponding to the audio feature based on an initial Audio2Face model; determining a model loss value according to the first expression coefficient, the first head posture, the second head posture, and the second expression coefficient; Updating the model parameters in the initial Audio2Face model based on the model loss value to obtain a preset Audio2Face model; The acquisition module is used to input the second expression coefficient and the audio feature into a preset lip shape identifier to obtain a lip shape loss value output by the preset lip shape identifier; The model parameters in the initial Audio2Face model are updated based on the lip shape loss value and the model loss value to obtain a preset Audio2Face model.
7. A digital human generation device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the digital human generation method according to any one of claims 1 to 5.
8. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the digital human generation method according to any one of claims 1 to 5 are implemented.
