Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong calculation of map #407

Open
Miilli opened this issue Oct 17, 2022 · 0 comments
Open

wrong calculation of map #407

Miilli opened this issue Oct 17, 2022 · 0 comments

Comments

@Miilli
Copy link

Miilli commented Oct 17, 2022

I think the calculation of mean average precision is wrong. In metrics.py (in ScaledYOLOv4/utils/) the function compute_ap is not correct. Using np.interp(x, mrec, mpre), x) results in a map which is too high because like this the interpolation sets all values between the last recall value and 1 to the last precision value (instead of 0).
An easy way to correct this is just to use the comments in line 125 and 126. Although I think you should use 1.0 for the first value instead of 0 ( like this: np.concatenate(([1.], precision, [0.])) )

compute_ap

@Miilli Miilli changed the title wrong calculation of map wrong calculation of ap Oct 17, 2022
@Miilli Miilli changed the title wrong calculation of ap wrong calculation of map Oct 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant