Land Cover Classification with eo-learn: Part 1

Mastering Satellite Data in an Open-Source Python Environment

Matic Lubej
Nov 5, 2018 · 8 min read
Sentinel-2 image of an area in Slovenia, blending into a map of predicted land cover classes.


Sentinel-2 image and the overlaid NDVI mask of an area in Slovenia, taken in the winter season.
Sentinel-2 image and the overlaid NDVI mask of an area in Slovenia, taken in the summer season.

Area-of-Interest? Take Your Pick!

The area-of-interest (Republic of Slovenia) split into smaller patches of approximately 1000 x 1000 square pixels at 10 m resolution.

Obtaining Open-Access Sentinel Data

True-colour images of a single patch at different time frames. Some frames are cloudy, indicating the need for a cloud detector.
Cloud probability masks of a single patch for different time frames (same as above). The colour scale represents the probability for a cloudy pixel, ranging from blue (low probability) to yellow (high probability).

Adding the Reference Data

The process of burning vector data into raster masks for a single patch. The left image shows the plotted polygons of the provided vector file, the centre image shows the split raster masks for each land-cover label, black and white indicating the positive and negative samples, respectively. The image on the right shows the merged raster mask with different colours for different labels.

Put it All Together

Code snippet of the presented pipeline, which is executed for each patch.
True colour image (left), map of valid pixel counts for the year 2017 (centre), and the averaged cloud probability map for the year 2017 (right) for a random patch in the AOI.
Mean NDVI of all pixels in a random patch throughout the year. The blue line shows the result with cloud filtering applied, while the orange line shows the calculation with clouds taken into account.

But, Will it Scale?

Number of valid Sentinel-2 observations for this AOI in the year 2017. The regions with higher count numbers are areas where the swaths of both Sentinel-2A and B overlap, while this does not happen in the middle part of the AOI.

A Jupyter Notebook Example

Sentinel Hub Blog

Stories from the next generation satellite imagery platform