Fix absolute path in class name loader

This commit is contained in:
Josh Veitch-Michaelis 2019-01-06 20:54:04 +00:00 committed by GitHub
parent 8dfa653942
commit 212597fddd
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' Loads class labels at 'path'
""" """
fp = open('data/coco.names', 'r') fp = open(path, 'r')
names = fp.read().split('\n') names = fp.read().split('\n')
return list(filter(None, names)) # filter removes empty strings (such as last line) return list(filter(None, names)) # filter removes empty strings (such as last line)