(self, transform, data_split)
| 14 | |
| 15 | class ARCTIC(HumanDataset): |
| 16 | def __init__(self, transform, data_split): |
| 17 | super(ARCTIC, self).__init__(transform, data_split) |
| 18 | |
| 19 | self.img_dir = 'data/osx_data/ARCTIC' |
| 20 | |
| 21 | |
| 22 | if data_split == 'train': |
| 23 | self.annot_path = 'data/preprocessed_npz/multihuman_data/p1_train_multi.npz' |
| 24 | self.annot_path_cache = 'data/preprocessed_npz/cache/p1_train_cache_sample1000_080824.npz' |
| 25 | self.sample_interval = 1000 |
| 26 | elif data_split == 'test': |
| 27 | self.annot_path = 'data/preprocessed_npz_old/multihuman_data/p1_val_multi.npz' |
| 28 | self.annot_path_cache = 'data/preprocessed_npz_old/cache/p1_val_cache_30.npz' |
| 29 | self.sample_interval = 30 |
| 30 | |
| 31 | |
| 32 | self.use_cache = getattr(cfg, 'use_cache', False) |
| 33 | self.img_shape = None #1024, 1024) # (h, w) |
| 34 | self.cam_param = {} |
| 35 | self.use_cache=True |
| 36 | # load data |
| 37 | if self.use_cache and osp.isfile(self.annot_path_cache): |
| 38 | print( |
| 39 | f'[{self.__class__.__name__}] loading cache from {self.annot_path_cache}' |
| 40 | ) |
| 41 | self.datalist = self.load_cache(self.annot_path_cache) |
| 42 | else: |
| 43 | if self.use_cache: |
| 44 | print( |
| 45 | f'[{self.__class__.__name__}] Cache not found, generating cache...' |
| 46 | ) |
| 47 | self.datalist = self.load_data(train_sample_interval=getattr( |
| 48 | cfg, f'{self.__class__.__name__}_train_sample_interval', self.sample_interval)) |
| 49 | if self.use_cache: |
| 50 | self.save_cache(self.annot_path_cache, self.datalist) |
| 51 | |
| 52 | |
| 53 | def evaluate(self, outs, cur_sample_idx): |
nothing calls this directly
no test coverage detected