-
Notifications
You must be signed in to change notification settings - Fork 332
[RandomZoom] Supporting Segmentation Masks #2010
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
Conversation
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.
LGTM after one little fix! Thank you!
self.get_zoom_matrix(zooms, mask_hd, mask_wd), | ||
fill_mode=self.fill_mode, | ||
fill_value=self.fill_value, | ||
interpolation=self.interpolation, |
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 to use "nearest" interpolation for segmentation masks to avoid encoding issues for sparse-encoded masks.
@ianstenbit how would you want me to add the numeric tests for the segmentation masks? |
A fixed-input test is fine with me (e.g. setting the seed of a random input and verifying the numerics of the output against a known set of values), or we can just rely on the demo results which is also fine with me. |
@ianstenbit thanks for the review!
I think this PR is in a good shape to be merged. |
@ariG23498 please take a look at the linter error. Once that is fixed I shall merge -- thank you! |
@ianstenbit over to you now! |
/gcbrun |
* chore: initial commit * chore: adding initial tests * update: readme for preprocessing * fix lint
Related #1992
CC: @ianstenbit
Working Colab Notebook