Virtual person construction method, virtual person system and electronic equipment
By performing object detection and pose capture on the real-time image of virtual characters, the quaternions of the six-dimensional rotation vector are determined, and driving parameters are determined in combination with the face image, the problem of incoherent movements of virtual characters in complex scenes is solved, and the virtual characters are improved accuracy and robustness.
Patent Information
- Application Number
- CN202411101174.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-12
- Publication Date
- 2024-12-10
AI Technical Summary
Existing virtual character construction methods may be incoherent and unnatural in complex body overall rotation or rapid movement scenarios, resulting in less precision and robustness.
By performing object detection on the real-time image of the person to be tested, face and body images are acquired, body posture capture is performed, quaternions of the six-dimensional rotation vector are determined, and virtual human driving parameters are determined based on the face image, and three-dimensional construction and rendering are performed.
It improves the smooth and naturalness of the movements of virtual characters, significantly improving accuracy and robustness.
Smart Images

Figure CN119107406A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of virtual human technology, and in particular to a virtual character construction method, a virtual human system and an electronic device. Background Art
[0002] At present, virtual human technology is a comprehensive application of artificial intelligence, computer graphics and other technologies. It simulates the form and behavior of real people through images, voice and text, so as to construct a virtual character image similar to real people. Virtual characters are not only an important medium to link the virtual world and the physical world, but also an important branch application scenario of the metaverse at the current stage. Virtual characters are mainly divided into two categories, namely two-dimensional virtual characters and three-dimensional virtual characters. Two-dimensional virtual characters are mainly used to simulate the voice and some gestures of real people. The driving methods of two-dimensional virtual characters mainly include voice driving and video driving. Voice driving is to achieve voice synthesis by simulating the mouth shape of real people, and video driving is to achieve the dynamic performance of virtual characters by simulating video images of real people. Three-dimensional virtual characters are richer and more realistic, and can simulate the expressions and body movements of real people. The driving methods of three-dimensional virtual characters are diverse, including visual motion capture, optical motion capture and non-optical motion capture. The method based on visual motion capture does not require the use of special equipment, but only requires an ordinary monocular camera to complete it.
[0003] The existing method for constructing a virtual character is to first construct an initial virtual human model through a three-dimensional modeling tool, then determine the face image from the real-time acquired human video image through a pre-trained face reasoning model, and then perform key point detection on the face image to obtain the face key points; and determine the body part image from the human video image through a pre-trained body reasoning model, and then perform key point detection on the body part image to obtain the body key points; map the face key points and body key points to the initial virtual human model to obtain the virtual character. This method drives the virtual character by key points. When it involves complex scenes of overall body rotation or rapid movement, the movements of the virtual character may be incoherent and unnatural, resulting in low accuracy and robustness of the constructed virtual character. Summary of the invention
[0004] The embodiments of the present application provide a method for constructing a virtual character, a virtual human system, and an electronic device, so as to solve the technical problem that the existing method for constructing a virtual character is to drive the virtual character by key points, and when it comes to complex scenes involving overall body rotation or rapid movement, the movements of the virtual character may appear incoherent and unnatural, resulting in low accuracy and robustness of the constructed virtual character.
[0005] In a first aspect, an embodiment of the present application provides a method for constructing a virtual character, comprising the following steps.
[0006] Perform target detection on the real-time image of the person to be tested to obtain a facial image and a body image; perform body posture capture on the body image to obtain human posture data; determine the quaternion corresponding to each of the multiple six-dimensional rotation vectors in the human posture data based on the rotation matrices corresponding to each of the multiple six-dimensional rotation vectors; determine virtual human driving parameters based on the facial image and the quaternions corresponding to each of the multiple six-dimensional rotation vectors; and perform three-dimensional construction and rendering of a virtual character corresponding to the person to be tested based on the virtual human driving parameters.
[0007] In one embodiment, the method of determining the quaternion corresponding to each of the multiple six-dimensional rotation vectors according to the rotation matrices corresponding to each of the multiple six-dimensional rotation vectors in the human posture data includes: performing the following operations for each six-dimensional rotation vector: extracting a first three-dimensional rotation vector and a second three-dimensional rotation vector from the six-dimensional rotation vector; normalizing the first three-dimensional rotation vector to obtain a first target vector; orthogonalizing the second three-dimensional rotation vector based on the first target vector to obtain a second target vector, and normalizing the second target vector to obtain a third target vector; performing cross product calculation on the first target vector and the third target vector to obtain a fourth target vector; constructing a rotation matrix corresponding to the six-dimensional rotation vector based on the first target vector, the third target vector and the fourth target vector, and determining the quaternion corresponding to the six-dimensional rotation vector based on the rotation matrix.
[0008] In one embodiment, the quaternion corresponding to the six-dimensional rotation vector includes: a first imaginary part, a second imaginary part, a third imaginary part and a real part; determining the quaternion corresponding to the six-dimensional rotation vector according to the rotation matrix includes: determining the real part according to the main diagonal elements in the rotation matrix; determining the first imaginary part, the second imaginary part and the third imaginary part according to other elements in the rotation matrix except the main diagonal elements in combination with the real part.
[0009] In one embodiment, determining the virtual human driving parameters according to the facial image and the quaternions corresponding to each of the multiple six-dimensional rotation vectors includes: capturing the head posture of the facial image to obtain the head Euler angles; capturing the facial expression of the facial image based on the head Euler angles to obtain multiple target coefficients; determining the virtual human driving parameters according to the quaternion corresponding to the head Euler angles, the multiple target coefficients and the quaternions corresponding to each of the multiple six-dimensional rotation vectors.
[0010] In one embodiment, the determining of the virtual human driving parameters according to the quaternion corresponding to the head Euler angles, the multiple target coefficients, and the quaternions corresponding to the multiple six-dimensional rotation vectors includes: determining the whole body parameters corresponding to the person to be tested according to the quaternion corresponding to the head Euler angles, the multiple target coefficients, and the quaternions corresponding to the multiple six-dimensional rotation vectors; and de-jittering the whole body parameters through a preset filter to obtain the virtual human driving parameters.
[0011] In one embodiment, capturing body posture of the body image to obtain human posture data includes: pre-inferring body parts of the body image to obtain a body part frame located in the body image; extracting an initial body part image from the body image based on the body part frame when detecting that a human part exists in the body part frame; pre-processing the initial body part image to obtain a target body part image and position and size data of the target body part image in the body image, the pre-processing including: image scaling and normalization; determining the human posture data according to the target body part image and the position and size data through a body posture inference model, the body posture inference model being trained based on body part image samples, position and size data samples corresponding to the body part image samples, and human posture data samples.
[0012] In the second aspect, an embodiment of the present application provides a virtual human system, comprising: a main control module, a motion capture module and a three-dimensional reconstruction module, wherein the main control module is used to obtain a real-time image of a person to be tested; the motion capture module is used to perform target detection on the real-time image to obtain a face image and a body image; perform body posture capture on the body image to obtain human posture data; determine the quaternion corresponding to each of the multiple six-dimensional rotation vectors in the human posture data according to the rotation matrix corresponding to each of the multiple six-dimensional rotation vectors; determine the virtual human driving parameters according to the face image and the quaternion corresponding to each of the multiple six-dimensional rotation vectors; the three-dimensional reconstruction module is used to perform three-dimensional construction and rendering of the virtual character corresponding to the person to be tested based on the virtual human driving parameters.
[0013] In a third aspect, an embodiment of the present application provides a terminal, including a memory, a transceiver, and a processor.
[0014] A memory is used to store a computer program; a transceiver is used to send and receive data under the control of the processor; and a processor is used to read the computer program in the memory and perform the following operations.
[0015] Perform target detection on the real-time image of the person to be tested to obtain a facial image and a body image; perform body posture capture on the body image to obtain human posture data; determine the quaternion corresponding to each of the multiple six-dimensional rotation vectors in the human posture data based on the rotation matrices corresponding to each of the multiple six-dimensional rotation vectors; determine virtual human driving parameters based on the facial image and the quaternions corresponding to each of the multiple six-dimensional rotation vectors; and perform three-dimensional construction and rendering of a virtual character corresponding to the person to be tested based on the virtual human driving parameters.
[0016] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory storing a computer program, wherein the processor implements the steps of the virtual character construction method described in the first aspect when executing the computer program.
[0017] In a fifth aspect, an embodiment of the present application further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the virtual character construction method described in the first aspect.
[0018] In a sixth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the virtual character construction method described in the first aspect.
[0019] The virtual character construction method, virtual human system and electronic device provided by the embodiment of the present application, the method obtains a face image and a body image by performing target detection on the real-time image of the person to be tested; the body posture is captured on the body image to obtain human posture data; according to the rotation matrix corresponding to each of the multiple six-dimensional rotation vectors in the human posture data, the quaternion corresponding to each of the multiple six-dimensional rotation vectors is determined; according to the face image and the quaternion corresponding to each of the multiple six-dimensional rotation vectors, the virtual human driving parameters are determined; based on the virtual human driving parameters, the virtual character corresponding to the person to be tested is three-dimensionally constructed and rendered. After determining the human posture data, the method first determines the rotation matrix corresponding to each of the multiple six-dimensional rotation vectors in the human posture data, and then determines the quaternion corresponding to each of the multiple six-dimensional rotation vectors, and then combines the face image to determine a more accurate virtual human driving parameter, so that based on the virtual human driving parameter, the virtual character corresponding to the person to be tested is three-dimensionally constructed and rendered to drive the virtual character, and the movement of the virtual character is smoother and more natural, which can effectively improve the accuracy and robustness of the virtual character. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the present application or the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0021] Figure 1 It is a flowchart of the method for constructing a virtual character provided in an embodiment of the present application.
[0022] Figure 2 It is a partial structural diagram of the body posture reasoning model provided in the embodiment of the present application.
[0023] Figure 3 It is a partial structural diagram of the head posture inference model provided in the embodiment of the present application.
[0024] Figure 4 It is a structural diagram of the virtual human system provided in an embodiment of the present application.
[0025] Figure 5 It is a schematic diagram of an application scenario of the virtual human system provided in an embodiment of the present application.
[0026] Figure 6 It is a timing diagram of the virtual human system provided in an embodiment of the present application.
[0027] Figure 7 It is a schematic diagram of the structure of the terminal provided in the embodiment of the present application.
[0028] Figure 8 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0029] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0030] Figure 1 Schematic diagram of the process of constructing a virtual character provided in the embodiment of the present application. Figure 1 , an embodiment of the present application provides a method for constructing a virtual character, comprising the following steps 101 to 105.
[0031] Step 101: Perform target detection on the real-time image of the person to be tested to obtain a face image and a body image.
[0032] The face image includes the head and face of the person to be tested.
[0033] The body image includes the hands, arms, legs, feet and torso of the person being tested.
[0034] Optionally, the electronic device performs target detection on the real-time image of the person to be tested to obtain a face image and a body image, which may include: the electronic device obtains the initial real-time image of the person to be tested from an input source in real time; the electronic device preprocesses the initial real-time image of the person to be tested to obtain the real-time image of the person to be tested; the electronic device determines the whole body key point information of the person to be tested according to the real-time image of the person to be tested through a target detection model; the electronic device determines the face target frame and the body target frame located in the real-time image according to the whole body key point information; when the face target frame is not empty, the electronic device extracts the face image from the real-time image; when the body target frame is not empty, the electronic device extracts the body image from the real-time image.
[0035] The input sources may include: a monocular camera, a real-time transport protocol (RTP) stream, and a video file.
[0036] The initial real-time image can be understood as the current frame in the video stream data.
[0037] Preprocessing may include: image scaling and normalization processing, etc.
[0038] Exemplarily, the target box may be represented as (x1, y1, x2, y2), where (x1, y1) represents the coordinates of the upper left corner of the target box, and (x2, y2) represents the coordinates of the lower right corner of the target box.
[0039] Exemplarily, the target detection model may adopt a YOLOv8 model, which can accurately obtain the whole body key point information of the person to be tested and can meet the real-time requirements.
[0040] Optionally, when the face target box is not empty and the body target box is empty, it means that the real-time image of the person to be tested does not include the hands, arms, legs, feet and torso of the person to be tested, but only includes the head and face of the person to be tested. The electronic device extracts the facial image from the real-time image; the electronic device determines the virtual human driving parameters based on the facial image.
[0041] Optionally, the electronic device determines the driving parameters of the virtual person based on the face image, which may include: the electronic device captures the head posture of the face image to obtain the head Euler angle; the electronic device captures the facial expression of the face image based on the head Euler angle to obtain multiple target coefficients; the electronic device determines the upper body parameters corresponding to the person to be tested based on the quaternion corresponding to the head Euler angle and the multiple target coefficients; the electronic device de-jitters the upper body parameters through a preset filter to obtain the driving parameters of the virtual person. It should be noted that at this time, the lower body of the virtual character returns to the default posture.
[0042] Among them, multiple target coefficients refer to a set of dynamically changing values used to characterize the user's facial expression features, such as multiple BlendShape (mixed deformation) coefficients in the ARKit framework. Generally, the ARKit standard defines 52 BlendShape coefficients, which provide a higher-dimensional interpretation of facial expressions and can more accurately capture subtle changes in the user's facial expressions. The user's current facial expression can be classified by analyzing the BlendShape coefficients. Each BlendShape coefficient controls the corresponding facial expression features, and the value range of each BlendShape coefficient is a floating point number between 0 and 1.
[0043] Taking the jawOpen coefficient among the 52 BlendShape coefficients as an example, the jawOpen coefficient is used to characterize the degree of opening of the user's mouth. The value of the jawOpen coefficient is between 0 and 1, representing the size of the mouth from closed to open.
[0044] Exemplarily, the preset filter may be a Euro filter. A Euro filter is a low-pass filter used for real-time noise filtering, which uses an exponential smoothing method, is simple to operate but has excellent effects, and utilizes the fact that people are more sensitive to jitter when moving at low speeds and more sensitive to delay when moving at high speeds, and achieves excellent filtering effects by defining a smoothing factor that is adaptively adjusted according to the displacement speed.
[0045] Step 102: Capture the body posture of the body image to obtain human body posture data.
[0046] Optionally, the human body posture data may include: human body posture parameters (pred_pose), human body shape parameters (pred_shape) and camera parameters (pred_cam), etc.
[0047] Among them, the human body posture parameters include multiple body joint rotation vectors. For example, assuming that there are 144 body joint rotation vectors, these 144 body joint rotation vectors can be divided into 24 six-dimensional rotation vectors.
[0048] Human body shape parameters are used to characterize the height, weight and size of a human body.
[0049] The camera parameters are the camera parameters corresponding to the input sources mentioned above.
[0050] After determining the body image, the electronic device can capture the body posture of the body image to obtain human posture data, providing data support for the subsequent determination of virtual human driving parameters.
[0051] In one embodiment, an electronic device captures body posture of a body image to obtain human posture data, which may include: the electronic device performs body part pre-inference on the body image to obtain a body part frame located in the body image; when a human part is detected in the body part frame, the electronic device extracts an initial body part image from the body image based on the body part frame; the electronic device pre-processes the initial body part image to obtain a target body part image and position and size data of the target body part image in the body image, and the pre-processing may include: image scaling and normalization; the electronic device determines the human posture data according to the target body part image and the position and size data through a body posture inference model, and the body posture inference model is trained based on body part image samples, position and size data samples corresponding to the body part image samples, and human posture data samples.
[0052] The position and size data may include: position information (coordinate point and center point) and size information (size in the horizontal direction and size in the vertical direction) of the target body part image in the body image.
[0053] In the process of determining the human body posture data, the electronic device first performs body part pre-inference on the body image to obtain the body part frame located in the body image, and then determines whether there is a human body part in the body part frame: if it is detected that there is no human body part in the body part frame, the electronic device returns the human body posture data available for the previous frame of the body image; if it is detected that there is a human body part in the body part frame, the electronic device extracts the initial body part image from the body image based on the body part frame, and then pre-processes the initial body part image (such as image scaling and normalization) to obtain the target body part image and the position and size data of the target body part image in the body image. In this way, the electronic device can input the target body part image and the position and size data into the body posture inference model to obtain the human body posture data output by the body posture inference model.
[0054] For example, Figure 2This is a partial structural diagram of the body posture inference model provided in the embodiment of the present application. The backbone network of the body posture inference model can adopt the ResNet-50 structure. After the mean pooling of the 7×7 window and the calculation of the fully connected layer, a 1×2048 feature vector can be obtained. The feature vector is then connected to Figure 2 In the network shown. Figure 2 As can be seen in the figure, the 1x2048 feature vector output by ResNet-50 is concatenated with offset_xyb (human position parameters, i.e. the horizontal coordinate of the center point of the body target frame, the vertical coordinate of the center point and the side length of the body target frame), pred_pose (human posture parameters), pred_shape (human shape parameters), and pred_cam (camera parameters), and then multiple operators such as full connection (Linear) and random inactivation (Dropout) are used to output the final pred_pose, pred_shape, and pred_cam parameters respectively. This data stream will be repeated 3 times (i.e. repeat 3 times). The first pred_pose, pred_shape, and pred_cam parameters use the default initialization values, while the second and third times are reassigned based on the previous processing results.
[0055] Optionally, the body posture inference model is trained based on the following steps: the electronic device inputs body part image samples and position size data samples corresponding to the body part image samples into the initial body posture inference model to obtain predicted human posture data output by the initial body posture inference model; the electronic device determines the loss value between the predicted human posture data and the human posture data sample based on a first loss function; the electronic device updates the model parameters of the initial body posture inference model based on the loss value to obtain a trained body posture inference model.
[0056] Exemplarily, the first loss function may be an L1 Loss loss function, and the calculation formula of the first loss function is: ;in, Indicates the loss value corresponding to pred_pose; express The weight coefficient of Indicates the loss value corresponding to pred_shape; express The weight coefficient of Represents a constant calculated from pred_cam within the same batch.
[0057] Step 103: Determine the quaternion corresponding to each of the multiple six-dimensional rotation vectors according to the rotation matrices corresponding to each of the multiple six-dimensional rotation vectors in the human body posture data.
[0058] After determining the human body posture data, the electronic device first determines the rotation matrices corresponding to the multiple six-dimensional rotation vectors in the human body posture data, and then determines the quaternions corresponding to the multiple six-dimensional rotation vectors, so as to facilitate the subsequent combination with the face image to determine more accurate virtual human driving parameters.
[0059] In one embodiment, the electronic device determines the quaternion corresponding to each of the multiple six-dimensional rotation vectors based on the rotation matrices corresponding to each of the multiple six-dimensional rotation vectors in the human body posture data, which may include: performing the following operations for each six-dimensional rotation vector: the electronic device extracts a first three-dimensional rotation vector and a second three-dimensional rotation vector from the six-dimensional rotation vector; the electronic device normalizes the first three-dimensional rotation vector to obtain a first target vector; the electronic device orthogonalizes the second three-dimensional rotation vector based on the first target vector to obtain a second target vector, and normalizes the second target vector to obtain a third target vector; the electronic device performs a cross product calculation on the first target vector and the third target vector to obtain a fourth target vector; the electronic device constructs a rotation matrix corresponding to the six-dimensional rotation vector based on the first target vector, the third target vector and the fourth target vector, and determines the quaternion corresponding to the six-dimensional rotation vector based on the rotation matrix.
[0060] It can be understood that, for multiple six-dimensional rotation vectors in the human body posture data, each six-dimensional rotation vector is composed of two three-dimensional rotation vectors.
[0061] Exemplarily, the following operations are performed for each six-dimensional rotation vector: the electronic device extracts a first three-dimensional rotation vector v1 and a second three-dimensional rotation vector v2 from the six-dimensional rotation vector, and then normalizes the first three-dimensional rotation vector v1 to obtain a first target vector , the first target vector The calculation formula is: Then, the electronic device is based on the first target vector , orthogonalize the second three-dimensional rotation vector v2 to obtain the second target vector , the second target vector The calculation formula is: , then, for the second target vector Perform standardization to obtain the third target vector , the third target vector The calculation formula is: In this way, the electronic device can detect the first target vector and the third target vector Perform cross product calculation to obtain the fourth target vector v3. The fourth target vector v3 and the first target vector and the third target vector Orthogonal, the calculation formula of the fourth target vector v3 is: Then, the electronic device can use the first target vector , the third target vector and the fourth target vector v3 (these three target vectors are all orthogonal normalized vectors) are used as column vectors of the rotation matrix R corresponding to the six-dimensional rotation vector to construct the rotation matrix R. The rotation matrix R can be expressed as: The electronic device can determine the quaternion corresponding to the six-dimensional rotation vector according to the rotation matrix R.
[0062] It is understandable that there are as many rotation matrices as there are six-dimensional rotation vectors, and each rotation matrix corresponds to a quaternion.
[0063] In one embodiment, the quaternion corresponding to the six-dimensional rotation vector may include: a first imaginary part, a second imaginary part, a third imaginary part and a real part; the electronic device determines the quaternion corresponding to the six-dimensional rotation vector based on the rotation matrix, which may include: the electronic device determines the real part based on the main diagonal elements in the rotation matrix; the electronic device determines the first imaginary part, the second imaginary part and the third imaginary part based on the elements other than the main diagonal elements in the rotation matrix combined with the real part.
[0064] Exemplarily, for each six-dimensional rotation vector, assume Represents the element in the i-th row and j-th column of the rotation matrix R corresponding to the six-dimensional rotation vector. The quaternion corresponding to the six-dimensional rotation vector can be expressed as (x, y, z, w), where x represents the first imaginary part; y represents the second imaginary part; z represents the third imaginary part; and w represents the real part. The calculation formula for the real part w is: ,in, , and are the main diagonal elements in the rotation matrix R; the calculation formula for the first imaginary part x is: , the calculation formula of the second imaginary part y is: , the calculation formula of the third imaginary part z is: ,in, , , , , and are all elements in the rotation matrix R except the main diagonal elements.
[0065] Step 104 : Determine virtual human driving parameters according to the face image and the quaternions corresponding to each of the multiple six-dimensional rotation vectors.
[0066] After determining the quaternions corresponding to multiple six-dimensional rotation vectors, the electronic device combines the facial image to determine the virtual human driving parameters. The virtual human driving parameters are relatively accurate, which facilitates the subsequent three-dimensional construction and rendering of the virtual character corresponding to the person under test to drive the virtual character. Compared with the key point driving method in the prior art, the movement of the virtual character is smoother and more natural.
[0067] In one embodiment, the electronic device determines the driving parameters of the virtual human based on the facial image and the quaternions corresponding to each of the multiple six-dimensional rotation vectors, which may include: the electronic device captures the head posture of the facial image to obtain the head Euler angles; the electronic device captures the facial expression of the facial image based on the head Euler angles to obtain multiple target coefficients; the electronic device determines the driving parameters of the virtual human based on the quaternions corresponding to the head Euler angles, the multiple target coefficients and the quaternions corresponding to each of the multiple six-dimensional rotation vectors.
[0068] It should be noted that there is no limit to the timing between the electronic device determining the Euler angles of the head and the electronic device determining the human body posture data.
[0069] Optionally, the electronic device captures the head posture of the face image to obtain the head Euler angles, which may include: the electronic device captures the head posture of the face image through a head posture inference model to obtain the head Euler angles; wherein the head posture inference model is trained based on face image samples and head Euler angle samples corresponding to the face image samples.
[0070] For example, Figure 3 is a partial structural diagram of the head posture inference model provided in the embodiment of the present application. Figure 3 As can be seen in Figure 2, the backbone network of the head posture inference model can use a convolutional neural network; Figure 3 In the figure, N represents the number of convolution kernels, C represents the number of convolution kernel channels, W represents the width of the convolution kernel, and H represents the height of the convolution kernel; CONV represents the convolution operation; CONVBLOCK1, CONV BLOCK2, and CONV BLOCK3 are all convolution blocks. In this way, the electronic device sends the output of the convolution neural network to two fully connected layers. The number of neurons in these two fully connected layers is set to 64 and 3 respectively. The output of the second fully connected layer is the head Euler angle, which includes: nutation angle (value range is [-180°, 180°]), precession angle (i.e. precession angle) (value range is [-90°,90°]) and rotation angle (The value range is [-180°, 180°]).
[0071] For example, the quaternion corresponding to the Euler angle of the head can be expressed as: .
[0072] Optionally, the head posture inference model is trained based on the following steps: the electronic device inputs a face image sample and a head Euler angle sample corresponding to the face image sample into an initial head posture inference model to obtain a predicted head Euler angle output by the initial head posture inference model; the electronic device determines a loss value between the predicted head Euler angle and the head Euler angle sample based on a second loss function; the electronic device updates the model parameters of the initial head posture inference model based on the loss value to obtain a trained head posture inference model.
[0073] Exemplarily, the second loss function may be an L1 Loss loss function.
[0074] Optionally, the electronic device captures facial expressions on facial images based on the Euler angles of the head to obtain multiple target coefficients, which may include: when the Euler angles of the head are less than or equal to a preset threshold, the electronic device captures facial expressions on facial images through a facial expression capture model to obtain multiple target coefficients; wherein the facial expression capture model is trained based on facial image samples and multiple target coefficient samples corresponding to the facial image samples.
[0075] Optionally, the preset threshold may be set before the electronic device leaves the factory, or may be user-defined, which is not specifically limited here.
[0076] It should be noted that when the head Euler angle is greater than a preset threshold, it means that there is an abnormality in the head Euler angle, and the electronic device returns the available head Euler angle of the previous frame of face image.
[0077] Taking 52 BlendShape coefficients as an example, the backbone network of the facial expression capture model can adopt the ResNet-50 structure. ResNet-50 extracts features from the face image to obtain facial features, which are then connected to the fully connected layer. The output of the fully connected layer is 52 neurons. Since the value range of the BlendShape coefficient is between 0 and 1, a Sigmoid function (also called Logistic function) is applied to the output of the fully connected layer for processing. The Sigmoid function can be expressed as: ,in, Represents the output result of the fully connected layer. The Sigmoid function will Mapped to the interval [0,1], which conforms to the value range of the BlendShape coefficient.
[0078] Optionally, the facial expression capture model is trained based on the following steps: the electronic device inputs a facial image sample and a plurality of target coefficient samples corresponding to the facial image sample into an initial facial expression capture model to obtain a plurality of predicted target coefficients output by the initial facial expression capture model; for each predicted target coefficient, the electronic device determines a loss value between the predicted target coefficient and the corresponding target coefficient sample based on a third loss function; the electronic device determines an average loss value corresponding to all loss values; the electronic device updates the model parameters of the initial facial expression capture model based on the average loss value to obtain a trained facial expression capture model.
[0079] Exemplarily, the third loss function may be an L1 Loss loss function.
[0080] Optionally, the electronic device can deploy the head pose inference model and the facial expression capture model through Open Neural Network Exchange (ONNX).
[0081] It should be noted that ONNX provides an intermediate bridge between model training and reasoning, so that different downstream reasoning frameworks can read ONNX for deployment. This method decouples the model training and reasoning processes, allowing any upstream training framework and downstream reasoning framework to be combined and matched without using the same framework for training and reasoning, with higher compatibility and easier deployment. In addition, ONNX supports two reasoning methods, Central Processing Unit (CPU) and Graphics Processing Unit (GPU), as well as cross-language reasoning. Through support for GPU, the reasoning speed of the model is greatly improved. Compared with reasoning in a CPU environment, the model performance will be significantly improved. In the embodiment of the present application, by converting the model output by PyTorch into an ONNX model and saving it to a specified path, the ONNX format model required for deployment can be obtained.
[0082] In this way, the electronic device can determine the driving parameters of the virtual human based on the quaternion corresponding to the Euler angle of the head, multiple target coefficients, and the quaternion corresponding to each of multiple six-dimensional rotation vectors.
[0083] In one embodiment, the electronic device determines the driving parameters of a virtual human based on the quaternion corresponding to the Euler angles of the head, multiple target coefficients, and the quaternions corresponding to each of the multiple six-dimensional rotation vectors, which may include: the electronic device determines the whole body parameters corresponding to the person to be tested based on the quaternion corresponding to the Euler angles of the head, multiple target coefficients, and the quaternions corresponding to each of the multiple six-dimensional rotation vectors; the electronic device de-jitters the whole body parameters through a preset filter to obtain the driving parameters of the virtual human.
[0084] Exemplarily, the preset filter may be the one-Euro filter mentioned above.
[0085] It should be noted that if the virtual character's wrist needs to be flipped, the electronic device will convert the quaternion corresponding to the wrist from a global parameter to a local parameter, and if the wrist Euler angle is within the normal range, part of the wrist will be migrated to the elbow, that is, part of the local parameters will be migrated to the quaternion corresponding to the elbow.
[0086] Exemplarily, the electronic device may predefine a whole body parameter matrix, and the electronic device stores the quaternion corresponding to the head Euler angle, multiple target coefficients (such as 52 BlendShape coefficients), and the quaternion corresponding to each of the multiple six-dimensional rotation vectors in the whole body parameter matrix. In addition, the electronic device may also store the human body shape parameters (pred_shape) and camera parameters (pred_cam) mentioned above in the whole body parameter matrix to obtain the final whole body parameter matrix. At this time, the data stored in the final whole body parameter matrix is the whole body parameters corresponding to the person to be tested. In this way, the electronic device can de-jitter the whole body parameters through a preset filter (such as a Euro filter) to obtain more accurate virtual human driving parameters.
[0087] Step 105: Based on the virtual human driving parameters, three-dimensionally construct and render the virtual character corresponding to the person to be tested.
[0088] After determining the virtual human driving parameters, the electronic device can construct and render the virtual character corresponding to the person under test in three dimensions based on the virtual human driving parameters to drive the virtual character. The movements of the virtual character are smoother and more natural, which can effectively improve the accuracy and robustness of the virtual character.
[0089] Optionally, the electronic device may also construct an initial virtual character corresponding to the person to be tested through a three-dimensional modeling tool; the electronic device performs three-dimensional reconstruction and rendering on the initial virtual character based on the virtual human driving parameters to obtain a virtual character corresponding to the person to be tested.
[0090] In an embodiment of the present application, target detection is performed on the real-time image of the person to be measured to obtain a face image and a body image; the body posture is captured on the body image to obtain human posture data; the quaternions corresponding to the multiple six-dimensional rotation vectors are determined according to the rotation matrices corresponding to the multiple six-dimensional rotation vectors in the human posture data; the virtual human driving parameters are determined according to the face image and the quaternions corresponding to the multiple six-dimensional rotation vectors; based on the virtual human driving parameters, the virtual character corresponding to the person to be measured is three-dimensionally constructed and rendered. After determining the human posture data, the method first determines the rotation matrices corresponding to the multiple six-dimensional rotation vectors in the human posture data, and then determines the quaternions corresponding to the multiple six-dimensional rotation vectors, and then combines the face image to determine more accurate virtual human driving parameters. In this way, based on the virtual human driving parameters, the virtual character corresponding to the person to be measured is three-dimensionally constructed and rendered to drive the virtual character, and the movement of the virtual character is smoother and more natural, which can effectively improve the accuracy and robustness of the virtual character.
[0091] The virtual human system provided in the embodiment of the present application is described below. The virtual human system described below and the virtual character construction method described above can be referenced to each other.
[0092] Figure 4 Schematic diagram of the structure of the virtual human system provided in the embodiment of the present application. Figure 4 The embodiment of the present application provides a virtual human system, including the following main control module 401, motion capture module 402 and three-dimensional reconstruction module 403.
[0093] The main control module 401 is used to obtain a real-time image of the person to be tested.
[0094] The motion capture module 402 is used to perform target detection on the real-time image to obtain the face image and the body image; to capture the body posture of the body image to obtain the human posture data; to determine the quaternion corresponding to each of the multiple six-dimensional rotation vectors according to the rotation matrix corresponding to each of the multiple six-dimensional rotation vectors in the human posture data; and to determine the virtual human driving parameters according to the face image and the quaternion corresponding to each of the multiple six-dimensional rotation vectors.
[0095] The three-dimensional reconstruction module 403 is used to perform three-dimensional construction and rendering of the virtual character corresponding to the person to be tested based on the virtual human driving parameters.
[0096] Specifically, after the main control module 401 obtains the real-time image of the person to be measured, the main control module 401 may transmit the real-time image to the shared memory for the motion capture module 402 to call.
[0097] Optionally, the motion capture module 402 is specifically used to perform the following operations for each six-dimensional rotation vector: extract a first three-dimensional rotation vector and a second three-dimensional rotation vector from the six-dimensional rotation vector; standardize the first three-dimensional rotation vector to obtain a first target vector; based on the first target vector, orthogonalize the second three-dimensional rotation vector to obtain a second target vector, and standardize the second target vector to obtain a third target vector; perform cross product calculation on the first target vector and the third target vector to obtain a fourth target vector; based on the first target vector, the third target vector and the fourth target vector, construct a rotation matrix corresponding to the six-dimensional rotation vector, and determine the quaternion corresponding to the six-dimensional rotation vector based on the rotation matrix.
[0098] Optionally, the quaternion corresponding to the six-dimensional rotation vector may include: a first imaginary part, a second imaginary part, a third imaginary part and a real part; the motion capture module 402 is specifically used to determine the real part based on the main diagonal elements in the rotation matrix; and determine the first imaginary part, the second imaginary part and the third imaginary part based on the elements other than the main diagonal elements in the rotation matrix combined with the real part.
[0099] Optionally, the motion capture module 402 is specifically used to capture the head posture of the face image to obtain the head Euler angle; based on the head Euler angle, capture the facial expression of the face image to obtain multiple target coefficients; determine the virtual human driving parameters according to the quaternion corresponding to the head Euler angle, the multiple target coefficients and the quaternion corresponding to each of the multiple six-dimensional rotation vectors.
[0100] Optionally, the motion capture module 402 is specifically used to determine the whole-body parameters corresponding to the person to be tested based on the quaternion corresponding to the Euler angle of the head, multiple target coefficients, and the quaternions corresponding to each of the multiple six-dimensional rotation vectors; and to de-jitter the whole-body parameters through a preset filter to obtain the virtual human driving parameters.
[0101] Optionally, the motion capture module 402 is specifically used to perform body part pre-inference on the body image to obtain a body part frame located in the body image; when a human body part is detected in the body part frame, an initial body part image is extracted from the body image based on the body part frame; the initial body part image is pre-processed to obtain a target body part image and position and size data of the target body part image in the body image, the preprocessing including: image scaling and normalization; and human body posture data is determined according to the target body part image and the position and size data through a body posture inference model, the body posture inference model being trained based on body part image samples, position and size data samples corresponding to the body part image samples, and human body posture data samples.
[0102] Optionally, the main control module 401 is also used to interact with other business systems.
[0103] Optionally, the main control module 401 is also used to control the running status of the motion capture module 402 and the 3D reconstruction module 403. Specifically, the main control module 401 can start, stop or adjust the running status of the motion capture module 402 and the 3D reconstruction module 403 through the control flow.
[0104] Optionally, the three-dimensional reconstruction module 403 is further used to output the virtual human image corresponding to the virtual character corresponding to the person to be tested to the shared memory for the main control module 401 to call.
[0105] For example, Figure 5 Schematic diagram of the application scenario of the virtual human system provided in the embodiment of the present application. Figure 5 As can be seen in FIG. 4 , the main control module 401, the motion capture module 402 and the three-dimensional reconstruction module 403 interact with each other to realize the construction of the virtual character. In addition, the main control module 401 can also interact with other business systems through interfaces.
[0106] For example, Figure 6 is a timing diagram of the virtual human system provided by the embodiment of the present application. Figure 6 It can be seen that the main control module 401, the motion capture module 402 and the 3D reconstruction module 403 run in different processes respectively and interact through shared memory. By taking advantage of the fast transmission speed of shared memory and its suitability for large-capacity data transmission, the virtual human system can efficiently process video stream data. Figure 6 In the example, the main control module 401 can interact with other business systems through interfaces. The main interface services may include: creating virtual human services, starting virtual human services, service execution, service stop and service destruction, etc.
[0107] In the embodiment of the present application, the main control module 401 obtains the real-time image of the person to be tested; the motion capture module 402 performs target detection on the real-time image to obtain a face image and a body image; the motion capture module 402 performs body posture capture on the body image to obtain human posture data; the motion capture module 402 determines the quaternion corresponding to each of the multiple six-dimensional rotation vectors according to the rotation matrix corresponding to each of the multiple six-dimensional rotation vectors in the human posture data; the motion capture module 402 determines the virtual human driving parameters according to the face image and the quaternion corresponding to each of the multiple six-dimensional rotation vectors; the three-dimensional reconstruction module 403 performs three-dimensional construction and rendering on the virtual character corresponding to the person to be tested based on the virtual human driving parameters. In the whole process, the virtual human system can determine more accurate virtual human driving parameters through the motion capture module 402, so that the virtual human system performs three-dimensional construction and rendering on the virtual character corresponding to the person to be tested based on the virtual human driving parameters through the three-dimensional reconstruction module 403 to drive the virtual character, and the movement of the virtual character is smoother and more natural, which can effectively improve the accuracy and robustness of the virtual character.
[0108] The terminal involved in the embodiments of the present application may be a device that provides voice and / or data connectivity to a user, a handheld device with a wireless connection function, or other processing devices connected to a wireless modem, etc. In different systems, the name of the terminal device may also be different. For example, in a 5G system, the terminal device may be called a user equipment (UE).
[0109] Figure 7 is a schematic diagram of the structure of the terminal provided in the embodiment of the present application, referring to Figure 7 , an embodiment of the present application further provides a terminal, which may include: a memory 710, a transceiver 720 and a processor 730.
[0110] The memory 710 is used to store computer programs; the transceiver 720 is used to send and receive data under the control of the processor 730; the processor 730 is used to read the computer program in the memory 710 and perform the following operations.
[0111] Perform target detection on the real-time image of the person to be tested to obtain a facial image and a body image; perform body posture capture on the body image to obtain human posture data; determine the quaternion corresponding to each of the multiple six-dimensional rotation vectors in the human posture data based on the rotation matrices corresponding to each of the multiple six-dimensional rotation vectors; determine virtual human driving parameters based on the facial image and the quaternions corresponding to each of the multiple six-dimensional rotation vectors; and perform three-dimensional construction and rendering of a virtual character corresponding to the person to be tested based on the virtual human driving parameters.
[0112] Among them, Figure 7In the embodiment, the bus architecture may include any number of interconnected buses and bridges, specifically one or more processors represented by processor 730 and various circuits of memory represented by memory 710 are linked together. The bus architecture may also link together various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface. The transceiver 720 may be a plurality of components, including a transmitter and a receiver, providing a unit for communicating with various other devices on a transmission medium. For different user devices, the user interface 740 may also be an interface capable of externally connecting to the required internal devices.
[0113] The processor 730 is responsible for managing the bus architecture and general processing, and the memory 710 can store data used by the processor 730 when performing operations.
[0114] The processor 730 is used to execute any of the methods provided in the embodiments of the present application according to the obtained executable instructions by calling the computer program stored in the memory 710. The processor and the memory may also be arranged physically separately.
[0115] It should be noted here that the terminal provided in the embodiment of the present application can implement all the method steps implemented in the above method embodiment and can achieve the same technical effect. The parts and beneficial effects of this embodiment that are the same as those in the method embodiment will not be described in detail here.
[0116] Figure 8 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application, such as Figure 8 As shown, the electronic device may include: a processor 810, a communication interface 820, a memory 830 and a communication bus 840, wherein the processor 810, the communication interface 820 and the memory 830 communicate with each other via the communication bus 840. The processor 810 may call a computer program in the memory 830 to execute the steps of the virtual character construction method, including the following steps.
[0117] Perform target detection on the real-time image of the person to be tested to obtain a facial image and a body image; perform body posture capture on the body image to obtain human posture data; determine the quaternion corresponding to each of the multiple six-dimensional rotation vectors in the human posture data based on the rotation matrices corresponding to each of the multiple six-dimensional rotation vectors; determine virtual human driving parameters based on the facial image and the quaternions corresponding to each of the multiple six-dimensional rotation vectors; and perform three-dimensional construction and rendering of a virtual character corresponding to the person to be tested based on the virtual human driving parameters.
[0118] In addition, the logic instructions in the above-mentioned memory 830 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0119] On the other hand, an embodiment of the present application also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the steps of the virtual character construction method provided in the above embodiments, including the following steps.
[0120] Perform target detection on the real-time image of the person to be tested to obtain a facial image and a body image; perform body posture capture on the body image to obtain human posture data; determine the quaternion corresponding to each of the multiple six-dimensional rotation vectors in the human posture data based on the rotation matrices corresponding to each of the multiple six-dimensional rotation vectors; determine virtual human driving parameters based on the facial image and the quaternions corresponding to each of the multiple six-dimensional rotation vectors; and perform three-dimensional construction and rendering of a virtual character corresponding to the person to be tested based on the virtual human driving parameters.
[0121] On the other hand, an embodiment of the present application further provides a processor-readable storage medium, wherein the processor-readable storage medium stores a computer program, and the computer program is used to enable the processor to execute the steps of the virtual character construction method provided in the above embodiments, including the following steps.
[0122] Perform target detection on the real-time image of the person to be tested to obtain a facial image and a body image; perform body posture capture on the body image to obtain human posture data; determine the quaternion corresponding to each of the multiple six-dimensional rotation vectors in the human posture data based on the rotation matrices corresponding to each of the multiple six-dimensional rotation vectors; determine virtual human driving parameters based on the facial image and the quaternions corresponding to each of the multiple six-dimensional rotation vectors; and perform three-dimensional construction and rendering of a virtual character corresponding to the person to be tested based on the virtual human driving parameters.
[0123] The processor-readable storage medium can be any available medium or data storage device that can be accessed by the processor, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc.), optical storage (such as CD, DVD, BD, HVD, etc.), and semiconductor storage (such as ROM, EPROM, EEPROM, non-volatile memory (NANDFLASH), solid-state drive (SSD)), etc.
[0124] The system embodiment described above is merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art may understand and implement it without creative work.
[0125] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0126] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for constructing a virtual character, It is characterized in that include: Perform target detection on the real-time image of the person to be tested to obtain the face image and body image; Capturing the body posture of the body image to obtain human body posture data; Determine the quaternion corresponding to each of the plurality of six-dimensional rotation vectors according to the rotation matrices corresponding to each of the plurality of six-dimensional rotation vectors in the human body posture data; Determining virtual human driving parameters according to the face image and the quaternions corresponding to the multiple six-dimensional rotation vectors; Based on the virtual human driving parameters, a virtual character corresponding to the person to be tested is three-dimensionally constructed and rendered.
2. The method for constructing a virtual character according to claim 1, It is characterized in that The step of determining the quaternions corresponding to the plurality of six-dimensional rotation vectors according to the rotation matrices corresponding to the plurality of six-dimensional rotation vectors in the human body posture data comprises: The following operations are performed for each six-dimensional rotation vector: Extracting a first three-dimensional rotation vector and a second three-dimensional rotation vector from the six-dimensional rotation vector; The first three-dimensional rotation vector is normalized to obtain a first target vector; based on the first target vector, the second three-dimensional rotation vector is orthogonalized to obtain a second target vector, and the second target vector is normalized to obtain a third target vector; Performing a cross product calculation on the first target vector and the third target vector to obtain a fourth target vector; Based on the first target vector, the third target vector and the fourth target vector, a rotation matrix corresponding to the six-dimensional rotation vector is constructed, and according to the rotation matrix, a quaternion corresponding to the six-dimensional rotation vector is determined.
3. The method for constructing a virtual character according to claim 2, It is characterized in that The quaternion corresponding to the six-dimensional rotation vector includes: a first imaginary part, a second imaginary part, a third imaginary part and a real part; and determining the quaternion corresponding to the six-dimensional rotation vector according to the rotation matrix includes: Determining the real part according to the main diagonal elements in the rotation matrix; The first imaginary part, the second imaginary part and the third imaginary part are determined according to other elements in the rotation matrix except the main diagonal elements in combination with the real part.
4. The method for constructing a virtual character according to claim 1, It is characterized in that Determining the virtual human driving parameters according to the face image and the quaternions corresponding to the multiple six-dimensional rotation vectors includes: Capturing the head posture of the face image to obtain Euler angles of the head; Based on the head Euler angles, capturing facial expressions of the face image to obtain a plurality of target coefficients; The virtual human driving parameters are determined according to the quaternion corresponding to the Euler angles of the head, the multiple target coefficients, and the quaternions corresponding to each of the multiple six-dimensional rotation vectors.
5. The method for constructing a virtual character according to claim 4, It is characterized in that The determining the virtual human driving parameters according to the quaternion corresponding to the head Euler angle, the multiple target coefficients, and the quaternions corresponding to each of the multiple six-dimensional rotation vectors includes: Determine whole body parameters corresponding to the person to be measured according to the quaternion corresponding to the head Euler angle, the multiple target coefficients, and the quaternions corresponding to each of the multiple six-dimensional rotation vectors; The whole body parameters are de-jittered by using a preset filter to obtain the virtual human driving parameters.
6. The method for constructing a virtual character according to any one of claims 1 to 5, It is characterized in that The step of capturing the body posture of the body image to obtain human body posture data includes: Performing body part pre-inference on the body image to obtain a body part frame located in the body image; In the case where a human body part is detected in the body part frame, extracting an initial body part image from the body image based on the body part frame; Preprocessing the initial body part image to obtain a target body part image and position and size data of the target body part image in the body image, wherein the preprocessing includes: image scaling processing and normalization processing; The human body posture data is determined according to the target body part image and the position size data through a body posture inference model, wherein the body posture inference model is trained based on body part image samples, position size data samples corresponding to the body part image samples, and human body posture data samples.
7. A virtual human system, It is characterized in that include: Main control module, motion capture module and 3D reconstruction module, among which, The main control module is used to obtain a real-time image of the person to be tested; The motion capture module is used to perform target detection on the real-time image to obtain a face image and a body image; perform body posture capture on the body image to obtain human posture data; determine the quaternion corresponding to each of the multiple six-dimensional rotation vectors according to the rotation matrix corresponding to each of the multiple six-dimensional rotation vectors in the human posture data; determine the virtual human driving parameters according to the face image and the quaternion corresponding to each of the multiple six-dimensional rotation vectors; The three-dimensional reconstruction module is used to perform three-dimensional construction and rendering of the virtual character corresponding to the person to be tested based on the virtual human driving parameters.
8. An electronic device comprising a processor and a memory storing a computer program, It is characterized in that When the processor executes the computer program, the steps of the virtual character construction method according to any one of claims 1 to 6 are implemented.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the virtual character construction method according to any one of claims 1 to 6 are implemented.
10. A computer program product comprising a computer program, It is characterized in that When the computer program is executed by a processor, the steps of the virtual character construction method according to any one of claims 1 to 6 are implemented.
