mirror of
https://github.com/gosticks/body-pose-animation.git
synced 2025-10-16 11:45:42 +00:00
40 lines
675 B
Python
40 lines
675 B
Python
# library imports
|
|
import numpy as np
|
|
|
|
# local imports
|
|
from renderer import DefaultRenderer
|
|
from model import SMPLyModel
|
|
from utils.general import load_config
|
|
|
|
# this a simple pose playground with a async renderer for quick prototyping
|
|
|
|
# load and select sample
|
|
config = load_config()
|
|
model = SMPLyModel.model_from_conf(config)
|
|
# try changing angles
|
|
pose = model.body_pose
|
|
|
|
# left elbow
|
|
pose[:, 56] = -np.pi / 2
|
|
# right elbow
|
|
pose[:, 53] = np.pi / 2
|
|
# left knee
|
|
pose[:, 12] = np.pi / 2
|
|
# right knee
|
|
pose[:, 9] = np.pi / 2
|
|
|
|
# right knee
|
|
pose[:, 24] = np.pi / 2
|
|
|
|
model_out = model(
|
|
pose=pose
|
|
)
|
|
|
|
r = DefaultRenderer()
|
|
r.setup(
|
|
model,
|
|
model_out=model_out
|
|
)
|
|
|
|
r.start()
|