Forest Disturbance Detection in Šumava National Park

Published:

View code on GitHub

Forest Disturbance in National Park Šumava, my home mountains

Šumava National Park in south-west Bohemia is, together with the Bavarian Forest across the border, the largest connected protected forest in Central Europe. It has lost a lot of forest over the last decade to drought, wind and the European spruce bark beetle. In 2024 alone about 202,205 m³ of wood was harvested there, more than 80 % of it as incidental logging after bark beetle and wind damage.

Nothing is very well mapped and there has been many examples where althought mask as logging after bark beetle, the logging has happend in highly protected area without any reasons to. This lead me to create a project with an aim of trying to detect these changes, what is dry wood, what is simply a clear cut.

There are two problems with tracking this from space. Logging and bark beetle dieback look almost the same in satellite data, because both remove canopy. And there is no open data on where the park actually logs. So we built and compared two ways of detecting forest disturbance from Sentinel-2 imagery.

  
ContextUniversity of Trento, team project with Anteneh Getachew Yitayal
AreaŠumava National Park, 682 km², of which 458 km² core forest
DataSentinel-2 (S2_SR_HARMONIZED), ESA WorldCover 2021, Hansen Global Forest Change, CzechGlobe disturbance polygons 2006–2024
StackPython · Google Earth Engine · scikit-learn · XGBoost

Approach 1: Harmonic regression (unsupervised)

The first approach needs no labels. It is a simplified version of CCDC (Continuous Change Detection and Classification), built to fit in Google Earth Engine’s memory limits.

For every forest pixel, I fit a model of how its Normalised Burn Ratio (NBR) normally behaves over 2020–2024: a linear trend plus yearly and half-yearly seasonal waves. Then for each new image I ask: how far is this observation from what the model expected? The residual is turned into a z-score, and a pixel is flagged when it drops below −2.5.

The trend term is the key idea. A slow decline, like trees dying over several seasons from bark beetle, gets absorbed by the trend, so the residuals stay small. A clearcut is sudden, so the model still expects healthy forest while the satellite sees bare soil, and the residual is large.

To keep only real, coherent disturbances, alerts then go through four filters:

  • Persistence: flagged in at least two independent images.
  • Forest mask: core forest only (WorldCover tree cover, peak-season NDVI > 0.5).
  • Patch size: at least 40 pixels (≈ 0.4 ha).
  • Abruptness: the first alert has to come before about mid-August, as a proxy for logging.
Satellite map of Šumava National Park with the four management zones coloured yellow, pink, blue and orange, and many small green dots marking detected disturbance patches spread across the park
Harmonic regression alerts for the 2024 growing season (green). Park zones: yellow = A, pink = B, blue = C, orange = D.

From 644 archive images and 104 scored images in 2024, the model found 2,285 ha of candidate anomalies. After the filters, 336 ha of disturbance patches remained, each confirmed on average by 2.95 independent observations.

Where it breaks

Sentinel-2 false-colour image of forest next to a village, with red outlines around flagged patches. Some outlines cover bright bare clearings, others cover purple-toned patches of standing dead trees
False positives: purple-toned patches are standing dead trees killed by bark beetle, flagged because their NBR is low too.

Checked manually against 2023 and 2024 Sentinel-2 imagery, the alerts had a precision of 62 %. Most false positives were standing dead wood: dry trees that still hold their needles drop the NBR almost as much as logging does, so the z-score alone can’t tell the two apart.

So the harmonic model is good for broad disturbance tracking, but not precise enough to say “this was logged”.


Approach 2: Supervised machine learning

The second approach learns from labels. I used the CzechGlobe dataset of manually mapped disturbance polygons (2006–2024) and merged its codes for standing deadwood, windthrow, salvage logging and clearcuts into one “disturbed” class.

The “stable forest” class is stricter: a pixel counts only if it had more than 70 % canopy in Hansen 2000, was core tree cover in WorldCover 2021 (fully surrounded by other tree pixels, to avoid forest edges), and was never in any recorded disturbance.

Features per pixel: Red, NIR, SWIR1 and SWIR2 reflectance, NDVI and NBR, all for the previous and the current year, plus the year-over-year change (slope) of NDVI and NBR. Images were cloud-filtered and turned into yearly median composites.

Split by time, validate by space and time

Satellite data leaks easily: neighbouring pixels are similar, and so are consecutive years. To get honest numbers:

  • Train on 2016–2020, test on 2022–2024. 2021 is left out as a buffer, so a disturbance that spans two years can’t end up in both sets. That gave 11,520 training and 7,200 test samples, balanced between classes.
  • Spatial block cross-validation: points are grouped into spatial clusters with k-means (37 groups) on UTM coordinates, and whole clusters are held out, so the model is never validated right next to where it trained.
  • Forward-chaining time-series cross-validation: train on past years, validate on the next year only, just like it would run in practice.

Logistic Regression, Random Forest and XGBoost were tuned with a grid search under both schemes, optimising F1.

Results on unseen future years

Model (time-series tuned)F1Accuracy
Logistic Regression0.8490.846
Random Forest0.8520.845
XGBoost0.8530.849

All three models transfer well to 2022–2024, which they never saw. Year by year, performance grows with the intensity of the outbreak: XGBoost goes from F1 0.80 in 2022 to 0.89 in 2023 and 0.88 in 2024, and recall for the disturbed class approaches 0.89.

The most important features were the current-year NDVI and NBR, followed by the red band and the NBR slope. In other words, the models react to the immediate drop in vegetation signal.

From model to map

Applied to the whole park with a strict probability threshold (> 0.8), the spatially tuned Random Forest maps 32.66 km² of disturbance in 2024. Run forward for 2025, and after masking out everything already disturbed, it projects 5.16 km² of new canopy loss.


What I take from it

  • Unsupervised vs. supervised is a trade-off, not a winner. The harmonic model needs no labels and is useful for tracking gradual stress and seasonal drift. With labels, the supervised models are far more precise.
  • Validation design matters as much as the model. Random splits would have looked better and meant less. Spatial blocks and forward-chaining are what make the 0.85 on future years believable.
  • Limits. Optical data only works in the summer window and between clouds, so winter logging on frozen ground isn’t seen. The stable-forest labels don’t account for regrowth after 2021. Separating bark beetle from logging properly would need more data, like Sentinel-1 radar, which is the next step I’d take.