-
-
Notifications
You must be signed in to change notification settings - Fork 1.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
Improve Cutout augmentation #264
Improve Cutout augmentation #264
Conversation
* Allow cutting out random number of regions. * Allow cutting out regions of random size. * Slightly simplify the code and remove the code which always creates patches of even height and width. * Add sanity checks for non-negative parameters. * Fix documentation which mentions squares being zeroed out from the image while the applied patches can be rectangular. * Change tests so that serialization is provided with new parameters.
we have to preserve old api to not break pipelines with updates, let's make two versions and deprecation warning for previous (for 0.4.0) |
As mentioned by @albu, it would be better to preserve API by deprecating current `Cutout` class and introducing another version of it.
@albu I'm not sure what's the best way to do that, but I've tried to address your comment in my last commit by introducing |
Yes, thanks. I think it's perfect option. Just make few style fixes as reported by travis and we can merge it |
Import multiple items using parenthesis as suggested in PEP 328 https://www.python.org/dev/peps/pep-0328/#rationale-for-parentheses
@albu Great, thanks! I've fixed CI issues and the patch should be ready for the merge now. |
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 your contribution
patches of even height and width.
image while the applied patches can be rectangular.
Implements the first part of #263.