Render animations in SMPL Format Using Python

In this tutorial, we will be using GenMotion’s Python rendering interface to render motion data in SMPL format. Inspired by ACTOR, GenMotino utilizes imageio and pyrender to help researchers visualize their motion sequence. This provides a lightweight and convenient way for rendering without any rendering software required.

1. Import libraries

[12]:
import numpy as np
from IPython.display import Video
import genmotion.render.python.rendermotion as rendermotion

2. Load motion data and render.

Note that data has to be in npz format. We will be using Humanacr12 dataset in this tutorial.

[9]:
data = np.load("/home/vince/Documents/Research/ACTOR/pretrained_models/humanact12/generation.npy")
data.shape
[9]:
(10, 12, 6890, 3, 60)

3. render and save video

The rendered video will be saved in the specified folder in mp4 format, which you can view afterwards

[3]:
rendermotion.render(data, "../../../../images")
[3]:
(10, 12, 6890, 3, 60)
[23]:
Video("../../../../images/action0_generation_0.mp4")
[23]:

Note that genmotion currently only supports data in SMPL formats. More format support is comming soon.