File size: 353 Bytes
78a947a
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
"""
Contains a function returning a transform that randomly flip images horizontally and
vertically.

Author: Ole-Christian Galbo Engstrøm
E-mail: ocge@foss.dk
"""

import torchvision.transforms.v2 as T


def get_random_flip_transform() -> T.Compose:
    trans = T.Compose([T.RandomHorizontalFlip(p=0.5), T.RandomVerticalFlip(p=0.5)])
    return trans