updates
This commit is contained in:
parent
a51d83df33
commit
a5160b44ca
|
@ -528,8 +528,9 @@ def non_max_suppression(prediction, conf_thres=0.5, nms_thres=0.5, multi_cls=Tru
|
||||||
|
|
||||||
# Non-maximum suppression
|
# Non-maximum suppression
|
||||||
det_max = []
|
det_max = []
|
||||||
for c in j.unique():
|
cls = pred[:, -1]
|
||||||
dc = pred[j == c] # select class c
|
for c in cls.unique():
|
||||||
|
dc = pred[cls == c] # select class c
|
||||||
n = len(dc)
|
n = len(dc)
|
||||||
if n == 1:
|
if n == 1:
|
||||||
det_max.append(dc) # No NMS required if only 1 prediction
|
det_max.append(dc) # No NMS required if only 1 prediction
|
||||||
|
|
Loading…
Reference in New Issue