From 94344f5beaeb952b1caea383d9d6b785f911ee79 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Thu, 26 Mar 2020 11:34:32 -0700 Subject: [PATCH] test augmentation comments --- test.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test.py b/test.py index a1e36b88..272584ae 100644 --- a/test.py +++ b/test.py @@ -88,7 +88,8 @@ def test(cfg, # Disable gradients with torch.no_grad(): - if augment: # augmented testing https://github.com/ultralytics/yolov3/issues/931 + # 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, 0.7), # scale @@ -99,6 +100,7 @@ def test(cfg, inf_out, train_out = model(imgs) # inference and training outputs t0 += torch_utils.time_synchronized() - t + # De-augment results if augment: x = torch.split(inf_out, nb, dim=0) x[1][..., 0] = width - x[1][..., 0] # flip lr