We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
is_coco
data['val']
1 parent 234e8ae commit fad57c2Copy full SHA for fad57c2
val.py
@@ -134,7 +134,7 @@ def run(data,
134
135
# Configure
136
model.eval()
137
- is_coco = type(data['val']) is str and data['val'].endswith('coco/val2017.txt') # COCO dataset
+ is_coco = isinstance(data.get('val'), str) and data['val'].endswith('coco/val2017.txt') # COCO dataset
138
nc = 1 if single_cls else int(data['nc']) # number of classes
139
iouv = torch.linspace(0.5, 0.95, 10).to(device) # iou vector for [email protected]:0.95
140
niou = iouv.numel()
0 commit comments