Log inStart free
LESSON 5.16 · 5 STAGES · 2 CONTROLS · 2 CHECKSPRO · PREVIEW

Data augmentation

Watch transformed copies of a few images teach a network to read new ones.


Pro lesson. Stage 1 is free to watch. Pro opens all 5 stages, 2 controls and 2 checks, in this lesson and every other.

Go Pro · $8.25/mo
EXPLAINER · 5.16 · AUGMENT BAY4 IMAGES · 2 PER CLASS
01
Stage 1 of 5 · Few images
The training set holds 2 images per class: T has label 1, ⊥ has label 0. Each image can sit 1 pixel off centre.
Explain it simply

Each picture is a 9 by 9 grid of pixels; the big one is the first T, up close. The top row holds 2 Ts with the label 1, a dot. The bottom row holds 2 upside-down Ts with the label 0, a square. Real images are noisy, and the shape can sit one pixel off centre.

Two rows of 2 small images: T shapes with label 1, upside-down T shapes with label 0. Some shapes sit 1 pixel off centre.

images: dot y = 1 (T), square y = 0 (⊥)weights for T, accuracyweights for ⊥, wrong answers, wrong labelstraining accuracy
T, y = 1⊥, y = 04 images · 81 pixels eachtraining setoriginal 1, up closeT, y = 1⊥, y = 04 images · 81 pixels eachtraining setoriginal 1, up close
Toy: 9×9 images, T (y = 1) or ⊥ (y = 0) · 1 to 8 per class · 72 test images · 1 sigmoid neuron
STAGE 1 / 5
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
D={(xi, yi)},xi∈[0,1]81, yi∈{0,1}\mathcal{D} = \{(\sy{x}{data}{x_i},\ \sy{y}{data}{y_i})\},\quad x_i \in [0, 1]^{81},\ y_i \in \{0, 1\}
2 per class⇒∣D∣=4,pixel noise σ=0.22\text{ per class} \Rightarrow |\mathcal{D}| = 4,\quad \text{pixel noise } \sigma = 0.2

Each training example pairs an image with its label.

Common mix-ups

MYTHAny transform gives more data, so it always helps.

The fix, and 1 more mix-up with the diagram to show them, come with Pro.

Predict, then reveal
2 CHECKS · PRO
Q01With 8 originals per class, does the shift add more or fewer points of test accuracy than with 2?

Make your guess, then test it in the diagram. All 2 checks come with Pro.

PRO LESSON · YOU WATCHED STAGE 1 OF 5
Unlock the full explainer
  • 4 more stages and 2 live controls
  • 2 mix-up cards and 2 predict-then-reveal checks
  • Watch it as a narrated video, in three voices
  • Every Pro lesson and capstone · 656 in total

$99 a year, or $15 a month. Cancel any time.