-
Notifications
You must be signed in to change notification settings - Fork 408
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 Mean Average Precision #1184
Wrong Calculation of Mean Average Precision #1184
Comments
Hi! thanks for your contribution!, great first issue! |
Any updates on this issue? |
Why does the above happen?
What can be done to solve this issue?In such a case, the static method Hope it helps! 😄 |
@dhananjaisharma10 would you be interested to send a draft PR with a suggested fix? 🐰 |
@Borda Sure, I can commence work on this. |
@dhananjaisharma10, how are you doing, can we help you with something? 🦦 |
@Borda I was a little held up in the last 2-3 weeks, though I am relatively free now. Is it okay if I provide an update by this weekend? EDIT: I have commenced work on it. |
sure, when ever you have time :) |
@Borda could you please check the Draft PR and guide further. Thanks. |
could you pls open the PR to this repo? 🦦 |
Hi @RostyslavUA, thanks for raising this issue. torch.tensor([ 1., 1., -1., -1.]) and not The explanation:
precision is fine, it becomes 1.0 for class {0,1} and 0 for class {2,3}. However, recall is an issue. For class {0,1} it is still 1, but for class {2,3} we will be calculating 0 / 0 because we have no ground truth boxes. Thus for these two cases the recall is undefined, which means that the precision-recall curve is undefined, which means that the average precision for these two classes are undefined. This is the exact reason our current implementation (and Hope this makes sense :] |
🐛 Bug
Wrong calculation of mean Average Precision (mAP). I get
while I would expect to have
'map': tensor(0.5)
andmap_per_class': tensor([ 1., 1., 0, 0.])
(see example below)To Reproduce
Steps to reproduce the behavior...
Expected behavior
AP per class 2 and 3 must be 0. Thus, the mAP would also become 0.5.
Environment
The text was updated successfully, but these errors were encountered: