Code for our CVPR 2022 paper "Physical Inertial Poser (PIP): Physics-aware Real-time Human Motion Tracking from Sparse Inertial Sensors". This repository contains the system implementation and evaluation. See Project Page.
We use python 3.7.6. You should install the newest pytorch chumpy vctoolkit open3d pybullet qpsolvers cvxopt.
You also need to compile and install rbdl with python bindings. Also install the urdf reader addon. This library is easy to compile on Linux. For Windows, you need to rewrite some codes and the CMakeLists. We have only tested our system on Windows.
If the newest vctoolkit reports errors, please use vctoolkit==0.1.5.39.
Installing pytorch with CUDA is recommended but not mandatory. During evaluation, the motion prediction can run at ~120fps on CPU, but computing the errors may be very slow without CUDA.
If you have configured TransPose, just use its environment and install the missing packages including the rbdl.
- Download SMPL model from here. You should click SMPL for Pythonand download theversion 1.0.0 for Python 2.7 (10 shape PCs). Then unzip it.
- In config.py, setpaths.smpl_fileto the model path.
If you have configured TransPose, just copy its settings here.
- Download the physics body model from here and unzip it.
- In config.py, setpaths.physics_model_fileto the body model path.
- In config.py, setpaths.plane_filetoplane.urdf. Please putplane.objnext to it.
The physics model and the ground plane are modified from physcap.
- Download weights from here.
- In config.py, setpaths.weights_fileto the weights path.
- Download DIP-IMU dataset from here. We use the raw (unnormalized) data.
- Download TotalCapture dataset from here. You need to download the real world position and orientationunderVicon Groundtruthin the website and unzip them. The ground-truth SMPL poses used in our evaluation are provided by the DIP authors. You can download it here (clickORIGINAL TotalCapture DATA W/ CORRESPONDING REFERENCE SMPL Poses). If you cannot reproduce the reported results, check #34.
- In config.py, setpaths.raw_dipimu_dirto the DIP-IMU dataset path; setpaths.raw_totalcapture_dip_dirto the TotalCapture SMPL poses (from DIP authors) path; and setpaths.raw_totalcapture_official_dirto the TotalCapture officialgtpath. Please refer to the comments in the codes for more details.
If you have configured TransPose, just copy its settings here. Remember: you need to rerun the preprocess.py as the preprocessing of TotalCapture dataset has been changed to remove the acceleration bias.
You should preprocess the datasets before evaluation:
python preprocess.py
python evaluate.py
The pose/translation evaluation results for DIP-IMU and TotalCapture test datasets will be printed/drawn.
The live demo codes are on the livedemo branch. Please checkout this branch.
The authors are too busy to clean up/rewrite the codes. Here are some useful tips:
- 
In dynamics.py, there are many disabled options for the physics optimization. You can try different combinations of the energy terms by enabling the corresponding terms.
- 
In Line ~44 in net.py:self.dynamics_optimizer = PhysicsOptimizer(debug=False) set debug=Trueto visualize the estimated motions using pybullet. You may need to clean the cached results and rerun theevaluate.py. (e.g., setflush_cache=Trueinevaluate()and rerun.)
- 
In Line ~244 in dynamics.py:if False: # visualize GRF (no smoothing) p.removeAllUserDebugItems() for point, force in zip(collision_points, GRF.reshape(-1, 3)): p.addUserDebugLine(point, point + force * 1e-2, [1, 0, 0]) Enabling this to visualize the ground reaction force. (You also need to set debug=Trueas stated above.) Note that rendering the force lines can be very slow in pybullet.
- 
The hyperparameters for the physics optimization are all in physics_parameters.json. If you setdebug=True, you can adjust these parameters interactively in the pybullet window.
If you find the project helpful, please consider citing us:
@InProceedings{PIPCVPR2022,
  author = {Yi, Xinyu and Zhou, Yuxiao and Habermann, Marc and Shimada, Soshi and Golyanik, Vladislav and Theobalt, Christian and Xu, Feng},
  title = {Physical Inertial Poser (PIP): Physics-aware Real-time Human Motion Tracking from Sparse Inertial Sensors},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
  month = {June},
  year = {2022}
}
