Giter Site home page Giter Site logo

smpl2bvh's Introduction

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.

smpl2bvh's People

Contributors

kosukefukazawa avatar visonpon avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.