Prevent PR plotting (#1489)
Browse files- 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 [email protected]
|
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 [email protected]
|
69 |
|
70 |
# Compute F1 score (harmonic mean of precision and recall)
|