RS_CLASSIFY
TheRS_Classify function performs single-label, multi-class classification.
Parameters
The identifier of the model to be used for classification. Supported model ID: landcover-eurosat-sentinel2.
The SQL column containing the input raster data for classification.
Returns
A map where the key is the class label (
STRING) and the value is the confidence score for the class label (FLOAT).Example Invocation
RS_MAX_CONFIDENCE
Returns the label and confidence of the highest confidence class from the RS_CLASSIFY function.Parameters
The prediction column result from RS_CLASSIFY.
Returns
- max_confidence_label:
STRING. The label with the highest confidence score. - max_confidence_score:
FLOAT. The highest confidence score.
RS_SEGMENT
TheRS_Segment function performs semantic segmentation.
Parameters
The identifier of the model to be used for segmentation. Supported model ID: solar-satlas-sentinel2.
The SQL column containing the input raster data for segmentation.
Returns
- confidence_array:
ARRAY<FLOAT>. An array of confidence scores. - class_map:
MAP<STRING, INTEGER>. A mapping of class labels to their corresponding integer values.
Example Invocation
RS_DETECT_BBOXES
TheRS_Detect_BBoxes function performs object detection and returns bounding boxes.
Parameters
The identifier of the model to be used for object detection. Supported model ID: marine-satlas-sentinel2.
The SQL column containing the input raster data for object detection.
Returns
- bboxes_wkt:
ARRAY<STRING>. The bounding boxes in Well-Known Text (WKT) format. - confidence_scores:
ARRAY<FLOAT>. The confidence scores corresponding to the bounding boxes. - labels:
ARRAY<INTEGER>. The labels for the bounding boxes.
Example Invocation
RS_FILTER_BOX_CONFIDENCE
TheRS_Filter_Box_Confidence function filters the bounding boxes by a confidence threshold.
Parameters
The bboxes_wkt column results from RS_DETECT_BBOXES.
The confidence scores corresponding to the bounding boxes.
The labels for the bounding boxes.
Returns
- max_confidence_bboxes:
ARRAY<STRING>. The bounding boxes with the highest confidence. - max_confidence_scores:
ARRAY<FLOAT>. The confidence scores corresponding to the bounding boxes. - max_confidence_labels:
ARRAY<STRING>. The labels for the bounding boxes with the highest confidence.
Example Invocation
RS_TEXT_TO_BBOXES
TheRS_Text_to_BBoxes function performs text-prompted object detection, returning bounding boxes for objects matching the text description. The flexibility of the text prompt depends on the underlying model.
Parameters
The identifier of the model to be used for text-prompted detection. Supported model IDs: owlv2.
The SQL column containing the input raster data for detection.
A natural language input used by the object detection model to determine which objects to identify.
A value between 0 and 1 to filter detection confidence. Lower values return more potential matches.
Returns
- bboxes_wkt:
ARRAY<STRING>. The bounding boxes in Well-Known Text (WKT) format. - confidence_scores:
ARRAY<FLOAT>. The confidence scores corresponding to the bounding boxes. - labels:
ARRAY<STRING>. The text labels for the bounding boxes (matching the input prompt).
Example Invocation
RS_TEXT_TO_SEGMENTS
TheRS_Text_to_Segments function performs text-prompted instance segmentation, returning WKT polygons converted from pixel-wise masks for areas matching the text description.
Parameters
The identifier of the model to be used for text-prompted segmentation. Supported model ID: sam2.
The SQL column containing the input raster data for segmentation.
A natural language description of the features to segment.
A value between 0 and 1 to filter segmentation confidence. Lower values return more potential matches.
Returns
- confidence_array:
ARRAY<FLOAT>. An array of confidence scores for each segment. - segments_wkt:
ARRAY<STRING>. The segmentation polygons in Well-Known Text (WKT) format. - labels:
ARRAY<STRING>. The text labels for the segments (matching the input prompt).
Example Invocation
Notes
The functionsRS_Text_to_BBoxes and RS_Text_to_Segments are best suited for exploratory detection scenarios where:
- Target features have high visual contrast with surroundings.
- Target features have clear, unambiguous descriptions.
- Image resolution and quality are sufficient to resolve features of interest.
wherobots.inference.plot.detections.show_detections function.
