class
Downscale
extends
PhotometricTransform[ScaleParam]Downscale(scale_min: float = 0.25, scale_max: float = 0.25, p: float = 0.5)Downscale then upscale to lose high-frequency detail (Albumentations Downscale).
Samples a scale factor uniformly from [scale_min, scale_max],
resizes the image to that fraction of its original (H, W) via
nearest-neighbour, then resizes back to the original size — a
cheap way to simulate sensor / JPEG block-level degradation.
Parameters
scale_minfloat= 0.25Lower bound of the downscale factor.
scale_maxfloat= 0.25Upper bound of the downscale factor (set equal to
scale_min for a deterministic factor).pfloat= 0.5Probability of applying the transform.