cocodataset / cocoapi

COCO API - Dataset @ http://cocodataset.org/
Other
6.09k stars 3.76k forks source link

maxDets missing when summarizing #558

Open TY48 opened 2 years ago

TY48 commented 2 years ago

It seems that an argument is missing when summarizing the result. https://github.com/cocodataset/cocoapi/blob/master/PythonAPI/pycocotools/cocoeval.py#L460

Currently:

stats[0] = _summarize(1)

With this, when maxDets is modified, that modification is not taken into account.

If I'm not wrong, this should be:

stats[0] = _summarize(1, maxDets=self.params.maxDets[2])

just like the below lines.

Thanks for your work!

akkiss commented 2 years ago

Faced the same issue with _summarizeKps, probably it would be good to use the same fix in that function as well.

collinmccarthy commented 8 months ago

It's possible this is a bug, but it's also possible they intended the standard AP metric to be evaluated at maxDets=100 for the competition, and didn't want the user to accidentally modify the meaning of this specific metric. If anyone figures this out at some point I'd love to know the answer.