Add optional dataset.yaml path attribute (#3753)
* Add optional dataset.yaml `path` attribute @KalenMike * pass locals to python scripts * handle lists * update coco128.yaml * Capitalize first letter * add test key * finalize GlobalWheat2020.yaml * finalize objects365.yaml * finalize SKU-110K.yaml * finalize SKU-110K.yaml * finalize VisDrone.yaml * NoneType fix * update download comment * voc to VOC * update * update VOC.yaml * update VOC.yaml * remove dashes * delete get_voc.sh * force coco and coco128 to ../datasets * Capitalize Argoverse_HD.yaml * Capitalize Objects365.yaml * update Argoverse_HD.yaml * coco segments fix * VOC single-thread * update Argoverse_HD.yaml * update data_dict in test handling * create root
This commit is contained in:
1 parent
417a2f425c
commit
f79d7479da
17 files changed
+265
-326
No files matched your search
@@ -76,6 +76,11 @@ def run(data,
|
||||
# if device.type != 'cpu' and torch.cuda.device_count() > 1:
|
||||
# model = nn.DataParallel(model)
|
||||
|
||||
# Data
|
||||
with open(data) as f:
|
||||
data = yaml.safe_load(f)
|
||||
check_dataset(data) # check
|
||||
|
||||
# Half
|
||||
half &= device.type != 'cpu' # half precision only supported on CUDA
|
||||
if half:
|
||||
@@ -83,10 +88,6 @@ def run(data,
|
||||
|
||||
# Configure
|
||||
model.eval()
|
||||
if isinstance(data, str):
|
||||
with open(data) as f:
|
||||
data = yaml.safe_load(f)
|
||||
check_dataset(data) # check
|
||||
is_coco = type(data['val']) is str and data['val'].endswith('coco/val2017.txt') # COCO dataset
|
||||
nc = 1 if single_cls else int(data['nc']) # number of classes
|
||||
iouv = torch.linspace(0.5, 0.95, 10).to(device) # iou vector for mAP@0.5:0.95
|
||||
|
||||
Reference in new issue
Block a user