(
rootpath: str,
setting: str,
num_classes: int = 3,
rnd_seed: int = 0
)
| 163 | |
| 164 | |
| 165 | def get_Sketchfab_model_list( |
| 166 | rootpath: str, |
| 167 | setting: str, |
| 168 | num_classes: int = 3, |
| 169 | rnd_seed: int = 0 |
| 170 | ) -> list: |
| 171 | np.random.seed(rnd_seed) |
| 172 | if setting == 'train': |
| 173 | off_list = sorted(os.listdir(os.path.join(rootpath, 'train_mesh'))) |
| 174 | elif setting == 'test': |
| 175 | off_list = sorted(os.listdir(os.path.join(rootpath, 'test_mesh'))) |
| 176 | |
| 177 | off_list = np.random.permutation(off_list).tolist() |
| 178 | |
| 179 | off_list = [setting + '_mesh/' + off for off in off_list[:num_classes]] |
| 180 | |
| 181 | return off_list |
| 182 | |
| 183 | |
| 184 | # below are only for debug this function individually |
nothing calls this directly
no outgoing calls
no test coverage detected