This commit is contained in:
Glenn Jocher 2019-05-05 22:10:02 +02:00
parent f05042b660
commit 2ebbe2f339
1 changed files with 1 additions and 1 deletions

View File

@ -146,9 +146,9 @@ class LoadImagesAndLabels(Dataset): # for training/testing
# Rectangular Training https://github.com/ultralytics/yolov3/issues/232 # Rectangular Training https://github.com/ultralytics/yolov3/issues/232
self.pad_rectangular = rect self.pad_rectangular = rect
if self.pad_rectangular: if self.pad_rectangular:
from PIL import Image
bi = np.floor(np.arange(n) / batch_size).astype(np.int) # batch index bi = np.floor(np.arange(n) / batch_size).astype(np.int) # batch index
nb = bi[-1] + 1 # number of batches nb = bi[-1] + 1 # number of batches
from PIL import Image
# Read image shapes # Read image shapes
sp = 'data' + os.sep + path.replace('.txt', '.shapes').split(os.sep)[-1] # shapefile path sp = 'data' + os.sep + path.replace('.txt', '.shapes').split(os.sep)[-1] # shapefile path