60-second card
Augmentation
Augmentation makes new training images by flipping, rotating, cropping or recolouring the ones you have.
- The model sees slightly different versions each epoch, so it generalises better.
- Only use changes that keep the label true.
- Augment training data only, never the test set.
import numpy as np
img = np.array([[1, 2, 3], [4, 5, 6]])
print(np.fliplr(img).tolist())Prints
[[3, 2, 1], [6, 5, 4]]Remember: Ask: would a person still give it the same label?
Common mistake: Flipping digits upside down: a 6 becomes a 9.