(BackBack)
ML//4 min read

Physics-based Human Motion Estimation and Synthesis from Videos

Paper review of Physics-based Human Motion Estimation and Synthesis from Videos

Paper Review of Physics-based Human Motion Estimation and Synthesis from Videos. The original paper can be found here.

Overview

Human motion synthesis is an essential field with relevance to graphics, gaming, and robotics. This paper breaks away from the typical reliance on large-scale motion capture and instead trains human motion synthesis directly from monocular RGB videos.

Contributions

  1. A smooth contact loss function for physics-based pose estimation.

  2. A fusion of visual pose estimation with physics-based optimization.

Method

This is a four-step process:

1) Estimate 2D and 3D body joints at each video frame using a monocular pose estimation model.

2) Transform 3D body joints to relative body part rotations using inverse-kinematics.

3) Refine initial motion estimates using physics-based optimization for physically plausible and temporal coherent motion.

4) Process all videos as above and use the resulting motions to train the motion synthesis model.

3D Pose Estimation

The 3D pose ppeRJ×3p^{pe} \in \R^{J×3} and 2D pose ppe,2dRJ×2p^{pe,2d} \in \R^{J×2} are estimated at each frame.

Motion Representation and Initialization

θtroot=(τ=0tΔθτroot,yaw)θtroot,xy\theta_t^{root} = (\displaystyle\sum_{\tau=0} ^t \Delta \theta_{\tau}^{root,yaw})*\theta_t^{root,xy}

Motion Optimization

Assume that a temporally evenly spaced sequence of motion frames {qt}1:T\{q_t\}_{1:T} and contact forces{fct}1:T\{f_c^t \}_{1:T} are given, where qtq_t and ftcf_{t}^c represent the generalized coordinates and global contact forces of the body at time tt. The loss function consists of three main parts:

Lphysics(qt,ftc)=Ldynamic+Lcontact+LpenetrationL_{physics}(q_t,f_{t}^{c}) = L_{dynamic} + L_{contact} + L_{penetration}

Total loss function, Ltotal=Lpose+Lphysics+LsmoothL_{total} = L_{pose} + L_{physics}+L_{smooth}, consists of physics loss, pose estimation loss, and smoothness regularization. The physics loss LphysicsL_{physics} itself includes dynamics loss, contact loss, and penetration loss.


Physics Loss: LdynamicsL_{dynamics}

Dynamics loss (LdynamicsL_{dynamics}): It calculates the dynamics loss using the Recursive Newton Euler algorithm.

Using ftrf_t^r we can calculate the dynamics loss by comparing it to the actual forces on the character.

Recursive Newton Euler algorithm which exploits the sparsity structure induced by the kinematic tree and we use finite difference approximations for the time derivatives of q(t)q(t).

ftr(q())=Mq¨t+Cq˙t+gf_t^r(q(·))= M\ddot{q}_t + C \dot{q}_t + g

MM: inverse dynamics computation involving mass matrix

Cq˙tC\dot{q}_t: centrifugal and coriolis forces

gg: gravity

Instead of leaving ftaf_t^a as yet an- other optimization variable, the optimal value of Bfta\Beta f_t^a can be easily chosen by assuming no limits on actuation force. Magnitude of joint actuation is implicitly limited by penalizing acceleration of 3d joint positions and rotations, described later.

Ldynamics=wdynamicftrBftaJTftc2L_{dynamics} = w_{dynamic}||f_t^r − \Beta f_t^a − J^{T} f_t^c||^2

JTJ^T: maps all the contact forces from the contact points onto the full space

B\Beta : joint actuation


Physics Loss: LcontactL_{contact}

Full-body inertia is accurately accounted for in the inverse dynamics loss and does not make use of centroidal approximations as in prior work. Contact forces are assumed to be exerted only by the feet at 4 different contact points.

The contact cost penalizes violation of Signorini’s conditions for contact

Lcontact=incct,i(weet,i2+we˙et,i˙2)L_{contact} = \displaystyle \sum_{i}^{n_c}c_{t,i} (w_e||e_{t,i}||^2 + w_{\dot{e}}||\dot{e_{t,i}}||^2)

et,iR3e_{t,i} ∈ \R^3 is the minimum displacement between the ithi^{th} end effector position and contact surface and its time derivative et,i˙\dot{e_{t,i}} is also included to prevent slip

ct,i=12(tanh(k1ft,ick2)+1)c_{t,i} = \frac{1}{2} ( \tanh (k_1 || f_{t,i}^c|| - k_2) + 1)


Physics Loss: LpenetrationL_{penetration}

As such the method can generate motions with penetrating objects without contact force. To avoid this, a separate term is used to explicitly penalize interpenetration

Lpenetration=wpenincmax({dt,i+kmargin,0})2L_{penetration} = w_{pen} \displaystyle \sum_i^{n_c}max( \{d_{t,i} + k_{margin}, 0 \})^2

dt,id_{t,i} : signed distance of the contact surface at ithi^{th} end effector which is negative if it is penetrating

Pose fitting loss (LposeL_{pose}) measures the motion error in terms of local 3d keypoints deviation, global camera projected 2d keypoint deviations. A kinematic acceleration penalty ensures motion smoothness.


Lphysics=wdynamicftrBftaJTftc2 + incct,i(weet,i2+we˙et,i˙2) + wpenincmax({dt,i+kmargin,0})2L_{physics} = w_{dynamic}||f_t^r − \Beta f_t^a − J^{T} f_t^c||^2 \ + \ \displaystyle \sum_{i}^{n_c}c_{t,i} (w_e||e_{t,i}||^2 + w_{\dot{e}}||\dot{e_{t,i}}||^2) \ + \ w_{pen} \displaystyle \sum_i^{n_c}max( \{d_{t,i} + k_{margin}, 0 \})^2

The pose fitting loss LposeL_{pose} we use is common in human shape estimation. It measures the motion error in terms of local 3d keypoints deviation, global camera projected 2d keypoint deviations.

We also use a kinematic acceleration penalty to ensure our motions are smooth.

Lsmooth=1njoints(wθ¨θ¨2+wp¨pt¨2)L_{smooth} = \frac {1}{n_{joints}} (w_{\ddot \theta} || \ddot{\theta}||^2 + w_{\ddot {p}} || \ddot {p_t}|| ^2)

pt¨\ddot{p_t} : global linear acceleration of the joints

Experimental Results

The paper explores whether the physics loss improves the accuracy and physical plausibility of pose estimation and compares the proposed method against other physics/temporal pose estimation methods.

Several metrics were used to measure 3D keypoint velocity, jittering in the motion, foot floating artifacts, and foot global z position error.

Evaluation metrics

It measures the difference in 3d keypoint velocity magnitude between the ground truth motion and the predicted motion which illustrates the amount of jittering present in the motion and is computed as follows:

Jit^=pt^pt1^\hat{Jit} = || \hat{p_t} - \hat{p_{t-1}}||

JitGT=ptGTpt1GTJit^{GT} = || p_t^{GT} - p_{t-1}^{GT}||

esmooth=tTjointsptGT=pt1GTe_{smooth} = \displaystyle\sum_t^T \sum{joints} || p_t^{GT} = p_{t-1}^{GT}||

To evaluate foot floating artifacts, we compare foot global zz position error (efoot,ze_{foot,z}) on ground truth

efoot,z=mean(p^foot,zpfoot,zGT)e_{foot,z} = mean(|\hat{p}_{foot,z} - p_{foot,z} ^ GT|)

efoot,vxy=mean(Δtp^foot,xyΔtpfoot,xyGT)e_{foot,vxy} = mean(||\Delta_t \hat{p}_{foot,xy} - \Delta_tp_{foot,xy}^{GT}||)