Land Cover Classification with eo-learn: Part 2

Going from Data to Predictions in the Comfort of Your Laptop

Matic Lubej
Jan 9, 2019 · 12 min read
Image for post
Image for post
A temporal stack of Sentinel-2 images of a small area in Slovenia, followed by a land cover prediction, obtained via methods presented in this post.

Foreword

Preparing the Data

Image for post
Image for post
Diagram of a machine learning pipeline, showing that the ML code actually represents a relatively small part of the ML pipeline. Source: Sculley et al. Hidden Technical Debt in Machine Learning Systems, NIPS 2015

Cloudy Scene Filtering

Temporal Interpolation of Pixels

Image for post
Image for post
A visual representation of a temporal stack of Sentinel-2 images over a randomly selected area. The transparent pixels on the left imply missing data due to cloud coverage. The stack on the right represents the pixel values after temporal interpolation, taking cloud masks into account.
Image for post
Image for post
Temporal evolution of NDVI values for pixels of selected land cover types through the year.

Negative Buffer Application

Image for post
Image for post
Reference map for a small part of the AOI before (left) and after (right) the application of the negative buffer on the map.

Random Subset Selection

Splitting and Reshaping the Data

Machine Learning Model Construction

Image for post
Image for post
Schematic of the decision trees in the LightGBM framework. Source: http://arogozhnikov.github.io/2016/06/24/gradient_boosting_explained.html

Model Validation

Confusion Matrix

Image for post
Image for post
Two aspects of viewing the normalised confusion matrix of a trained model.
Image for post
Image for post
Frequency of pixels for each class in the training dataset. In general, the distribution is not uniform.

Receiver Operating Characteristic — ROC Curve

Image for post
Image for post
ROC curves of the classifier, represented as “one vs. rest” for each class in the dataset. Numbers in brackets are the area-under-curve (AUC) values.

Feature Importance

Image for post
Image for post
Feature importance map for the features used in this classification.
Image for post
Image for post
A part of this AOI consisting of 3x3 EOPatches covered with snow.

Prediction Results

Image for post
Image for post
Sentinel-2 image (left), ground truth (centre) and prediction (right) for a random EOPatch in the selected AOI. Some differences are visible, which is mostly due to the application of the negative buffer on the reference map, otherwise the agreement is satisfactory for this use case.
Image for post
Image for post
Screenshot of the land cover prediction for Slovenia 2017 using the approach shown in this blog post, available for detailed browsing in the CloudGIS Geopedia portal (https://www.geopedia.world/#T244).
Image for post
Image for post
Sentinel-2 image (left), ground truth (centre) and prediction (right) for the area around the small sports airfield Levec, near Celje, Slovenia. The classifier correctly recognises the landing strip as grassland, which is marked as artificial surface in the official land use data.
Image for post
Image for post
Sentinel-2 image (left), ground truth (centre) and prediction (right) for the area around the Ljubljana Jože Pučnik Airport, the largest airport in Slovenia. The classifier recognises the tarmac runway and the road network, while still correctly identifying grassland and cultivated land in the surrounding area.

We also plan to publish Part 3, the last part of this series, where we will show how to experiment with the ML workflow and try to improve the results! Additionally, we will openly share all EOPatches for Slovenia 2017 — that’s right, you heard correctly, the whole dataset, containing Sentinel-2 L1C data, s2cloudless cloud masks, reference data, etc., so everyone can try it out!

We cannot wait to see how you apply your own methods inside of eo-learn. :)

Stay tuned!

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