This commit is contained in:
Glenn Jocher 2019-11-30 17:19:44 -08:00
parent 4e0067cdc9
commit f2ec1cb9ea
1 changed files with 1 additions and 2 deletions

View File

@ -609,8 +609,7 @@ def load_mosaic(self, index):
def letterbox(img, new_shape=(416, 416), color=(128, 128, 128), auto=True, scaleFill=False, interp=cv2.INTER_AREA): def letterbox(img, new_shape=(416, 416), color=(128, 128, 128), auto=True, scaleFill=False, interp=cv2.INTER_AREA):
# Resize a rectangular image to a 32 pixel multiple rectangle # Resize image to a 32-pixel-multiple rectangle https://github.com/ultralytics/yolov3/issues/232
# https://github.com/ultralytics/yolov3/issues/232
shape = img.shape[:2] # current shape [height, width] shape = img.shape[:2] # current shape [height, width]
if isinstance(new_shape, int): if isinstance(new_shape, int):
new_shape = (new_shape, new_shape) new_shape = (new_shape, new_shape)