Rotate by a random multiple of 90° (Albumentations RandomRotate90).
Samples k uniformly from {0, 1, 2, 3} and applies
lucid.rot90 with that k to image / mask, plus the
matching coordinate transform to boxes / keypoints. Exact (no
interpolation), so it's a free augmentation for square inputs.
Parameters
pfloat= 0.5Probability of applying the rotation.
Examples
>>> import lucid, lucid.utils.transforms as T
>>> tf = T.RandomRotate90(p=1.0)
>>> tuple(tf(T.Image(lucid.rand(3, 32, 32))).data.shape)
(3, 32, 32)