Skip to content
class

CoarseDropout

extendsPhotometricTransform[HoleParams]
CoarseDropout(max_holes: int = 8, max_height: int = 8, max_width: int = 8, min_holes: int | None = None, min_height: int | None = None, min_width: int | None = None, fill_value: float = 0.0, p: float = 0.5)

Drop several random rectangles (Albumentations CoarseDropout).

Parameters

max_holesint= 8
No description.
max_heightint= 8
No description.
max_widthint= 8
No description.
min_holesint= None
Default to the corresponding max.
min_heightint= None
Default to the corresponding max.
min_widthint= None
Default to the corresponding max.
fill_valuefloat= 0.0
No description.
pfloat= 0.5
No description.

Examples

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

Used by 1

Constructors

1
dunder

__init__

→None
__init__(max_holes: int = 8, max_height: int = 8, max_width: int = 8, min_holes: int | None = None, min_height: int | None = None, min_width: int | None = None, fill_value: float = 0.0, p: float = 0.5)

Instance methods

1
fn

make_params

→HoleParams
make_params(img: Tensor)

Sample the per-call parameters from the reference image.

Dunder methods

1