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
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Address review comments
  • Loading branch information
kirillbobyrev committed May 21, 2019
commit 707c73a88c9c96c4fad57cadcd62044055c4ee5f
6 changes: 3 additions & 3 deletions albumentations/augmentations/transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -938,9 +938,9 @@ def __init__(self, max_holes=8, max_height=8, max_width=8,
self.min_height = min_height if min_height is not None else max_height
self.min_width = min_width if min_width is not None else max_width

assert 0 < self.min_holes and self.min_holes <= self.max_holes
assert 0 < self.min_height and self.min_height <= self.max_height
assert 0 < self.min_width and self.min_width <= self.max_width
assert 0 < self.min_holes <= self.max_holes
assert 0 < self.min_height <= self.max_height
assert 0 < self.min_width <= self.max_width

def apply(self, image, holes=[], **params):
return F.cutout(image, holes)
Expand Down