This commit is contained in:
Glenn Jocher 2019-11-27 22:36:01 -10:00
parent 9e9a6a1425
commit 340e0371f8
1 changed files with 2 additions and 2 deletions

View File

@ -511,8 +511,8 @@ def non_max_suppression(prediction, conf_thres=0.5, nms_thres=0.5):
if n == 1:
det_max.append(dc) # No NMS required if only 1 prediction
continue
elif n > 100:
dc = dc[:100] # limit to first 100 boxes: https://github.com/ultralytics/yolov3/issues/117
elif n > 500:
dc = dc[:500] # limit to first 100 boxes: https://github.com/ultralytics/yolov3/issues/117
# Non-maximum suppression
if nms_style == 'OR': # default