This commit is contained in:
Glenn Jocher 2019-03-26 18:02:57 +01:00
parent 5fd702aead
commit 47eab968ab
1 changed files with 1 additions and 0 deletions

View File

@ -382,6 +382,7 @@ def non_max_suppression(prediction, conf_thres=0.5, nms_thres=0.4):
# Sort the detections by maximum object confidence # Sort the detections by maximum object confidence
_, conf_sort_index = torch.sort(dc[:, 4] * dc[:, 5], descending=True) _, conf_sort_index = torch.sort(dc[:, 4] * dc[:, 5], descending=True)
dc = dc[conf_sort_index] dc = dc[conf_sort_index]
dc = dc[:min(len(dc), 100)] # limit to first 100 boxes: https://github.com/ultralytics/yolov3/issues/117
# Non-maximum suppression # Non-maximum suppression
det_max = [] det_max = []