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

mAP@.5:.95 calculation different than cocoapi calculation #1622

Closed
ofrimasad opened this issue Dec 7, 2020 · 5 comments · Fixed by #1645
Closed

mAP@.5:.95 calculation different than cocoapi calculation #1622

ofrimasad opened this issue Dec 7, 2020 · 5 comments · Fixed by #1645
Assignees
Labels
question Further information is requested

Comments

@ofrimasad
Copy link

❔Question

Hi there :)
I was testing with different 'conf-thres' values and I have noticed that when setting extremely high values, the calculated
mAP@.5:.95 differs very much from the IoU=0.50:0.95 metric calculated by the cocoapi.

I have ran:
python test.py --data data/coco.yaml --conf-thres 0.7
and got the results:
mAP@.5:.95 = 0.729
Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.200

What is the difference between the internal measuring and the coco API measuring?
What does the coco API take into account that changes the results so dramatically?

Thanks you :)

Additional context

@ofrimasad ofrimasad added the question Further information is requested label Dec 7, 2020
@ofrimasad ofrimasad changed the title mAP@.5:.95 calculation very different than cocoapi calculation mAP@.5:.95 calculation different than cocoapi calculation Dec 7, 2020
@glenn-jocher
Copy link
Member

@ofrimasad yes, you've discovered a latent bug in the mAP computation that affects testing at higher --conf threshold. I've opened an issue on this myself, and it is currently on our TODO list in #1466

There's also a second, much smaller disconnect between the two mAP calculations, which means that even if the above bug is fixed, pycocotools will typically report mAPs about 1% higher than ours, for both mAP@0.5 and mAP@0.5-0.95. I spent some time trying to track this down, but ultimately abandoned the effort. If you've gleaned any insight into this I'd be very interested to know how to align our results more closely (without sacrificing much speed if possible).

@glenn-jocher
Copy link
Member

@ofrimasad the PR that caused this change BTW is #1206

@ofrimasad
Copy link
Author

Thank you!
reverting these two line actually fix this issue
image

thank you :)

@glenn-jocher
Copy link
Member

@ofrimasad this issue should be officially resolved now in PR #1645.

Thank you for your contributions. Please let us know if you come across any other issues or you see any other areas for improvement.

@ofrimasad
Copy link
Author

amazing! thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants