glenn-jocher commited on
Commit
7aeef2d
1 Parent(s): 0ddf12e

Prevent PR plotting (#1489)

Browse files
Files changed (1) hide show
  1. utils/metrics.py +1 -1
utils/metrics.py CHANGED
@@ -64,7 +64,7 @@ def ap_per_class(tp, conf, pred_cls, target_cls, plot=False, save_dir='precision
64
  # AP from recall-precision curve
65
  for j in range(tp.shape[1]):
66
  ap[ci, j], mpre, mrec = compute_ap(recall[:, j], precision[:, j])
67
- if j == 0:
68
  py.append(np.interp(px, mrec, mpre)) # precision at mAP@0.5
69
 
70
  # Compute F1 score (harmonic mean of precision and recall)
 
64
  # AP from recall-precision curve
65
  for j in range(tp.shape[1]):
66
  ap[ci, j], mpre, mrec = compute_ap(recall[:, j], precision[:, j])
67
+ if plot and (j == 0):
68
  py.append(np.interp(px, mrec, mpre)) # precision at mAP@0.5
69
 
70
  # Compute F1 score (harmonic mean of precision and recall)