Code for our SIGGRAPH 2025 paper "Improving Global Motion Estimation in Sparse IMU-based Motion Capture with Physics". See Project Page.
The only supported and tested environment is Python 3.8 on Windows. This is because all physics-related computations—such as Jacobian calculation and the Recursive Newton-Euler Algorithm for inverse dynamics—are implemented by ourselves in C++ and compiled specifically for Windows with Python 3.8 bindings. The precompiled dynamic link libraries are provided in the carticulate package.
If you need to use a different environment, you will have to manually compile the C++ library available at https://github.com/Xinyu-Yi/carticulate for your target platform, and replace the provided carticulate package with your own build.
Our implementation differs from the previously used RBDL library in that all computations are performed in a singularity-free manner—for example, by using tangent-space accelerations and torques for rotational joints. This approach avoids artifacts such as ill-conditioned Jacobians and sudden body flipping caused by singularities. Additionally, our library supports SMPL shape parameters as input, allowing the physics properties of the human model to be adapted accordingly.
This part was not included in the paper due to space constraints and to maintain readability. The authors plan to release a technical report with more details, possibly at https://xinyu-yi.github.io/Blogs/. However, this may take some time, as the author has graduated and is currently occupied with work. Readers may later check the blog for future updates.
To run the test, you should install chumpy open3d pybullet qpsolvers numpy-quaternion vctoolkit==0.1.5.39 and pytorch with CUDA (we use pytorch 2.0.1 with CUDA 11.8).
If chumpy reports errors, comment the lines from numpy import bool ... that generate errors.
If osqp solver is not found, install with pip install qpsolvers[osqp]
- 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. - Rename and put the male model file into
models/SMPL_male.pkl.
- Download weights from here.
- Rename and put the file into
data/weights.pt.
- Download the preprocessed DIP-IMU and TotalCapture dataset (with two different calibrations as listed in the paper) from here. Please note that by downloading the preprocessed datasets you agree to the same license conditions as for the DIP-IMU dataset (https://dip.is.tue.mpg.de/) and the TotalCapture dataset (https://cvssp.org/data/totalcapture/). You may only use the data for scientific purposes and cite the corresponding papers.
- Rename and put the files into
data/test_datasets/dipimu.pt,data/test_datasets/totalcapture_dipcalib.pt,data/test_datasets/totalcapture_officalib.pt.
We provided a process.py script, which was used to generate the preprocessed values from the raw datasets (not cleaned, may need some modifications).
python test.py
The pose/translation evaluation results for DIP-IMU and TotalCapture (DIP/Official Calibration) will be printed/drawn.
To run the live demo, you will need the Noitom Lab IMUs (L1T0C090026).
First, launch the Axis Lab software and configure it to enable live streaming to port 7777.
Then, run the unity viewer (download from here) and run
python live_demo.py
A useful tip: the walking-based calibration as described in the paper is provided in articulate/utils/noitom/PN_lab.py: CalibratedIMUSet._walking_calibration.
We provide a script for IMU measurement synthesis from SMPL motion data.
python imu_synthesis.py
The code contains an example to synthesize IMU for the first sequence of TotalCapture. The default setting disables the use of ESKF and run angular velocity integration instead, which is very fast during training and is used in our work GlobalPose. While if you know exactly your IMU intrinsics and do not care about long training time, you can enable the C++-based ESKF by:
def _syn_imu(p, R, skip_ESKF=False): # set skip_ESKF to False
This may slightly improve performance (used in our previous work PNP). Note that both versions have modeled the IMU raw signal noise and calibration error, and we recommend using the default setting for its fast speed and comparable effectiveness.
Note: The author has graduated and currently has limited time to format the codes in the repository. If you encounter any issues or have questions, feel free to open an issue. You may also contact me via the updated email address: [email protected] (note that the university email provided in the paper is no longer active after graduation).