(image_set, args)
| 179 | |
| 180 | |
| 181 | def build(image_set, args): |
| 182 | root = Path(args.coco_path) |
| 183 | assert root.exists(), f'provided VOC path {root} does not exist' |
| 184 | mode = 'instances' |
| 185 | PATHS = { |
| 186 | "train": (root / "images" / "train", root / "annotations" / "voc_train.json"), |
| 187 | "val": (root / "images" / "val", root / "annotations" / "voc_val.json"), |
| 188 | } |
| 189 | |
| 190 | img_folder, ann_file = PATHS[image_set] |
| 191 | dataset = CocoDetection(img_folder, ann_file, transforms=make_coco_transforms(image_set), return_masks=args.masks) |
| 192 | return dataset |
nothing calls this directly
no test coverage detected