erase
cli_eraseErase logos, watermarks, or objects from images and videos by inpainting specified box regions, including tracked moving marks across frames.
Instructions
Erase arbitrary region(s) from an image or video via inpainting.
Universal and position-agnostic: removes any logo / watermark / object inside
the boxes you pass, regardless of color or location. Runs on CPU. Use this
for marks the dedicated ``visible`` registry does not cover.
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": {
"source": "<source>",
"regions": "<regions>"
},
"name": "cli_erase"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| track | No | Track moving watermark/object box(es) across video frames from the starting frame. | |
| dilate | No | Grow the box by this many px before inpainting. | |
| frames | No | Inclusive 0-based START:END frame range when erasing a video clip. | |
| output | No | Output path (default: <source>_clean.<ext>). | |
| source | Yes | source | |
| as_json | No | Emit JSON output when erasing video. | |
| backend | No | Inpaint backend. cv2: instant, no model download. migan: light ONNX MI-GAN, ~1 GB RAM, near-LaMa quality (extra 'migan'). lama: big-LaMa, best quality but ~4.7 GB RAM (extra 'lama'). | cv2 |
| regions | Yes | x,y,w,h box to erase (repeatable). | |
| inpaint_method | No | cv2 inpaint method. | telea |
| strip_metadata | No | Strip AI metadata from output. |