From 9a440cfa159613870b43b84c62e7dd5cef3e9a85 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Thu, 18 Apr 2019 02:13:04 +0200 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 ecccf7cc..77469cd2 100755 --- a/utils/utils.py +++ b/utils/utils.py @@ -280,6 +280,7 @@ def compute_loss(p, targets, model): # predictions, targets, model def build_targets(model, targets): # targets = [image, class, x, y, w, h] + iou_thres = model.hyp['iou_t'] # hyperparameter if type(model) in (nn.parallel.DataParallel, nn.parallel.DistributedDataParallel): model = model.module @@ -298,7 +299,7 @@ def build_targets(model, targets): # reject below threshold ious (OPTIONAL, increases P, lowers R) reject = True if reject: - j = iou > model.hyp['iou_t'] # hyperparameter + j = iou > iou_thres t, a, gwh = targets[j], a[j], gwh[j] # Indices