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

Method __init__

text2motion/utils/skeleton.py:5–15  ·  view source on GitHub ↗
(self, offset, kinematic_tree, device)

Source from the content-addressed store, hash-verified

3
4class Skeleton(object):
5 def __init__(self, offset, kinematic_tree, device):
6 self.device = device
7 self._raw_offset_np = offset.numpy()
8 self._raw_offset = offset.clone().detach().to(device).float()
9 self._kinematic_tree = kinematic_tree
10 self._offset = None
11 self._parents = [0] * len(self._raw_offset)
12 self._parents[0] = -1
13 for chain in self._kinematic_tree:
14 for j in range(1, len(chain)):
15 self._parents[chain[j]] = chain[j-1]
16
17 def njoints(self):
18 return len(self._raw_offset)

Callers

nothing calls this directly

Calls 1

toMethod · 0.80

Tested by

no test coverage detected