glenn-jocher commited on
Commit
224e9a1
2 Parent(s): 98fc483 d6f6b33

Merge remote-tracking branch 'origin/master'

Browse files
Files changed (1) hide show
  1. utils/datasets.py +1 -0
utils/datasets.py CHANGED
@@ -436,6 +436,7 @@ class LoadImagesAndLabels(Dataset): # for training/testing
436
  image.verify() # PIL verify
437
  # _ = io.imread(img) # skimage verify (from skimage import io)
438
  shape = exif_size(image) # image size
 
439
  if os.path.isfile(label):
440
  with open(label, 'r') as f:
441
  l = np.array([x.split() for x in f.read().splitlines()], dtype=np.float32) # labels
 
436
  image.verify() # PIL verify
437
  # _ = io.imread(img) # skimage verify (from skimage import io)
438
  shape = exif_size(image) # image size
439
+ assert (shape[0] > 9) & (shape[1] > 9), 'image size <10 pixels'
440
  if os.path.isfile(label):
441
  with open(label, 'r') as f:
442
  l = np.array([x.split() for x in f.read().splitlines()], dtype=np.float32) # labels