Skip to content

CoarseDropout augmentation (augmentations.dropout.coarse_dropout)

class albumentations.augmentations.dropout.coarse_dropout.CoarseDropout (max_holes=8, max_height=8, max_width=8, min_holes=None, min_height=None, min_width=None, fill_value=0, mask_fill_value=None, always_apply=False, p=0.5) [view source on GitHub]

CoarseDropout of the rectangular regions in the image.

Parameters:

Name Type Description
max_holes int

Maximum number of regions to zero out.

max_height int, float

Maximum height of the hole.

max_width int, float

Maximum width of the hole.

min_holes int

Minimum number of regions to zero out. If None, min_holes is be set to max_holes. Default: None.

min_height int, float

Minimum height of the hole. Default: None. If None, min_height is set to max_height. Default: None. If float, it is calculated as a fraction of the image height.

min_width int, float

Minimum width of the hole. If None, min_height is set to max_width. Default: None. If float, it is calculated as a fraction of the image width.

fill_value int, float, list of int, list of float

value for dropped pixels.

mask_fill_value int, float, list of int, list of float

fill value for dropped pixels in mask. If None - mask is not affected. Default: None.

Targets: image, mask, keypoints

Image types: uint8, float32

Reference: | https://arxiv.org/abs/1708.04552 | https://github.com/uoguelph-mlrg/Cutout/blob/master/util/cutout.py | https://github.com/aleju/imgaug/blob/master/imgaug/augmenters/arithmetic.py