0
0
Computer Visionml~10 mins

Albumentations library in Computer Vision - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to import the Albumentations library.

Computer Vision
import [1] as A
Drag options to blanks, or click blank then click option'
Anumpy
Bcv2
Calbumentations
Dtorch
Attempts:
3 left
💡 Hint
Common Mistakes
Importing 'cv2' instead of 'albumentations'.
Using 'torch' which is for deep learning, not augmentations.
2fill in blank
medium

Complete the code to create a horizontal flip augmentation with a 50% chance.

Computer Vision
transform = A.[1](p=0.5)
Drag options to blanks, or click blank then click option'
AHorizontalFlip
BVerticalFlip
CRandomBrightnessContrast
DRotate
Attempts:
3 left
💡 Hint
Common Mistakes
Using VerticalFlip which flips images top to bottom.
Using Rotate which rotates images instead of flipping.
3fill in blank
hard

Fix the error in the code to apply a random brightness and contrast adjustment.

Computer Vision
transform = A.[1](brightness_limit=0.2, contrast_limit=0.2, p=0.5)
Drag options to blanks, or click blank then click option'
ABrightnessContrast
BRandomContrast
CRandomBrightness
DRandomBrightnessContrast
Attempts:
3 left
💡 Hint
Common Mistakes
Using RandomBrightness or RandomContrast alone which only adjust one property.
Using a non-existent class 'BrightnessContrast'.
4fill in blank
hard

Fill both blanks to create a Compose pipeline with horizontal flip and random rotate.

Computer Vision
transform = A.Compose([
    A.[1](p=0.5),
    A.[2](limit=40, p=0.7)
])
Drag options to blanks, or click blank then click option'
AHorizontalFlip
BVerticalFlip
CRotate
DRandomRotate90
Attempts:
3 left
💡 Hint
Common Mistakes
Using VerticalFlip instead of HorizontalFlip for horizontal flipping.
Using RandomRotate90 which rotates only by 90 degrees multiples.
5fill in blank
hard

Fill all three blanks to create a Compose pipeline with normalization, horizontal flip, and random brightness/contrast.

Computer Vision
transform = A.Compose([
    A.[1](mean=(0.485, 0.456, 0.406), std=(0.229, 0.224, 0.225)),
    A.[2](p=0.5),
    A.[3](brightness_limit=0.2, contrast_limit=0.2, p=0.3)
])
Drag options to blanks, or click blank then click option'
ANormalize
BHorizontalFlip
CRandomBrightnessContrast
DResize
Attempts:
3 left
💡 Hint
Common Mistakes
Using Resize instead of Normalize for normalization.
Mixing up the order of augmentations.