SAM 3 Interactive¶
Class: SegmentAnything3InteractiveBlockV1
Run the interactive (promptable visual segmentation) head of Segment Anything 3 (SAM3) on an image.
Unlike the SAM 3 concept segmentation block (which takes text or exemplar prompts and returns ALL instances of a concept), this block performs SAM2-style interactive segmentation: each prompt targets ONE object and the model returns a single mask for it.
Two prompt inputs are supported (at least one must be provided): - points: a list of labeled 2D points defining a single object. Positive points mark the object to segment, negative points mark regions to exclude (useful to refine the mask). - boxes: detections from another model. Each bounding box becomes a separate prompt and the model segments the object inside it. Class names of the boxes are forwarded to the predicted masks.
Type identifier¶
Use the following identifier in step "type" field: roboflow_core/sam3_interactive@v1to add the block as
as step in your workflow.
Properties¶
| Name | Type | Description | Refs |
|---|---|---|---|
name |
str |
Enter a unique identifier for this step.. | ❌ |
points |
List[Any] |
Labeled points defining a single object to segment. Each point is {'x': ..., 'y': ..., 'positive': ...} in absolute pixel coordinates - positive points mark the object, negative points mark regions to exclude. Plain (x, y) or (x, y, positive) sequences are also accepted.. | ✅ |
threshold |
float |
Minimum confidence threshold for predicted masks. | ✅ |
multimask_output |
bool |
Flag to determine whether to use SAM3 internal multimask or single mask mode. For ambiguous prompts (like a single point) setting to True is recommended.. | ✅ |
The Refs column marks possibility to parametrise the property with dynamic values available
in workflow runtime. See Bindings for more info.
Runtime compatibility¶
-
hard— runtimeself_hosted_cpu; executionlocal - Requires a GPU; run_locally() loads a model that needs CUDA.
Available Connections¶
Compatible Blocks
Check what blocks you can connect to SAM 3 Interactive in version v1.
- inputs:
Halo Visualization,Image Threshold,SAM 3 Interactive,Template Matching,Stitch Images,Morphological Transformation,Classification Label Visualization,Twilio SMS/MMS Notification,Crop Visualization,Icon Visualization,Stability AI Outpainting,Blur Visualization,Detections Transformation,Reference Path Visualization,VLM As Classifier,ByteTrack Tracker,YOLO-World Model,Detections Classes Replacement,Byte Tracker,Webhook Sink,Camera Focus,Instance Segmentation Model,QR Code Generator,Track Class Lock,Instance Segmentation Model,Mask Edge Snap,Model Comparison Visualization,Path Deviation,MQTT Writer,Trace Visualization,Ellipse Visualization,Object Detection Model,Keypoint Detection Model,BoT-SORT Tracker,Dot Visualization,Perspective Correction,Label Visualization,Image Convert Grayscale,Instance Segmentation Model,Seg Preview,JSON Parser,Text Display,Per-Class Confidence Filter,Roboflow Dataset Upload,Detections Stabilizer,Image Blur,Keypoint Detection Model,Absolute Static Crop,Detections Merge,Velocity,SIFT,Gaze Detection,Keypoint Detection Model,EasyOCR,OC-SORT Tracker,Local File Sink,SAM 3,Triangle Visualization,Camera Focus,Contrast Equalization,Time in Zone,Polygon Visualization,SORT Tracker,SAM2 Video Tracker,VLM As Detector,Heatmap Visualization,Detections Stitch,Detections List Roll-Up,Contrast Enhancement,Halo Visualization,Color Visualization,Morphological Transformation,VLM As Detector,Event Writer,Identify Changes,Polygon Visualization,Email Notification,Mask Visualization,Detections Filter,Stability AI Inpainting,Bounding Rectangle,Time in Zone,PTZ Tracking (ONVIF),Keypoint Visualization,Roboflow Asset Library Attributes,Background Subtraction,Microsoft SQL Server Sink,Overlap Filter,Roboflow Vision Events,Identify Outliers,Mask Area Measurement,Twilio SMS Notification,Email Notification,Image Slicer,Detection Offset,Image Contours,Line Counter Visualization,Detections Consensus,Object Detection Model,Image Preprocessing,Byte Tracker,SAM 3,Dynamic Crop,Path Deviation,Byte Tracker,OPC UA Writer Sink,VLM As Classifier,Depth Estimation,Bounding Box Visualization,Detections Combine,Motion Detection,Cosine Similarity,Corner Visualization,Polygon Zone Visualization,Camera Calibration,Moondream2,Grid Visualization,Stability AI Image Generation,Segment Anything 2 Model,SAM 3,Roboflow Dataset Upload,S3 Sink,Circle Visualization,Image Slicer,SIFT Comparison,Time in Zone,OCR Model,Roboflow Custom Metadata,Relative Static Crop,Instance Segmentation Model,Model Monitoring Inference Aggregator,Object Detection Model,Slack Notification,Detection Event Log,SIFT Comparison,Pixelate Visualization,Google Vision OCR,Background Color Visualization,Line Counter,SAM3 Video Tracker,Dynamic Zone - outputs:
Halo Visualization,Overlap Analysis,SAM 3 Interactive,Crop Visualization,Icon Visualization,Detections Transformation,Blur Visualization,ByteTrack Tracker,Detections Classes Replacement,Byte Tracker,Track Class Lock,Size Measurement,Mask Edge Snap,Model Comparison Visualization,Path Deviation,Florence-2 Model,Trace Visualization,Ellipse Visualization,BoT-SORT Tracker,Dot Visualization,Perspective Correction,Label Visualization,Florence-2 Model,Per-Class Confidence Filter,Roboflow Dataset Upload,Detections Stabilizer,Detections Merge,Velocity,OC-SORT Tracker,Triangle Visualization,Camera Focus,Time in Zone,Line Counter,SORT Tracker,SAM2 Video Tracker,Polygon Visualization,Heatmap Visualization,Detections Stitch,Detections List Roll-Up,Halo Visualization,Color Visualization,Event Writer,Polygon Visualization,Mask Visualization,Detections Filter,Distance Measurement,Stability AI Inpainting,Bounding Rectangle,PTZ Tracking (ONVIF),Time in Zone,Overlap Filter,Roboflow Vision Events,Mask Area Measurement,Detection Offset,Detections Consensus,Byte Tracker,Dynamic Crop,Path Deviation,Byte Tracker,Bounding Box Visualization,Detections Combine,Roboflow Dataset Upload,Corner Visualization,Segment Anything 2 Model,Circle Visualization,Time in Zone,Roboflow Custom Metadata,Model Monitoring Inference Aggregator,Detection Event Log,Pixelate Visualization,Background Color Visualization,Line Counter,Dynamic Zone
Input and Output Bindings¶
The available connections depend on its binding kinds. Check what binding kinds
SAM 3 Interactive in version v1 has.
Bindings
-
input
images(image): The image to infer on..points(labeled_points): Labeled points defining a single object to segment. Each point is {'x': ..., 'y': ..., 'positive': ...} in absolute pixel coordinates - positive points mark the object, negative points mark regions to exclude. Plain (x, y) or (x, y, positive) sequences are also accepted..boxes(Union[instance_segmentation_prediction,keypoint_detection_prediction,object_detection_prediction]): Bounding boxes (from another model) to use as prompts - the model segments the object inside each box.threshold(float): Minimum confidence threshold for predicted masks.multimask_output(boolean): Flag to determine whether to use SAM3 internal multimask or single mask mode. For ambiguous prompts (like a single point) setting to True is recommended..
-
output
predictions(instance_segmentation_prediction): Prediction with detected bounding boxes and segmentation masks in form of sv.Detections(...) object.
Example JSON definition of step SAM 3 Interactive in version v1
{
"name": "<your_step_name_here>",
"type": "roboflow_core/sam3_interactive@v1",
"images": "$inputs.image",
"points": [
{
"positive": true,
"x": 320,
"y": 240
}
],
"boxes": "$steps.object_detection_model.predictions",
"threshold": 0.3,
"multimask_output": true
}