Skip to content

Detection references are needlessly transforming masks #7489

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

Open
NicolasHug opened this issue Apr 3, 2023 · 2 comments
Open

Detection references are needlessly transforming masks #7489

NicolasHug opened this issue Apr 3, 2023 · 2 comments
Labels
bug module: reference scripts Perf For performance improvements

Comments

@NicolasHug
Copy link
Member

Something we realized today with @pmeier: even for pure detection tasks where masks aren't needed, the detection training references are still using the masks from COCO, which means that:

  • those masks are being decoded into images
  • those masks get transformed all the time e.g. here

Both these things are completely wasteful since masks aren't needed for detection tasks. According to some simple benchmark this significantly hurts performance.

(Not sure if that applies to Keypoints too, would need to check)

@NicolasHug
Copy link
Member Author

We can probably address this issue by simply relying on the v2 wrapper for Coco on the references - regardless of whether v2 transforms are being used. #7494 and #7488 show that the v2 COCO wrapper is ~20% faster than the one we have on the references, and it supports removing masks natively which should lead to further improvements

@pmeier
Copy link
Collaborator

pmeier commented Apr 11, 2023

I can send a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug module: reference scripts Perf For performance improvements
Projects
None yet
Development

No branches or pull requests

2 participants