diff --git a/ultralytics/utils/metrics.py b/ultralytics/utils/metrics.py index fc9862dd36..2b80c02fe1 100644 --- a/ultralytics/utils/metrics.py +++ b/ultralytics/utils/metrics.py @@ -598,7 +598,7 @@ def ap_per_class( # AP from recall-precision curve for j in range(tp.shape[1]): ap[ci, j], mpre, mrec = compute_ap(recall[:, j], precision[:, j]) - if plot and j == 0: + if j == 0: prec_values.append(np.interp(x, mrec, mpre)) # precision at mAP@0.5 prec_values = np.array(prec_values) # (nc, 1000)