sam2_segment_image
Generate a PNG mask for a single image by providing point coordinates and labels. Use this tool to isolate objects or regions for compositing or replacement tasks.
Instructions
SAM2: PNG mask for a single image, via the video predictor.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"input": "<input>",
"output": "<output>",
"points": "<points>"
},
"name": "sam2_segment_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| blur | No | ||
| input | Yes | ||
| labels | No | ||
| output | Yes | ||
| points | Yes | ||
| erosion | No |