Invert pixel intensities via 1 - img (Albumentations InvertImg).
Photographic negative — every channel of every pixel is replaced by
1 - x. No parameters and no sampling; deterministic when
triggered. Often used as a building block for AutoAugment /
RandAugment policies.
Parameters
pfloat= 0.5Probability of applying the transform.
Examples
>>> import lucid
>>> import lucid.utils.transforms as T
>>> tf = T.InvertImg(p=1.0)
>>> out = tf(T.Image(lucid.rand(3, 32, 32))).data
>>> tuple(out.shape)
(3, 32, 32)