-
Notifications
You must be signed in to change notification settings - Fork 326
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 support of segmentation mask in RandomCutout #2004
Add support of segmentation mask in RandomCutout #2004
Conversation
69e6422
to
0f5e539
Compare
Thanks for the PR! I think we need to think a bit about how to handle segmentation masks in this case. My concern with zeroing-out the mask is that we're effectively telling the model that this is neither foreground class nor background class. Maybe that's okay, but I don't have a great intuition for that. It could be ideal to instead set the masked-out area to have the background class, but that introduces some API awkwardness as the caller needs to specify what the background class is. My intuition is that the best approach is probably to leave the seg mask unmodified, but it's hard to say for sure. I'd propose that we test each option with my (WIP) KerasCV segmentation guide and see which one yields the best results |
Hey @ianstenbit, Thank you for this intuition and your colab notebook. I will test out all the possibilities and see which one yields the best results. |
Hey @ianstenbit, I have tested it and I find out that it works best when we don't apply random cutout to mask. Here is the colab link.
I have updated the code to remove randomcutout from mask. |
Awesome thank you for doing this test -- that's awesome! |
/gcbrun |
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 for the PR!
/gcbrun |
* added support of segmentation-mask * added demo * add test * update readme * random cutout removed from mask * update test
What does this PR do?
Related: #1992
Add support of segmentation mask in Augmix layer. Here is the colab link for demo.
Output generated by demo:
Who can review?
@ianstenbit @jbischof