← All projects

University of Padova · 2022

Landslide detection with improved U-Net models

Mapping small rainfall-triggered landslides in Kerala, India, from PlanetScope imagery and terrain data, comparing three U-Net variants.

Role: Research intern: data, models, experiments and evaluation

  • Python
  • PyTorch
  • NumPy
  • GDAL
  • scikit-learn
  • pandas
  • ArcGIS Pro
Map of Devikolam taluk in Idukki, Kerala, with the 2018 landslides marked as red dots across hilly terrain
Basemap: Esri, OpenStreetMap contributors

The question

In August 2018, extreme monsoon rain in Kerala, India, triggered about 4,700 landslides. Devikolam taluk in Idukki district alone had 780 landslides, and most of them were small and hard to see on satellite images.

An event-based landslide inventory is the starting point for hazard assessment and recovery planning, but mapping thousands of landslides by hand is slow. Can a deep-learning model find these small landslides reliably? Which U-Net variant and settings work best, and does adding terrain data help?

My role

A research internship at the Machine Intelligence and Slope Stability Laboratory (MISS-LAB), Department of Geosciences, University of Padova, from January to April 2022, as part of my MSc at ITC, University of Twente. I prepared the data, built and trained the models, ran the experiments and evaluated the results. The work was supervised by Prof. Filippo Catani.

Data

  • Imagery: PlanetScope surface-reflectance tiles at 3 m from October 2018 (blue, green, red and near-infrared), plus NDVI.
  • Terrain: the ALOS PALSAR 12.5 m elevation model, from which I derived slope, aspect, profile curvature and planar curvature, resampled and aligned to the imagery.
  • Labels: the existing 2018 landslide inventory (NRSC, updated by Hao et al., 2020), checked against the imagery. I moved shifted polygons, redrew inaccurate boundaries and added missing landslides, because label errors carry straight into the model.
Four PlanetScope image excerpts of landslide scars, each with the original inventory polygon in yellow and a redrawn polygon in red that follows the scar more closely
Cleaning the training labels: original inventory polygons (yellow) and redrawn boundaries (red) on PlanetScope imagery.

From raw data to training patches

I built three input stacks of increasing detail: spectral (visible, near-infrared and NDVI), spectral + slope, and spectral + all terrain (slope, aspect and both curvatures). Each stack and the label raster were cut into 640 × 640 tiles on one shared grid, then into 64 × 64 and 128 × 128 patches. Patches without landslides were dropped.

Flowchart: the landslide inventory is corrected and rasterised into labels; PlanetScope images are mosaicked and stacked with NDVI; the elevation model is mosaicked, filled and turned into slope, aspect and curvatures; the three input stacks and the labels are sliced into tiles on a shared grid
Data preparation: labels (0) and the three input stacks (1–3) sliced on one shared grid.
  • Augmentation: horizontal and vertical flips, 45° rotation and shear, applied to the training set only. This grew it from 244 to 1,190 patches and made a clear difference to model quality.
  • Fair testing: a held-out test set was never augmented or seen in training. All scores below are on that set.

Experiments

I compared three models, each designed to pick out small objects better than the last:

  • U-Net, the standard encoder–decoder for segmentation.
  • Attention U-Net, which adds attention gates that suppress background and focus on relevant features.
  • Multi-scale (MS) Attention U-Net, which also feeds the input in at several scales so fine detail isn't lost in deep layers.

For each model and input stack I tuned the loss function (binary cross-entropy, Tversky and focal Tversky with γ of 0.80, 0.85 and 0.90), learning rate (10⁻³ to 10⁻⁵), number of filters (8, 16, 32), batch size (8, 16, 32) and patch size. Combinations that did poorly early on were dropped to save compute. The 128 × 128 patches, for example, underperformed because landslides made up too small a share of each patch, so later rounds used 64 × 64.

Results

Best model per input stack, on the held-out test set:

Inputs Model Precision Recall F1
Spectral U-Net 0.701 0.696 0.697
Spectral Attention U-Net 0.685 0.768 0.723
Spectral MS Attention U-Net 0.765 0.783 0.773
+ slope U-Net 0.684 0.715 0.697
+ slope Attention U-Net 0.705 0.741 0.720
+ slope MS Attention U-Net 0.761 0.721 0.739
+ all terrain U-Net 0.703 0.675 0.686
+ all terrain Attention U-Net 0.685 0.747 0.713
+ all terrain MS Attention U-Net 0.718 0.754 0.734
  • MS Attention U-Net won on every input stack, and was also the most stable in training. The best result was an F1 score of 0.773 from spectral data alone, with focal Tversky loss.
  • Terrain data did not help, against the starting hypothesis. The elevation model is about four times coarser than the imagery, so a small landslide spans only a few elevation cells, and slope and curvature smooth that further. The lesson: terrain inputs need a resolution close to the imagery to add value.
  • Recall is slightly higher than precision for the best model, so it misses few landslides. That is the right trade-off for an inventory, because false positives are quick to remove in manual cleaning.
Two 64 by 64 pixel test patches, each shown as the input image, the landslide label and the model prediction; the predicted landslide shapes closely follow the labels
Test patches: input, label and the Multi-scale Attention U-Net prediction (spectral inputs).