ArcGIS Developers

ArcGIS API for Python

Land Cover Classification using Satellite Imagery and Deep Learning

  • 🔬 Data Science
  • 🥠 Deep Learning and pixel-based classification


  • 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.

Figure 1. A subset of of the labeled data for Kent county, Delaware

Export training data for deep learning

Import ArcGIS API for Python and get connected to your GIS

In [1]:
import os
from pathlib import Path

from arcgis import GIS
from arcgis.learn import UnetClassifier, prepare_data
In [2]:
ent_gis = GIS('', 'arcgis_python', 'amazing_arcgis_123')

Prepare data that will be used for training data export

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.

In [27]:
label_layer ="title: Kent_county_full_label_land_cover owner:api_data_owner", 
                                 "Map Image Layer")[0] # the index might change
Kent_county_labelMap Image Layer by api_data_owner
Last Modified: April 03, 2020
0 comments, 0 views

Now let's retrieve the World Imagery layer.

In [30]:
world_imagery_item ="title: WorldImagery_AOI_NewYork owner:api_data_owner", 
                                 "Map Image Layer")[0] # the index might change
WorldImagery_AOI_NewYorkMap Image Layer by api_data_owner
Last Modified: April 03, 2020
0 comments, 1 views
In [ ]:
world_imagery_layer = world_imagery_item.layers[0]
In [32]:
m ="Kent county, Delaware")