__call__#
- smplfitter.np.BodyModel.__call__(pose_rotvecs=None, shape_betas=None, trans=None, kid_factor=None, rel_rotmats=None, glob_rotmats=None, *, return_vertices=True)[source]#
Calculates the body model vertices, joint positions, and orientations for a batch of instances given the input pose, shape, and translation parameters. The rotation may be specified as one of three options: parent-relative rotation vectors (pose_rotvecs), parent-relative rotation matrices (rel_rotmats), or global rotation matrices (glob_rotmats).
- Parameters:
pose_rotvecs (Optional[ndarray]) – Rotation vectors per joint, shaped as (batch_size, num_joints, 3) or flattened as (batch_size, num_joints * 3).
shape_betas (Optional[ndarray]) – Shape coefficients (betas) for the body shape, shaped as (batch_size, num_betas).
trans (Optional[ndarray]) – Translation vector to apply after posing, shaped as (batch_size, 3).
kid_factor (Optional[ndarray]) – Adjustment factor for kid shapes, shaped as (batch_size, 1).
rel_rotmats (Optional[ndarray]) – Parent-relative rotation matrices per joint, shaped as (batch_size, num_joints, 3, 3).
glob_rotmats (Optional[ndarray]) – Global rotation matrices per joint, shaped as (batch_size, num_joints, 3, 3).
return_vertices (bool) – Flag indicating whether to compute and return the body model vertices. If only joints and orientations are needed, setting this to False is faster.
- Returns:
- A dictionary containing
vertices – 3D body model vertices, shaped as (batch_size, num_vertices, 3), if return_vertices is True.
joints – 3D joint positions, shaped as (batch_size, num_joints, 3).
orientations – Global orientation matrices for each joint, shaped as (batch_size, num_joints, 3, 3).