Apply horizontal or vertical masking strips to simulate occlusion. Useful for spectrograms (spectral/frequency masking).
Useful for training with varied visibility conditions; spectral and frequency
masking can improve model robustness (e.g. SpecAugment-style). At least one of
max_x_length or max_y_length must be specified, dictating the mask's
maximum size along each axis.
num_masks_x_rangeRange of horizontal regions to mask. Defaults to (0, 0).
num_masks_y_rangeRange of vertical regions to mask. Defaults to (0, 0).
mask_x_length_rangeRange (min, max) of mask length along the X (horizontal) axis. The length is randomly chosen within this range for each mask. Defaults to (0, 0).
mask_y_length_rangeRange (min, max) of mask height along the Y (vertical) axis. The height is randomly chosen within this range for each mask. Defaults to (0, 0).
fillValue for the dropped pixels. Can be:
fill_maskFill value for dropout regions in the mask. If None, mask regions corresponding to image dropouts are unchanged. Default: None
pProbability of applying the transform. Defaults to 0.5.
Either mask_x_length_range or mask_y_length_range or both must have a positive max.