From 470371ba592af7264924d47117bf0fc88e3432e3 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Thu, 26 Mar 2020 16:20:06 -0700 Subject: [PATCH] Test augment update --- test.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test.py b/test.py index 916ab45e..e41f998f 100644 --- a/test.py +++ b/test.py @@ -91,7 +91,7 @@ def test(cfg, # Augment images if augment: # https://github.com/ultralytics/yolov3/issues/931 imgs = torch.cat((imgs, - imgs.flip(3), # flip-lr + torch_utils.scale_img(imgs.flip(3), 0.9), # flip-lr and scale torch_utils.scale_img(imgs, 0.7), # scale ), 0) @@ -103,6 +103,7 @@ def test(cfg, # De-augment results if augment: x = torch.split(inf_out, nb, dim=0) + x[1][..., :4] /= 0.9 # scale x[1][..., 0] = width - x[1][..., 0] # flip lr x[2][..., :4] /= 0.7 # scale inf_out = torch.cat(x, 1)