Machine Learning in Materials Processing & Characterization
Unit 6: Data Scarcity & Transfer Learning
FAU Erlangen-Nürnberg
By the end of this unit, you can:
Slides 03–08
| Domain | Typical Dataset Size | Labels |
|---|---|---|
| ImageNet | 14,000,000 images | Crowdsourced |
| Medical Imaging | 10,000–100,000 | Expert radiologists |
| Materials Science | 50–500 images | PhD microscopists |
Standard deep learning (ResNet-50: 25M parameters) is designed for 1M+ images.
If we train from scratch on 100 images → guaranteed overfitting.
Three strategies to overcome data scarcity:
Slides 09–20
Each transformation multiplies your effective dataset size. Flips alone give 4× more data.
Note
Augmentation is a way to tell the network: “This transformation doesn’t change the physics.”
Physical reality check: Transformations must not violate materials physics!
Think before you augment: “Would this transformation produce a physically plausible image?”
Purpose: Make the model robust to different imaging conditions. A model trained at one brightness level should work at another.
Gaussian noise: Electronic/thermal noise
Poisson/Shot noise: Counting statistics
Blur: Gaussian or motion blur
import albumentations as A
transform = A.Compose([
A.HorizontalFlip(p=0.5),
A.RandomRotate90(p=0.5),
A.GaussNoise(var_limit=(10, 50), p=0.3),
A.RandomBrightnessContrast(p=0.3),
A.ElasticTransform(alpha=120, sigma=6, p=0.2),
])
# Apply to image AND mask simultaneously
augmented = transform(image=image, mask=mask)Offline:
On-the-fly (preferred):
If you transform the image, you must transform the labels identically!

Intensity augmentations (brightness, noise) don’t affect labels — only geometric ones do.
Scenario: You have 50 SEM images of a laser-welded joint. The weld bead runs left-to-right. You want to classify weld quality (good/defective).
Which augmentations are valid?
Slides 21–32
“Learning on Peas to count Lentils.” — Sandfeld (2024)
ImageNet: 14 million images, 1000 classes (dogs, cats, cars, buildings…)
The hierarchical features learned on ImageNet:
Early layers transfer well. Late layers need adaptation.
When to use: Very small dataset (<100 images), risk of overfitting is high.
Advantage: Fast training, minimal risk of destroying pretrained features.
Disadvantage: Cannot adapt backbone to domain-specific textures.
When to use: Moderate dataset (100-1000 images), enough to adapt the backbone.
Advantage: Backbone adapts to “micrograph-specific” textures.
Risk: Catastrophic forgetting — destroying useful pretrained features with aggressive updates.
A safer fine-tuning protocol:
This prevents catastrophic forgetting of low-level features while allowing high-level adaptation.
Natural images and micrographs differ in:
If the domain gap is large, more fine-tuning is needed. Feature extraction alone may not suffice.

ImageNet pretraining helped even though ImageNet contains no TEM images — the low-level features transferred.
The next frontier: physics-simulation-based pretraining for materials ML.
Slides 33–42
Note
Synthetic data flips the labeling bottleneck: instead of labeling real images, we generate images from known structures.
Voronoi Tessellations:

A raw Voronoi diagram doesn’t look like an SEM image. We need to add:

CNNs might learn synthetic-only features and fail on real SEMs.
Making synthetic images look more like real ones:

The synthetic data captured the topological truth of grain networks — boundaries, junctions, and connectivity patterns.
This is a form of active learning for synthetic data generation.
Synthetic data works for more than images:
The same principle: if you can simulate it, you can label it for free.
Scenario: You generate synthetic EBSD maps using a grain growth simulation. Your CNN achieves 95% accuracy on synthetic test data but only 60% on real EBSD maps.
What went wrong?
Possible causes:
Slides 43–50
Note
This recipe works for 90% of materials classification and segmentation tasks.
Maximizes the value of every expert hour — 50 strategically chosen labels can beat 500 random ones.
Your model is only as credible as your test set is rigorous.
Key Takeaways:
Reading:
Next Week: Unit 7 — Learning from Processing Data: Time Series & Sequence Models

© Philipp Pelz - Machine Learning in Materials Processing & Characterization