From 2ebbe2f33979099227742ac75002bb44a38a32a6 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Sun, 5 May 2019 22:10:02 +0200 Subject: [PATCH] updates --- utils/datasets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/datasets.py b/utils/datasets.py index c4f93f23..879d0d31 100755 --- a/utils/datasets.py +++ b/utils/datasets.py @@ -146,9 +146,9 @@ class LoadImagesAndLabels(Dataset): # for training/testing # Rectangular Training https://github.com/ultralytics/yolov3/issues/232 self.pad_rectangular = rect if self.pad_rectangular: + from PIL import Image bi = np.floor(np.arange(n) / batch_size).astype(np.int) # batch index nb = bi[-1] + 1 # number of batches - from PIL import Image # Read image shapes sp = 'data' + os.sep + path.replace('.txt', '.shapes').split(os.sep)[-1] # shapefile path