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/Object_Detection.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 WherobotsDB Context
Here we configure WherobotsDB to enable access to the necessary cloud object storage buckets with sample data.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 Predictions And Visualize Results
To run predictions we will specify the model we wish to use. Some models are pre-loaded and made available in Wherobots Cloud. We can also load our own models. Predictions can be run using Wherobot’s Spatial SQL functions, in this caseRS_DETECT_BBOXES.
Here we generate 100 predictions using RS_DETECT_BBOXES.
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_DETECT_BBOXES.
For example:
RS_FILTER_BOX_CONFIDENCE and by the integer label representing offshore wind farms, 2, to locate predicted offshore wind farms.
arrays_zip and then use explode to convert lists to rows. To convert our string column representing a geometry into a GeometryType column, we use ST_GeomFromWKT so we can plot it with SedonaKepler.
wherobots.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_DETECT_BBOXES.

