MCPcopy Create free account
hub / github.com/Vegetebird/GraphMLP / __getitem__

Method __getitem__

common/load_data_hm36.py:179–194  ·  view source on GitHub ↗
(self, index)

Source from the content-addressed store, hash-verified

177 return len(self.generator.pairs)
178
179 def __getitem__(self, index):
180 seq_name, start_3d, end_3d, flip, reverse = \
181 self.generator.pairs[index], self.generator.bounds_1[index], self.generator.bounds_2[index], \
182 self.generator.augment_vectors[index], self.generator.reverse_augment_vectors[index]
183
184 cam, gt_3D, input_2D, input_2D_GT, action, subject, cam_ind = self.generator.get_batch(seq_name, start_3d, end_3d, flip, reverse)
185
186 if self.train == False and self.test_aug:
187 _, _, input_2D_aug, input_2D_aug_GT, _, _,_ = self.generator.get_batch(seq_name, start_3d, end_3d, flip=True, reverse=reverse)
188 input_2D = np.concatenate((np.expand_dims(input_2D,axis=0),np.expand_dims(input_2D_aug,axis=0)),0)
189 input_2D_GT = np.concatenate((np.expand_dims(input_2D_GT,axis=0),np.expand_dims(input_2D_aug_GT,axis=0)),0)
190
191 input_2D_update = input_2D
192 input_2D_update_GT = input_2D_GT
193
194 return cam, gt_3D, input_2D_update, input_2D_update_GT, action, subject, cam_ind
195
196
197

Callers

nothing calls this directly

Calls 1

get_batchMethod · 0.80

Tested by

no test coverage detected