From b3e1d74478bdaf34acc6c53febd5f5704ad0a722 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Tue, 7 Apr 2020 14:23:31 -0700 Subject: [PATCH] remove imwrite from augment --- models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/models.py b/models.py index a4ce6c31..f574cb84 100755 --- a/models.py +++ b/models.py @@ -236,13 +236,13 @@ class Darknet(nn.Module): return self.forward_once(x) else: # Augment images (inference and test only) https://github.com/ultralytics/yolov3/issues/931 img_size = x.shape[-2:] # height, width - s = [0.83, 1.33] # scales + s = [0.83, 0.67] # scales y = [] for i, xi in enumerate((x, torch_utils.scale_img(x.flip(3), s[0], same_shape=False), # flip-lr and scale torch_utils.scale_img(x, s[1], same_shape=False), # scale )): - cv2.imwrite('img%g.jpg' % i, 255 * xi[0].numpy().transpose((1, 2, 0))[:, :, ::-1]) + # cv2.imwrite('img%g.jpg' % i, 255 * xi[0].numpy().transpose((1, 2, 0))[:, :, ::-1]) y.append(self.forward_once(xi)[0]) y[1][..., :4] /= s[0] # scale