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

Method __init__

detrsmpl/models/body_models/flame.py:111–140  ·  view source on GitHub ↗

Args: *args: extra arguments for FLAME initialization. keypoint_src: source convention of keypoints. This convention is used for keypoints obtained from joint regressors. Keypoints then undergo conversion into keypoint_dst

(self,
                 *args,
                 keypoint_src: str = 'flame',
                 keypoint_dst: str = 'human_data',
                 keypoint_approximate: bool = False,
                 **kwargs)

Source from the content-addressed store, hash-verified

109 NUM_FACES = 9976
110
111 def __init__(self,
112 *args,
113 keypoint_src: str = 'flame',
114 keypoint_dst: str = 'human_data',
115 keypoint_approximate: bool = False,
116 **kwargs):
117 """
118 Args:
119 *args: extra arguments for FLAME initialization.
120 keypoint_src: source convention of keypoints. This convention
121 is used for keypoints obtained from joint regressors.
122 Keypoints then undergo conversion into keypoint_dst
123 convention.
124 keypoint_dst: destination convention of keypoints. This convention
125 is used for keypoints in the output.
126 keypoint_approximate: whether to use approximate matching in
127 convention conversion for keypoints.
128 **kwargs: extra keyword arguments for FLAME initialization.
129
130 Returns:
131 None
132 """
133 super(FLAMELayer, self).__init__(*args, **kwargs)
134 self.keypoint_src = keypoint_src
135 self.keypoint_dst = keypoint_dst
136 self.keypoint_approximate = keypoint_approximate
137
138 self.num_verts = self.get_num_verts()
139 self.num_faces = self.get_num_faces()
140 self.num_joints = get_keypoint_num(convention=self.keypoint_dst)
141
142 def forward(self,
143 *args,

Callers

nothing calls this directly

Calls 4

get_keypoint_numFunction · 0.90
get_num_vertsMethod · 0.80
get_num_facesMethod · 0.80
__init__Method · 0.45

Tested by

no test coverage detected