From a6602117331276bf76f631e492dddb706ccaf184 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Sun, 26 Aug 2018 23:59:13 +0200 Subject: [PATCH] updates --- utils/datasets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/datasets.py b/utils/datasets.py index 07647166..81371c8f 100755 --- a/utils/datasets.py +++ b/utils/datasets.py @@ -270,7 +270,7 @@ def random_affine(img, targets=None, degrees=(-10, 10), translate=(.1, .1), scal h = xy[:, 3] - xy[:, 1] area = w * h ar = np.maximum(w / (h + 1e-16), h / (w + 1e-16)) - i = (w > 4) & (h > 4) & (area / area0 > 0.1) & (ar < 10) + i = (w > 4) & (h > 4) & (area / (area0 + 1e-16) > 0.1) & (ar < 10) targets = targets[i] targets[:, 1:5] = xy[i]