-
Notifications
You must be signed in to change notification settings - Fork 7k
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
only return small set of targets by default from dataset wrapper #7488
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/vision/7488
Note: Links to docs will display an error until the docs builds have been completed. ❌ 4 FailuresAs of commit 47f638d: NEW FAILURES - The following jobs have failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
area=float(torch.rand(1)), | ||
iscrowd=int(torch.randint(2, size=(1,))), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need the full sample now for target_keys="all"
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Philip, some comments below but looks good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Philip, LGTM
Sneak peak into the performance gains of this change
Details
Roughly 3x over v1. To be fair, v1 is affected by #7489 so this comparison is not totally fair. However, it accurately reflects the current state of our references vs. what can be achieved with v2. |
…pper (#7488) Reviewed By: vmoens Differential Revision: D45183665 fbshipit-source-id: 1d803dee2f2e1442113ad8d0e7f95e3b1314f7be
From benchmarking, it seems that the detection references with v2 are quite a bit slower than v1 for two reasons:
"segmentations"
key, which stores the vertex coordinates of polygons in nested lists. Recursing through them every time withpytree
is slow."segmentations"
key will be decoded into adatapoints.Mask
and later on transformed although for regular object detection, this is not needed.This PR introduces the
target_keys
parameter that let's users select which keys they actually want.ToDo:
"all"
if users want everythingtarget_keys
in all irregular datasets besidesCocoDetection
cc @vfdev-5