-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
459 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
# Cutout Augmenter | ||
# Cutout Augmenter #531 | ||
|
||
* Added `imgaug.augmenters.arithmetic.apply_cutout_()`, which replaces | ||
in-place a single rectangular area with a constant intensity value or a | ||
constant color or gaussian noise. | ||
See also the [paper](https://arxiv.org/abs/1708.04552) about Cutout. | ||
* Added `imgaug.augmenters.arithmetic.apply_cutout()`. Same as | ||
`apply_cutout_()`, but copies the input images before applying cutout. | ||
* Added `imgaug.augmenters.arithmetic.Cutout`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from __future__ import print_function, division, absolute_import | ||
import imgaug as ia | ||
import imgaug.augmenters as iaa | ||
|
||
|
||
def main(): | ||
aug = iaa.Cutout(fill_mode=["gaussian", "constant"], cval=(0, 255), | ||
per_channel=0.5) | ||
image = ia.quokka() | ||
images_aug = aug(images=[image] * 16) | ||
ia.imshow(ia.draw_grid(images_aug, cols=4, rows=4)) | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.