class
ToFloat
extends
_NoParamsPhotometricTransform[Empty]ToFloat(max_value: float = 255.0, p: float = 1.0)Scale an integer-range image to [0, 1] (Albumentations ToFloat).
Parameters
max_valuefloat= 255.0Value the image is divided by.
pfloat= 1.0No description.
Examples
>>> import lucid, lucid.utils.transforms as T
>>> tf = T.ToFloat(p=1.0)
>>> tuple(tf(T.Image(lucid.rand(3, 32, 32))).data.shape)
(3, 32, 32)
Divides by max_value, so an 8-bit image lands in 0-1. The
input here is already float, which is why the values do not move.