sam2_refine_mask
Refine a PNG mask by applying erosion and Gaussian blur, reducing edge artifacts and smoothing boundaries for cleaner video compositing.
Instructions
Refine a PNG mask by erosion and Gaussian blur. Needs only OpenCV and NumPy.
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>"
},
"name": "sam2_refine_mask"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| blur | No | ||
| input | Yes | ||
| output | Yes | ||
| erosion | No |