- Login to Wherobots Cloud.
- Start a GPU-Optimized runtime instance.
- We recommend using a Tiny GPU-Optimized runtime.
- Open a notebook.
- Open the
examples/Analyzing_Data/Raster_Segmentation.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
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 with the Raster Inference SQL functionRS_Segment or the Python API.
Here we generate 400 raster predictions using RS_Segment.
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_SEGMENT.
For example:
RS_Segment_To_Geoms function to extract the geometries indicating the model has identified as possible solar farms. we’ll specify the following:
- a raster column to use for georeferencing our results
- the prediction result from the previous step
- our category label “1” returned by the model representing Solar Farms and the class map to use for assigning labels to the prediction
- a confidence threshold between 0 and 1.
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 with RS_SEGMENT.References
- Bastani, Favyen, Wolters, Piper, Gupta, Ritwik, Ferdinando, Joe, and Kembhavi, Aniruddha. “SatlasPretrain: A Large-Scale Dataset for Remote Sensing Image Understanding.” arXiv preprint arXiv:2211.15660 (2023). https://doi.org/10.48550/arXiv.2211.15660

