updates
This commit is contained in:
parent
2ca4c9aaec
commit
7709e8aa72
|
@ -319,13 +319,14 @@ def build_targets(model, targets):
|
||||||
|
|
||||||
# Class
|
# Class
|
||||||
tcls.append(c)
|
tcls.append(c)
|
||||||
assert c.max() <= layer.nC, 'Target classes exceed model classes'
|
if c.shape[0]:
|
||||||
|
assert c.max() <= layer.nC, 'Target classes exceed model classes'
|
||||||
|
|
||||||
return txy, twh, tcls, indices
|
return txy, twh, tcls, indices
|
||||||
|
|
||||||
|
|
||||||
# @profile
|
# @profile
|
||||||
def non_max_suppression(prediction, conf_thres=0.5, nms_thres=0.4):
|
def non_max_suppression(prediction, conf_thres=0.5, nms_thres=0.5):
|
||||||
"""
|
"""
|
||||||
Removes detections with lower object confidence score than 'conf_thres'
|
Removes detections with lower object confidence score than 'conf_thres'
|
||||||
Non-Maximum Suppression to further filter detections.
|
Non-Maximum Suppression to further filter detections.
|
||||||
|
|
Loading…
Reference in New Issue