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

Method __init__

ADHMR/lib/utils/human_models.py:162–182  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

160
161class SMPL(object):
162 def __init__(self):
163 self.human_model_path = '/path/to/HMR-Scorer/common/utils/human_model_files'
164 self.layer_arg = {'create_body_pose': False, 'create_betas': False, 'create_global_orient': False, 'create_transl': False}
165 self.layer = {'neutral': smplx.create(self.human_model_path, 'smpl', gender='NEUTRAL', **self.layer_arg), 'male': smplx.create(self.human_model_path, 'smpl', gender='MALE', **self.layer_arg), 'female': smplx.create(self.human_model_path, 'smpl', gender='FEMALE', **self.layer_arg)}
166 self.vertex_num = 6890
167 self.face = self.layer['neutral'].faces
168 self.shape_param_dim = 10
169 self.vposer_code_dim = 32
170
171 # original SMPL joint set
172 self.orig_joint_num = 24
173 self.orig_joints_name = ('Pelvis', 'L_Hip', 'R_Hip', 'Spine_1', 'L_Knee', 'R_Knee', 'Spine_2', 'L_Ankle', 'R_Ankle', 'Spine_3', 'L_Foot', 'R_Foot', 'Neck', 'L_Collar', 'R_Collar', 'Head', 'L_Shoulder', 'R_Shoulder', 'L_Elbow', 'R_Elbow', 'L_Wrist', 'R_Wrist', 'L_Hand', 'R_Hand')
174 self.orig_flip_pairs = ( (1,2), (4,5), (7,8), (10,11), (13,14), (16,17), (18,19), (20,21), (22,23) )
175 self.orig_root_joint_idx = self.orig_joints_name.index('Pelvis')
176 self.orig_joint_regressor = self.layer['neutral'].J_regressor.numpy().astype(np.float32)
177
178 self.joint_num = self.orig_joint_num
179 self.joints_name = self.orig_joints_name
180 self.flip_pairs = self.orig_flip_pairs
181 self.root_joint_idx = self.orig_root_joint_idx
182 self.joint_regressor = self.orig_joint_regressor
183
184class MANO(object):
185 def __init__(self):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected