From 6893f1daf8d817b32c04f6e6f9aad585d843a086 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Mon, 15 Jul 2019 16:48:02 +0200 Subject: [PATCH] updates --- test.py | 2 +- utils/utils.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test.py b/test.py index 9a2f7c68..9ffdcf76 100644 --- a/test.py +++ b/test.py @@ -89,7 +89,7 @@ def test( continue # Clip boxes to image bounds - # clip_coords(pred, shapes[si]) + clip_coords(pred, (height, width)) # Append to text file # with open('test.txt', 'a') as file: diff --git a/utils/utils.py b/utils/utils.py index e0e48c04..6f492fcf 100755 --- a/utils/utils.py +++ b/utils/utils.py @@ -130,7 +130,7 @@ def scale_coords(img1_shape, coords, img0_shape): coords[:, [0, 2]] -= (img1_shape[1] - img0_shape[1] * gain) / 2 # x padding coords[:, [1, 3]] -= (img1_shape[0] - img0_shape[0] * gain) / 2 # y padding coords[:, :4] /= gain - # clip_coords(coords, img0_shape) + clip_coords(coords, img0_shape) return coords