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

Method __init__

detrsmpl/models/utils/SMPLX.py:346–379  ·  view source on GitHub ↗
(self,
                 model_head,
                 body_model,
                 convention='smplx',
                 img_res=256,
                 scale_factor=2.0,
                 crop_size=224,
                 condition_hand_wrist_pose=True,
                 condition_hand_shape=False,
                 condition_hand_finger_pose=True)

Source from the content-addressed store, hash-verified

344 position.
345 """
346 def __init__(self,
347 model_head,
348 body_model,
349 convention='smplx',
350 img_res=256,
351 scale_factor=2.0,
352 crop_size=224,
353 condition_hand_wrist_pose=True,
354 condition_hand_shape=False,
355 condition_hand_finger_pose=True):
356 self.model_head = model_head
357 self.body_model = body_model
358 self.img_res = img_res
359 self.convention = convention
360 self.left_hand_idxs = get_keypoint_idxs_by_part(
361 'left_hand', self.convention)
362 left_wrist_idx = get_keypoint_idx('left_wrist', self.convention)
363 self.left_hand_idxs.append(left_wrist_idx)
364 self.left_wrist_kin_chain = find_joint_kin_chain(
365 left_wrist_idx, self.body_model.parents)
366
367 self.right_hand_idxs = get_keypoint_idxs_by_part(
368 'right_hand', self.convention)
369 right_wrist_idx = get_keypoint_idx('right_wrist', self.convention)
370 self.right_hand_idxs.append(right_wrist_idx)
371 self.right_wrist_kin_chain = find_joint_kin_chain(
372 right_wrist_idx, self.body_model.parents)
373
374 self.scale_factor = scale_factor
375 self.hand_cropper = CropSampler(crop_size)
376
377 self.condition_hand_wrist_pose = condition_hand_wrist_pose
378 self.condition_hand_shape = condition_hand_shape
379 self.condition_hand_finger_pose = condition_hand_finger_pose
380
381 def build_hand_mean(self, global_orient, body_pose, betas, left_hand_pose,
382 raw_right_hand_pose, batch_size):

Callers

nothing calls this directly

Calls 4

get_keypoint_idxFunction · 0.90
find_joint_kin_chainFunction · 0.90
CropSamplerClass · 0.85

Tested by

no test coverage detected