From 62c186da25e4f1a8b9c7cd6fe19c2be67c0b5475 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Wed, 19 Dec 2018 23:48:52 +0100 Subject: [PATCH] updates --- utils/utils.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/utils/utils.py b/utils/utils.py index 293c5961..e7bac03d 100755 --- a/utils/utils.py +++ b/utils/utils.py @@ -365,12 +365,7 @@ def non_max_suppression(prediction, conf_thres=0.5, nms_thres=0.4): continue # From (center x, center y, width, height) to (x1, y1, x2, y2) - box_corner = pred.new(nP, 4) - xy = pred[:, 0:2] - wh = pred[:, 2:4] / 2 - box_corner[:, 0:2] = xy - wh - box_corner[:, 2:4] = xy + wh - pred[:, :4] = box_corner + pred[:, :4] = xywh2xyxy(pred[:, :4]) # Detections ordered as (x1, y1, x2, y2, obj_conf, class_prob, class_pred) detections = torch.cat((pred[:, :5], class_prob.float().unsqueeze(1), class_pred.float().unsqueeze(1)), 1)