Download visualization/MotionStreamer272/render.py from haiyangliu0/FloodDiffusion-MEI: direct link, hf CLI and curl.
- Browser
- Download file 520 Bytes
-
https://huggingface.co/haiyangliu0/FloodDiffusion-MEI/resolve/main/visualization/MotionStreamer272/render.py
- Command line
-
hf download hf://haiyangliu0/FloodDiffusion-MEI/visualization/MotionStreamer272/render.py
-
curl -L -o render.py https://huggingface.co/haiyangliu0/FloodDiffusion-MEI/resolve/main/visualization/MotionStreamer272/render.py
520 Bytes
| import numpy as np | |
| from .recovery import recover_joint_positions | |
| from ..tools.render_skeleton import get_smpl22_chains, render_skeleton_frames | |
| def render_frames(motion: np.ndarray) -> list: | |
| """Render 272D MotionStreamer motion features to image frames. | |
| Args: | |
| motion: (T, 272) denormalized motion features. | |
| Returns: | |
| list of np.ndarray images (H, W, 3), uint8. | |
| """ | |
| joints = recover_joint_positions(motion) | |
| return render_skeleton_frames(data=joints, chains=get_smpl22_chains()) | |