- Annual Crop
- Forest
- Herbaceous Vegetation
- Highway
- Industrial Buildings
- Pasture
- Permanent Crop
- Residential Buildings
- River
- SeaLake
Before you start
This is a read-only preview of this notebook. To execute the cells in this Jupyter Notebook, do the following:- Login to Wherobots Cloud.
- Start a GPU-Optimized runtime instance.
- Open a notebook.
- We recommend using a Tiny GPU-Optimized runtime.
- Open the
examples/Analyzing_Data/Raster_Classification.ipynbnotebook path.
Access a GPU-Optimized runtime
This notebook requires a GPU-Optimized runtime. For more information on GPU Optimized runtimes, see Runtime types. To access this runtime category, do the following:- Sign up for a paid Wherobots Organization Edition (Professional or Enterprise).
- Submit a Compute Request for a GPU-Optimized runtime.
Step 1: Set up the Wherobots Context
Step 2: Load satellite imagery
Next, we load the satellite imagery that we will be running inference over. These GeoTiff images are loaded as out-db rasters in WherobotsDB, where each row represents a different scene.Step 3: Run prediction with sedona.sql apis
To run predictions we will specify the model we wish to use. Some models are pre-loaded and made available in Wherobots Cloud. Predictions can be run using the Raster Inference SQL functionRS_CLASSIFY or with the Python API.
Here we generate 200 predictions using RS_CLASSIFY.
model_id variable. To do so, replace the model_id variable with the s3 uri pointing to your Machine Learning Model Extension (MLM) metadata json. Then pass that as an argument to RS_CLASSIFY.
For example:
wherobots.inference Raster Inference Python API
If you prefer Python, wherobots.inference offers a module for registering the SQL inference functions as python functions. Below we run the same inference as before withRS_CLASSIFY.
Visualize the model predictions and source imagery
References
- Stewart, A. J., Robinson, C., Corley, I. A., Ortiz, A., Lavista Ferres, J. M., & Banerjee, A. (2022). TorchGeo: Deep Learning With Geospatial Data. In Proceedings of the 30th International Conference on Advances in Geographic Information Systems (pp. 1-12). Association for Computing Machinery. https://doi.org/10.1145/3557915.3560953
- Eurosat: A novel dataset and deep learning benchmark for land use and land cover classification. Patrick Helber, Benjamin Bischke, Andreas Dengel, Damian Borth. IEEE Journal of Selected Topics in Applied Earth Observations and Remote Sensing, 2019.

