Merge pull request #70 from jveitchmichaelis/patch-2

Fix absolute path in class name loader
This commit is contained in:
Glenn Jocher 2019-01-06 23:18:49 +02:00 committed by GitHub
commit c164c87935
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -22,7 +22,7 @@ def load_classes(path):
"""
Loads class labels at 'path'
"""
fp = open('data/coco.names', 'r')
fp = open(path, 'r')
names = fp.read().split('\n')
return list(filter(None, names)) # filter removes empty strings (such as last line)