From 1827b796478ec53e6761e950e1a65d7ce2d937a7 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Mon, 24 Jun 2019 14:13:16 +0200 Subject: [PATCH] updates --- utils/datasets.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/utils/datasets.py b/utils/datasets.py index 66c9feb7..c6f343eb 100755 --- a/utils/datasets.py +++ b/utils/datasets.py @@ -74,7 +74,7 @@ class LoadImages: # for inference print('image %g/%g %s: ' % (self.count, self.nF, path), end='') # Padded resize - img, _, _, _ = letterbox(img0, new_shape=self.height) + img, *_ = letterbox(img0, new_shape=self.height) # Normalize RGB img = img[:, :, ::-1].transpose(2, 0, 1) # BGR to RGB @@ -116,7 +116,7 @@ class LoadWebcam: # for inference print('webcam %g: ' % self.count, end='') # Padded resize - img, _, _, _ = letterbox(img0, new_shape=self.height) + img, *_ = letterbox(img0, new_shape=self.height) # Normalize RGB img = img[:, :, ::-1].transpose(2, 0, 1) # BGR to RGB @@ -356,7 +356,7 @@ def letterbox(img, new_shape=416, color=(127.5, 127.5, 127.5), mode='auto'): elif mode is 'scaleFill': dw, dh = 0.0, 0.0 new_unpad = (new_shape, new_shape) - ratiow, ratioh = new_shape/shape[1], new_shape/shape[0] + ratiow, ratioh = new_shape / shape[1], new_shape / shape[0] top, bottom = int(round(dh - 0.1)), int(round(dh + 0.1)) left, right = int(round(dw - 0.1)), int(round(dw + 0.1))