Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Add masks to boundaries #7704
base: main
Are you sure you want to change the base?
Add masks to boundaries #7704
Changes from 8 commits
79dcbb1
d171ffd
9d41c0a
e277308
330301c
a8bd95c
7311956
08485c0
59fb72c
091f3fb
fa68881
c2d8074
aa4b2e3
293e436
cf07bc0
7abbc3b
762992f
0991f93
4de4913
91df477
ebee25e
9fc12a9
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
I guess it's OK to have the implementation in this file even though this isn't related to boxed. However, I don't think we should expose it here. I think we should just expose it in from the
torchvision.ops
namespace (otherwise the implementation will always have to stay in this file for BC, and that may lock us).We probably just need to rename this to
_masks_to_boundaries
and the expose it intorchvision.ops.__init__.py
likeAny other suggestion @pmeier @vfdev-5 @oke-aditya ?
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.
No strong opinion, but could we maybe also have a new
_masks.py
module or move it into themisc.py
one?👍 for only exposing it in the
torchvision.ops
namespace.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.
Tbh there is demand for mask_utils. Several of them, #4415 . Candidate utils like
convert_masks_format
,paste_masks_in_images
, etc. Maybe it's time to create new filesmask_utils.py
and make future extensions possible?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 can always create an
ops.mask*
namespace at any time. We should only do that when we know for sure we need it, i.e. when we start having 2+ mask utils. Alls ops are exposed in theops.
namespace anyway so there's no need to rush and create a file which will only have one single util in it ATM.I'm OK with creating
_mask.py
as well (and we can rename it intomask.py
later if we want to).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.
This sounds best solution! We can avoid the bloat inside this file as well as keep them private 😄