diff --git a/utils/datasets.py b/utils/datasets.py index ff1a0a11..ab681f4e 100755 --- a/utils/datasets.py +++ b/utils/datasets.py @@ -143,7 +143,7 @@ class LoadImagesAndLabels(Dataset): # for training/testing for x in self.img_files] if n < 200: # preload all images into memory if possible - self.imgs = (cv2.imread(img_files[i]) for i in range(n)) + self.imgs = [cv2.imread(img_files[i]) for i in range(n)] def __len__(self): return len(self.img_files)