updates
This commit is contained in:
parent
55aaf9a21e
commit
20bb5f0a6a
|
@ -351,7 +351,7 @@ def non_max_suppression(prediction, conf_thres=0.5, nms_thres=0.5):
|
||||||
pred[:, 4] *= class_conf
|
pred[:, 4] *= class_conf
|
||||||
|
|
||||||
# Select only suitable predictions
|
# Select only suitable predictions
|
||||||
i = (pred[:, 4] > conf_thres) & (pred[:, 2:4] > min_wh).all(1) & (torch.isnan(pred).any(1) == 0)
|
i = (pred[:, 4] > conf_thres) & (pred[:, 2:4] > min_wh).all(1) & torch.isfinite(pred).all(1)
|
||||||
pred = pred[i]
|
pred = pred[i]
|
||||||
|
|
||||||
# If none are remaining => process next image
|
# If none are remaining => process next image
|
||||||
|
|
Loading…
Reference in New Issue