ML for Materials Science · Week 10 · Lecture 10

Learning from Images and Spectra

Convolutional networks: small learned filters that slide over micrographs and diffraction patterns, and how to train them with little data.
Undergraduate course · 16 weeks
micrograph (pixels) feature map: "boundary here?" 5 × 5 learned filter
Recap of lecture 9

Last time: networks of neurons, trained by backpropagation

1

Multilayer network: linear map → nonlinear activation (ReLU) → linear map … Without the nonlinearity, the whole stack collapses to one linear model.

2

Backpropagation = the chain rule, applied layer by layer from the loss back to every weight θ.

3

Training: stochastic gradient descent, momentum, Adam; fight overfitting with early stopping, dropout and weight decay (= ridge, lecture 2).

4

When a network wins: with many data. With few data, a forest on good descriptors is better (lecture 9: crossing near 500 compounds).

What it left open

Every input was a vector of features with no order. But a micrograph is a grid of pixels and an XRD pattern is a line of intensities: neighbours belong together. A dense layer ignores that, and needs millions of weights.

Today

Replace the dense layer by a small filter shared across the image: the convolution. Then pooling, deep architectures, segmentation with U-Net, transfer learning, augmentation, and 1-D networks for spectra.

Build what you know about the data into the network: locality and the same pattern anywhere.
Why questions · answered at the end

Four puzzles for today

WHY 1

A dense layer on a 256 × 256 micrograph needs about 6.5 million weights. Why does a convolutional layer that works better need only a few hundred?

WHY 2

Why may you rotate a micrograph to create "new" training images, but must be careful when you shift an XRD pattern along 2θ?

WHY 3

Why does a network pretrained on everyday photos (cats, cars) help to classify steel microstructures from only a hundred images?

WHY 4

A grain-boundary segmentation is "90 % accurate", yet the grain size computed from it is badly wrong. How?

Motivation · images and spectra are arrays with neighbours

A micrograph is a grid, a pattern is a line

Image = H × W × C numbers

A grey SEM micrograph of 256 × 256 pixels is 65 536 numbers (C = 1 channel; a colour photo has C = 3). What matters is local: a lamella, a boundary, a pore, a dislocation.

Spectrum = one line of numbers

An XRD pattern from 10° to 80° in 0.1° steps is 701 intensities. Each peak is local; its position encodes a lattice spacing (Bragg).

A dense layer is the wrong tool

Pixels → 100 hidden units: \((65\,536 + 1)\times 100 = 6\,553\,700\) weights. And a lamella learned in one corner must be learned again in every other corner.

Today's tasks: grain and phase segmentation in SEM micrographs · defect detection in TEM · crystal system from an XRD pattern.

SEM micrograph of lamellar pearlite in eutectoid steel
SEM micrograph of lamellar pearlite in a 0.8 % C steel (nital etch). Edward Pleshakov, public domain
X-ray powder diffractometer
X-ray powder diffractometer, FZU Prague. René Volfík, CC BY-SA 4.0
Math primer · discrete convolution and cross-correlation

Slide, multiply, add

1
1-D, kernel w of width K: every output is a weighted sum of K neighbours,\[ z_i = \sum_{a=0}^{K-1} w_a\, x_{i+a} \]
The same weights at every position i: the kernel "slides".
2
2-D, a K × K kernel on an image:\[ z_{ij} = \sum_{a=0}^{K-1}\sum_{b=0}^{K-1} w_{ab}\, x_{i+a,\,j+b} \]
Rows a, columns b: a dot product of the kernel with one patch.
3
Name check: mathematicians' convolution flips the kernel, \(x_{i-a}\); deep learning uses the unflipped form (cross-correlation) and still calls it "convolution".
Harmless: the kernel is learned, so a flipped kernel is learned just as well.
input x output z

What this tells us

With w = [−1, 0, 1] the output is "right neighbour minus left neighbour": +1 where the signal steps up, −1 where it steps down, 0 on flat parts. A kernel is a pattern detector; this one detects edges.

Derivation · a convolutional layer, forward and backward

One small shared filter, learned by the chain rule

1
Forward: kernel, bias, activation for every position:\[ z_{ij} = \sum_{a,b} w_{ab}\,x_{i+a,j+b} + w_0, \qquad h_{ij} = \mathrm{ReLU}(z_{ij}) \]
A dense neuron that looks only at one K × K patch.
2
Weight sharing ⇒ equivariance: shift the input by one pixel, and the feature map shifts by one pixel.
A boundary is detected the same way wherever it lies.
3
Channels: with Cin input maps each kernel is K × K × Cin; Cout kernels give Cout feature maps.
Each kernel looks for a different pattern.
4
Backward: wab appears in every zij, so the chain rule sums over positions. With \(\delta_{ij} = \partial L/\partial z_{ij}\):\[ \frac{\partial L}{\partial w_{ab}} = \sum_{i,j} \frac{\partial L}{\partial z_{ij}}\,\frac{\partial z_{ij}}{\partial w_{ab}} = \sum_{i,j} \delta_{ij}\, x_{i+a,\,j+b} \]
The gradient is itself a correlation: of the input with the error map.

Sanity checks

• K = 1: each pixel is only rescaled; no neighbours are used.
• K = image size: one output, which is exactly one dense neuron. A dense layer is the extreme case of a convolution.
• Units: z has the units of x times w; ReLU keeps only positive matches.

What the model learned

Each kernel is a learned local template: edge, line, spot, texture. It assumes a pattern means the same thing anywhere (fine for micrographs), so it cannot know absolute position, and it is not built to handle a change of scale (magnification) or of contrast it has never seen.

Worked problem 1 · by hand

A 3 × 3 edge detector on a 5 × 5 image of two grains

image x (grain 2 | grain 8)
⊛
kernel w
=
output z (3 × 3)
kernel rotated: wᵀ
→
output with wᵀ

The transposed kernel looks for horizontal edges; it only sees the small bump of the boundary.

1
Top-left patch (gold frame): kernel = right column minus left column:\[ z_{11} = (2+2+8) - (2+2+2) = 12 - 6 = 6 \]
2
Move one pixel right (red frame), the patch now straddles the boundary:\[ z_{12} = (8+8+8) - (2+2+2) = 18 \]
3
All nine outputs (valid positions only, 5 − 3 + 1 = 3 per row). The largest values, 18, form the middle column.
Check one more: z₂₁ = (2+8+8) − (2+2+2) = 12.

What this tells us

The output is a map of where vertical edges are, and how strong. A patch inside one uniform grain would give 0 (e.g. 24 − 24); this small image is too narrow to have one, so every output here sees part of the boundary. A CNN learns kernels like this one by itself.

Derivation · padding, stride and the output size

How big is the feature map?

1
No padding, stride 1: the kernel's first column can sit at positions 0, 1, …, N − K, so there are N − K + 1 outputs.
Worked problem 1: 5 − 3 + 1 = 3.
2
Padding P: add P zeros on each side; the input becomes N + 2P wide.
Lets the kernel visit the border pixels too.
3
Stride S: jump S pixels each time, so the positions are 0, S, 2S, … up to N + 2P − K. Count them:
\[ O = \left\lfloor \frac{N + 2P - K}{S} \right\rfloor + 1 \]
NKPSoutput Oname
53013"valid"
53115"same" size
53123downsampling
256312128halves the image

Sanity check

For S = 1 the size is kept when 2P = K − 1, i.e. P = 1 for a 3 × 3 kernel and P = 2 for 5 × 5. That is why kernels have odd sizes. If (N + 2P − K)/S is not a whole number, the last pixels are simply skipped.

Pooling and receptive field

Pooling shrinks the map; deep layers see a whole grain

feature map 4 × 4
→
max pool 2 × 2

Max pooling: keep the largest value in each 2 × 2 block (stride 2). No weights. Average pooling would give 3.5, 1, 1, 6.

∑
Receptive field r = input pixels that one unit sees:\[ r_l = r_{l-1} + (K_l - 1)\,j_{l-1},\quad j_l = j_{l-1}S_l \]
j = spacing of the units in input pixels; r₀ = j₀ = 1.
number of 3 × 3 convolution layers receptive field (pixels)

What this tells us

Pooling makes the receptive field grow geometrically, so deep units see a whole grain or colony, and small shifts do not change the output. The price: the exact position is lost. Segmentation needs it back (U-Net).

Derivation · counting parameters, convolution versus dense

The number of weights does not depend on the image size

1
Dense layer: one weight per input–output pair, plus one bias per output:\[ \#_{\text{dense}} = (N_{\text{in}} + 1)\,N_{\text{out}} \]
2
Convolution: each of Cout kernels has K·K·Cin weights and one bias:\[ \#_{\text{conv}} = (K^2 C_{\text{in}} + 1)\,C_{\text{out}} \]
No N anywhere: the same kernel serves a 64-pixel or a 4000-pixel image.
3
Numbers for a 256 × 256 grey micrograph:
3 × 3 conv, 1 → 32 maps: (9 + 1) × 32 = 320
dense → 100 units: 65 537 × 100 = 6 553 700
dense with the conv's output size (256·256·32): 1.4 × 10¹¹
parameters (log scale)

What the model learned

320 weights can be pinned down by one image's 65 536 pixels; 6.5 million cannot be pinned down by a few hundred images: that is overfitting (lecture 9). Locality + sharing is a strong, correct assumption for micrographs, so we lose almost nothing by making it.

Worked problem 2 · by hand

Shapes and parameters of a small micrograph CNN

Input: 64 × 64 grey patch. Task: 4 microstructure classes. All convolutions 3 × 3 with padding 1, stride 1; pooling 2 × 2.

layeroutput shapeparameters
input64 × 64 × 10
conv 3 × 3, 16 maps + ReLU64 × 64 × 16(9·1 + 1)·16 = 160
max pool 2 × 232 × 32 × 160
conv 3 × 3, 32 maps + ReLU32 × 32 × 32(9·16 + 1)·32 = 4 640
max pool 2 × 216 × 16 × 320
conv 3 × 3, 64 maps + ReLU16 × 16 × 64(9·32 + 1)·64 = 18 496
global average pool640
dense → 4 classes (softmax)4(64 + 1)·4 = 260
total23 556

Softmax: \(p_c = e^{z_c} / \sum_k e^{z_k}\), the multiclass sigmoid (lecture 5); loss \(-\log p_{\text{true}}\).

1
Shapes: padding 1 keeps 64 → 64; each pool halves: 64 → 32 → 16.
Output formula: (64 + 2 − 3)/1 + 1 = 64.
2
Parameters grow with channels, not with pixels: the third conv has 18 496 because each kernel spans 32 input maps.
Global average pooling makes the dense layer tiny.
3
Compare: one dense layer 64·64 → 100 already has 409 700 weights, 17 times the whole CNN.
Receptive field of the last conv: 3, 4, 8, 10, 18 pixels.

Check

The last conv units see 18 × 18 pixels: choose the patch scale so that one lamella spacing or grain fits in it, or add another block.

CNN architectures · the same recipe, deeper and deeper

Conv–ReLU–pool blocks, then a classifier

image64 × 64 × 1
→
conv + ReLU64 × 64 × 16
→
pool32 × 32 × 16
→
conv + ReLU32 × 32 × 32
→
pool16 × 16 × 32
→
conv + ReLU16 × 16 × 64
→
global pool64
→
dense4 classes
networkyearideaparameters
LeNet-51998conv + pool for handwritten digits~6 × 10⁴
AlexNet2012GPUs, ReLU, dropout; won ImageNet by a wide margin~6 × 10⁷
VGG-162014only stacked 3 × 3 kernels~1.4 × 10⁸
ResNet-502015skip (residual) connections, very deep~2.5 × 10⁷
R
Residual block: learn a correction, not the whole map:\[ \mathbf h_{\text{out}} = \mathbf h + F(\mathbf h;\theta),\qquad \frac{\partial \mathbf h_{\text{out}}}{\partial \mathbf h} = I + \frac{\partial F}{\partial \mathbf h} \]
The identity term carries the gradient through 50 or 100 layers without vanishing.

What this tells us

Early layers learn edges and blobs; deeper layers combine them into textures and objects. For materials images, small networks are often enough; the big ones matter for transfer learning.

Materials example 1 · grain boundaries in a micrograph (simulated)

Hand-made filters see every edge, not only boundaries

simulated micrograph (96 × 96 px)
filter output: edge strength

Try it (outside the video)

The data

Simulated grains (Voronoi cells) with random brightness, dark boundaries about 1.5 px wide, uneven illumination, blur and noise. Boundaries are 19 % of the pixels. True boundary masks are known.

Edge strength (Sobel)

\(\sqrt{z_x^2 + z_y^2}\) from a vertical and a horizontal 3 × 3 kernel, like worked problem 1 but with weights 1, 2, 1 (Sobel). It lights up on both sides of a dark boundary, and at every step between two grains of different brightness.

What this tells us

A hand-designed kernel finds "change", not "boundary". We need a kernel tuned to what a boundary looks like in these images, so we learn it from labelled pixels.

Materials example 1 · the smallest CNN versus a threshold (simulated)

One learned 5 × 5 filter beats a brightness threshold

true boundaries
baseline: dark = boundary
learned 5 × 5 filter
correct boundaryfalse alarmmissed boundary
model (test image)pixel accuracyboundary IoU
"everything is grain"0
brightness threshold (tuned on training image)
one 5 × 5 conv + sigmoid (26 weights)

Training: logistic regression on every 5 × 5 patch of a second simulated image (cross-entropy, Adam). This is a one-layer CNN: one kernel, one bias, a sigmoid.

learned kernel

Blue = negative weight (wants dark), orange = positive (wants bright).

What the model learned

A dark line with brighter surroundings: a centre–surround detector. It compares a pixel with its neighbours, so uneven illumination and dark grains fool it much less. It would fail on bright boundaries or ones wider than its 5-pixel view.

Segmentation · a label for every pixel

U-Net: an encoder for "what", a decoder for "where"

SEM micrograph of an intergranular crack in steel

Intergranular crack in a hardened steel (SEM): grains, boundaries and the crack are typical segmentation targets.
KassJuanebe, CC BY-SA 4.0

Encoder (contracting path)

Conv blocks + pooling, as before: the map shrinks, the channels grow. It learns what is in the image, but loses the exact position.

Decoder (expanding path)

Upsampling (e.g. transposed convolution) doubles the size at each level, back to the input size: one class probability per pixel.

Skip connections

Copy the fine encoder maps to the decoder at the same level: sharp boundaries come back. Loss: per-pixel cross-entropy, often plus a Dice term for rare classes.

Worked problem 3 · by hand

Pixel accuracy versus intersection over union

truth: 10 boundary pixels
model B
TP = 6FP = 2FN = 4TN = 88
\[ \text{IoU} = \frac{TP}{TP+FP+FN}, \qquad \text{Dice} = \frac{2\,TP}{2\,TP+FP+FN} \]
1
Model A says "all grain": 90 of 100 pixels right.\[ \text{accuracy} = 0.90,\qquad \text{IoU} = \frac{0}{0+0+10} = 0 \]
2
Model B: TP = 6, FP = 2, FN = 4, TN = 88.\[ \text{accuracy} = \frac{6+88}{100} = 0.94 \]\[ \text{IoU} = \frac{6}{12} = 0.50,\qquad \text{Dice} = \frac{12}{18} = 0.67 \]
3
Topology: B misses rows 5–6 and 9–10 of the boundary, so the two grains are connected: counted as one grain.
Grain size doubles, although 94 % of pixels are right.

What this tells us

When one class is rare, accuracy is dominated by the easy class (the accuracy trap of lecture 5). Report IoU or Dice for the rare class, and check the quantity you really need: grain count and size.

Transfer learning · borrowing features from millions of photos

Small datasets borrow features from ImageNet

1
Pretrain a large CNN (e.g. ResNet-50, about 25 million weights) on ImageNet: about 1.2 million everyday photos in 1000 classes.
Someone else pays for this once; the weights are free to download.
2
Feature extraction: freeze all conv layers, run your micrographs through, keep the pooled feature vector (2048 numbers). Train a small model on it: logistic regression or a random forest (lecture 5).
Only a few thousand weights are learned from your data.
3
Fine-tuning: then unfreeze the last block(s) and train with a small η (e.g. 10⁻⁴), so the pretrained weights change only a little.
Early layers (edges, textures) are kept; late layers adapt.
4
Practical details: copy a grey image into 3 channels; standardize as in pretraining; validate with grouped splits (images of the same sample stay together, lecture 6).
TEM micrograph of dislocations and a precipitate in austenitic stainless steel
TEM: dislocations and a precipitate in austenitic stainless steel. Wikityke, CC BY-SA 3.0

What the model learned

Edges, blobs and textures are the same in photos and micrographs, so early layers transfer. Objects (cats) do not. Defect detection in TEM, with a few hundred labelled images, typically works this way. It fails when the images are physically different: diffraction patterns, or contrast that flips with imaging conditions.

Data augmentation · free data, if the label does not change

Rotate a micrograph freely; shift a peak with care

An augmentation is a change of the input that leaves the label unchanged.

Micrographs: usually safe

Rotations by 90°, flips, random crops, small brightness and contrast changes, noise. A grain does not care which way the microscope's stage was turned.

Micrographs: careful

Zoom changes the apparent grain size: forbidden if the label is a size. Rotation is wrong if direction matters (rolling direction, elongated grains, growth direction).

Spectra: what is safe

Noise, background, overall intensity scale, peak broadening (crystallite size), changed relative intensities (texture), tiny shifts within the instrument's zero error.

1
Bragg's law ties position to spacing:\[ \lambda = 2d\sin\theta \;\Rightarrow\; d = \frac{\lambda}{2\sin\theta} \]
Cu Kα: λ = 1.5406 Å (here λ is the X-ray wavelength).
2
Shift a peak from 2θ = 40.0° to 40.2°:\[ d: 2.2522 \to 2.2415\ \text{Å},\qquad \frac{\Delta d}{d} = -0.48\,\% \]
3
Compare with Vegard (lecture 2): Si 5.431 Å, Ge 5.658 Å differ by 4.2 %. A 0.48 % change in spacing is the change from about 11 % Ge.

What this tells us

A 0.2° shift is not "noise": it is a different lattice parameter, i.e. a different composition or strain. Shifting is allowed only if the label (e.g. crystal system) does not depend on it. A composition or strain change shifts peaks by Δ2θ = −2 tan θ · Δd/d, more at high angle; a uniform shift mimics a zero-offset error.

1-D convolutional networks · spectra and diffraction patterns

The same idea along one axis: 2θ

XRD pattern701 points, 10–80°
→
conv 1-D, width 916 maps · 0.9° window
→
max pool 4173 × 16
→
conv 1-D, width 932 maps · ~4° view
→
global max + mean64 numbers
→
dense3 crystal systems
1
Layer 1 learns peak shapes: a single peak, a shoulder, a doublet.
16 × (9 + 1) = 160 weights, used at all 693 positions.
2
Layer 2 sees about 4° and learns groups of peaks, e.g. a split peak of a tetragonal cell (a ≠ c).
Receptive field 9 + 3 + 8 × 4 = 44 points ≈ 4.4°.
3
Global pooling asks "does this motif occur anywhere?", so the answer barely moves when the peaks shift (a zero error, or a modest lattice change).
Translation tolerance is built in.

Compare: a dense (linear) model on the raw pattern

One weight per 2θ value per class: it learns "intensity at 38.4° means cubic". When the lattice parameter changes, every peak moves to a new 2θ, and that weight is useless.

What the model learned

Local peak motifs, independent of where they sit. It cannot use exact peak positions as a ruler (a ratio rule like the cubic sequence √1 : √2 : √3 is not local); a deeper network or physics-based features are needed for that.

Materials example 2 · crystal system from XRD (simulated patterns)

The 1-D CNN beats the raw-pattern baselines

2θ (degrees, Cu Kα) intensity (offset)

Simulated primitive cubic, tetragonal, hexagonal cells; random a = 3–6 Å, c/a, intensities.

model (test set)accuracy
chance (3 balanced classes)0.33
nearest neighbour, raw pattern
dense softmax, raw pattern
1-D CNN

What the model learned

Lab 10 · this week in Colab (CPU is enough)

Build, count and train small CNNs in PyTorch

import torch, torch.nn as nn
C = lambda i, o: [nn.Conv2d(i, o, 3, padding=1), nn.ReLU()]
net = nn.Sequential(*C(1, 16), nn.MaxPool2d(2),
        *C(16, 32), nn.MaxPool2d(2), *C(32, 64),
        nn.AdaptiveAvgPool2d(1), nn.Flatten(), nn.Linear(64, 4))
print(sum(p.numel() for p in net.parameters()))  # 23556
opt = torch.optim.Adam(net.parameters(), lr=1e-3)
for xb, yb in train_loader:
    k = int(torch.randint(4, (1,)))      # random 90° turn
    xb = torch.rot90(xb, k, dims=(2, 3))
    loss = nn.functional.cross_entropy(net(xb), yb)
    opt.zero_grad(); loss.backward(); opt.step()
xrd = nn.Sequential(nn.Conv1d(1, 16, 9), nn.ReLU(),
    nn.MaxPool1d(4), nn.Conv1d(16, 32, 9), nn.ReLU(),
    nn.AdaptiveMaxPool1d(1), nn.Flatten(), nn.Linear(32, 3))
# lecture used max + mean pooling (64 numbers); max only here

Exercises

  • Reproduce worked problem 1 with nn.functional.conv2d and check the 18s.
  • Train the boundary filter on the simulated micrographs, with and without rotation augmentation; compare test IoU.
  • Transfer learning: pretrained ResNet-18 features + logistic regression on the posted micrograph set; use a grouped split by sample.
  • Train the 1-D CNN on the simulated XRD patterns; shift the test patterns by 1–3° and compare with a dense model.

Data and notebook are posted with this lecture. Team projects: the one-page proposal is due this week.

Answers to the why questions

The four puzzles, solved

1 · Millions versus hundreds of weights

Locality and weight sharing: (9 + 1) × 32 = 320 weights, used at every position, versus one weight per pixel per unit (6.5 million). Fewer weights overfit less, and a pattern learned once is found everywhere.

2 · Rotate yes, shift with care

A rotated micrograph shows the same microstructure (unless direction matters). A peak position is physics: 0.2° at 2θ = 40° changes d by 0.48 %, like 11 % Ge in Si.

3 · Cats help with steel

Early layers of a pretrained CNN detect edges, blobs and textures, which also make up micrographs. Only a small head must be learned from the hundred images.

4 · 90 % accurate, wrong grain size

Boundaries are a small fraction of pixels: "all grain" is already 90 % accurate (IoU 0). A few missing boundary pixels merge grains. Use IoU or Dice, and check the grain count.

Check your understanding · click a card to reveal

Concept check

Q1. A 128 × 128 image, a 3 × 3 kernel, padding 1, stride 2. How large is the output?
O = ⌊(128 + 2 − 3)/2⌋ + 1 = ⌊63.5⌋ + 1 = 64, so 64 × 64.
Q2. How many parameters has a conv layer with 10 kernels of 5 × 5 on a 3-channel input?
(5·5·3 + 1) × 10 = 76 × 10 = 760, whatever the image size.
Q3. You predict grain size from micrographs and augment with random zoom (0.5× to 2×). What goes wrong?
Zoom changes the apparent grain size, so the label no longer matches the input. Use rotations and flips; keep the scale fixed (or rescale with the scale bar).
Q4. A U-Net trained without skip connections gives blurry, displaced boundaries. Why?
Pooling in the encoder discarded exact positions; the decoder cannot recover them alone. Skip connections pass the high-resolution maps across.
Wrap-up

Summary and next lecture

1
A convolution slides one small learned kernel over the input: local, shared weights, equivariant to shifts; its gradient is again a correlation.
2
Output size ⌊(N + 2P − K)/S⌋ + 1; parameters (K²Cin + 1)Cout, independent of the image size; pooling grows the receptive field.
3
Segmentation: U-Net (encoder, decoder, skip connections); judge with IoU or Dice and the physical quantity, not pixel accuracy.
4
Little data: transfer learning, and label-preserving augmentations (rotate micrographs; shift peaks only if the label ignores the lattice parameter).
5
Spectra: 1-D CNNs learn peak motifs and tolerate shifts, beating raw-pattern baselines.

This week

Lab 10: small CNNs, augmentation, transfer learning, 1-D CNN for XRD. Team projects: one-page proposal due. Problem set 3 (weeks 9–10) is due in week 11.

Next lecture · Graph neural networks for crystals

A crystal is neither a grid nor a line: atoms are nodes, neighbours within a cutoff are edges. Message passing generalizes today's shared kernel to irregular neighbourhoods (CGCNN, MEGNet, ALIGNN), with formation energies across about 10⁵ structures.

References and image credits

Further reading

Reading for this week

  • C. M. Bishop, H. Bishop, Deep Learning: Foundations and Concepts, Springer (2024): chapter on convolutional networks.
  • G. James, D. Witten, T. Hastie, R. Tibshirani, J. Taylor, An Introduction to Statistical Learning with Applications in Python, Springer (2023), Ch. 10 (deep learning, CNNs).
  • A. Géron, Hands-On Machine Learning, 3rd ed., O'Reilly (2022): chapter on computer vision with CNNs.
  • K. P. Murphy, Probabilistic Machine Learning: An Introduction, MIT Press (2022): chapter on neural networks for images.
  • Y. LeCun, L. Bottou, Y. Bengio, P. Haffner, "Gradient-based learning applied to document recognition," Proc. IEEE 86, 2278 (1998).
  • O. Ronneberger, P. Fischer, T. Brox, "U-Net: convolutional networks for biomedical image segmentation," MICCAI (2015).
  • K. He, X. Zhang, S. Ren, J. Sun, "Deep residual learning for image recognition," CVPR (2016).
  • F. Oviedo et al., "Fast and interpretable classification of small X-ray diffraction datasets using data augmentation and deep neural networks," npj Comput. Mater. 5, 60 (2019).

Image credits (Wikimedia Commons)

  • Lamellar pearlite, SEM: Edward Pleshakov, public domain — File page
  • X-ray powder diffractometer (FZU Prague): René Volfík, CC BY-SA 4.0 — File page
  • Intergranular crack, SEM: KassJuanebe, CC BY-SA 4.0 — File page
  • TEM micrograph of dislocations and a precipitate in stainless steel: Wikityke at English Wikipedia, CC BY-SA 3.0 — File page

All schematics and plots were drawn for this course. The micrographs of example 1 and the XRD patterns of example 2 are simulated (numpy, work/lecture10); model sizes of LeNet, AlexNet, VGG and ResNet are rounded orders of magnitude.