augmentations.py 207 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 import torch import torch.nn.functional as F import numpy as np def horisontal_flip(images, targets): images = torch.flip(images, [-1]) targets[:, 2] = 1 - targets[:, 2] return images, targets