...
/Exercise: Using the Albumentations Library for Augmentations
Exercise: Using the Albumentations Library for Augmentations
Learn about basic augmentation techniques available in the Albumentations library.
Playground
Using an image, we will implement a technique to produce two variations of the image by adjusting its brightness, contrast, saturation, and hue.
Functions to learn before coding
The
Compose
function: It is used to combine multiple image transformation operations. Each transformation is applied sequentially in the order it appears in the list.The
HorizontalFlip
function: This is a transformation that flips an image horizontally (like a mirror effect). Here are its parameters:p
: It is the probability of applying the augmentation. Ifp=1
, it will always flip the image, while ifp=0
, it will never flip the image. Ap=0.5
means there’s a 50% chance to apply the flip.
The augmentation probability (
p
) function: For many transformations in Albumentations, there's a ...