Vertical Flip

Augments your data by flipping it vertically.

This data augmentation allows the user to vertically flip images with a certain probability.

Parameters

Probability

This produces the probability of vertically flipping each image.

If a large fraction of images needs to be flipped, set a high probability.

Original Image
Vertically flipped image

Code Implementation

import albumentations as albu
from PIL import Image
import numpy as np
transform =albu.VerticalFlip(p=0.5)
image = np.array(Image.open('/some/random/image.png'))
augmented_image = transform(image=image)['image']
# we have our required flipped image in augmented_image.

Further Resources