Geospatial Machine Learning

Geospatial Machine Learning icon

Geospatial Machine Learning

About This Course

Build machine learning models on spatial data, where the location of an observation carries information that ordinary models throw away. Over three days you classify multispectral satellite imagery into land cover classes, detect features in drone imagery, and model continuous surfaces from scattered observations.

Day One focuses on satellite imagery as training data. A satellite scene is a stack of spectral bands. Reshaped into one row per pixel, the scene becomes an ordinary classification problem for scikit-learn. The predictions then have to be reshaped back into geographic space before anyone can read the result. You then classify land cover a second time, with a different dataset and a different algorithm. This time you check the result properly: what accuracy pure chance would give you, and whether the model still works on a patch it has never seen.

Day Two focuses on spatial dependence, which is what separates this course from a generic machine learning course. Near things are more related than distant things, so spatial observations are not independent. Most models assume they are. Using PySAL you learn to measure that dependence, to separate a genuine hotspot from an artefact of how the data was collected, and to judge when spatial dependence makes a standard model's results misleading.

Day Three focuses on feature detection, validation and scale. Counting features on the ground by walking transects is slow, and on fragile terrain the survey itself does damage. You process drone imagery into candidate detections with scikit-image, check the answer against a physical ground survey, and count exactly how often you were wrong. False positives and false negatives are counted separately, not folded into a single accuracy figure. The day ends with scale. You rebuild the same pipeline on dask-image to run across several machines, and use Datashader for output too large to plot.

Who This Course Is For

Remote sensing scientists, GIS analysts, data scientists and researchers who need to build models on imagery and location data rather than on tidy tables. You can already load a raster and draw a map. What you need next is a classification or a prediction you can defend.

This course also suits teams whose work arrives as satellite and drone imagery, environmental and survey observations, or statistical boundaries, and who currently count or digitise features by hand. Common backgrounds include environment and water agencies, mining and resources, transport, emergency services, health and statistical agencies.

Prerequisites

Our Python for Geospatial Analysis course, or equivalent experience.

You should already be comfortable reading vector data into GeoPandas, working with rasters in xarray or Rasterio, and handling coordinate reference systems and reprojection. We revise these briefly rather than teaching them from scratch.

No prior machine learning or spatial statistics experience is assumed.

What You'll Learn

  • Classify multispectral satellite imagery into land cover classes with scikit-learn, and map the predictions back onto the raster.
  • Build a feature detection pipeline over drone imagery with scikit-image, from raw pixels through to labelled candidate features.
  • Validate a spatial model against ground-truthed survey data, and count the false positives and false negatives.
  • Measure spatial dependence and autocorrelation with PySAL, and identify hotspots, coldspots and local anomalies.
  • Judge when spatial dependence invalidates a standard machine learning model, and choose an approach accordingly.
  • Predict continuous surfaces from scattered observations, and process imagery that does not fit on one machine.

Course Syllabus

Day 1: Learning from imagery

  • Revision of GeoPandas, xarray rasters, projections and coordinate reference systems
  • Preparing raster and vector data for machine learning
  • Rasterisation and vectorisation, in both directions
  • Supervised classification of multispectral satellite imagery with scikit-learn
  • Reshaping predictions back into geographic space with xarray
  • Land cover classification against Digital Earth Australia categories, with a chance-rate baseline and a held-out patch

Day 2: Spatial dependence

  • Why spatially dependent data breaks ordinary machine learning
  • Spatial weights and the spatial lag: Queen, Rook, distance band and kernel
  • Measuring spatial dependence and autocorrelation with PySAL
  • Global autocorrelation with Moran's I and Geary's C
  • Finding hotspots, coldspots and spatial anomalies with local Moran's I
  • Building models that account for location

Day 3: Surfaces, validation and scale

  • Feature detection in drone imagery with scikit-image: filtering, edges, thresholding and morphology
  • Labelling and filtering candidate features with regionprops
  • Predicting continuous surfaces from scattered observations with SciPy and scikit-learn
  • Validating spatial models against ground-truthed survey data
  • Counting false positives and false negatives with a confusion matrix
  • Scaling image processing beyond a single machine with dask-image
  • Visualising model output over very large datasets with Datashader

Worked examples use satellite, aerial and survey data, chosen to suit the group. Bring your own datasets and we will work through them with you. Our trainers do this work for a living, so an unfamiliar problem gets solved in the room rather than deferred.