Apply default ConfusionMatrix `conf=0.25` (#4813)

pull/4822/head
Glenn Jocher 1 year ago committed by GitHub
parent dbc53f6741
commit dd0782bd8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      ultralytics/utils/metrics.py

@ -189,7 +189,7 @@ class ConfusionMatrix:
self.task = task
self.matrix = np.zeros((nc + 1, nc + 1)) if self.task == 'detect' else np.zeros((nc, nc))
self.nc = nc # number of classes
self.conf = 0.25 if conf is None else conf # argument may be None from default cfg
self.conf = 0.25 if conf in (None, 0.001) else conf # apply 0.25 if default val conf is passed
self.iou_thres = iou_thres
def process_cls_preds(self, preds, targets):

Loading…
Cancel
Save