Mai Thanh Minh
commited on
Commit
•
fa29125
1
Parent(s):
6187edc
`is_coco` list fix (#3646)
Browse files
test.py
CHANGED
@@ -78,7 +78,7 @@ def test(data,
|
|
78 |
with open(data) as f:
|
79 |
data = yaml.safe_load(f)
|
80 |
check_dataset(data) # check
|
81 |
-
is_coco = data['val'].endswith('coco/val2017.txt') # COCO dataset
|
82 |
nc = 1 if single_cls else int(data['nc']) # number of classes
|
83 |
iouv = torch.linspace(0.5, 0.95, 10).to(device) # iou vector for mAP@0.5:0.95
|
84 |
niou = iouv.numel()
|
|
|
78 |
with open(data) as f:
|
79 |
data = yaml.safe_load(f)
|
80 |
check_dataset(data) # check
|
81 |
+
is_coco = type(data['val']) is str and data['val'].endswith('coco/val2017.txt') # COCO dataset
|
82 |
nc = 1 if single_cls else int(data['nc']) # number of classes
|
83 |
iouv = torch.linspace(0.5, 0.95, 10).to(device) # iou vector for mAP@0.5:0.95
|
84 |
niou = iouv.numel()
|