class
SmallestMaxSize
extends
_MaxSizeResizeSmallestMaxSize(max_size: int, interpolation: int | str | Interpolation = 1, p: float = 1.0)Scale so the shorter side equals max_size (Albumentations SmallestMaxSize).
Computes the scale factor max_size / min(H, W) and applies it to
both axes — the aspect ratio is preserved and the longer side ends
up at least as large as max_size. Image uses interpolation,
masks use nearest, boxes / keypoints scale exactly.
Parameters
max_sizeintTarget length of the shorter side after resize.
Image resampling mode (OpenCV codes accepted).
pfloat= 1.0Probability of applying the transform.