§12.2.1 Preprocessing
Vision needs surprisingly little preprocessing. The one strict requirement is a consistent pixel range — mixing images in with images in fails. Resizing to a standard size is common but not always necessary (some conv nets accept variable sizes). Dataset augmentation (§7.4) — random translations, rotations, flips, color perturbation — is one of the best ways to cut vision generalization error; a test-time cousin averages predictions over several crops (an ensemble). Other preprocessing puts examples into a more canonical form to reduce variation the model must handle — but with large data and models, it’s often best to just let the model learn its own invariances (AlexNet’s only preprocessing was subtracting the per-pixel mean).
§12.2.1.1 Contrast normalization
A safe-to-remove source of variation is contrast — the standard deviation of an image’s pixels (eqs 12.1–12.2). Global contrast normalization (GCN) global contrast normalization (gcn) Preprocessing that removes per-image contrast variation: subtract the image mean, then rescale so the pixel standard deviation equals a constant s (with a regularizer λ to avoid amplifying noise in near-constant images). Maps examples onto a spherical shell. defined in ch. 12 — open in glossary subtracts the mean and rescales every image to a fixed pixel std :
Global contrast normalization (eq 12.3)
| subtract the mean image intensity — center the image so its average is zero | centering | |
| the (regularized) contrast = pixel standard deviation; λ biases the estimate so near-constant images are not amplified | the contrast | |
| a floor to avoid dividing by zero on a zero-contrast image | safety | |
| the target standard deviation (often 1) — every image ends with the same contrast | scale |
Geometrically, GCN maps examples onto a spherical shell (fig 12.1) — useful because networks respond better to directions than exact locations. Slide to see the effect:
λ = 0: every non-zero example is mapped exactly onto the sphere — GCN discards all norm (contrast) variation, keeping only direction. Networks respond better to directions than exact locations.
(Do not confuse this with sphering / whitening whitening (sphering) Rescaling the principal components of data to equal variance, so a fitted Gaussian has spherical contours. Distinct from GCN (which maps examples onto a sphere); also called sphering. defined in ch. 12 — open in glossary , which instead rescales the principal components to equal variance.) GCN keeps a big dark region distinguishable from a big bright one, but won’t make edges within the dark region pop. Local contrast normalization (LCN) local contrast normalization (lcn) Like GCN but per small window: each pixel is normalized by the mean and std of nearby pixels (rectangular or Gaussian-weighted), highlighting edges. Implementable via separable convolution; a differentiable op usable as a layer. defined in ch. 12 — open in glossary fixes that by normalizing each small window (fig 12.2) — subtract a local mean, divide by a local std — making edges stand out. LCN is efficiently computed via separable convolution (§9.8), is differentiable (usable as a layer, not just preprocessing), and needs more regularization than GCN because small windows often have near-zero std.
§12.3 Speech recognition
Automatic speech recognition (ASR) maps an acoustic signal to the intended words. With the acoustic frames (traditionally 20 ms each):
The ASR objective (eq 12.4)
| the acoustic input sequence — one vector per ~20 ms audio frame | input | |
| the target linguistic sequence (words or characters) | output | |
| return the most probable word/character sequence given the audio | decode |
For decades GMM-HMM systems ruled (an HMM over phoneme sequences, a GMM turning each symbol into audio). Deep learning changed that fast:
Starting in 2009, deep feedforward nets — each layer initialized by unsupervised RBM pretraining — replaced the GMM acoustic model, cutting TIMIT phoneme error from ~26% to 20.7%. Then ReLU + dropout made pretraining unnecessary, and ~30% word-error-rate gains flipped the whole industry to deep learning within two years. Two later pushes: 2-D convolutions treating the spectrogram as an image (time × frequency), and end-to-end systems that remove the HMM entirely — a deep LSTM RNN (§10.10) trained with CTC connectionist temporal classification (ctc) A framework for training a sequence model (e.g. a deep LSTM RNN) end-to-end without a pre-specified frame-to-label alignment — key to removing the HMM from speech recognition (Graves 2006/2013). defined in ch. 12 — open in glossary brought TIMIT to a record 17.7%, with depth from both stacked layers and time unfolding.
Next: the largest applications area — natural language processing, from n-grams to word embeddings — NLP, n-grams, and neural language models.
Check yourself — vision preprocessing and speech recognition
1.What preprocessing does computer vision strictly require?
2.What is global contrast normalization (GCN), and what does the λ regularizer do? (See the ContrastNormLab.)
3.How does local contrast normalization (LCN) differ from GCN?
4.Why is dataset augmentation especially effective for object recognition?
5.What model family dominated speech recognition before ~2012, and how did deep learning first improve it?
6.What characterizes end-to-end deep-learning speech recognition?