updates
This commit is contained in:
parent
60bc2c1fbd
commit
59b1a1e89b
|
@ -486,7 +486,7 @@ def non_max_suppression(prediction, conf_thres=0.5, nms_thres=0.5):
|
||||||
iou = bbox_iou(dc[0], dc[1:]) # iou with other boxes
|
iou = bbox_iou(dc[0], dc[1:]) # iou with other boxes
|
||||||
dc = dc[1:]
|
dc = dc[1:]
|
||||||
dc[:, 4] *= torch.exp(-iou ** 2 / sigma) # decay confidences
|
dc[:, 4] *= torch.exp(-iou ** 2 / sigma) # decay confidences
|
||||||
dc = dc[dc[:, 4] > nms_thres] # new line per https://github.com/ultralytics/yolov3/issues/362
|
# dc = dc[dc[:, 4] > nms_thres] # new line per https://github.com/ultralytics/yolov3/issues/362
|
||||||
|
|
||||||
if len(det_max):
|
if len(det_max):
|
||||||
det_max = torch.cat(det_max) # concatenate
|
det_max = torch.cat(det_max) # concatenate
|
||||||
|
|
Loading…
Reference in New Issue