Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ultralytics/utils/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,7 @@ def ap_per_class(
n_l = nt[ci] # number of labels
n_p = i.sum() # number of predictions
if n_p == 0 or n_l == 0:
prec_values.append(np.zeros(1000))
continue

# Accumulate FPs and TPs
Expand Down