| 57 | return batch |
| 58 | |
| 59 | def collate_data3d(batch): |
| 60 | batchTensor = {} |
| 61 | for key in batch[0].keys(): |
| 62 | databatch = [b[key] for b in batch] |
| 63 | if key == "paths": |
| 64 | batchTensor[key] = databatch |
| 65 | else: |
| 66 | batchTensor[key] = torch.stack(databatch,axis=0) |
| 67 | batch = batchTensor |
| 68 | # theta - [bs, lengths, 85], theta shape (85,) |
| 69 | # - (np.array([1., 0., 0.]), pose(72), shape(10)), axis=0) |
| 70 | # kp_2d - [bs, lengths, njoints, nfeats], nfeats (x,y,weight) |
| 71 | # kp_3d - [bs, lengths, njoints, nfeats], nfeats (x,y,z) |
| 72 | # w_smpl - [bs, lengths] zeros |
| 73 | # w_3d - [bs, lengths] zeros |
| 74 | return batch |