From d6f6b33a4921a4e7b04e0e996f56596cd4a5c8c0 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Sat, 11 Jul 2020 00:21:52 -0700 Subject: [PATCH] update datasets.py for image size check during caching --- utils/datasets.py | 1 + 1 file changed, 1 insertion(+) diff --git a/utils/datasets.py b/utils/datasets.py index fe965f7..d034942 100755 --- a/utils/datasets.py +++ b/utils/datasets.py @@ -436,6 +436,7 @@ class LoadImagesAndLabels(Dataset): # for training/testing image.verify() # PIL verify # _ = io.imread(img) # skimage verify (from skimage import io) shape = exif_size(image) # image size + assert (shape[0] > 9) & (shape[1] > 9), 'image size <10 pixels' if os.path.isfile(label): with open(label, 'r') as f: l = np.array([x.split() for x in f.read().splitlines()], dtype=np.float32) # labels