SAMDetector (segmented)
ImpactPack/Detector
SAMDetectorSegmentedExample
JSON Example
{
"class_type": "SAMDetectorSegmented",
"inputs": {
"sam_model": [
"node_id",
0
],
"segs": [
"node_id",
0
],
"image": [
"node_id",
0
],
"detection_hint": "center-1",
"dilation": 0,
"threshold": 0.93,
"bbox_expansion": 0,
"mask_hint_threshold": 0.7,
"mask_hint_use_negative": "False"
}
}This example shows required inputs only. Connection values like ["node_id", 0] should reference actual node IDs from your workflow.
Inputs
| Name | Type | Status | Constraints | Default |
|---|---|---|---|---|
sam_model? | SAM_MODEL | required | - | - |
segs? | SEGS | required | - | - |
image? | IMAGE | required | - | - |
detection_hint? | ENUM9 options
| required | - | - |
dilation? | INT | required | min: -512, max: 512, step: 1 | 0 |
threshold | FLOAT | required | min: 0, max: 1, step: 0.01 | 0.93 |
bbox_expansion? | INT | required | min: 0, max: 1000, step: 1 | 0 |
mask_hint_threshold? | FLOAT | required | min: 0, max: 1, step: 0.01 | 0.7 |
mask_hint_use_negative? | ENUM3 options
| required | - | - |
Outputs
| Index | Name | Type | Is List | Connection Reference |
|---|---|---|---|---|
0 | combined_mask | MASK | No | ["{node_id}", 0] |
1 | batch_masks | MASK | No | ["{node_id}", 1] |
How to connect to these outputs
To connect another node's input to an output from this node, use the connection reference format:
["node_id", output_index]Where node_id is the ID of this SAMDetectorSegmented node in your workflow, and output_index is the index from the table above.
Example
If this node has ID "5" in your workflow:
combined_mask (MASK):["5", 0]batch_masks (MASK):["5", 1]
Was this page helpful?