MCPcopy Create free account
hub / github.com/MotrixLab/AiOS / SMPLX

Class SMPLX

util/smplx/smplx/body_models.py:814–1206  ·  view source on GitHub ↗

SMPL-X (SMPL eXpressive) is a unified body model, with shape parameters trained jointly for the face, hands and body. SMPL-X uses standard vertex based linear blend skinning with learned corrective blend shapes, has N=10475 vertices and K=54 joints, which includes joints for the nec

Source from the content-addressed store, hash-verified

812
813
814class SMPLX(SMPLH):
815 """SMPL-X (SMPL eXpressive) is a unified body model, with shape parameters
816 trained jointly for the face, hands and body.
817
818 SMPL-X uses standard vertex based linear blend skinning with learned
819 corrective blend shapes, has N=10475 vertices and K=54 joints, which
820 includes joints for the neck, jaw, eyeballs and fingers.
821 """
822
823 NUM_BODY_JOINTS = SMPLH.NUM_BODY_JOINTS
824 NUM_HAND_JOINTS = 15
825 NUM_FACE_JOINTS = 3
826 NUM_JOINTS = NUM_BODY_JOINTS + 2 * NUM_HAND_JOINTS + NUM_FACE_JOINTS
827 EXPRESSION_SPACE_DIM = 100
828 NECK_IDX = 12
829
830 def __init__(self,
831 model_path: str,
832 num_expression_coeffs: int = 10,
833 create_expression: bool = True,
834 expression: Optional[Tensor] = None,
835 create_jaw_pose: bool = True,
836 jaw_pose: Optional[Tensor] = None,
837 create_leye_pose: bool = True,
838 leye_pose: Optional[Tensor] = None,
839 create_reye_pose=True,
840 reye_pose: Optional[Tensor] = None,
841 use_face_contour: bool = False,
842 batch_size: int = 1,
843 gender: str = 'neutral',
844 dtype=torch.float32,
845 ext: str = 'npz',
846 **kwargs) -> None:
847 """SMPLX model constructor.
848
849 Parameters
850 ----------
851 model_path: str
852 The path to the folder or to the file where the model
853 parameters are stored
854 num_expression_coeffs: int, optional
855 Number of expression components to use
856 (default = 10).
857 create_expression: bool, optional
858 Flag for creating a member variable for the expression space
859 (default = True).
860 expression: torch.tensor, optional, Bx10
861 The default value for the expression member variable.
862 (default = None)
863 create_jaw_pose: bool, optional
864 Flag for creating a member variable for the jaw pose.
865 (default = False)
866 jaw_pose: torch.tensor, optional, Bx3
867 The default value for the jaw pose variable.
868 (default = None)
869 create_leye_pose: bool, optional
870 Flag for creating a member variable for the left eye pose.
871 (default = False)

Callers 1

createFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected