EasyDeepLearn
Deep Learning · section 9 of 19

Data augmentation & mixing

3 interview questions on data augmentation & mixing, each answered in full. Free to read, no account needed.

How does CutMix differ from Mixup?

medium
  • Cut a rectangular patch from image B and paste it into image A.
  • The label is mixed by the area ratio: y  =  λyA  +  (1λ)yBy\; = \;{\lambda} \cdot y_{A}\; + \;(1 - {\lambda}) \cdot y_{B}.
  • Unlike Mixup (which blends pixel values everywhere and creates 'ghost' images), CutMix keeps local pixel statistics intact — better for localization tasks and dense prediction.
  • Often combined with Mixup in modern vision recipes.
#augmentation#mixupPermalink & quiz →

What is RandAugment and why is it a nice augmentation policy?

medium
  • Instead of learning an augmentation policy (AutoAugment), RandAugment randomly picks N transforms from a fixed pool (rotate, shear, color jitter, ...) each with a shared magnitude M.
  • Two hyperparameters (N, M) instead of dozens — much easier to tune, and matches AutoAugment's accuracy on ImageNet.
  • TrivialAugment (2021) simplifies further: apply one random transform with a random magnitude.

What is Test-Time Augmentation (TTA)?

easy
  • At inference, apply K augmentations (crops, flips, color jitter) to the same input, run K forward passes, and average the predictions.
  • Better probability estimates, often 0.5-2% accuracy gain in classification and detection, at K× inference cost.
  • Popular in Kaggle competitions and medical imaging.
  • Not free — production usually skips it or uses only 2-4 augmentations.

Practise Deep Learning