(self, opt)
| 28 | return parser |
| 29 | |
| 30 | def get_paths(self, opt): |
| 31 | root = opt.dataroot |
| 32 | phase = 'val' if opt.phase == 'test' else opt.phase |
| 33 | |
| 34 | label_dir = os.path.join(root, '%s_label' % phase) |
| 35 | label_paths = make_dataset(label_dir, recursive=False, read_cache=True) |
| 36 | |
| 37 | if not opt.coco_no_portraits and opt.isTrain: |
| 38 | label_portrait_dir = os.path.join(root, '%s_label_portrait' % phase) |
| 39 | if os.path.isdir(label_portrait_dir): |
| 40 | label_portrait_paths = make_dataset(label_portrait_dir, recursive=False, read_cache=True) |
| 41 | label_paths += label_portrait_paths |
| 42 | |
| 43 | image_dir = os.path.join(root, '%s_img' % phase) |
| 44 | image_paths = make_dataset(image_dir, recursive=False, read_cache=True) |
| 45 | |
| 46 | if not opt.coco_no_portraits and opt.isTrain: |
| 47 | image_portrait_dir = os.path.join(root, '%s_img_portrait' % phase) |
| 48 | if os.path.isdir(image_portrait_dir): |
| 49 | image_portrait_paths = make_dataset(image_portrait_dir, recursive=False, read_cache=True) |
| 50 | image_paths += image_portrait_paths |
| 51 | |
| 52 | if not opt.no_instance: |
| 53 | instance_dir = os.path.join(root, '%s_inst' % phase) |
| 54 | instance_paths = make_dataset(instance_dir, recursive=False, read_cache=True) |
| 55 | |
| 56 | if not opt.coco_no_portraits and opt.isTrain: |
| 57 | instance_portrait_dir = os.path.join(root, '%s_inst_portrait' % phase) |
| 58 | if os.path.isdir(instance_portrait_dir): |
| 59 | instance_portrait_paths = make_dataset(instance_portrait_dir, recursive=False, read_cache=True) |
| 60 | instance_paths += instance_portrait_paths |
| 61 | |
| 62 | else: |
| 63 | instance_paths = [] |
| 64 | |
| 65 | return label_paths, image_paths, instance_paths |
nothing calls this directly
no test coverage detected