Files
sign-predictor/src/augmentations.py
Victor Mylle 246595780c First training
2023-03-02 11:18:57 +00:00

11 lines
222 B
Python

import random
class MirrorKeypoints:
def __call__(self, sample):
if random.random() > 0.5:
return sample
# flip the keypoints tensor
sample = 1 - sample
return sample