1 of 50

Introduction to Image Classification

and Change Detection

Training:

16 November 2022

Environmental Monitoring with Google Earth Engine

November 8, 10, 16, 17 - 2022

2 of 50

Session Overview

  • Theory and Concept of Image Classification
  • Types of Image Classification
                  • Supervised
                  • Unsupervised
                • Good practices for training data collection
                  • Use of the Earth Engine Geometry Tools
                • Change Detection / Forest Disturbances and Time Series Analysis

Environmental Monitoring with Google Earth Engine

November 8, 10, 16, 17 - 2022

3 of 50

Prediction / Estimation

Estimation

Continuous values

Categorical values

Regression

Classification

Clustering

E.g.: Temperature estimation

E.g.: Land use land cover

Environmental Monitoring with Google Earth Engine

November 8, 10, 16, 17 - 2022

4 of 50

Prediction / Estimation

Estimation

Continuous values

Categorical values

Regression

Classification

Clustering

E.g.: Temperature estimation

E.g.: Land use land cover

Environmental Monitoring with Google Earth Engine

November 8, 10, 16, 17 - 2022

5 of 50

Image Classification

In remote sensing, image classification is an attempt to categorize each pixel into land use land cover classes/labels.

Environmental Monitoring with Google Earth Engine

November 8, 10, 16, 17 - 2022

6 of 50

Land cover relates to the physical characteristics of the surface.

Land use refers to how this land is being used by people.

Land Cover and Land Use

LC: Herbaceous vegetation

LU: Pasture or Park

Environmental Monitoring with Google Earth Engine

November 8, 10, 16, 17 - 2022

7 of 50

Supervised classification uses a training dataset with known labels that represent the spectral characteristics of each land use land cover class, in order to “supervise” the classification

Environmental Monitoring with Google Earth Engine

November 8, 10, 16, 17 - 2022

Types of Classification

Supervised

Environmental Monitoring with Google Earth Engine

November 8, 10, 16, 17 - 2022

8 of 50

Unsupervised classification is the opposite of supervised classification. The spectral classes are clustered together to then be categorized into groups: clustering, more computer automated

Types of Classification

Unsupervised (Clustering)

Environmental Monitoring with Google Earth Engine

November 8, 10, 16, 17 - 2022

Environmental Monitoring with Google Earth Engine

November 8, 10, 16, 17 - 2022

9 of 50

Types of Classification

Unsupervised

Environmental Monitoring with Google Earth Engine

November 8, 10, 16, 17 - 2022

Environmental Monitoring with Google Earth Engine

November 8, 10, 16, 17 - 2022

10 of 50

Types of Classification

Supervised and Unsupervised

Prior decision

Supervised

  • Get a scene or composite
  • Collect training data
  • Select and train a classifier using training data
  • Classify the image using the selected classifier

Post decision

Unsupervised

  • Assemble features with numeric properties in which to find clusters (training data)
  • Select and instantiate a clusterer
  • Train the clusterer with the training data
  • Apply the clusterer to the scene (classification)
  • Label the clusters

*We will only work with pixel-based classification

Environmental Monitoring with Google Earth Engine

November 8, 10, 16, 17 - 2022

Environmental Monitoring with Google Earth Engine

November 8, 10, 16, 17 - 2022

11 of 50

Machine Learning

“Machine learning is the study of the computer algorithms that allow computer programs to automatically improve through experience.”

(Tom M. Mitchell, McGraw Hill, 1997)

It is a branch of Artificial Intelligence

“Machine learning utilizes various techniques to intelligently handle large and complex amounts of information to make decisions and/or predictions”.

Environmental Monitoring with Google Earth Engine

November 8, 10, 16, 17 - 2022

12 of 50

Supervised Classification

Which classifier to use?

There are many different classifiers and the decision is not always straightforward.

Check the options under the ee.Classifier object in GEE

We will use:

  • CART
  • Random Forest

Environmental Monitoring with Google Earth Engine

November 8, 10, 16, 17 - 2022

Environmental Monitoring with Google Earth Engine

November 8, 10, 16, 17 - 2022

13 of 50

Classification and Regression Tree (CART)

  • A decision tree algorithm
  • Based on information-based (e.g.: spectral) rules
  • Have been used for decades: considered a classic algorithm
  • Basis for more sophisticated algorithms such as Random Forest

CART

Supervised Classification

Band 1 > 0.8

Band 2 < 0.4

Forest

Non forest

Forest

Yes

No

Yes

No

Root node

Internal node

Leaf node

Leaf node

Lead node

Environmental Monitoring with Google Earth Engine

November 8, 10, 16, 17 - 2022

Environmental Monitoring with Google Earth Engine

November 8, 10, 16, 17 - 2022

14 of 50

  • A decision-tree algorithm but more robust
  • Uses many trees and the final prediction is based on the average of all predictions
  • Breiman 2001, Pal 2005

Random Forest

Supervised Classification

Environmental Monitoring with Google Earth Engine

November 8, 10, 16, 17 - 2022

Environmental Monitoring with Google Earth Engine

November 8, 10, 16, 17 - 2022

15 of 50

Unsupervised Classification (Clustering)

Which clusterer to use?

There are many clusterer options

Check the options under the ee.Clusterer object in GEE

Environmental Monitoring with Google Earth Engine

November 8, 10, 16, 17 - 2022

Environmental Monitoring with Google Earth Engine

November 8, 10, 16, 17 - 2022

16 of 50

  • Has been utilized for years
  • Identifies groups of pixels near each other in the spectral space by using an iterative regrouping strategy
  • We define the number k, which is the number of clusters
  • Randomly distributes the k seed points and each iteration recalculates the class means and reclassifies pixels with respect to the new means

K-means

Unsupervised classification (Clustering)

Environmental Monitoring with Google Earth Engine

November 8, 10, 16, 17 - 2022

Environmental Monitoring with Google Earth Engine

November 8, 10, 16, 17 - 2022

17 of 50

Class Definition

It is extremely important to have labelling protocols for the reference dataset

  • Define a classification schema
    • If possible, use a known national classification schema for land use land cover labels, with the same definitions
    • Also possible to use other existing templates - e.g.: IPCC
  • Make sure to have a clear definition for each class
    • E.g.: Forest: areas with 70% tree cover

LC

Forest

Non Forest

Broadleaf

Deciduous

….

Environmental Monitoring with Google Earth Engine

November 8, 10, 16, 17 - 2022

18 of 50

Class Definition

Código IPCC

Descripción IPCC

GeoBosques

1

Forest Land

Tierras Forestales

2

Cropland

Tierras Agrícolas

3

Grassland

Praderas

4

Wetland

Humedales

5

Settlements

Asentamientos

6

Other Land

Otras Tierras

Environmental Monitoring with Google Earth Engine

November 8, 10, 16, 17 - 2022

19 of 50

Class Definition

Código MapBiomas

Descripción

Código IPCC

Descripcion IPCC

3

Formación Forestal

01

Tierras Forestales

6

Bosque Inundable

04

Humedales

11

Formación Natural No Forestal Inundable

04

Humedales

12

Formación Campestre

03

Praderas

14

Mosaico de Agricultura y/o Pasto

02

Tierras Agricolas

24

Infraestructura Urbana

05

Asentamientos

25

Otra Área sin Vegetación

06

Otras Tierras

30

Minería

06

Otras Tierras

33

Río, Lago u Océano

04

Humedales

Environmental Monitoring with Google Earth Engine

November 8, 10, 16, 17 - 2022

20 of 50

Reference data creation (training)

To create in GEE:

  1. Geometry tools
  2. Add a marker (punto)
  3. Geometry imports
  4. Settings
  5. Name the class
  6. Import as

FeatureCollection

  1. +Property
    1. ‘class’ and number
  2. Choose color

Repeat for other classes using the +New Layer in Geometry Imports

Merge all FeatureCollections using the “merge” function

(Another option: you can also collect polygons - more spectral information)

Environmental Monitoring with Google Earth Engine

November 8, 10, 16, 17 - 2022

21 of 50

Good practices for training data collection

  • Distributed throughout the area
  • If possible, proportional number of points to its presence
  • Make sure to collect points that represent the spectral variability of each class
  • Check the spectral signatures

Environmental Monitoring with Google Earth Engine

November 8, 10, 16, 17 - 2022

22 of 50

Change Detection

Change detection is the process of assessing how landscape conditions are changing by looking at differences in images acquired at different times.

Environmental Monitoring with Google Earth Engine

November 8, 10, 16, 17 - 2022

23 of 50

Change Detection

Change detection is the process of assessing how landscape conditions are changing by looking at differences in images acquired at different times.

Environmental Monitoring with Google Earth Engine

November 8, 10, 16, 17 - 2022

24 of 50

Change Detection

Change detection is the process of assessing how landscape conditions are changing by looking at differences in images acquired at different times.

Environmental Monitoring with Google Earth Engine

November 8, 10, 16, 17 - 2022

25 of 50

Change Detection

Change detection is the process of assessing how landscape conditions are changing by looking at differences in images acquired at different times.

Environmental Monitoring with Google Earth Engine

November 8, 10, 16, 17 - 2022

26 of 50

Change Detection

Commonly used approaches:

  • Image differencing
    • Example: NDVI post image – NDVI pre image
  • Advanced algorithms (time series analysis) – focus on forest disturbances
  • LandTrendr
  • CCDC
  • CODED
  • MTDD
  • CCDC-SMA
  • ….

Environmental Monitoring with Google Earth Engine

November 8, 10, 16, 17 - 2022

27 of 50

Change Detection

Commonly used approaches:

  • Image differencing
    • Example: NDVI post image – NDVI pre image
  • Advanced algorithms (time series analysis) – focus on forest disturbances
  • LandTrendr
  • CCDC
  • CODED
  • MTDD
  • CCDC-SMA
  • ….

Environmental Monitoring with Google Earth Engine

November 8, 10, 16, 17 - 2022

28 of 50

Time Series Analysis

“A time series is a sequence of observations taken sequentially in time. … An intrinsic feature of a time series is that, typically, adjacent observations are dependent. Time-series analysis is concerned with techniques for the analysis of this dependency.” (Box et al., 1994)

Environmental Monitoring with Google Earth Engine

November 8, 10, 16, 17 - 2022

29 of 50

LandTrendr

“LandTrendr is set of spectral-temporal segmentation algorithms that are useful for change detection in a time series of moderate resolution satellite imagery (primarily Landsat) and for generating trajectory-based spectral time series data largely absent of inter-annual signal noise.”

LandTrendr in GEE

Environmental Monitoring with Google Earth Engine

November 8, 10, 16, 17 - 2022

30 of 50

LandTrendr

  • Landsat-Based Detection of Trends in Disturbance and Recovery (LandTrendr)
  • Recognizes that change is often not a contrast between two dates, but an ongoing process operating on multiple timescales
    • Short duration (e.g. wildfires) and long-term trends
  • Extracts spectral trajectories of land surface changes from annual Landsat time series stacks
  • 3 Components:
  • Tracks annual (not intra-annual) changes
  • Pixel based
  • Allows single events and spectral smoothing (arbitrary time segmentation)

Environmental Monitoring with Google Earth Engine

November 8, 10, 16, 17 - 2022

31 of 50

LandTrendr

In practice, LandTrendr takes a single point of view of a pixel's spectral history, such as a band or an index, and goes through a process to identify breakpoints separating periods of durable change or stability in the spectral trajectory and records the year that change has taken place. These breakpoints, defined by year and spectral index value, allow us to represent the spectral history of a pixel as a series of vertices delimiting line segments.

Environmental Monitoring with Google Earth Engine

November 8, 10, 16, 17 - 2022

32 of 50

CODED (COntinuous DEgradation Detection)�

Based on Spectral Unmixing and the Normalized Difference Fraction Index (NDFI)

NDFI

Intact forest

Logged forest

Non-Forest

Soil

Shade

NPV

GV

Landsat RGB

Slides from Eric Bullock

Environmental Monitoring with Google Earth Engine

November 8, 10, 16, 17 - 2022

33 of 50

CODED (COntinuous DEgradation Detection)�

Slides from Eric Bullock

Steps:

  • Identifies forest through a regression model applied over training data
  • Calculates NDFI annual time series
  • Detects changes based on thresholds
  • Classifies those changes with a random forest classifier

Environmental Monitoring with Google Earth Engine

November 8, 10, 16, 17 - 2022

34 of 50

CODED (COntinuous DEgradation Detection)�

Spectral Unmixing and the Normalized Difference Fraction Index (NDFI)

  • Introduced in Souza et al. (2005, 2013)
  • Calculated using spectral mixture analysis

Spectral mixture

analysis & NDFI

Time series analysis (CCDC)1

Google Earth Engine

Large-area processing

Continuous Degradation Detection (CODED)

  1. 1 Zhu & Woodcock, 2014

Slides from Eric Bullock

Environmental Monitoring with Google Earth Engine

November 8, 10, 16, 17 - 2022

35 of 50

CODED (COntinuous DEgradation Detection)�

Spectral Unmixing and the Normalized Difference Fraction Index (NDFI)

Slides from Eric Bullock

Environmental Monitoring with Google Earth Engine

November 8, 10, 16, 17 - 2022

36 of 50

D/ND

Deforestation

Sample Interpretation

Before

During

0 0.5 km

Slides from Eric Bullock

Environmental Monitoring with Google Earth Engine

November 8, 10, 16, 17 - 2022

37 of 50

D/ND

Deforestation

Sample Interpretation

Slides from Eric Bullock

Environmental Monitoring with Google Earth Engine

November 8, 10, 16, 17 - 2022

38 of 50

D/ND

Deforestation

Sample Interpretation

Slides from Eric Bullock

Environmental Monitoring with Google Earth Engine

November 8, 10, 16, 17 - 2022

39 of 50

Before

During

0 0.5 km

D/ND

Deforestation

Sample Interpretation

Slides from Eric Bullock

Environmental Monitoring with Google Earth Engine

November 8, 10, 16, 17 - 2022

40 of 50

D/ND

Deforestation

Sample Interpretation

Slides from Eric Bullock

Environmental Monitoring with Google Earth Engine

November 8, 10, 16, 17 - 2022

41 of 50

D/ND

Deforestation

Sample Interpretation

Slides from Eric Bullock

Environmental Monitoring with Google Earth Engine

November 8, 10, 16, 17 - 2022

42 of 50

D/ND

Deforestation

Sample Interpretation

Slides from Eric Bullock

Environmental Monitoring with Google Earth Engine

November 8, 10, 16, 17 - 2022

43 of 50

D/ND

Deforestation

Sample Interpretation

Slides from Eric Bullock

Environmental Monitoring with Google Earth Engine

November 8, 10, 16, 17 - 2022

44 of 50

Dense Forest, Rondônia

Cerrado Forest, Mato Grosso

Observed vs Predicted NDFI (Training Period)

Observed vs Predicted NDFI (Training Period)

Slides from Eric Bullock

Environmental Monitoring with Google Earth Engine

November 8, 10, 16, 17 - 2022

45 of 50

Continuous Degradation Detection (CODED)

-1

1

Slides from Eric Bullock

Environmental Monitoring with Google Earth Engine

November 8, 10, 16, 17 - 2022

46 of 50

Continuous Degradation Detection (CODED)

-1

1

Degradation:

Forest -> Forest

Deforestation: Forest-> Non Forest

Slides from Eric Bullock

Environmental Monitoring with Google Earth Engine

November 8, 10, 16, 17 - 2022

47 of 50

Degradation

Slides from Eric Bullock

Environmental Monitoring with Google Earth Engine

November 8, 10, 16, 17 - 2022

48 of 50

MTDD

Uses 66 metrics to train a random forest classifier

Steps:

  • Sampling (training + validation)
    • Degradation
    • Deforestation
    • Stable forest
    • Non-forest
  • Annual composites (uses LandTrendr library)
  • Calculation of indices and metrics
  • Random forest model

NDVI

SWIR1

SWIR2

NDWI2130nm

NDWI1640nm

SAVI

min

max

range

std

coef. of variation

kurtosis

skewness

slope

max-slope

most recent value

66 metrics

Environmental Monitoring with Google Earth Engine

November 8, 10, 16, 17 - 2022

49 of 50

Tutorial

Tutorial para el mapeo de disturbios forestales en la Amazonia

Sudoccidental usando CODED, LandTrendr y MTDD (GitHub)

Environmental Monitoring with Google Earth Engine

November 8, 10, 16, 17 - 2022

50 of 50

Useful Resources

 

Environmental Monitoring with Google Earth Engine

November 8, 10, 16, 17 - 2022