import cv2 # after loading 'image' flipped_verti = cv2.flip(image, 0) # vertical flip flipped_horiz = cv2.flip(image, 1) # horizontal flip flipped_both = cv2.flip(image, -1) # both-axis flip