Skip to content
class

Resize

extends_NoParamsGeometricTransform[Empty]
Resize(height: int, width: int, interpolation: int | str | Interpolation = 1, p: float = 1.0)

Resize to an exact height x width (Albumentations Resize).

Parameters

heightint
Target spatial size.
widthint
Target spatial size.
interpolationint or str or Interpolation= 1
Image resampling mode (OpenCV codes accepted; masks use nearest).
pfloat= 1.0
No description.

Examples

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

Used by 3

Constructors

1
dunder

__init__

→None
__init__(height: int, width: int, interpolation: int | str | Interpolation = 1, p: float = 1.0)

Instance methods

1
fn

make_params

→Emptyfrom _NoParams
make_params(img: Tensor)

Dunder methods

1