Land Cover Classification using Satellite Imagery and Deep Learning¶
- 🔬 Data Science
- 🥠 Deep Learning and pixel-based classification
Table of Contents
- Export training data for deep learning
- Model training
- Deployment and inference
- Visualize land cover classification on map
- Please refer to the prerequisites section in our guide for more information. This sample demonstrates how to do export training data and model inference using ArcGIS Image Server. Alternatively, they can be done using ArcGIS Pro as well.
- If you have already exported training samples using ArcGIS Pro, you can jump straight to the training section. The saved model can also be imported into ArcGIS Pro directly.
Land cover classification has been one of the most common tasks in remote sensing as it is the foundation for many global and environmental applications. Traditionally, people have been using algorithms like maximum likelihood classifier, SVM, random forest, and object-based classification. The recent success of AI brings new opportunity to this field. This notebook showcases an end-to-end to land cover classification workflow using ArcGIS API for Python. The workflow consists of three major steps: (1) extract training data, (2) train a deep learning image segmentation model, (3) deploy the model for inference and create maps. To better illustrate this process, we will use World Imagery and high-resolution labeled data provided by the Chesapeake Conservancy land cover project.
import os from pathlib import Path from arcgis import GIS from arcgis.learn import UnetClassifier, prepare_data
ent_gis = GIS("https://pythonapi.playground.esri.com/portal", 'arcgis_python', 'amazing_arcgis_123')
To export training data, we need a labeled imagery layer that contains the class label for each location, and a raster input that contains all the original pixels and band information. In this land cover classification case, we will be using a subset of the one-meter resolution Kent county, Delaware, dataset as the labeled imagery layer and World Imagery: Color Infrared as the raster input.
label_layer = ent_gis.content.search("title: Kent_county_full_label_land_cover owner:api_data_owner", "Map Image Layer") # the index might change label_layer
Now let's retrieve the World Imagery layer.
world_imagery_item = ent_gis.content.search("title: WorldImagery_AOI_NewYork owner:api_data_owner", "Map Image Layer") # the index might change world_imagery_item
world_imagery_layer = world_imagery_item.layers
m = ent_gis.map("Kent county, Delaware") m