← Back to all transforms
PixelDropout
Description
Set pixels to 0 with some probability. Args: dropout_prob (float): pixel drop probability. Default: 0.01 per_channel (bool): if set to `True` drop mask will be sampled for each channel, otherwise the same mask will be sampled for all channels. Default: False drop_value (number or sequence of numbers or None): Value that will be set in dropped place. If set to None value will be sampled randomly, default ranges will be used: - uint8 - [0, 255] - uint16 - [0, 65535] - uint32 - [0, 4294967295] - float, double - [0, 1] Default: 0 mask_drop_value (number or sequence of numbers or None): Value that will be set in dropped place in masks. If set to None masks will be unchanged. Default: 0 p (float): probability of applying the transform. Default: 0.5. Targets: image, mask Image types: any
Parameters
- p: float (default: 0.5)
- dropout_prob: float (default: 0.01)
- per_channel: bool (default: false)
- drop_value: float | tuple[float, float] | None (default: 0)
- mask_drop_value: float | tuple[float, float] | None (default: null)
Targets
- Image
- Mask
Try it out
Original Image (width = 484, height = 733):
Transformed Image:
Transform not yet applied