def randomHorizontalFlip(rand_seed,img, u=0.5): if rand_seed < u: img = cv2.flip(img,1) #np.fliplr(img) #cv2.flip(img,1) ##left-right return img