Skip to content

Commit 385ec8e

Browse files
HERIUNpre-commit-ci[bot]glenn-jocher
authored andcommitted
Update val.py (ultralytics#7478)
* Update val.py is_coco doesn't work!! '/' -> os.sep!! * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Cleanup * fix Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Glenn Jocher <[email protected]>
1 parent 6e00902 commit 385ec8e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

val.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def run(
155155
# Configure
156156
model.eval()
157157
cuda = device.type != 'cpu'
158-
is_coco = isinstance(data.get('val'), str) and data['val'].endswith('coco/val2017.txt') # COCO dataset
158+
is_coco = isinstance(data.get('val'), str) and data['val'].endswith(f'coco{os.sep}val2017.txt') # COCO dataset
159159
nc = 1 if single_cls else int(data['nc']) # number of classes
160160
iouv = torch.linspace(0.5, 0.95, 10, device=device) # iou vector for [email protected]:0.95
161161
niou = iouv.numel()

0 commit comments

Comments
 (0)