RSAgent: Learning to Reason and Act for Text-Guided Segmentation via Multi-Turn Tool Invocations
Xingqi He, Yujie Zhang, Shuyong Gao, Wenjie Li, Lingyi Hong, Mingxi Chen, Kaixun Jiang, Jiyuan Fu, Wenqiang Zhang
TL;DR
RSAgent tackles text-guided segmentation by framing it as an interactive, episodic decision process in which a multimodal LLM alternates between reasoning and multi-turn tool invocations to query a segmentation toolbox and iteratively refine masks. A dedicated data pipeline generates high-quality multi-turn trajectories for cold-start supervised fine-tuning, followed by agentic reinforcement learning with fine-grained rewards that reward final mask quality and step-wise improvements. The two-stage training, combined with a modular tool environment, enables robust cross-modal reasoning and targeted refinement, achieving state-of-the-art results on RES and ReasonSeg benchmarks (e.g., 66.5% gIoU on ReasonSeg and 81.5% cIoU on RefCOCOg). This approach demonstrates a strong, interactive paradigm for text-guided pixel-level understanding, with potential impact on interactive perception and embodied AI tasks that require precise localization under open vocabulary.
Abstract
Text-guided object segmentation requires both cross-modal reasoning and pixel grounding abilities. Most recent methods treat text-guided segmentation as one-shot grounding, where the model predicts pixel prompts in a single forward pass to drive an external segmentor, which limits verification, refocusing and refinement when initial localization is wrong. To address this limitation, we propose RSAgent, an agentic Multimodal Large Language Model (MLLM) which interleaves reasoning and action for segmentation via multi-turn tool invocations. RSAgent queries a segmentation toolbox, observes visual feedback, and revises its spatial hypothesis using historical observations to re-localize targets and iteratively refine masks. We further build a data pipeline to synthesize multi-turn reasoning segmentation trajectories, and train RSAgent with a two-stage framework: cold-start supervised fine-tuning followed by agentic reinforcement learning with fine-grained, task-specific rewards. Extensive experiments show that RSAgent achieves a zero-shot performance of 66.5% gIoU on ReasonSeg test, improving over Seg-Zero-7B by 9%, and reaches 81.5% cIoU on RefCOCOg, demonstrating state-of-the-art performance on both in-domain and out-of-domain benchmarks.
