Skip to content

Commit

Permalink
Merge pull request #1581 from roboflow/fix/mAP-calculation-division-fix
Browse files Browse the repository at this point in the history
Minor fix: mAP can be 1.01
  • Loading branch information
LinasKo authored Oct 9, 2024
2 parents 22d7358 + 3231f7f commit 70869c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion supervision/metrics/mean_average_precision.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def _compute_average_precision(recall: np.ndarray, precision: np.ndarray) -> flo
for r, p in zip(recall[::-1], precision[::-1]):
precision_levels[recall_levels <= r] = p

average_precision = (1 / 100 * precision_levels).sum()
average_precision = (1 / 101 * precision_levels).sum()
return average_precision

@staticmethod
Expand Down

0 comments on commit 70869c7

Please sign in to comment.