Run text-based segmentation (LangSAM).
(ctx, output, text_prompt, box_threshold, text_threshold)
| 361 | ) |
| 362 | @click.pass_context |
| 363 | def segment_text(ctx, output, text_prompt, box_threshold, text_threshold): |
| 364 | """Run text-based segmentation (LangSAM).""" |
| 365 | p = _load_project(ctx) |
| 366 | from cli_anything.samgeo.core.segment import text_segment |
| 367 | |
| 368 | result = text_segment( |
| 369 | p, |
| 370 | text_prompt, |
| 371 | output, |
| 372 | box_threshold=box_threshold, |
| 373 | text_threshold=text_threshold, |
| 374 | ) |
| 375 | _save_project(ctx, p) |
| 376 | _output(result, ctx.obj.get("as_json")) |
| 377 | |
| 378 | |
| 379 | # --------------------------------------------------------------------------- |
nothing calls this directly
no test coverage detected