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

Method load_annotations

detrsmpl/data/datasets/mesh_dataset.py:43–63  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

41 self.ann_file = os.path.join(ann_prefix, self.ann_file)
42
43 def load_annotations(self):
44
45 self.get_annotation_file()
46 data = np.load(self.ann_file, allow_pickle=True)
47
48 self.smpl = data['smpl'].item()
49 num_data = self.smpl['global_orient'].shape[0]
50 if 'transl' not in self.smpl:
51 self.smpl['transl'] = np.zeros((num_data, 3))
52 self.has_smpl = np.ones((num_data))
53
54 data_infos = []
55
56 for idx in range(num_data):
57 info = {}
58 for k, v in self.smpl.items():
59 info['smpl_' + k] = v[idx]
60
61 data_infos.append(info)
62 self.num_data = len(data_infos)
63 self.data_infos = data_infos

Callers

nothing calls this directly

Calls 3

get_annotation_fileMethod · 0.95
loadMethod · 0.45
itemsMethod · 0.45

Tested by

no test coverage detected