
Imbalance in Earth Observation Deep Learning: Rare Classes, Geographic Bias, and How to Fix Them
A landslide map can be 99% accurate and still miss every landslide. This tutorial explains why, and what to do about it.
Notes
A landslide map can be 99% accurate and still miss every landslide. This tutorial explains why, and what to do about it. It covers class imbalance in Earth observation deep learning (rare classes at the pixel, patch and object level) and geographic bias (labels clustered in a few regions while models are used everywhere). Fixes are covered at four levels: sampling, loss functions (weighted cross-entropy, class-balanced, focal, Dice, Tversky, Lovász), decision rules (classifier retraining, logit adjustment, threshold tuning) and region-aware training. It also shows which metrics hide the rare class and which reveal it, and how to evaluate with spatial splits and the area of applicability. Code examples use TorchGeo 0.10.1, segmentation-models-pytorch 0.6.0 and torchmetrics 1.9.0.