This commit is contained in:
Glenn Jocher 2019-07-08 15:28:29 +02:00
parent 94669fb704
commit a8c73f1c50
1 changed files with 1 additions and 1 deletions

View File

@ -430,7 +430,7 @@ def non_max_suppression(prediction, conf_thres=0.5, nms_thres=0.5):
pred = pred[(-pred[:, 4]).argsort()] pred = pred[(-pred[:, 4]).argsort()]
det_max = [] det_max = []
nms_style = 'SOFT' # 'OR' (default), 'AND', 'MERGE' (experimental) nms_style = 'MERGE' # 'OR' (default), 'AND', 'MERGE' (experimental)
for c in pred[:, -1].unique(): for c in pred[:, -1].unique():
dc = pred[pred[:, -1] == c] # select class c dc = pred[pred[:, -1] == c] # select class c
n = len(dc) n = len(dc)