RotateViaShear#
- class deepinv.transform.RotateViaShear(*args, limits=360.0, multiples=1.0, positive=False, center=None, **kwargs)[source]#
Bases:
Transform2D rotations implemented via shear composition through FFT.
Generates
n_transrandomly rotated versions of 2D images using FFT-based shear operations.Picks integer angles between
-limitsandlimits, by default -360 to 360 degrees. Setpositive=Trueto use only positive angles.- Parameters:
limits (float) – rotation angles are sampled in the range
(-limits, limits).multiples (float) – angles are sampled in multiples of this value. Defaults to 1.
positive (bool) – if
True, only use positive angles.center (tuple[int, int], None) – center of rotation. If
None, use the center of the image.n_trans (int) – number of transformed versions generated per input image.
rng (torch.Generator) – random number generator.