def random_flip_lr(img): rand_num = np.random.rand(1) if rand_num > 0.5: img = np.flip(img, 1) return img