class
CropAndPad
extends
_NoParamsGeometricTransform[Empty]CropAndPad(px: int = 0, value: float = 0.0, p: float = 1.0)Crop (negative) or pad (positive) every side by px pixels.
A simplified Albumentations CropAndPad supporting a single int
px applied to all four sides.
Parameters
pxint= 0Positive pads, negative crops, on every side.
valuefloat= 0.0Pad fill (for positive
px).pfloat= 1.0No description.
Examples
>>> import lucid, lucid.utils.transforms as T
>>> tf = T.CropAndPad(p=1.0)
>>> tuple(tf(T.Image(lucid.rand(3, 32, 32))).data.shape)
(3, 32, 32)