From 7aeef2dca518916a13b7e516505a87c2e77155fd Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Tue, 24 Nov 2020 00:46:01 +0100 Subject: [PATCH] Prevent PR plotting (#1489) --- utils/metrics.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/metrics.py b/utils/metrics.py index 26872f2..79f18cf 100644 --- a/utils/metrics.py +++ b/utils/metrics.py @@ -64,7 +64,7 @@ def ap_per_class(tp, conf, pred_cls, target_cls, plot=False, save_dir='precision # AP from recall-precision curve for j in range(tp.shape[1]): ap[ci, j], mpre, mrec = compute_ap(recall[:, j], precision[:, j]) - if j == 0: + if plot and (j == 0): py.append(np.interp(px, mrec, mpre)) # precision at mAP@0.5 # Compute F1 score (harmonic mean of precision and recall)