| 1 | |
| 2 | |
| 3 | class MocapDataset: |
| 4 | def __init__(self, fps, skeleton): |
| 5 | self._skeleton = skeleton |
| 6 | self._fps = fps |
| 7 | self._data = None |
| 8 | self._cameras = None |
| 9 | |
| 10 | def remove_joints(self, joints_to_remove): |
| 11 | kept_joints = self._skeleton.remove_joints(joints_to_remove) |
| 12 | for subject in self._data.keys(): |
| 13 | for action in self._data[subject].keys(): |
| 14 | s = self._data[subject][action] |
| 15 | s['positions'] = s['positions'][:, kept_joints] |
| 16 | |
| 17 | def __getitem__(self, key): |
| 18 | return self._data[key] |
| 19 | |
| 20 | def subjects(self): |
| 21 | return self._data.keys() |
| 22 | |
| 23 | def fps(self): |
| 24 | return self._fps |
| 25 | |
| 26 | def skeleton(self): |
| 27 | return self._skeleton |
| 28 | |
| 29 | def cameras(self): |
| 30 | return self._cameras |
| 31 | |
| 32 | def supports_semi_supervised(self): |
| 33 | return False |
| 34 | |
| 35 |
nothing calls this directly
no outgoing calls
no test coverage detected