This commit is contained in:
Glenn Jocher 2020-03-04 09:53:02 -08:00
parent e482392161
commit 35eae3ace9
1 changed files with 1 additions and 1 deletions

View File

@ -523,7 +523,7 @@ def non_max_suppression(prediction, conf_thres=0.1, iou_thres=0.6, multi_cls=Tru
pred = pred[pred[:, 4] > conf_thres]
# Apply width-height constraint
pred = pred[(pred[:, 2:4] > min_wh).all(1) & (pred[:, 2:4] < max_wh).all(1)]
pred = pred[((pred[:, 2:4] > min_wh) & (pred[:, 2:4] < max_wh)).all(1)]
# Compute conf
pred[..., 5:] *= pred[..., 4:5] # conf = obj_conf * cls_conf