A real-time motion capture system that estimates poses and global translations using only 6 inertial measurement units

Overview

TransPose

Code for our SIGGRAPH 2021 paper "TransPose: Real-time 3D Human Translation and Pose Estimation with Six Inertial Sensors". This repository contains the system implementation, evaluation, and some example IMU data which you can easily run with. Project Page

Live Demo 1Live Demo 2

Usage

Install dependencies

We use python 3.7.6. You should install the newest pytorch chumpy vctoolkit open3d.

Prepare SMPL body model

  1. Download SMPL model from here. You should click SMPL for Python and download the version 1.0.0 for Python 2.7 (10 shape PCs). Then unzip it.
  2. In config.py, set paths.smpl_file to the model path.

Prepare pre-trained network weights

  1. Download weights from here.
  2. In config.py, set paths.weights_file to the weights path.

Prepare test datasets (optional)

  1. Download DIP-IMU dataset from here. We use the raw (unnormalized) data.
  2. Download TotalCapture dataset from here. The ground-truth SMPL poses used in our evaluation are provided by the DIP authors. So you may also need to contact the DIP authors for them.
  3. In config.py, set paths.raw_dipimu_dir to the DIP-IMU dataset path; set paths.raw_totalcapture_dip_dir to the TotalCapture SMPL poses (from DIP authors) path; and set paths.raw_totalcapture_official_dir to the TotalCapture official gt path. Please refer to the comments in the codes for more details.

Run the example

To run the whole system with the provided example IMU measurement sequence, just use:

python example.py

The rendering results in Open3D may be upside down. You can use your mouse to rotate the view.

Run the evaluation

You should preprocess the datasets before evaluation:

python preprocess.py
python evaluate.py

Both offline and online results for DIP-IMU and TotalCapture test datasets will be printed.

Citation

If you find the project helpful, please consider citing us:

@article{TransPoseSIGGRAPH2021,
    author = {Yi, Xinyu and Zhou, Yuxiao and Xu, Feng},
    title = {TransPose: Real-time 3D Human Translation and Pose Estimation with Six Inertial Sensors},
    journal = {ACM Transactions on Graphics}, 
    year = {2021}, 
    month = {08},
    volume = {40},
    number = {4}, 
    articleno = {86},
    publisher = {ACM}
} 
Comments
  • IMU data

    IMU data

    I am using BMX055 sensor as input. It's a 9-dof sensor that includes Accelerometer, Gyroscope, Magnetometer.

    IMU data, each sensor

    Accelerometer

       [ xAccl, yAccl, zAccl]        [3 x 1]
    

    Gyroscope

       [ xGyro, yGyro, zGyro]        [3 x 1]
    

    Magnetometer

       [ xMag, yMag, zMag]        [3 x 1]
    

    Model input data, each sensor

    Accelerations

       [ 1.0883e+00,  2.7423e+00,  1.7926e+00]        [3 x 1]
    

    Rotations

       [[ 0.2445,  0.1298,  0.9609],       [3 x 3]
       [-0.9482,  0.2391,  0.2090],
       [-0.2026, -0.9623,  0.1815]]
    

    How to convert IMU data to model input data? Thankyou!

    opened by NoLoPhe 19
  • Data synthesis for sensor relative orientations

    Data synthesis for sensor relative orientations

    In your paper you mention you synthesise global virtual "sensor" orientations. I'm confused how I might go about synthesising sensor relative orientations from the amass dataset (so that I can use this model with imus that only provide sensor relative measurements). Do you guys have any insights?

    Thanks! Vimal

    opened by VimalMollyn 7
  • Sensor Calibration

    Sensor Calibration

    Hi Xinyu-Yi,

    Thank you for sharing the code. Maybe I missed it, but I couldn't figure out where in the code you actually do the Calibration stated in section A 1. in the paper. For example the Raw DIP-IMU data is uncalibrated, but you just adapt it for NaN values and the npass it to the network after normalization. But nevertheless I obtain the same results as in the paper. Why do you not do the calibration in here?

    Also would it be possible to share the training routines, so that we can reproduce your results from scratch? The latter might be also in your interest as I will list your method as a comparison in a coming paper, and in best case I plug and play your method with my Input to have the fairest comparison.

    Thank you in advance

    opened by trikpachu 7
  • Pose-S3 output dimension

    Pose-S3 output dimension

    Hello Xinyu, I have a question about the dimension of Pose-S3 output. As mentioned in the paper, image The output of Pose-S3 is R6(j-1), and j is 24. So the output dimension is 138 But the in the code, net.py, The pose_s3 output dimension is joint_set.n_reduced * 6, which is 90. I have no idea about it. Can you help me to figure out why the dimension is it?

    So, when I want to calculate the loss of Pose-S3. I need to use the func:_reduced_glb_6d_to_full_local_mat. to get the full joint rotation matrix. And use func:rotation_matrix_to_r6d, to get the full joint rotation in 6d, right?

    opened by TowoC 5
  • Please help me modify code to fit my sensor!

    Please help me modify code to fit my sensor!

    Hi!

    I'm trying to reproduce paper results using lower-cost IMU.

    Since I am not tall enough (1m63) and have not edited the leg_length information, the estimate is not accurate. I tried and tested a lot to get the first results: Video Link

    IMU: I'm supported six Hi229 9-dof from HiPNUC (datasheet) Frequency: 50Hz (record 100Hz step=2)

    I recorded the data(data_align, data_T_Pose) and modified live_hi229.py based live_demo.py:

    • Put imu (x = Left, y = Up, z = Forward)
      • record data_align in 10s length: 500 frame
      • data_align[50:300]: align
    • Stand straight in T-pose
      • record data_T_Pose in 60s length: 2999 frame
      • data_T_Pose[50:300]: T_Pose
    • Demo
      • data_T_Pose[500:2980]: action

    The acceleration read from Noitom is global. But in my data: the acceleration is local, and the quaternion is local. I don't know how to convert local to global acceleration, the local accelerometer is passed to the model. This could be the reason the body estimate is not accurate.

    Can you help me revise the code to fit my data? (live_hi229.py) If you are too busy, read through the code once and give me some advice. Thanks a lot!

    opened by SlimeVRX 5
  • AMASS pretraining details

    AMASS pretraining details

    Hi Xinyu,

    Thank you and your colleagues for this great work. Really impressed by the results.

    We are working on a project where part of your project might be very helpful. Specifically, how do you select the subset of AMASS and generate the synthetic data (~1200 min out of total 60 hours)? Do you need to downweight some common motions (like walking) and upweight some rare motions during training?

    I am also wondering the details about how you place the virtual IMU sensors on the SMPL model -- is it same as DIP? Would it be possible for you to send me (yifengj at stanford.edu) the training / data generation code? ("Dirty" and uncommented version is totally fine.)

    Thanks a lot! Yifeng

    opened by jyf588 5
  • Can I use the results of the article into VRChat?

    Can I use the results of the article into VRChat?

    Dear the author of the article Transpose

    I am a student at the University of Danang in Vietnam.

    I want to use the results of the paper "Real-time 3D Human Translation and Pose Estimation with Six Inertial Sensors" into VRChat.

    Please allow me to conduct research for academic purposes.

    Thank you very much!

    Link: https://twitter.com/VRChat/status/1493314642071986182 https://twitter.com/Tn23008624/status/1494618444821839877

    opened by SlimeVRX 4
  • totalcapture   trans处理

    totalcapture trans处理

    你好,请问在对totalcapture处理过程中 代码如下 pos[:, :, 0].neg_() #对Tensor中的每个元素取负 pos[:, :, 2].neg_() trans.append(pos[:, 2] - pos[:1, 2]) # N, 3 #相当与每帧的脊柱坐标减去第一帧的脊柱坐标 请问为什么要进行neg操作,此外左右脚数据好像没有使用到 十分感谢

    opened by Jaceyxy 2
  • Some doubt while running with other imus

    Some doubt while running with other imus

    您好,我在尝试使用其他传感器运行TransPose代码时,遇到一些问题,想请教一下。

    我基于live_demo.py,将TCP接收诺亦腾数据部分改为接收自己的传感器数据,按照左手臂、右手臂、左腿、右腿、头、胯顺序,分别存入self._quat_buffer和self._acc_buffer中。其中,四元数是按照(w, x, y, z)顺序存放,加速度数据是经过处理去掉重力部分的数据。 后续代码基本没变,最后使用提供的U3D插件显示结果。 运行时,按照指示先将传感器按照x左y上z前摆放,再穿戴好做T-POSE(佩戴时传感器朝向和文章中的不一样)。

    一开始显示的姿态异常,例如向前举手,模型手会绕一圈再举起来,我尝试将_read()中,加速度乘以-9.8的操作去掉后,姿态显示好了很多,但模型始终无法跳跃(地上行走ok),猜测是诺亦腾的加速度数据与我的传感器加速度数据不一致,或者我是否漏了一些处理操作,因此有以下几个问题:

    1、是否可以提供一小段诺亦腾数据供参考数据的格式?(例如加速度数据是否含有重力部分) 2、_read()中为什么加速度要乘以-9.8? 3、TransPoseNet初始化中gravity_velocity=-0.018是如何计算得到的? 4、config.py中提供的acc_scale = 30和vel_scale = 3是如何计算得到的? 5、传感器佩戴方式是否有限制?如果有,方便提供一下传感器在佩戴时的轴向情况吗?

    非常感谢!

    opened by DrakeWYH 2
  • vertex_id

    vertex_id

    Very nice work! I have a question about the smpl vertex index. In the smpl model, we need to manually select some vertices and place virtual sensors on these vertices. Each of these vertices corresponds to an index. I would like to ask you how you get these indices? Is it by calculation or do you get them through unity?

    opened by hengrui1012 2
  • How do you process variable length input sequences while training?

    How do you process variable length input sequences while training?

    Hi! Congrats on the amazing paper and thanks so much for providing your source code! I was wondering if you guys used variable input sequences while training and if you could provide code for handling variable input sequences?

    Thanks!

    opened by VimalMollyn 2
  • smpl与unity坐标转换的问题请教

    smpl与unity坐标转换的问题请教

    大佬你好,感谢你的工作。 我在使用其他项目计算的SMPLX数据(右手坐标系,X-right,Y-up,Z-forward)截取了前24个节点坐标和trans后导入你创建的unity项目中实现可视化的时候遇到了一些问题,人体动作很扭曲。 想请教你的是,你的代码计算后传输到unity的数据是左手坐标系还是右手坐标系?x,y,z分别都是哪些方向? MotionController.cs中的坐标转换看得有点懵。请大佬指教

    opened by Seeseallllll 0
  • calibration in AMASS datasets

    calibration in AMASS datasets

    I'm trying to make train.py with your given code and datasets. I made synthetic amass datasets and checked it worked well in evaluate.py.

    Most of train.py was written, but there is difficulty in calibrating amass data.

    In the paper, t-pose calibration was used, and to do so, ori_raw and acc_raw values of t-pose are required. How can I get data? Are they already in synthetic amass datasets?

    In calibration process of the live_demo.py, I can check that smpl2imu and device2bone are created by directly collecting t-pose data. I'm trying to use a code similar to this, but I don't know how to get ori_raw and acc_raw.

    opened by iamyouno 0
  • Can not reproduce test result in TotalCapture

    Can not reproduce test result in TotalCapture

    Hi, I'm trying to reproduce test result using DIP-IMU and TotalCapture datasets.

    When run preprocess.py and evaluate.py, It worked well in DIP-IMU, but not in TotalCapture.

    Is anyone who reproduce test result with TotalCapture dataset?

    Should I change code or some data?

    opened by iamyouno 0
  • 如何使用自己买的IMU的数据进行离线演示效果?

    如何使用自己买的IMU的数据进行离线演示效果?

    作者在论文中写到输入的数据是 校准后的6个IMU的加速度 accelerations 6 * 3, 还有方向矩阵 rotations 633 我自己买的九轴传感器其中一个数据是 三轴加速度 + 三轴角速度 +三轴磁场 我理解的是 accelerations 是由三轴加速度校准得来的 但我并不清楚rotations是 九轴IMU的哪些数据得来的 作者能解答一下rotations是怎么得来的吗

    opened by MrBen2019 5
  • Lower limb pose prediction much worse than upper limb prediction

    Lower limb pose prediction much worse than upper limb prediction

    Hi, I've been using the XSens IMU sensors to collect data and run pose prediction using the TransPose algorithm. The sensor placement and configuration follow that of the DIP dataset. I use both single sensor calibration (x=Left, y=Up, z=Forward) and T-pose calibration, like what is done in live_demo.py. However, what I've found, is that upper limb predictions are pretty accurate, but the lower limb predictions are not correct (for example, the Unity avatar is supposed to raise the leg but it is just standing normally). Any possible suggestions, or someone with similar problems?

    opened by formidify 1
PhysCap: Physically Plausible Monocular 3D Motion Capture in Real Time

PhysCap: Physically Plausible Monocular 3D Motion Capture in Real Time The implementation is based on SIGGRAPH Aisa'20. Dependencies Python 3.7 Ubuntu

soratobtai 124 Dec 8, 2022
Some useful blender add-ons for SMPL skeleton's poses and global translation.

Blender add-ons for SMPL skeleton's poses and trans There are two blender add-ons for SMPL skeleton's poses and trans.The first is for making an offli

犹在镜中 154 Jan 4, 2023
An addon uses SMPL's poses and global translation to drive cartoon character in Blender.

Blender addon for driving character The addon drives the cartoon character by passing SMPL's poses and global translation into model's armature in Ble

犹在镜中 153 Dec 14, 2022
Real-Time-Student-Attendence-System - Real Time Student Attendence System

Real-Time-Student-Attendence-System The Student Attendance Management System Pro

Rounak Das 1 Feb 15, 2022
Semi-Supervised 3D Hand-Object Poses Estimation with Interactions in Time

Semi Hand-Object Semi-Supervised 3D Hand-Object Poses Estimation with Interactions in Time (CVPR 2021).

null 96 Dec 27, 2022
We utilize deep reinforcement learning to obtain favorable trajectories for visual-inertial system calibration.

Unified Data Collection for Visual-Inertial Calibration via Deep Reinforcement Learning Update: The lastest code will be updated in this branch. Pleas

ETHZ ASL 27 Dec 29, 2022
Motion and Shape Capture from Sparse Markers

MoSh++ This repository contains the official chumpy implementation of mocap body solver used for AMASS: AMASS: Archive of Motion Capture as Surface Sh

Nima Ghorbani 135 Dec 23, 2022
EasyMocap is an open-source toolbox for markerless human motion capture from RGB videos.

EasyMocap is an open-source toolbox for markerless human motion capture from RGB videos. In this project, we provide the basic code for fitt

ZJU3DV 2.2k Jan 5, 2023
dataset for ECCV 2020 "Motion Capture from Internet Videos"

Motion Capture from Internet Videos Motion Capture from Internet Videos Junting Dong*, Qing Shuai*, Yuanqing Zhang, Xian Liu, Xiaowei Zhou, Hujun Bao

ZJU3DV 98 Dec 7, 2022
A minimal solution to hand motion capture from a single color camera at over 100fps. Easy to use, plug to run.

Minimal Hand A minimal solution to hand motion capture from a single color camera at over 100fps. Easy to use, plug to run. This project provides the

Yuxiao Zhou 824 Jan 7, 2023
Differential rendering based motion capture blender project.

TraceArmature Summary TraceArmature is currently a set of python scripts that allow for high fidelity motion capture through the use of AI pose estima

William Rodriguez 4 May 27, 2022
An automated algorithm to extract the linear blend skinning (LBS) from a set of example poses

Dem Bones This repository contains an implementation of Smooth Skinning Decomposition with Rigid Bones, an automated algorithm to extract the Linear B

Electronic Arts 684 Dec 26, 2022
Code for Quantifying Ignorance in Individual-Level Causal-Effect Estimates under Hidden Confounding

?? quince Code for Quantifying Ignorance in Individual-Level Causal-Effect Estimates under Hidden Confounding ?? Installation $ git clone [email protected]

Andrew Jesson 19 Jun 23, 2022
LVI-SAM: Tightly-coupled Lidar-Visual-Inertial Odometry via Smoothing and Mapping

LVI-SAM This repository contains code for a lidar-visual-inertial odometry and mapping system, which combines the advantages of LIO-SAM and Vins-Mono

Tixiao Shan 1.1k Dec 27, 2022
COVINS -- A Framework for Collaborative Visual-Inertial SLAM and Multi-Agent 3D Mapping

COVINS -- A Framework for Collaborative Visual-Inertial SLAM and Multi-Agent 3D Mapping Version 1.0 COVINS is an accurate, scalable, and versatile vis

ETHZ V4RL 183 Dec 27, 2022
Learning to Estimate Hidden Motions with Global Motion Aggregation

Learning to Estimate Hidden Motions with Global Motion Aggregation (GMA) This repository contains the source code for our paper: Learning to Estimate

Shihao Jiang (Zac) 221 Dec 18, 2022
VID-Fusion: Robust Visual-Inertial-Dynamics Odometry for Accurate External Force Estimation

VID-Fusion VID-Fusion: Robust Visual-Inertial-Dynamics Odometry for Accurate External Force Estimation Authors: Ziming Ding , Tiankai Yang, Kunyi Zhan

ZJU FAST Lab 86 Nov 18, 2022
T-LOAM: Truncated Least Squares Lidar-only Odometry and Mapping in Real-Time

T-LOAM: Truncated Least Squares Lidar-only Odometry and Mapping in Real-Time The first Lidar-only odometry framework with high performance based on tr

Pengwei Zhou 183 Dec 1, 2022
A lane detection integrated Real-time Instance Segmentation based on YOLACT (You Only Look At CoefficienTs)

Real-time Instance Segmentation and Lane Detection This is a lane detection integrated Real-time Instance Segmentation based on YOLACT (You Only Look

Jin 4 Dec 30, 2022