(self, transform, data_split)
| 93 | ] |
| 94 | |
| 95 | def __init__(self, transform, data_split): |
| 96 | self.transform = transform |
| 97 | self.data_split = data_split |
| 98 | |
| 99 | # dataset information, to be filled by child class |
| 100 | self.img_dir = None |
| 101 | self.annot_path = None |
| 102 | self.annot_path_cache = None |
| 103 | self.use_cache = False |
| 104 | self.img_shape = None # (h, w) |
| 105 | self.cam_param = None # {'focal_length': (fx, fy), 'princpt': (cx, cy)} |
| 106 | self.use_betas_neutral = False |
| 107 | self.body_only = False |
| 108 | self.joint_set = { |
| 109 | 'joint_num': smpl_x.joint_num, |
| 110 | 'joints_name': smpl_x.joints_name, |
| 111 | 'flip_pairs': smpl_x.flip_pairs |
| 112 | } |
| 113 | self.joint_set['root_joint_idx'] = self.joint_set['joints_name'].index( |
| 114 | 'Pelvis') |
| 115 | self.format = DefaultFormatBundle() |
| 116 | self.normalize = Normalize(mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375]) |
| 117 | self.keypoints2d = None |
| 118 | # self.rank = dist.get_rank() |
| 119 | self.lhand_mean = smpl_x.layer['neutral'].left_hand_mean.reshape(15, 3).cpu().numpy() |
| 120 | self.rhand_mean = smpl_x.layer['neutral'].right_hand_mean.reshape(15, 3).cpu().numpy() |
| 121 | # self.log_file_path = f'indices_node{rank}.txt' |
| 122 | def load_cache(self, annot_path_cache): |
| 123 | datalist = Cache(annot_path_cache) |
| 124 | # assert datalist.data_strategy == getattr(cfg, 'data_strategy', None), \ |
nothing calls this directly
no test coverage detected