single#
- smplfitter.np.BodyModel.single(*args, return_vertices=True, **kwargs)[source]#
Calculates the body model vertices, joint positions, and orientations for a single instance 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). If none of the arguments are given, the default pose and shape are used.
- Parameters:
pose_rotvecs – Rotation vectors per joint, shaped as (num_joints, 3) or (num_joints * 3,).
shape_betas – Shape coefficients (betas) for the body shape, shaped as (num_betas,).
trans – Translation vector to apply after posing, shaped as (3,).
kid_factor – Adjustment factor for kid shapes, shaped as (1,). Default is None.
rel_rotmats – Parent-relative rotation matrices per joint, shaped as (num_joints, 3, 3).
glob_rotmats – Global rotation matrices per joint, shaped as (num_joints, 3, 3).
return_vertices – Flag indicating whether to compute and return the body model vertices. If only joints and orientations are needed, it is much faster.
- Returns:
- A dictionary containing
vertices – 3D body model vertices, shaped as (num_vertices, 3), if return_vertices is True.
joints – 3D joint positions, shaped as (num_joints, 3).
orientations – Global orientation matrices for each joint, shaped as (num_joints, 3, 3).