(self, opt)
| 27 | return parser |
| 28 | |
| 29 | def get_paths(self, opt): |
| 30 | root = opt.dataroot |
| 31 | phase = 'val' if opt.phase == 'test' else 'train' |
| 32 | |
| 33 | all_images = make_dataset(root, recursive=True, read_cache=False, write_cache=False) |
| 34 | image_paths = [] |
| 35 | label_paths = [] |
| 36 | for p in all_images: |
| 37 | if '_%s_' % phase not in p: |
| 38 | continue |
| 39 | if p.endswith('.jpg'): |
| 40 | image_paths.append(p) |
| 41 | elif p.endswith('.png'): |
| 42 | label_paths.append(p) |
| 43 | |
| 44 | instance_paths = [] # don't use instance map for ade20k |
| 45 | |
| 46 | return label_paths, image_paths, instance_paths |
| 47 | |
| 48 | # In ADE20k, 'unknown' label is of value 0. |
| 49 | # Change the 'unknown' label to the last label to match other datasets. |
nothing calls this directly
no test coverage detected