-
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
Allow SanitizeBoundingBoxes to sanitize more labels #8319
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/vision/8319
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit c9bd6c8 with merge base 53869eb (): This comment was automatically generated by Dr. CI and updates every 15 minutes. |
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.
Just minor things. Thanks Nicolas!
labels = tuple(labels) | ||
for entry in labels: | ||
if not isinstance(entry, torch.Tensor): | ||
# TODO: we don't need to enforce tensors, just that entries are indexable as t[bool_mask] |
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.
Just checking: was this a requirement from the issue or a nice to have?
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.
Just a nice to have
Thanks ! :) |
Reviewed By: vmoens Differential Revision: D55062811 fbshipit-source-id: 2216cc6805bff1c69d3dd7e570b80c927b82d19a
Closes #8294
We allow the
labels_getter
parameter ofSanitizeBoudingBoxes
to return a tuple. Each entry in the tuple gets sanitized/subsampled, along with the boxes. This enables the sanitization of properties like "area" or "iscrowd" from COCO.cc @vfdev-5