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
Image for post
Image for post
Sentinel-2 image of an area in Slovenia, blending into a map of predicted land cover classes.

Foreword

Image for post
Image for post
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!

Image for post
Image for post
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

Image for post
Image for post
True-colour images of a single patch at different time frames. Some frames are cloudy, indicating the need for a cloud detector.
Image for post
Image for post
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

Image for post
Image for post
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.
Image for post
Image for post
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.
Image for post
Image for post
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?

Image for post
Image for post
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

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store