From 3f68a6776a6db865b1828abc88826494f9f59e68 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Thu, 21 Feb 2019 20:45:53 +0100 Subject: [PATCH] updates --- utils/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utils/utils.py b/utils/utils.py index cf2a17be..fc2d1b4e 100755 --- a/utils/utils.py +++ b/utils/utils.py @@ -251,12 +251,13 @@ def build_targets(target, anchor_wh, nA, nC, nG): # Unique anchor selection u = torch.cat((gi, gj, a), 0).view((3, -1)) + # u = torch.stack((gi, gj, a),0) _, first_unique = np.unique(u[:, iou_order], axis=1, return_index=True) # first unique indices # _, first_unique = torch.unique(u[:, iou_order], dim=1, return_inverse=True) # different than numpy? i = iou_order[first_unique] # best anchor must share significant commonality (iou) with target - i = i[iou_best[i] > 0.10] + i = i[iou_best[i] > 0.10] # TODO: arbitrary threshold is problematic if len(i) == 0: continue