Update datasets.py

pull/1/head
Glenn Jocher 5 years ago committed by GitHub
parent 13a09fa68a
commit dd33d2ab77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -294,8 +294,8 @@ class LoadImagesAndLabels(Dataset): # for training/testing
raise Exception('%s does not exist' % p) raise Exception('%s does not exist' % p)
path = p # *.npy dir path = p # *.npy dir
self.img_files = [x.replace('/', os.sep) for x in f if os.path.splitext(x)[-1].lower() in img_formats] self.img_files = [x.replace('/', os.sep) for x in f if os.path.splitext(x)[-1].lower() in img_formats]
except: except Exception as e:
raise Exception('Error loading data from %s. See %s' % (path, help_url)) raise Exception('Error loading data from %s: %s\nSee %s' % (path, e, help_url))
n = len(self.img_files) n = len(self.img_files)
assert n > 0, 'No images found in %s. See %s' % (path, help_url) assert n > 0, 'No images found in %s. See %s' % (path, help_url)

Loading…
Cancel
Save