Skip to content
class

MaskDropout

extends_NoParamsTransform[Empty]
MaskDropout(max_objects: int = 1, image_fill_value: float = 0.0, mask_fill_value: float = 0.0, p: float = 0.5)

Drop random mask label regions from image + mask (Albumentations MaskDropout).

Parameters

max_objectsint= 1
Max number of distinct mask labels to zero out.
image_fill_valuefloat= 0.0
No description.
mask_fill_valuefloat= 0.0
No description.
pfloat= 0.5
No description.

Examples

>>> import lucid, lucid.utils.transforms as T
>>> tf = T.MaskDropout(p=1.0)
>>> tuple(tf(T.Image(lucid.rand(3, 32, 32))).data.shape)
(3, 32, 32)

Used by 1

Constructors

2
dunder

__init__

→None
__init__(max_objects: int = 1, image_fill_value: float = 0.0, mask_fill_value: float = 0.0, p: float = 0.5)
dunder

__call__

→object
__call__(inputs: object)

Instance methods

1
fn

make_params

→Emptyfrom _NoParams
make_params(img: Tensor)

Dunder methods

1