0
0
Computer Visionml~10 mins

Why augmentation multiplies training data in Computer Vision - Test Your Understanding

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

Complete the code to apply a horizontal flip to an image using torchvision transforms.

Computer Vision
transform = torchvision.transforms.Compose([torchvision.transforms.[1]()])
Drag options to blanks, or click blank then click option'
ANormalize
BRandomHorizontalFlip
CToTensor
DResize
Attempts:
3 left
💡 Hint
Common Mistakes
Using Resize or Normalize instead of a flip transform.
2fill in blank
medium

Complete the code to create augmented data by rotating images randomly within 30 degrees.

Computer Vision
transform = torchvision.transforms.Compose([torchvision.transforms.RandomRotation([1])])
Drag options to blanks, or click blank then click option'
A30
B15
C45
D60
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing 15 or 45 degrees which do not match the instruction.
3fill in blank
hard

Fix the error in the code to correctly apply color jitter augmentation.

Computer Vision
transform = torchvision.transforms.ColorJitter(brightness=[1])
Drag options to blanks, or click blank then click option'
A0.5
B'0.5'
CTrue
D[0.5]
Attempts:
3 left
💡 Hint
Common Mistakes
Using a string instead of a float for brightness.
4fill in blank
hard

Fill both blanks to create a dictionary comprehension that maps each image filename to its augmented version using a horizontal flip.

Computer Vision
augmented_images = {filename: transform([1]) for filename, [2] in images.items()}
Drag options to blanks, or click blank then click option'
Aimage
Bimg
Cdata
Dpicture
Attempts:
3 left
💡 Hint
Common Mistakes
Using different variable names for the blanks or incorrect variable names.
5fill in blank
hard

Fill all three blanks to create a dictionary comprehension that filters images with width greater than 100 and applies a rotation augmentation.

Computer Vision
augmented = {name: transform([1]) for name, [2] in dataset.items() if [3].width > 100}
Drag options to blanks, or click blank then click option'
Aimg
Bimage
Ddata
Attempts:
3 left
💡 Hint
Common Mistakes
Using inconsistent variable names between the loop and condition.