`is_coco` list fix (#3646)

This commit is contained in:
Mai Thanh Minh 2021-06-17 03:56:16 +07:00 committed by GitHub
parent 6187edcb53
commit fa29125f18
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -78,7 +78,7 @@ def test(data,
with open(data) as f: with open(data) as f:
data = yaml.safe_load(f) data = yaml.safe_load(f)
check_dataset(data) # check check_dataset(data) # check
is_coco = data['val'].endswith('coco/val2017.txt') # COCO dataset 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 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 iouv = torch.linspace(0.5, 0.95, 10).to(device) # iou vector for mAP@0.5:0.95
niou = iouv.numel() niou = iouv.numel()