A method and system for generating three-dimensional digital human animation

Through the combination of human-computer interaction interface and 3D rendering engine, video data is collected and processed to achieve efficient generation of 3D digital human animation, solving the problems of complex generation process and insufficient flexibility in the existing technology, and providing flexible 3D Animation generation solution.

CN117292030BActive Publication Date: 2024-10-29海看网络科技(山东)股份有限公司
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202311411658.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-27
Publication Date
2024-10-29
Estimated Expiration
2043-10-27

AI Technical Summary

Technical Problem

The existing 3D digital human animation generation technology lacks flexibility and cannot modify the character model, scene and lighting at the same time. The generation process is complex and time-consuming, making it difficult for ordinary people to complete.

Method used

By configuring the human-computer interaction interface to obtain the mouth shape information of the template video characters, convert the text into voice data, collect video frame images and facial key points, calculate expression parameters, import the three-dimensional rendering engine, output the image sequence and perform video synthesis, realizing the Editing and modification of character models, scenes and lighting.

Benefits of technology

The efficiency of 3D animation generation is greatly improved. Users can simply input text to select language and animation parameters to output a 3D digital human animation video. The operation is simple and the scene is not limited by the real world.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117292030B_ABST
    Figure CN117292030B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and system for generating three-dimensional digital human animation, mainly relating to the technical field of three-dimensional digital human animation. The method comprises the following steps: configuring a human-computer interaction interface to obtain the mouth shape information of a character in a template video, and converting the text into voice data; replacing the configured mouth shape information of a character in a template video with voice drive and obtaining new video data; collecting each frame image of the new video data obtained in step S2 and the coordinates of the key points of the face in each frame image; calculating the image parameters of each frame by obtaining each frame image and the coordinates of the key points of the face in each frame image to obtain the expression parameters; importing the obtained expression parameters into a three-dimensional rendering engine according to a frame sequence; outputting an image sequence through a three-dimensional rendering engine; and performing video synthesis on the obtained image sequence. The beneficial effect of the present invention is that it can greatly improve the generation efficiency of three-dimensional animation digital humans.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of three-dimensional digital human animation, and in particular to a method and system for generating three-dimensional digital human animation. Background Art

[0002] Machine learning provides a series of interesting capabilities, such as text-to-speech technology, voice replacement of existing mouth shapes of characters in videos, and facial key point collection technology. Currently, there are products that generate digital human videos using the above technologies. However, they only change the existing mouth shapes of characters in the original video, and cannot modify the scenes, characters' clothing and other information in the original video. They are not flexible enough.

[0003] Thanks to the technological advances of 3D rendering engines such as Ureal and Maye, with sufficient computing power, it is now possible to build lifelike character models, and control the body movements and facial expressions of the character models through specific programming methods within the software or in the form of animation assets.

[0004] At present, the main way to generate 3D digital human animation is to manually edit the animation keyframes for each frame in the animation system of the 3D rendering engine. In particular, in order to ensure the smoothness and reality of the facial expressions of the characters, it is necessary to edit the facial animation frame by frame. Generally speaking, this step is complicated, time-consuming and requires corresponding technical capabilities to complete. Ordinary people cannot complete it without professional training. Summary of the invention

[0005] The purpose of the present invention is to provide a method and system for generating three-dimensional digital human animation, which can greatly improve the generation efficiency of three-dimensional animation digital human.

[0006] In order to achieve the above object, the present invention is implemented through the following technical solutions:

[0007] A method for generating a three-dimensional digital human animation comprises the following steps:

[0008] S1: Configure the human-computer interaction interface to obtain the mouth shape information of the characters in the template video and convert the text into voice data;

[0009] S2: Replace the configured template video character mouth shape information with voice drive and obtain new video data;

[0010] S3: Collect each frame of the new video data obtained in step S2 and the coordinates of the key points of the face in each frame;

[0011] S4: Calculate the image parameters of each frame by acquiring each frame image and the coordinates of the facial key points in each frame image to obtain the expression parameters;

[0012] S5: importing the obtained expression parameters into a three-dimensional rendering engine according to a frame sequence;

[0013] S6: outputting the image sequence through a three-dimensional rendering engine;

[0014] S7: Perform video synthesis on the obtained image sequence.

[0015] Preferably, the configuration of the human-computer interaction interface is specifically: configuring the template scene, adjusting the scene, inputting driving text information, selecting the language, selecting the dubbing gender, timbre, output video resolution, output video format and output video compression rate; the conversion of text into voice data is specifically: using the input text information, language, gender and timbre parameters as input parameters to call the text-to-speech machine learning model interface, generating corresponding voice data as a return value based on the input data through model calculation, and saving the voice data.

[0016] Preferably, step S2 specifically includes: reading the voice data and the mouth shape information of the character in the template video in step S1, and using the voice data and the mouth shape information of the character in the template video as input parameters to call the voice-driven lip synchronization machine learning model interface, the model outputs lip synchronization video data that matches the input voice after calculation, the length of the new video data should be equal to the length of the above-mentioned voice data, and this video data is saved.

[0017] Preferably, the acquisition of each frame of new video data is specifically as follows: reading the video data acquired in step S2, obtaining the frame rate, number of frames and duration parameters of the video data, and saving the image sequence of each frame in order to obtain a frame sequence; the acquisition of the coordinates of the key points of the face in each frame of the new video data is specifically as follows: reading the above frame sequence in order, and obtaining the coordinates of all three-dimensional key points of the face existing in the frame by calling the face key point recognition interface.

[0018] Preferably, calculating the image parameters of each frame to obtain the expression parameters in step S4 specifically includes: calculating the head rotation parameters of each frame and calculating the expression parameters of each frame.

[0019] Preferably, the head rotation parameters include: HeadYaw, HeadPitch and HeadRoll, and the calculation of the head rotation parameters for each frame specifically includes:

[0020] Get the width, height and number of channels of the frame image; set the focal length of the camera according to the angle of the frame image, and calculate the coordinates of the center point of the image; create a camera matrix according to the focal length of the camera and the coordinates of the center point; initialize the distortion coefficient; extract the three-dimensional coordinates of the first 468 key points from the input face key points and store them in the landmarks variable; perform coordinate transformation and posture correction; extract model points and image points; use the cv2.solvePnP function in the OpenCV library to calculate the rotation vector and translation vector through the model point, image point, camera matrix and distortion coefficient; the cv2.solvePnP function returns the posture transformation matrix, the three-dimensional coordinates of the metric standard, the rotation vector and the translation vector; use the mat2euler function in the transforms3d library to convert the rotation vector into the Euler angle matrix, which includes three angles of pitch, yaw and roll; smooth the pitch, yaw and roll parameters and save them in frame order.

[0021] Preferably, the step of importing the obtained expression parameters into the three-dimensional rendering engine according to the frame sequence specifically comprises: creating animation assets according to the expression parameters of each frame and applying them to the three-dimensional character model.

[0022] Preferably, the outputting of the image sequence through the 3D rendering engine specifically comprises: using the animation component of the 3D rendering engine, rendering the above-mentioned character model with animation from the first frame to the last frame according to the resolution selected by the user, and rendering each frame of the animation into a picture for storage.

[0023] Preferably, the video synthesis of the obtained image sequence is specifically: by reading the above-mentioned rendered pictures, synthesizing the video according to the video format and compression rate selected by the user, and attaching the audio generated in step S1 to the new video.

[0024] A system for generating three-dimensional digital human animation driven by text, comprising:

[0025] Data configuration module: used to configure the human-computer interaction interface to obtain the mouth shape information of the characters in the template video, convert the text into voice data, and replace the configured mouth shape information of the characters in the template video with the voice drive and obtain new video data;

[0026] Data acquisition module: used to acquire each frame of new video data and the coordinates of key facial points in each frame;

[0027] Data processing module: used to calculate the image parameters of each frame by acquiring the coordinates of the key points of the face in each frame to obtain the expression parameters, and import the obtained expression parameters into the three-dimensional rendering engine according to the frame sequence, and output the image sequence through the three-dimensional rendering engine;

[0028] Data output module: used to perform video synthesis on the obtained image sequence.

[0029] Compared with the prior art, the beneficial effects of the present invention are:

[0030] 1. Character models, scenes, lighting, and camera positions can all be edited and modified without restrictions;

[0031] 2. The compression rate, bit rate and resolution of the exported video can be edited

[0032] 3. The exported video itself is in the form of 3D animation, and the scene is any scene, not limited to the real world

[0033] 4. The operation is simple. Users only need to input the text to be played, select the language, and select the export animation parameters to output the corresponding 3D digital human animation video. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 It is a flow chart of the method of the present invention.

[0035] Figure 2 It is a system framework diagram of the present invention.

[0036] Description of the accompanying drawings:

[0037] 1. Key point mark33; 2. Key point mark133; 3. Key point mark263; 4. Key point mark362; 5. Lower edge of left eyebrow; 6. Lower edge of right eyebrow; 7. Upper edge of left eye; 8. Upper edge of right eye; 9. Left corner of mouth key point mark61; 10. Right corner of mouth key point mark291; 11. Lips key point mark13; 12. Nose tip key point mark1. DETAILED DESCRIPTION

[0038] The present invention will be further described below in conjunction with specific embodiments. It should be understood that these embodiments are only used to illustrate the present invention and are not intended to limit the scope of the present invention. In addition, it should be understood that after reading the content taught by the present invention, those skilled in the art can make various changes or modifications to the present invention, and these equivalent forms fall within the scope limited by the application equally.

[0039] In the present invention, terms such as "upper", "lower", "left", "right", "front", "back", "vertical", "horizontal", "side", "bottom", etc. indicate directions or positional relationships based on the directions or positional relationships shown in the accompanying drawings. They are relational words determined only for the convenience of describing the structural relationships of the various parts or elements of the present invention, and do not specifically refer to any part or element in the present invention and should not be understood as limitations on the present invention.

[0040] In the present invention, terms such as "fixed connection", "connected", "connection", etc. should be understood in a broad sense, indicating that it can be fixedly connected, integrally connected or detachably connected; it can be directly connected or indirectly connected through an intermediate medium. Relevant scientific research or technical personnel in this field can determine the specific meanings of the above terms in the present invention according to specific circumstances, and they should not be understood as limiting the present invention.

[0041] Embodiment: A method for generating three-dimensional digital human animation

[0042] like Figure 1 As shown, the specific steps include:

[0043] S1: Configure the human-computer interaction interface to obtain the mouth shape information of the characters in the template video and convert the text into voice data;

[0044] S2: Replace the configured template video character mouth shape information with voice drive and obtain new video data;

[0045] S3: Collect each frame of the new video data obtained in step S2 and the coordinates of the key points of the face in each frame;

[0046] S4: Calculate the image parameters of each frame by acquiring each frame image and the coordinates of the facial key points in each frame image to obtain the expression parameters;

[0047] S5: importing the obtained expression parameters into a three-dimensional rendering engine according to a frame sequence;

[0048] S6: outputting the image sequence through a three-dimensional rendering engine;

[0049] S7: Perform video synthesis on the obtained image sequence.

[0050] The interactive interface in step S1 is used as an interface for inputting configuration information, and the user selects a template scene, adjusts the scene, inputs driving text information, selects a language (Chinese, English, Japanese, Korean, etc.), selects the gender of the dubbing (male, female), timbre, output video resolution, output video format, output video compression rate and other parameters through this interactive interface;

[0051] The specific steps of converting text into voice data in step S1 are as follows: running a program on a computer, taking the input text data, language, gender, timbre and other parameters as input parameters to call the text-to-speech machine learning model interface, and through model calculation, generating corresponding voice data as a return value based on the input data, and saving the voice data.

[0052] In step S2, the voice data is read by running a computer program, and the template video is read at the same time. The voice and template video are used as input parameters to call the voice-driven lip synchronization machine learning model interface. The model calculates and outputs lip synchronization video data that matches the input voice. The length of the new video should be equal to the length of the voice data, and the video data is saved.

[0053] In step S3, obtaining each frame of the new video data is specifically as follows: running a program on a computer, reading the new video data obtained in step S2, obtaining its frame rate, number of frames, duration and other parameters, and saving the image sequence of each frame in the form of 0001.png, 0002.png, 0003.png, ... The purpose of saving the images in this form is to number the images and to be able to call them in sequence;

[0054] In step S3, the coordinates of the key points of the face in each frame of the new video data are obtained by running a program on a computer, reading the frame sequence in order, and obtaining the coordinates of all three-dimensional key points of the face in the frame by calling the key point recognition interface.

[0055] In step S4, calculating the image parameters of each frame to obtain the expression parameters specifically includes calculating the head rotation parameters of each frame and calculating the expression parameters of each frame. The head rotation parameters are also called head posture estimation, which include three parameters: HeadYaw, HeadPitch, and HeadRoll. These three parameters represent turning the head left and right, tilting the head left and right, and nodding up and down. The following is a specific method for calculating the head rotation parameters of each frame in Python:

[0056] Get the width, height, and number of channels of the frame image;

[0057] Set the focal length of the camera according to the image width, and calculate the coordinate center of the image center;

[0058] Create a camera matrix camera_matrix, which describes the camera parameters, such as focal length focal_length and center point center, as well as a fixed internal parameter type float;

[0059] Initialize the distortion coefficient dist_coeff, usually to zero, indicating no distortion;

[0060] Extract the 3D coordinates of the first 468 key points from the input face key points face_landmarks and store them in the landmarks variable;

[0061] Perform a series of coordinate transformations and posture corrections, including projecting key point landmarks into three-dimensional space, adjusting the chirality of the coordinate system, estimating the scale, etc.

[0062] Extract model points model_points and image points image_points. model_points contains the 3D coordinates of the metric, while image_points contains the coordinates on the image calculated from the keypoint coordinates;

[0063] Use the cv2.solvePnP function in the OpenCV library to calculate the rotation vector rotation_vector and the translation vector translation_vector by providing the model points model_points and image points image_points, as well as the camera matrix and distortion coefficients. These two vectors describe the posture and position of the head.

[0064] cv2.solvePnP returns the pose transformation matrix pose_transform_mat, the three-dimensional coordinates of the metric standard metric_landmarks, the rotation vector rotation_vector and the translation vector translation_vector;

[0065] Use the mat2euler function in the transforms3d library to convert the rotation matrix pose_transform_mat into an Euler angle matrix. Euler angles are a commonly used method of representing rotations. Euler angle matrices usually include three angles: pitch, yaw, and roll.

[0066] Smooth the above angle parameters and save them in frame order;

[0067] It should be pointed out that the head posture estimation core obtains the head rotation parameters through machine vision (OpenCV), and there is the possibility of optimization iteration. In fact, there are more than one feasible solutions, including but not limited to machine learning solutions, optical flow solutions, etc.

[0068] The expression parameters are shown in Table 1. There are 61 expression parameters, and the calculation of expression parameters has great flexibility.

[0069] Table 1 Expression parameters and schematics

[0070]

[0071]

[0072]

[0073] Calculate the expression parameters of each frame. Take a smile expression in one frame as an example. The main parameters that have a greater impact on the face are: left eye blink (leftEyeBlink), right eye blink (rightEyeBlink), left eyebrow up (browOuterUp_L), right eyebrow up (browOuterUp_R), left mouth corner up (mouthSmile_R), right mouth corner up (mouthSmile_R), mouth closure (mouthClose);

[0074] Calculate the left eye blink leftEyeBlink parameters, the process is as follows:

[0075] Take the eye width key points mark33 and mark133 to calculate the Euclidean distance, and record the result as left_eye_width. Take the outer vertical distance of the eye mark160 and mark144 to calculate the Euclidean distance, and record the result as left_eye_outer_lid. The Euclidean distance result of the inner eye mark158 and mark133 is recorded as left_eye_inner_lid. The vertical distance between the middle vertical mark159 and mark14 is recorded as left_eye_mid_lid;

[0076] Calculate the average vertical distance, add left_eye_outer_lid, left_eye_inner_lid, and left_eye_mid_lid and divide by 3 to record it as left_eye_lid_avg;

[0077] Calculate the ratio of left_eye_lid_avg to left_eye_width and record it as left_eye_radio;

[0078] Calculate the left eye blink parameters. From the empirical data of multiple debugging calculations, we know that the maximum left_eye_radio value is generally 0.6 and the minimum is 0.2. Based on the above experience, normalize this data and map the value range from 0.2 to 0.6 to the range of [-1,1], and record the result as left_eye_blink;

[0079] The left_eye_blink of this frame is the left eye blink parameter leftEyeBlink, and this value is smoothed and saved.

[0080] The process of calculating the right eye blink rightEyeBlink parameters is as follows: Take the eye width key points mark263 and mark362 to calculate the Euclidean distance, and record the result as left_eye_width. Take the outer vertical distance of the eye mark387 and mark373 to calculate the Euclidean distance, and record the result as right_eye_outer_lid. Similarly, the Euclidean distance result of the inner eye mark385 and mark380 is recorded as right_eye_inner_lid. The vertical distance between the middle vertical mark386 and mark374 of the eye is recorded as right_eye_mid_lid;

[0081] Calculate the average vertical distance, add right_eye_outer_lid, right_eye_inner_lid, right_eye_mid_lid and divide by 3 to record as right_eye_lid_avg;

[0082] Calculate the ratio of right_eye_lid_avg and right_eye_width and record it as right_eye_radio;

[0083] Calculate the right eye blink parameters. From the experience of multiple debugging calculations, we know that the right_eye_radio value is generally 0.6 at most and 0.2 at least. Based on the above experience, normalize the data and map the value range from 0.2 to 0.6 to the range of [-1,1]. The result is recorded as right_eye_blink;

[0084] The right_eye_blink of this frame is the left eye blink parameter rightEyeBlink, and this value is smoothed and saved.

[0085] Calculate the left eyebrow upward lift (browOuterUp_L) parameters:

[0086] Take the key points mark295, mark282, and mark283 of the lower edge of the eyebrow and calculate the average coordinates of the lower edge of the eyebrow by adding the three coordinates and dividing by 3. The result is recorded as left_brow_lower;

[0087] Take the key point mark 257, the upper edge of the eye, and calculate the Euclidean distance between the lower edge of the eyebrow and the upper edge of the eye, recorded as left_brow_dist;

[0088] Calculate the left eyebrow upward lifting parameter. According to empirical data, the maximum value of left_brow_dist is 1.5 and the minimum value is 1.25. Through normalization calculation, map left_brow_dist to the interval [-1,1] according to the above empirical data. The result is browOuterUp_L, which is smoothed and saved;

[0089] Calculate the right eyebrow upward lift (browOuterUp_R) parameter;

[0090] Take the key points mark52, mark53, and mark46 of the lower edge of the eyebrow and calculate the average coordinates of the lower edge of the eyebrow by adding the three coordinates and dividing by 3. The result is recorded as right_brow_lower;

[0091] Take the key point mark 27 on the upper edge of the eye, and calculate the Euclidean distance between the lower edge of the eyebrow and the upper edge of the eye, recorded as right_brow_dist;

[0092] Calculate the left eyebrow upward lifting parameter. According to empirical data, the maximum value of right_brow_dist is 1.5 and the minimum value is 1.25. Through normalization calculation, right_brow_dist is mapped to the interval [-1,1] according to the above empirical data. The result is browOuterUp_R, which is smoothed and saved.

[0093] Calculate the upper left corner of the mouth expression parameter mouthSmile_L:

[0094] Take the key point parameter of the left corner of the mouth mark61, and take the key point coordinate of the middle point of the lower edge of the upper lip mark13;

[0095] Subtract the coordinates of the two coordinates mark61 and mark13 in the Y-axis (vertical direction of the face) and get their distance in the vertical direction as left_dist;

[0096] Calculate the left mouth corner upward parameter. According to experience, the maximum value of left_dist is 0 and the minimum value is -0.25. Calculate it through normalization. Map its change to the interval [-1,1]. The result is mouthSmile_L. Smooth the result and save it.

[0097] Calculate the upper right corner of the mouth expression parameter mouthSmile_R:

[0098] Take the key point parameter of the right corner of the mouth, mark 291, and the key point coordinate of the middle point of the lower edge of the upper lip, mark 13;

[0099] Subtract the coordinates of the two coordinates mark291 and mark13 in the Y-axis (vertical direction of the face) and get their vertical distance, which is recorded as right_dist;

[0100] Calculate the left mouth corner upturn parameter. According to experience, the maximum value of right_dist is 0 and the minimum value is -0.25. Calculate by normalization. Map its change to the interval [-1,1]. The result is mouthSmile_R, which is smoothed and saved.

[0101] Calculate the mouth closure (mouthClose) parameters:

[0102] Take the key point mark 13 of the lower edge of the upper lip and the key point mark 14 of the upper edge of the lower lip. Calculate their sum and divide by 2 to get the center point of the mouth, recorded as mouth_center;

[0103] Take the key point mark1 at the tip of the nose. Calculate the Euclidean distance between mark1 and mouth_center, recorded as mouth_center_nose_dist;

[0104] Calculate the Euclidean distance between the upper and lower lip edges mark13 and mark14, and record it as mouth_open_dist;

[0105] Calculate the difference between mouth_center_nose_dist and mouth_open_dist, and record it as mouth_close. According to empirical data, the maximum value of mouth_close is 4.5 and the minimum value is 3.0. Through normalization calculation, its value is mapped to the interval [-1,1], and the result is mouthClose. Smooth the result and save it.

[0106] It should be pointed out that before calculating the expression of each frame, the application does not know what the expression of each frame is. In fact, all sub-expression parameters should be calculated. The combination of all sub-expression parameters is the complete parameter feature of the facial expression. It should be emphasized that the calculation method of each sub-expression parameter is not fixed, and there is the possibility of optimization and improvement.

[0107] Repeat steps S3-S4 to process all frames in the video and save the expression calculation results calculated in the order of processing each frame.

[0108] Step S5 is specifically: running a program on a computer, creating animation assets according to the expression parameters of each frame and applying them to the three-dimensional character model. Taking the Ureal three-dimensional rendering engine as an example, the steps are as follows:

[0109] Read the expression parameters saved in the frame order in step S5 to obtain the frame number fps, duration time and other information of the video;

[0110] Use CreateMoveScenec to create an empty animation asset, and use the MovieSceneBindingRig method to bind the skeleton of the 3D character model to the animation asset;

[0111] Use the GetMovieScene method to get the animation scene, record it as MovieScene, and use the SetPlaybackRange setting of MovieScene to configure the above video duration time to the animation asset, and use the SetFrameRate of MovieScene to set the frame rate of the animation asset;

[0112] Use the MovieSceneControlRigParameterTrack method of MovieScene to obtain the control handles of the face Face_ControlBoard_CtrlRig and the body Body_ControlBoard_CtrlRig in the skeleton asset, recorded as ControlRigParameterSectionFace and ControlRigParameterSectionBody respectively;

[0113] Assign values ​​to each sub-expression in each frame by using the AddScalarParameterKey method of ControlRigParameterSectionFace according to the order of the frames in the video;

[0114] In the order of the frames in the video, each sub-expression is assigned a value in each frame by using the AddTransformParameterKey method of ControlRigParameterSectionBody.

[0115] After the above steps, all sub-expressions have been saved in the animation assets in the order of frames and applied to the above character model.

[0116] Step S6 specifically includes: running a program on a computer, using the animation component of a 3D rendering engine, and rendering the above-mentioned character model with animation from the first frame to the last frame according to the resolution selected by the user. Each frame of the animation is rendered into a picture and saved in the form of 0001.jpg, 0002.jpg, 0003.jpg according to the naming rules.

[0117] Step S7 specifically includes: reading the above-rendered picture through a computer running program, synthesizing a video according to the video format and compression rate selected by the user, and attaching the audio generated in step 1 to the new video.

[0118] A system for generating three-dimensional digital human animation, comprising:

[0119] Data configuration module: used to configure the human-computer interaction interface to obtain the mouth shape information of the characters in the template video, convert the text into voice data, and replace the configured mouth shape information of the characters in the template video with the voice drive and obtain new video data;

[0120] Data acquisition module: used to acquire each frame of new video data and the coordinates of key facial points in each frame;

[0121] Data processing module: used to calculate the image parameters of each frame by acquiring the coordinates of the key points of the face in each frame to obtain the expression parameters, and import the obtained expression parameters into the three-dimensional rendering engine according to the frame sequence, and output the image sequence through the three-dimensional rendering engine;

[0122] Data output module: used to perform video synthesis on the obtained image sequence.

[0123] Among them, the data configuration module is data-connected with the data acquisition module, the data acquisition module is data-connected with the data processing module, and the data processing module is data-connected with the data output module.

Claims

1. A method for generating a three-dimensional digital human animation, characterized in that: The following steps are involved: S1: Configure the human-computer interaction interface to obtain the mouth shape information of the characters in the template video and convert the text into voice data; S2: Replace the configured template video character mouth shape information with voice drive and obtain new video data; S3: Collect each frame of the new video data obtained in step S2 and the coordinates of the key points of the face in each frame; S4: Calculate the image parameters of each frame by acquiring each frame image and the coordinates of the facial key points in each frame image to obtain the expression parameters; S5: importing the obtained expression parameters into a three-dimensional rendering engine according to a frame sequence; S6: outputting the image sequence through a three-dimensional rendering engine; S7: Perform video synthesis on the obtained image sequence; Calculating the image parameters of each frame to obtain the expression parameters in step S4 specifically includes: calculating the head rotation parameters of each frame and calculating the expression parameters of each frame; The head rotation parameters include: HeadYaw, HeadPitch and HeadRoll, and the calculation of the head rotation parameters for each frame specifically includes: Get the width, height and number of channels of the frame image; set the focal length of the camera according to the angle of the frame image, and calculate the coordinates of the center point of the image; create a camera matrix according to the focal length of the camera and the coordinates of the center point; initialize the distortion coefficient; extract the three-dimensional coordinates of the first 468 key points from the input face key points and store them in the landmarks variable; perform coordinate transformation and posture correction; extract model points and image points; use the cv2.solvePnP function in the OpenCV library to calculate the rotation vector and translation vector through the model point, image point, camera matrix and distortion coefficient; the cv2.solvePnP function returns the posture transformation matrix, the three-dimensional coordinates of the metric standard, the rotation vector and the translation vector; use the mat2euler function in the transforms3d library to convert the rotation vector into the Euler angle matrix, which includes three angles of pitch, yaw and roll; smooth the pitch, yaw and roll parameters and save them in frame order; The configuration of the human-computer interaction interface specifically includes: configuring the template scene, adjusting the scene, inputting the driving text information, selecting the language, selecting the dubbing gender, timbre, output video resolution, output video format and output video compression rate; the conversion of text into voice data specifically includes: using the input text information, language, gender and timbre parameters as input parameters to call the machine learning model interface of text-to-speech, generating corresponding voice data as a return value according to the input data through model calculation, and saving the voice data; The step S2 specifically includes: reading the voice data and the mouth shape information of the characters in the template video in step S1, and using the voice data and the mouth shape information of the characters in the template video as input parameters to call the voice-driven lip-sync machine learning model interface, wherein the model calculates and outputs lip-sync video data that matches the input voice, and the length of the new video data should be equal to the length of the above-mentioned voice data, and the video data is saved.

2. A method for generating three-dimensional digital human animation according to claim 1, characterized in that: The method of acquiring each frame of new video data comprises the following steps: reading the video data acquired in step S2, obtaining the frame rate, number of frames and duration parameters of the video data, and saving the image sequence of each frame in order to obtain a frame sequence; and acquiring the coordinates of the key points of the face in each frame of the new video data comprises the following steps: reading the frame sequence in order, and obtaining the coordinates of all three-dimensional key points of the face in the frame by calling the key point recognition interface of the face.

3. The method for generating three-dimensional digital human animation according to claim 1, characterized in that: The step of importing the obtained expression parameters into the three-dimensional rendering engine according to the frame sequence specifically includes: creating animation assets according to the expression parameters of each frame and applying them to the three-dimensional character model.

4. The method for generating three-dimensional digital human animation according to claim 1, characterized in that: Outputting the image sequence through the three-dimensional rendering engine specifically includes: using the animation component of the three-dimensional rendering engine, rendering the character model from the first frame to the last frame according to the resolution selected by the user, and rendering each frame of the animation into a picture for storage.

5. The method for generating three-dimensional digital human animation according to claim 1, characterized in that: The video synthesis of the obtained image sequence is specifically as follows: by reading the above-mentioned rendered pictures, synthesizing the video according to the video format and compression rate selected by the user, and attaching the audio generated in step S1 to the new video.

6. A system applied to the method for generating three-dimensional digital human animation as claimed in claim 1, characterized in that: include: Data configuration module: used to configure the human-computer interaction interface to obtain the mouth shape information of the characters in the template video, convert the text into voice data, and replace the configured mouth shape information of the characters in the template video with the voice drive and obtain new video data; Data acquisition module: used to acquire each frame of new video data and the coordinates of key facial points in each frame; Data processing module: used to calculate the image parameters of each frame by acquiring the coordinates of the key points of the face in each frame to obtain the expression parameters, and import the obtained expression parameters into the three-dimensional rendering engine according to the frame sequence, and output the image sequence through the three-dimensional rendering engine; Data output module: used to perform video synthesis on the obtained image sequence.

Citation Information

Patent Citations

  • Real-time analysis method of learning states of students in classroom and in natural teaching environment

    CN110287792A

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

    CN115908659A

  • Multi-field lip language recognition sample automatic generation method and system based on corpus relationship

    CN116486812A

  • Digital human control method and device, electronic equipment and storage medium

    CN116910198A