MCPcopy Create free account
hub / github.com/MotrixLab/MotionDiffuse / get_offsets_joints

Method get_offsets_joints

text2motion/utils/skeleton.py:43–51  ·  view source on GitHub ↗
(self, joints)

Source from the content-addressed store, hash-verified

41
42 # joints (joints_num, 3)
43 def get_offsets_joints(self, joints):
44 assert len(joints.shape) == 2
45 _offsets = self._raw_offset.clone()
46 for i in range(1, self._raw_offset.shape[0]):
47 # print(joints.shape)
48 _offsets[i] = torch.norm(joints[i] - joints[self._parents[i]], p=2, dim=0) * _offsets[i]
49
50 self._offset = _offsets.detach()
51 return _offsets
52
53 # face_joint_idx should follow the order of right hip, left hip, right shoulder, left shoulder
54 # joints (batch_size, joints_num, 3)

Callers 2

uniform_skeletonFunction · 0.95
motion_process.pyFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected