Manuscript Offprint

arXiv:2610.29409

LLMSeg: Training-Free Text-Prompted Image Segmentation with B-Splines

Abdullah Hamdi

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

Promptable segmentation models such as SAM 3 achieve remarkable open-vocabulary performance but require dedicated architectures, large-scale annotation engines, and task-specific training. We ask a different question: can a general-purpose multimodal large language model (MLLM) segment images directly, without an added segmentation head, mask decoder, or training? We present LLM-Seg, a training-free pipeline that turns a vision-capable LLM into a text-prompted image segmenter. LLMSeg decomposes segmentation into three LLM-driven stages. First, detect localizes all instances matching a free-form text query and describes their coarse morphology. Next, segment traces each instance using closed periodic B-splines confined to its detected box. These splines define an outer boundary and optional hole loops. Finally, refine iteratively proposes focus boxes around residual errors and retraces confined splines. The process ends when the mask stabilizes or the pass budget is exhausted. The output is a binary mask with inspectable intermediate geometry. We evaluate LLMSeg across ten referring and reasoning segmentation splits (ReasonSeg and RefCOCO/+/g). We also evaluate open-vocabulary instance segmentation (LVIS, COCO, and SA-Co), semantic segmentation, and zero-shot detection (ODinW13 and RF-100VL). With an off-the-shelf Gemini-3.7-Flash backend, LLMSeg is competitive with and often surpasses the specialist SAM 3 model on identical items. It reaches 71.5 cIoU on ReasonSeg val without additional segmentation-specific training. Backend model updates can improve accuracy without retraining the pipeline. The code is available at https://abdullahamdi.com/llmseg/.

Figure

“the donut”

“the car that may need repair”

“road, sidewalk, building, wall, fence, pole, …” (19 classes, one query)

“the places where the driver can observe the speed”

input

LLMSeg

Figure

"the stacked cookies"

B-splines per instance box

{"id":0,"box": [574,547,1375,1304], "control_points": [[962,546], [1132,584], ...

rasterize

iterate

mask

overlay

output

Figure

Figure 1: Text-prompted segmentation from a frozen MLLM. LLMSeg segments an image from a free-form text query alone, with a frozen multimodal LLM as its only vision component: no segmentation head, no mask decoder, no training. Top: four results, each under its query. Bottom: the model emits geometry rather than pixels; deterministic code rasterizes it, and the rendered overlay is fed back so the model can inspect and correct its own boundary.

1 INTRODUCTION

Text-prompted segmentation (producing a pixel mask for every instance that matches a language query) is a foundational capability for multimodal AI. The dominant approach builds ever-stronger specialist models: the SAM series (Kirillov et al., 2023; Ravi et al., 2024) introduced promptable visual segmentation. SAM 3 (Carion et al., 2026) extends this capability to promptable concept segmentation from noun phrases. It relies on a dedicated detector-tracker architecture and a massive human- and model-in-the-loop data engine.

In parallel, multimodal large language models (MLLMs) have acquired remarkable general visual competence. Their capabilities include grounding, counting, and coarse localization (Comanici et al., 2025; OpenAI, 2023; Bai et al., 2025; Deitke et al., 2025). However, they are widely assumed to require a trained segmentation decoder, such as SAM, to produce dense pixel masks (Lai et al., 2024; Rasheed et al., 2024; Carion et al., 2026). We challenge this assumption. We present LLMSeg (Figure 1), a fully training-free pipeline. A general-purpose MLLM is its only vision component. It returns geometry: closed curves that deterministic code rasterizes into a mask and keeps inside each box. The work splits into three stages. Detect localizes every instance the query matches and returns its box. Segment traces that instance with closed periodic B-spline loops confined to the box. Refine reads the rendered overlay and retraces the errors that remain, each inside a signed focus box.

This design provides an explicit parametric intermediate representation: cubic traces encode smooth curves, while degree-one traces encode straight edges. Rasterization and refinement need not preserve a smooth final boundary. With topology enabled, holes are specified as subtractive loops. Reasoning queries (“the food that the bird likes to eat”) work off the shelf because each query is interpreted by the same LLM that performs the segmentation. Every stage emits human-readable JSON, making geometric decisions inspectable. Since LLMSeg adds no trained parameters, backend upgrades require no pipeline retraining and usually come with segmentation accuracy gains.

Contributions: (i) We propose LLMSeg, a training-free promptable segmentation pipeline in which an MLLM predicts parametric B-spline geometry confined to each detected box and then refines it inside signed focus boxes. (ii) We show for the first time at benchmark scale that a general-purpose MLLM can perform dense text-prompted segmentation without any trained segmentation component. LLMSeg with Gemini-3.7-Flash as the backend is competitive with SAM 3 (Carion et al., 2026) on ReasonSeg, RefCOCO+/g, LVIS, COCO, SA-Co, ADE20K, Cityscapes, ODinW13, and RF-100VL, and reaches 71.5 cIoU on ReasonSeg val, the best among methods not fine-tuned for the task. Further analysis shows LLMSeg's segmentation quality follows the backend strength without retraining, offering automatic improvement in segmentation with better backends.

References (78)