Skip to content
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

Merged
merged 6 commits into from
May 29, 2019
Merged

Improve Cutout augmentation #264

merged 6 commits into from
May 29, 2019

Conversation

kirillbobyrev
Copy link
Contributor

  • 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.

Implements the first part of #263.

* 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.
@albu
Copy link
Contributor

albu commented May 22, 2019

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.
@kirillbobyrev
Copy link
Contributor Author

@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 CoarseDropout and deprecating Cutout in favor of it. Is that what you suggested?

@albu
Copy link
Contributor

albu commented May 25, 2019

Yes, thanks. I think it's perfect option. Just make few style fixes as reported by travis and we can merge it

@kirillbobyrev
Copy link
Contributor Author

@albu Great, thanks! I've fixed CI issues and the patch should be ready for the merge now.

Copy link
Contributor

@albu albu left a 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

@albu albu merged commit a7f085d into albumentations-team:master May 29, 2019
@kirillbobyrev kirillbobyrev deleted the improve-cutout branch May 31, 2019 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants