Action redirection method, device, equipment and storage medium

By adjusting the arm opening of the action data using a pre-trained redirection model in the three-dimensional virtual mannequin, the problem of model penetration in the action simulation is solved, and the fast, low cost and high real-time performance of the action simulation is achieved.

CN112562072BActive Publication Date: 2025-02-28BEIJING IQIYI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011569050.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-25
Publication Date
2025-02-28
Estimated Expiration
2040-12-25

AI Technical Summary

Technical Problem

The existing three-dimensional virtual mannequin movement simulation method may cause the movement to not conform to physical principles when the actor does not match the body shape of the model. For example, the arm passes through the inside of the limb, resulting in the movement simulation being not realistic enough and affecting the user's visual perception.

Method used

By obtaining the original action data and bone vectors, inputting them into the pre-trained redirection model, adjusting the arm opening to avoid the phenomenon of mold penetration, obtaining the redirection action data, and maintaining the bone vector, thereby rendering the three-dimensional virtual mannequin.

Benefits of technology

It realizes fast and low-cost action redirection, reduces the time-consuming operation simulation, and improves the real-time interaction between the three-dimensional virtual mannequin and the user.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112562072B_ABST
    Figure CN112562072B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a method, device, equipment and storage medium for action redirection, the method comprising: obtaining original action data and a bone vector corresponding to the original action data, then inputting the original action data and the bone vector into a pre-trained redirection model, adjusting the arm opening of the original action data, obtaining redirected action data, and maintaining the bone vector, wherein the pre-trained redirection model is trained using sample action data of different arm openings and sample bone vectors corresponding to the sample action data, and then rendering a three-dimensional virtual human model according to the redirected action data and the bone vector. In this way, action redirection can be achieved by adjusting the arm opening in the original action data, thereby reducing the time and cost of the action redirection method, and thereby improving the real-time performance of the action simulation of the three-dimensional virtual human model.
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 model processing, and in particular to an action redirection method, device, equipment and storage medium. Background Art

[0002] Motion simulation based on three-dimensional virtual human models has many applications in animation production, movie special effects and other scenes. Usually, the process of motion simulation includes: first, the motion capture device collects the motion data of various actions demonstrated by the actor, and uploads the collected motion data to the processing device. Then, the processing device corrects and processes the motion data, and combines the motion data with the three-dimensional virtual human model to make the movements of the three-dimensional virtual human model consistent with the movements of the actor.

[0003] However, due to the different body shapes of the actor and the 3D virtual human model, the above motion simulation method may cause the 3D virtual human model to show some motions that do not conform to the physical principles, such as Figure 1 As shown, the arm of the three-dimensional virtual human body model passes through the inside of the limb, which is called "penetration". This will cause the movement simulation of the three-dimensional virtual human body model to be not realistic enough and affect the user's perception.

[0004] At present, manual correction can be used to redirect the penetration action so that the redirected action conforms to the physical principles. However, such action redirection method is time-consuming and costly, which makes the real-time performance of action simulation poor. Therefore, a faster and lower-cost action redirection method is urgently needed. Summary of the invention

[0005] The purpose of the embodiments of the present invention is to provide a method, device, equipment and storage medium for action redirection, so as to reduce the time and cost of the action redirection method and realize real-time interaction between a three-dimensional virtual human model and a user. The specific technical solution is as follows:

[0006] In a first aspect of the present invention, an action redirection method is first provided, the method comprising:

[0007] Obtaining original motion data and a bone vector corresponding to the original motion data;

[0008] Inputting the original motion data and the bone vector into a pre-trained redirection model, adjusting the arm opening of the original motion data to obtain redirection motion data, and maintaining the bone vector, wherein the pre-trained redirection model is trained using sample motion data of different arm openings and sample bone vectors corresponding to the sample motion data;

[0009] Rendering a three-dimensional virtual human body model according to the redirection motion data and the bone vector.

[0010] Optionally, inputting the original motion data and the bone vector into a pre-trained redirection model, adjusting the arm opening of the original motion data, and obtaining the redirection motion data includes:

[0011] Inputting the original motion data into the first network model of the redirection model for processing to obtain a rotation feature;

[0012] Inputting the bone vector into the second network model of the redirected model for processing to obtain the bone length feature of the redirected model;

[0013] splicing the rotation feature with the bone length feature to obtain an action feature;

[0014] Inputting the action feature into the third network model of the redirection model for processing to obtain an action offset;

[0015] The sum of the action offset and the original action data is calculated to obtain redirected action data.

[0016] Optionally, the dimension of the original motion data is (N-1)×3, the dimension of the bone vector is (N-1)×1, and N is the number of human joints;

[0017] The step of inputting the original motion data into the first network model of the redirection model for processing to obtain the rotation feature comprises:

[0018] Inputting the original motion data into the first network model of the redirection model for processing to obtain a rotation feature with a dimension of (N-1)×M, where M is an integer greater than 3;

[0019] The step of inputting the bone vector into the second network model of the redirected model for processing to obtain the bone length feature of the redirected model includes:

[0020] Inputting the bone vector into the second network model of the redirected model for processing to obtain a bone length feature of the redirected model with a dimension of (N-1)×Y, where Y is an integer greater than 1;

[0021] The step of splicing the rotation feature with the bone length feature to obtain the action feature comprises:

[0022] The rotation feature is concatenated with the bone length feature to obtain an action feature with a dimension of (N-1)×(M+Y);

[0023] The step of inputting the action feature into the third network model of the redirection model for processing to obtain the action offset includes:

[0024] Inputting the action feature into the third network model of the redirection model for processing to obtain an action offset with a dimension of (N-1)×3;

[0025] The calculating the sum of the action offset and the original action data to obtain the redirected action data includes:

[0026] The sum of the action offset and the original action data is calculated to obtain redirected action data with a dimension of (N-1)×3.

[0027] Optionally, the redirection model is trained by adopting the following steps:

[0028] Acquire a plurality of sample motion data and sample bone vectors corresponding to the sample motion data;

[0029] The original model is trained according to the loss value between the predicted penetration offset and the actual penetration offset of the sample action data to obtain a redirected model;

[0030] The predicted penetration offset is obtained by calculating the sample motion data and the sample bone vector using the original model, and the actual penetration offset is obtained by redirecting the sample motion data.

[0031] Optionally, the training of the original model according to the loss value of the predicted model penetration offset and the actual model penetration offset of the sample action data to obtain the redirected model includes:

[0032] Performing redirection processing on each of the sample action data to obtain sample redirection action data corresponding to each of the sample action data;

[0033] Calculating a difference between the sample action data and the sample redirection action data as a real penetration offset of the sample action data;

[0034] Inputting the sample motion data and the corresponding sample bone vector into the original model to obtain the predicted penetration offset of the sample motion data;

[0035] The loss value between the predicted penetration offset and the actual penetration offset is calculated, and it is determined whether the loss value meets a preset condition. If not, the original model is iteratively adjusted. If so, the iteratively adjusted original model is used as a redirected model.

[0036] In a second aspect of the present invention, an action redirection device is also provided, the device comprising:

[0037] An acquisition module, used to acquire original motion data and the bone vector corresponding to the original motion data;

[0038] an adjustment module, for inputting the original motion data and the bone vector into a pre-trained redirection model, adjusting the arm opening of the original motion data, obtaining the redirection motion data, and maintaining the bone vector, wherein the pre-trained redirection model is trained using sample motion data of different arm openings and sample bone vectors corresponding to the sample motion data;

[0039] The rendering module is used to render a three-dimensional virtual human model according to the redirected motion data and the bone vector.

[0040] Optionally, the adjustment module is specifically used to:

[0041] Inputting the original motion data into the first network model of the redirection model for processing to obtain a rotation feature;

[0042] Inputting the bone vector into the second network model of the redirected model for processing to obtain the bone length feature of the redirected model;

[0043] splicing the rotation feature with the bone length feature to obtain an action feature;

[0044] Inputting the action feature into the third network model of the redirection model for processing to obtain an action offset;

[0045] The sum of the action offset and the original action data is calculated to obtain redirected action data.

[0046] Optionally, the dimension of the original motion data is (N-1)×3, the dimension of the bone vector is (N-1)×1, and N is the number of human joints;

[0047] The adjustment module is specifically used to input the original action data into the first network model of the redirection model for processing to obtain a rotation feature with a dimension of (N-1)×M, where M is an integer greater than 3; input the bone vector into the second network model of the redirection model for processing to obtain a bone length feature of the redirection model with a dimension of (N-1)×Y, where Y is an integer greater than 1; concatenate the rotation feature with the bone length feature to obtain an action feature with a dimension of (N-1)×(M+Y); input the action feature into the third network model of the redirection model for processing to obtain an action offset with a dimension of (N-1)×3; calculate the sum of the action offset and the original action data to obtain redirection action data with a dimension of (N-1)×3.

[0048] Optionally, the device further comprises a training module, for:

[0049] Acquire a plurality of sample motion data and sample bone vectors corresponding to the sample motion data;

[0050] The original model is trained according to the loss value between the predicted penetration offset and the actual penetration offset of the sample action data to obtain a redirected model;

[0051] The predicted penetration offset is obtained by calculating the sample motion data and the sample bone vector using the original model, and the actual penetration offset is obtained by redirecting the sample motion data.

[0052] Optionally, the training module is specifically used to:

[0053] Performing redirection processing on each of the sample action data to obtain sample redirection action data corresponding to each of the sample action data;

[0054] Calculating a difference between the sample action data and the sample redirection action data as a real penetration offset of the sample action data;

[0055] Inputting the sample motion data and the corresponding sample bone vector into the original model to obtain the predicted penetration offset of the sample motion data;

[0056] The loss value between the predicted penetration offset and the actual penetration offset is calculated, and it is determined whether the loss value meets a preset condition. If not, the original model is iteratively adjusted. If so, the iteratively adjusted original model is used as a redirected model.

[0057] In another aspect of the present invention, there is provided an electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;

[0058] Memory, used to store computer programs;

[0059] The processor is used to implement the action redirection method described in any one of the above claims when executing the program stored in the memory.

[0060] In another aspect of the present invention, a computer-readable storage medium is provided, wherein instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium is executed on a computer, the computer executes any of the above-mentioned action redirection methods.

[0061] In another aspect of the present invention, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute any of the above-mentioned action redirection methods.

[0062] The action redirection method, device, equipment and storage medium provided by the embodiment of the present invention first obtain the original action data and the bone vector corresponding to the original action data, then input the original action data and the bone vector into the redirection model obtained by pre-training, adjust the arm opening of the original action data, obtain the redirected action data, and maintain the bone vector, wherein the redirection model obtained by pre-training is trained using sample action data of different arm openings and sample bone vectors corresponding to the sample action data, and then, render a three-dimensional virtual human body model according to the redirected action data and the bone vector. In this way, action redirection can be achieved by adjusting the arm opening in the original action data, thereby reducing the time and cost of the action redirection method, and thereby improving the real-time performance of the action simulation of the three-dimensional virtual human body model. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art are briefly introduced below.

[0064] Figure 1 A schematic diagram of a three-dimensional virtual human body model having a penetration action;

[0065] Figure 2 A flowchart of a method for redirecting an action provided by an embodiment of the present invention;

[0066] Figure 3 A schematic diagram of a three-dimensional virtual human body model provided by an embodiment of the present invention;

[0067] Figure 4for Figure 3 A schematic diagram of the parent-child relationship between various joints in the three-dimensional virtual human body model shown;

[0068] Figure 5 A schematic diagram of a training process of a redirection model provided by an embodiment of the present invention;

[0069] Figure 6 A flowchart of steps for redirection by a redirection model provided by an embodiment of the present invention;

[0070] Figure 7 A schematic diagram of an action redirection process of a redirection model provided by an embodiment of the present invention;

[0071] Figure 8 A schematic diagram of an embodiment of the present invention;

[0072] Fig. 9 is a structural block diagram of an action redirection device according to an embodiment of the present invention;

[0073] Fig.10 The figure is a schematic diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0074] The technical solutions in the embodiments of the present invention will be described below in conjunction with the accompanying drawings in the embodiments of the present invention.

[0075] In the related technology, during the action simulation process based on the three-dimensional virtual human body model, the actor wears a motion capture device at each joint of the three-dimensional virtual human body model according to the needs of the three-dimensional virtual human body model. Then, the actor can make different actions according to the requirements, and the motion capture device collects the actor's bone vectors and the action data of each joint of the three-dimensional virtual human body model during the action, and maps the collected action data to the three-dimensional virtual human body model. In this way, the three-dimensional virtual human body model can make the actions shown by the actor. However, due to the different body shapes of the actor and the three-dimensional virtual human body model, the three-dimensional virtual human body model may show some actions that do not conform to the principles of physics, among which the penetration of the arms and chest is the most common.

[0076] Model penetration is a very complex problem. If you want to solve it thoroughly, you need very complex calculations. At present, you can use manual correction to redirect the model penetration action, which is time-consuming and costly, and cannot achieve real-time interaction between the 3D virtual human model and the user.

[0077] In order to solve the above problem, an embodiment of the present invention proposes an action redirection method. The action redirection method provided by the embodiment of the present invention is generally described below. The method includes the following steps:

[0078] Get the original motion data and the bone vector corresponding to the original motion data;

[0079] Inputting the original motion data and the bone vector into a pre-trained redirection model, adjusting the arm opening of the original motion data to obtain redirection motion data, and maintaining the bone vector, wherein the pre-trained redirection model is trained using sample motion data of different arm openings and sample bone vectors corresponding to the sample motion data;

[0080] Render a three-dimensional virtual human model based on the redirected motion data and bone vectors.

[0081] From the above, it can be seen that the motion redirection method provided in the embodiment of the present invention can achieve motion redirection by adjusting the arm opening in the original motion data, thereby reducing the time and cost of the motion redirection method and improving the real-time performance of motion simulation of the three-dimensional virtual human model.

[0082] The action redirection method provided by the embodiment of the present invention will be described in detail below through specific embodiments.

[0083] Reference Figure 2 , shows a flowchart of the steps of an action redirection method of the present application, which may specifically include the following steps:

[0084] S201: Obtain original motion data and the bone vector corresponding to the original motion data.

[0085] In an embodiment of the present invention, the original motion data is the motion data of the three-dimensional virtual human model obtained after mapping the collected motion data of the actor onto the three-dimensional virtual human model. The three-dimensional virtual human model can be a model designed manually by a designer, or a model directly generated according to the skeleton of the human body. Different three-dimensional virtual human models have different skeleton vectors. When the skeleton vector changes, the three-dimensional virtual human model will also change. The skeleton vector corresponding to the original motion data is also the skeleton vector of the three-dimensional virtual human model corresponding to the original motion data.

[0086] For example, Figure 3 As shown, it is a schematic diagram of a three-dimensional virtual human body model provided by an embodiment of the present invention, wherein the left side is a skeleton diagram of the three-dimensional virtual human body model, and the right side is a schematic diagram of a virtual idol generated according to the three-dimensional virtual human body model. The three-dimensional virtual human body model can be understood as a shell. To make the shell move, it is necessary to drive the rotation angle of the joint. The joints of the three-dimensional virtual human body model may include human elbows, shoulder joints, knee joints, etc. By controlling these joints, the three-dimensional virtual human body model can be driven.

[0087] The motion data may be data containing rotation information of each joint of the three-dimensional virtual human model, which may be represented by a matrix M having a dimension of (J-1)×3, where J is the number of joints in the three-dimensional virtual human model, and the motion matrix M does not include rotation information of a preset root joint among the joints, wherein the 3D vector of each row represents the axis angle information of the joint represented by the row relative to its parent node. In an embodiment of the present invention, a single independent action is processed, rather than an action sequence, so there is no need to obtain the global coordinates of the root node, that is, there is no need to modify the global coordinates of the root node.

[0088] like Figure 4 As shown, Figure 3 The schematic diagram of the parent-child relationship between each joint point in the three-dimensional virtual human model shown in the figure includes 17 joint points, so the dimension of the rotation matrix R is 16×3. The connection between each joint point is a bone rod, the length of the bone rod is constant, the bone vector is S, and its dimension is 16×1. There is a parent-child relationship between each joint point, where the preset root joint point is the highest level parent node, and the joint point connected to the preset root joint point is the child node of the preset root joint point, and so on.

[0089] In this step, after obtaining the original motion data and bone vectors collected by the motion capture device, it is possible to first determine whether the arm area motion data in the original motion data is through the model. If so, execute the next step. If not, directly render the three-dimensional virtual human body model based on the original motion data, thereby reducing the occupancy of system resources.

[0090] S202: Input the original motion data and the bone vector into the pre-trained redirection model, adjust the arm opening of the original motion data, obtain the redirected motion data, and maintain the bone vector, wherein the pre-trained redirection model is trained using sample motion data of different arm openings and sample bone vectors corresponding to the sample motion data.

[0091] In the embodiment of the present invention, the redirection model is a pre-trained model. The original motion data and the bone vector are input into the redirection model to obtain redirected motion data. Compared with the original motion data, the arm opening of the redirected motion data is adjusted, thereby reducing the penetration phenomenon between the arm and the chest of the three-dimensional virtual human model. The redirection model can be a deep learning network model or a neural network model, which is not limited.

[0092] For example, Figure 5 The following is a schematic diagram of the training process of the redirection model. The following steps can be used to train the redirection model:

[0093] First, multiple sample action data and sample bone vectors corresponding to the sample action data are obtained, wherein the sample action data may include multiple and corresponding sample bone vectors of different types, so that the trained redirection model can be better adapted to different bone vectors.

[0094] Then, according to the loss value between the predicted model penetration offset and the real model penetration offset of the sample action data, the original model is trained to obtain the redirected model. The predicted model penetration offset is calculated by using the original model for the sample action data and the sample bone vector, and the real model penetration offset is obtained by redirecting the sample action data.

[0095] For example, the original model is trained according to the loss value between the predicted penetration offset and the actual penetration offset of the sample action data, which may specifically include the following steps:

[0096] In the first step, each sample action data is redirected to obtain the sample redirected action data corresponding to each sample action data, and the difference between the sample action data and the sample redirected action data is calculated as the real penetration offset of the sample action data.

[0097] The sample motion data may be redirected using any redirection algorithm, for example, an IK (Inverse Kinematics) algorithm, or manually redirected, without limitation. The redirected sample motion data adjusts the arm opening, so that the penetration phenomenon does not occur.

[0098] In the second step, the sample motion data and the corresponding sample bone vector are input into the original model to obtain the predicted penetration offset of the sample motion data.

[0099] The third step is to calculate the loss value between the predicted penetration offset and the actual penetration offset, and determine whether the loss value meets the preset conditions. If not, the original model is iteratively adjusted. If so, the iteratively adjusted original model is used as the redirection model.

[0100] In this way, a redirection model is obtained, which can process the input original motion data and bone vectors to obtain redirection motion data with adjusted arm opening.

[0101] The redirection model may be a neural network model, a deep learning model, or any other training model, without limitation. Figure 6 As shown, in one implementation, the redirection model processes the original motion data and the bone vector to obtain the redirected motion data, which may include:

[0102] S601, input the original motion data into the first network model of the redirection model for processing to obtain a rotation feature. The first network model can be any feasible network composed of multiple layers of fully connected layers. For example, assuming that the dimension of the original motion data is (N-1)×3 and the dimension of the bone vector is (N-1)×1, then the original motion data is input into the first network model of the redirection model for processing, and a rotation feature with a dimension of (N-1)×M can be obtained, wherein N is the number of human joints and M is an integer greater than 3.

[0103] S602, input the bone vector to the second network model of the redirected model for processing to obtain the bone length feature of the redirected model. The second network model can also be any feasible network composed of multiple layers of fully connected layers. For example, continuing the above example, the bone vector is input to the second network model of the redirected model for processing, and the bone length feature of the redirected model with a dimension of (N-1)×Y can be obtained, wherein Y is an integer greater than 1.

[0104] S603, splicing the rotation feature with the bone length feature of the redirected model to obtain an action feature. The splicing axis of the rotation feature and the bone length feature is the second axis. For example, continuing the above example, splicing the rotation feature with the bone length feature can obtain an action feature with a dimension of (N-1)×(M+Y).

[0105] S604, input the action feature to the third network model of the redirection model for processing to obtain an action offset. The action offset ΔR is the difference between the redirected action data R′ and the original action data R, that is, ΔR=R′-R. Among them, the third fully connected layer can also be any feasible network composed of multiple layers of fully connected layers. For example, continuing the above example, the action feature is input to the third network model of the redirection model for processing, and an action offset with a dimension of (N-1)×3 can be obtained.

[0106] S605, calculate the sum of the motion offset and the original motion data to obtain redirected motion data. It can be understood that the redirected motion data is R′=ΔR+R. For example, continuing the above example, the sum of the motion offset and the original motion data is calculated to obtain redirected motion data with a dimension of (N-1)×3.

[0107] by Figure 3 Taking the three-dimensional virtual human model shown in the figure as an example, the original motion data is a motion matrix R with a dimension of 16×3, and the dimension of the bone vector is 16×1. Then, the output of the first network model is a rotation feature f with a dimension of 16×12. R The output of the second network model is the bone length feature f with a dimension of 16×4 O, the 16×12 rotation feature f R With the bone length characteristic of 16×4 O Along the second axis, the dimension of the motion feature f obtained is 16×16, and the action offset output by the third network model is a rotation matrix offset ΔR with a dimension of 16×3.

[0108] like Figure 7 As shown, it is a schematic diagram of the action redirection process of the above-mentioned redirection model, wherein Net A represents the first network model, Net B represents the second network model, Net C represents the third network model, Net A, Net B and Net C can adopt the same network structure or different network structures, and the action redirection process of the redirection model is the same as steps S601 to S605, which will not be repeated here.

[0109] S203: Rendering a three-dimensional virtual human body model according to the redirected motion data and the bone vector.

[0110] After obtaining the redirected motion data, the 3D virtual human model can be rendered according to the redirected motion data and the bone vector. The redirected motion data adjusts the arm opening of the original motion data, and after rendering, there will be no motion that does not conform to the physical principle, such as the arm passing through the inside of the limb. Figure 8 As shown, it is a schematic diagram of the scheme of an embodiment of the present invention. The original motion data has a model penetration phenomenon. The original motion data and the bone vector are input into the redirected model, and the arm opening is adjusted to obtain the redirected motion data. Rendering is performed according to the redirected motion data and the bone vector to obtain a three-dimensional virtual human body model without model penetration.

[0111] From the above, it can be seen that the motion redirection method provided in the embodiment of the present invention can achieve motion redirection by adjusting the arm opening in the original motion data, thereby reducing the time and cost of the motion redirection method and improving the real-time performance of motion simulation of the three-dimensional virtual human model.

[0112] Reference Fig. 9 , shows a structural block diagram of an action redirection device of the present application, which may specifically include the following modules:

[0113] An acquisition module 901 is used to acquire original motion data and a bone vector corresponding to the original motion data;

[0114] An adjustment module 902 is used to input the original motion data and the bone vector into a pre-trained redirection model, adjust the arm opening of the original motion data, obtain the redirection motion data, and maintain the bone vector, wherein the pre-trained redirection model is trained using sample motion data of different arm openings and sample bone vectors corresponding to the sample motion data;

[0115] The rendering module 903 is used to render a three-dimensional virtual human model according to the redirection motion data and the bone vector.

[0116] In one implementation, the adjustment module 902 is specifically configured to:

[0117] Inputting the original motion data into the first network model of the redirection model for processing to obtain a rotation feature;

[0118] Inputting the bone vector into the second network model of the redirected model for processing to obtain the bone length feature of the redirected model;

[0119] splicing the rotation feature with the bone length feature to obtain an action feature;

[0120] Inputting the action feature into the third network model of the redirection model for processing to obtain an action offset;

[0121] The sum of the action offset and the original action data is calculated to obtain redirected action data.

[0122] In one implementation, the dimension of the original motion data is (N-1)×3, the dimension of the bone vector is (N-1)×1, and N is the number of human joints;

[0123] The adjustment module 902 is specifically used to input the original action data into the first network model of the redirected model for processing to obtain a rotation feature with a dimension of (N-1)×M, where M is an integer greater than 3; input the bone vector into the second network model of the redirected model for processing to obtain a bone length feature of the redirected model with a dimension of (N-1)×Y, where Y is an integer greater than 1; concatenate the rotation feature with the bone length feature to obtain an action feature with a dimension of (N-1)×(M+Y); input the action feature into the third network model of the redirected model for processing to obtain an action offset with a dimension of (N-1)×3; calculate the sum of the action offset and the original action data to obtain redirected action data with a dimension of (N-1)×3.

[0124] In one implementation, the device further includes a training module (not shown in the figure) for:

[0125] Acquire a plurality of sample motion data and sample bone vectors corresponding to the sample motion data;

[0126] The original model is trained according to the loss value between the predicted penetration offset and the actual penetration offset of the sample action data to obtain a redirected model;

[0127] The predicted penetration offset is obtained by calculating the sample motion data and the sample bone vector using the original model, and the actual penetration offset is obtained by redirecting the sample motion data.

[0128] In one implementation, the training module (not shown in the figure) is specifically used to:

[0129] Performing redirection processing on each of the sample action data to obtain sample redirection action data corresponding to each of the sample action data;

[0130] Calculating a difference between the sample action data and the sample redirection action data as a real penetration offset of the sample action data;

[0131] Inputting the sample motion data and the corresponding sample bone vector into the original model to obtain the predicted penetration offset of the sample motion data;

[0132] The loss value between the predicted penetration offset and the actual penetration offset is calculated, and it is determined whether the loss value meets a preset condition. If not, the original model is iteratively adjusted. If so, the iteratively adjusted original model is used as a redirected model.

[0133] From the above, it can be seen that the motion redirection device provided in the embodiment of the present invention can realize motion redirection by adjusting the arm opening in the original motion data, thereby reducing the time and cost of the motion redirection method and improving the real-time performance of motion simulation of the three-dimensional virtual human model.

[0134] The embodiment of the present invention further provides an electronic device, such as Fig.10 As shown, it includes a processor 1001, a communication interface 1002, a memory 1003 and a communication bus 1004, wherein the processor 1001, the communication interface 1002, and the memory 1003 communicate with each other through the communication bus 1004.

[0135] Memory 1003, used for storing computer programs;

[0136] The processor 1001 is used to execute the program stored in the memory 1003, and implements the following steps:

[0137] Get the original motion data and the bone vector corresponding to the original motion data;

[0138] Inputting the original motion data and the bone vector into a pre-trained redirection model, adjusting the arm opening of the original motion data to obtain redirection motion data, and maintaining the bone vector, wherein the pre-trained redirection model is trained using sample motion data of different arm openings and sample bone vectors corresponding to the sample motion data;

[0139] Render a three-dimensional virtual human model based on the redirected motion data and bone vectors.

[0140] The communication bus mentioned in the above terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0141] The communication interface is used for communication between the above terminal and other devices.

[0142] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0143] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0144] In another embodiment of the present invention, a computer-readable storage medium is provided, in which instructions are stored. When the computer-readable storage medium is executed on a computer, the computer executes any one of the action redirection methods in the above embodiments.

[0145] In another embodiment of the present invention, a computer program product including instructions is provided, which, when executed on a computer, enables the computer to execute any one of the action redirection methods in the above embodiments.

[0146] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.

[0147] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0148] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0149] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims

1. An action redirection method, characterized in that: The method comprises: Obtaining original motion data and a bone vector corresponding to the original motion data; Inputting the original motion data and the bone vector into a pre-trained redirection model, adjusting the arm opening of the original motion data to obtain redirection motion data, and maintaining the bone vector, including: inputting the original motion data into a first network model of the redirection model for processing to obtain a rotation feature, inputting the bone vector into a second network model of the redirection model for processing to obtain a bone length feature of the redirection model, splicing the rotation feature with the bone length feature to obtain a motion feature, inputting the motion feature into a third network model of the redirection model for processing to obtain a motion offset, calculating the sum of the motion offset and the original motion data to obtain the redirection motion data; wherein the pre-trained redirection model is trained using sample motion data of different arm openings and sample bone vectors corresponding to the sample motion data; Rendering a three-dimensional virtual human body model according to the redirection motion data and the bone vector.

2. The method according to claim 1, characterized in that The dimension of the original motion data is (N-1)×3, the dimension of the bone vector is (N-1)×1, and N is the number of human joints; The step of inputting the original motion data into the first network model of the redirection model for processing to obtain the rotation feature comprises: Inputting the original motion data into the first network model of the redirection model for processing to obtain a rotation feature with a dimension of (N-1)×M, where M is an integer greater than 3; The step of inputting the bone vector into the second network model of the redirected model for processing to obtain the bone length feature of the redirected model includes: Inputting the bone vector into the second network model of the redirected model for processing to obtain a bone length feature of the redirected model with a dimension of (N-1)×Y, where Y is an integer greater than 1; The step of splicing the rotation feature with the bone length feature to obtain the action feature comprises: The rotation feature is concatenated with the bone length feature to obtain an action feature with a dimension of (N-1)×(M+Y); The step of inputting the action feature into the third network model of the redirection model for processing to obtain the action offset includes: Inputting the action feature into the third network model of the redirection model for processing to obtain an action offset with a dimension of (N-1)×3; The calculating the sum of the action offset and the original action data to obtain the redirected action data includes: The sum of the action offset and the original action data is calculated to obtain redirected action data with a dimension of (N-1)×3.

3. The method according to claim 1, characterized in that The redirection model is trained by adopting the following steps: Acquire a plurality of sample motion data and sample bone vectors corresponding to the sample motion data; The original model is trained according to the loss value between the predicted penetration offset and the actual penetration offset of the sample action data to obtain a redirected model; The predicted penetration offset is obtained by calculating the sample motion data and the sample bone vector using the original model, and the actual penetration offset is obtained by redirecting the sample motion data.

4. The method according to claim 3, characterized in that The training of the original model according to the loss value of the predicted model penetration offset and the actual model penetration offset of the sample action data to obtain the redirected model includes: Performing redirection processing on each of the sample action data to obtain sample redirection action data corresponding to each of the sample action data; Calculating a difference between the sample action data and the sample redirection action data as a real penetration offset of the sample action data; Inputting the sample motion data and the corresponding sample bone vector into the original model to obtain the predicted penetration offset of the sample motion data; The loss value between the predicted penetration offset and the actual penetration offset is calculated, and it is determined whether the loss value meets a preset condition. If not, the original model is iteratively adjusted. If so, the iteratively adjusted original model is used as a redirected model.

5. An action redirection device, characterized in that: The device comprises: An acquisition module, used for acquiring original motion data and a bone vector corresponding to the original motion data; An adjustment module is used to input the original motion data and the bone vector into a pre-trained redirection model, adjust the arm opening of the original motion data, obtain redirection motion data, and maintain the bone vector. The adjustment module is specifically used to: input the original motion data into the first network model of the redirection model for processing to obtain a rotation feature, input the bone vector into the second network model of the redirection model for processing to obtain a bone length feature of the redirection model, splice the rotation feature with the bone length feature to obtain a motion feature, input the motion feature into the third network model of the redirection model for processing to obtain a motion offset, calculate the sum of the motion offset and the original motion data, and obtain the redirection motion data; wherein the pre-trained redirection model is trained using sample motion data of different arm openings and sample bone vectors corresponding to the sample motion data; A rendering module is used to render a three-dimensional virtual human model according to the redirection action data and the bone vector.

6. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the method steps described in any one of claims 1 to 4 when executing a program stored in a memory.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Virtual reality driving method and virtual reality system based on arm motion capture

    CN108762495A

  • Action data correction method and device, and electronic equipment

    CN110738717A