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

Method __init__

util/smplx/smplx/body_models.py:42–239  ·  view source on GitHub ↗

SMPL model constructor. Parameters ---------- model_path: str The path to the folder or to the file where the model parameters are stored data_struct: Strct A struct object. If given, then the parameters of the model are

(self,
                 model_path: str,
                 data_struct: Optional[Struct] = None,
                 create_betas: bool = True,
                 betas: Optional[Tensor] = None,
                 num_betas: int = 10,
                 create_global_orient: bool = True,
                 global_orient: Optional[Tensor] = None,
                 create_body_pose: bool = True,
                 body_pose: Optional[Tensor] = None,
                 create_transl: bool = True,
                 transl: Optional[Tensor] = None,
                 dtype=torch.float32,
                 batch_size: int = 1,
                 joint_mapper=None,
                 gender: str = 'neutral',
                 vertex_ids: Dict[str, int] = None,
                 v_template: Optional[Union[Tensor, Array]] = None,
                 **kwargs)

Source from the content-addressed store, hash-verified

40 SHAPE_SPACE_DIM = 300
41
42 def __init__(self,
43 model_path: str,
44 data_struct: Optional[Struct] = None,
45 create_betas: bool = True,
46 betas: Optional[Tensor] = None,
47 num_betas: int = 10,
48 create_global_orient: bool = True,
49 global_orient: Optional[Tensor] = None,
50 create_body_pose: bool = True,
51 body_pose: Optional[Tensor] = None,
52 create_transl: bool = True,
53 transl: Optional[Tensor] = None,
54 dtype=torch.float32,
55 batch_size: int = 1,
56 joint_mapper=None,
57 gender: str = 'neutral',
58 vertex_ids: Dict[str, int] = None,
59 v_template: Optional[Union[Tensor, Array]] = None,
60 **kwargs) -> None:
61 """SMPL model constructor.
62
63 Parameters
64 ----------
65 model_path: str
66 The path to the folder or to the file where the model
67 parameters are stored
68 data_struct: Strct
69 A struct object. If given, then the parameters of the model are
70 read from the object. Otherwise, the model tries to read the
71 parameters from the given `model_path`. (default = None)
72 create_global_orient: bool, optional
73 Flag for creating a member variable for the global orientation
74 of the body. (default = True)
75 global_orient: torch.tensor, optional, Bx3
76 The default value for the global orientation variable.
77 (default = None)
78 create_body_pose: bool, optional
79 Flag for creating a member variable for the pose of the body.
80 (default = True)
81 body_pose: torch.tensor, optional, Bx(Body Joints * 3)
82 The default value for the body pose variable.
83 (default = None)
84 num_betas: int, optional
85 Number of shape components to use
86 (default = 10).
87 create_betas: bool, optional
88 Flag for creating a member variable for the shape space
89 (default = True).
90 betas: torch.tensor, optional, Bx10
91 The default value for the shape member variable.
92 (default = None)
93 create_transl: bool, optional
94 Flag for creating a member variable for the translation
95 of the body. (default = True)
96 transl: torch.tensor, optional, Bx3
97 The default value for the transl variable.
98 (default = None)
99 dtype: torch.dtype, optional

Callers 9

__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45

Calls 9

nameMethod · 0.95
StructClass · 0.85
VertexJointSelectorClass · 0.85
cloneMethod · 0.80
to_tensorFunction · 0.70
to_npFunction · 0.70
printFunction · 0.50
loadMethod · 0.45
detachMethod · 0.45

Tested by

no test coverage detected