Skip to content
项目

关于

This repository contains an example script to convert from a SMPL model to a bvh file.

其他项目

这些数字如何统计

实测星标增长

24小时
0
7天
0
15天
0
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

smpl2bvh

This repository contains an example script to convert from a SMPL model to a bvh file.


The left side of the figure shows the SMPL grand truth and the right side shows the bvh data. If you want to convert AMASS to bvh, please refer to my another repo.

Notification

This code is MIT licensed, but SMPL requires a separate license.
Please see SMPL official website.

Requirements

You need to download SMPL models in ./data/smpl/smpl/.
You need to download smplx too.
To install from PyPi simply run:

    pip install smplx[all]

How to use?

After downloads all requirements, you can use smpl2bvh like this:

    python smpl2bvh.py --gender MALE --poses ${PATH_TO_Y0UR_INPUT} --fps 60 --output ${PATH_TO_SAVE} --mirror

poses is an .npz file or .pkl file.
.npz file must contain rotations and trans as keys.
rotations value is an np.array consisting of [fnum, 24, 3] and trans value is the root transition consisting of [fnum, 3] (fnum means frame number).

.pkl file must contain smpl_poses and smpl_scaling and smpl_trans as keys.
smpl_poses value is an np.array consisting of [fnum, 72] and smpl_scaling value is the scaling parameter. smpl_trans value is the root transition consisting of [fnum, 3].
The format of pkl file is the same as AIST++ dataset.
If you check --mirror as an argument, the mirrored motion is also saved.
After processing, you can find bvh file as --output.
For more information, please refer to smpl2bvh.py.

Reference

bvh.py and quat.py are based on Motion Matching.

探索相关项目

加载中…