MCPcopy Create free account
hub / github.com/OpenDriveLab/ReSim / build

Function build

SwissArmyTransformer/examples/yolos/datasets_/voc.py:181–192  ·  view source on GitHub ↗
(image_set, args)

Source from the content-addressed store, hash-verified

179
180
181def 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

Callers

nothing calls this directly

Calls 3

CocoDetectionClass · 0.85
existsMethod · 0.80
make_coco_transformsFunction · 0.70

Tested by

no test coverage detected