Always return Precision metric regardless of plot arg (#16900)
This commit is contained in:
parent
6ec8e6ae55
commit
4642d687ba
1 changed files with 1 additions and 1 deletions
|
|
@ -598,7 +598,7 @@ def ap_per_class(
|
||||||
# AP from recall-precision curve
|
# AP from recall-precision curve
|
||||||
for j in range(tp.shape[1]):
|
for j in range(tp.shape[1]):
|
||||||
ap[ci, j], mpre, mrec = compute_ap(recall[:, j], precision[:, j])
|
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.append(np.interp(x, mrec, mpre)) # precision at mAP@0.5
|
||||||
|
|
||||||
prec_values = np.array(prec_values) # (nc, 1000)
|
prec_values = np.array(prec_values) # (nc, 1000)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue