(self, transform, data_split)
| 5 | |
| 6 | class BEDLAM(HumanDataset): |
| 7 | def __init__(self, transform, data_split): |
| 8 | super(BEDLAM, self).__init__(transform, data_split) |
| 9 | |
| 10 | self.img_dir = './data/datasets/bedlam/train_images/' |
| 11 | self.annot_path = 'data/preprocessed_npz/multihuman_data/bedlam_train_multi_0915.npz' |
| 12 | self.annot_path_cache = 'data/preprocessed_npz/cache/bedlam_train_cache_080824.npz' |
| 13 | self.use_cache = getattr(cfg, 'use_cache', False) |
| 14 | |
| 15 | self.img_shape = None #1024, 1024) # (h, w) |
| 16 | self.cam_param = {} |
| 17 | |
| 18 | # load data or cache |
| 19 | if self.use_cache and osp.isfile(self.annot_path_cache): |
| 20 | print( |
| 21 | f'[{self.__class__.__name__}] loading cache from {self.annot_path_cache}' |
| 22 | ) |
| 23 | self.datalist = self.load_cache(self.annot_path_cache) |
| 24 | else: |
| 25 | if self.use_cache: |
| 26 | print( |
| 27 | f'[{self.__class__.__name__}] Cache not found, generating cache...' |
| 28 | ) |
| 29 | self.datalist = self.load_data(train_sample_interval=getattr( |
| 30 | cfg, f'{self.__class__.__name__}_train_sample_interval', 5)) |
| 31 | if self.use_cache: |
| 32 | self.save_cache(self.annot_path_cache, self.datalist) |
nothing calls this directly
no test coverage detected