From 3e6800fbc9526b0de0959c36bd0b89fbfb823ff6 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Tue, 5 Mar 2019 16:13:40 +0100 Subject: [PATCH] updates --- utils/datasets.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/utils/datasets.py b/utils/datasets.py index e274fab8..3a0d6bd3 100755 --- a/utils/datasets.py +++ b/utils/datasets.py @@ -37,7 +37,7 @@ class LoadImages: # for inference # Read image img0 = cv2.imread(img_path) # BGR - assert img0 is not None, 'Failed to load ' + img_path + assert img0 is not None, 'File Not Found ' + img_path # Padded resize img, _, _, _ = letterbox(img0, height=self.height) @@ -106,7 +106,7 @@ class LoadImagesAndLabels: # for training self.multi_scale = multi_scale self.augment = augment - assert self.nB > 0, 'No images found in %s' % path + assert self.nF > 0, 'No images found in %s' % path def __iter__(self): self.count = -1 @@ -134,8 +134,7 @@ class LoadImagesAndLabels: # for training label_path = self.label_files[self.shuffled_vector[files_index]] img = cv2.imread(img_path) # BGR - if img is None: - continue + assert img is not None, 'File Not Found ' + img_path augment_hsv = True if self.augment and augment_hsv: