Apply the canonical sepia-tone colour matrix (Albumentations ToSepia).
Multiplies the input by the fixed 3x3 sepia matrix used by
Microsoft / PIL / Albumentations and clips to [0, 1]. Produces a
warm brown-tinted output reminiscent of vintage photographs.
Parameters
pfloat= 0.5Probability of applying the transform.
Raises
ValueErrorIf the input image does not have exactly 3 channels.
Examples
>>> import lucid
>>> import lucid.utils.transforms as T
>>> tf = T.ToSepia(p=1.0)
>>> out = tf(T.Image(lucid.rand(3, 32, 32))).data
>>> tuple(out.shape)
(3, 32, 32)