updates
This commit is contained in:
parent
4e0067cdc9
commit
f2ec1cb9ea
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue