Challenge - 5 Problems
Image Augmentation Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ Predict Output
intermediate1:30remaining
Output of horizontal flip augmentation
What will be the shape and pixel value of the center pixel after applying a horizontal flip to this 3x3 grayscale image?
Computer Vision
import numpy as np image = np.array([[10, 20, 30], [40, 50, 60], [70, 80, 90]]) flipped = np.fliplr(image) center_pixel = flipped[1,1] print(flipped.shape, center_pixel)
Attempts:
2 left
💡 Hint
Horizontal flip reverses columns but keeps rows the same.
✗ Incorrect
The horizontal flip reverses each row. The center pixel stays at position (1,1) and keeps its original value 50.
❓ Model Choice
intermediate1:30remaining
Best augmentation for rotation invariance
Which image augmentation transform helps a model learn rotation invariance best?
Attempts:
2 left
💡 Hint
Rotation invariance means the model should recognize objects even if rotated.
✗ Incorrect
Random rotation teaches the model to recognize objects at different angles, improving rotation invariance.
❓ Hyperparameter
advanced2:00remaining
Choosing brightness adjustment range
You want to augment images by adjusting brightness. Which brightness factor range is most reasonable to avoid unnatural images?
Attempts:
2 left
💡 Hint
Brightness factor 1 means no change; too low or too high values can distort images.
✗ Incorrect
A range from 0.5 to 1.5 adjusts brightness moderately, keeping images natural while augmenting.
❓ Metrics
advanced2:00remaining
Effect of augmentation on validation accuracy
After adding random cropping augmentation during training, which effect on validation accuracy is most likely?
Attempts:
2 left
💡 Hint
Augmentation usually helps models generalize better to unseen data.
✗ Incorrect
Random cropping creates varied training samples, helping the model generalize and improving validation accuracy.
🔧 Debug
expert2:30remaining
Bug in augmentation pipeline code
What error will this code raise when applying a vertical flip using torchvision transforms on a PIL image?
Computer Vision
from torchvision import transforms from PIL import Image image = Image.new('RGB', (100, 100), color='red') transform = transforms.RandomVerticalFlip(p=1.0) augmented = transform(image) print(type(augmented))
Attempts:
2 left
💡 Hint
Check if RandomVerticalFlip works directly on PIL images.
✗ Incorrect
RandomVerticalFlip from torchvision.transforms works on PIL images and returns a PIL image, so no error occurs.