I’m working on a Semantic Segmentation problem. I would want to create a custom transformation “randomRotation” that rotates an image (input or output) 90, 180, or 270 degrees randomly. Due to the nature of the problem It is compulsory that each pair of images (input and output) to be rotated the same number of degrees.
Anybody could shed some light on the problem?