用自然语言指令一键分割任意物体实例,支持复杂语义理解
InstructSAM: Segment Any Instance with Any Instructions

- 将指令驱动的分割转为可学习的查询集预测问题
- 20万+样本数据集上实现93.6%的指令分割准确率
- 无需修改SAM核心结构,单次前向传播完成多实例分割
本文提出InstructSAM,一个统一的多实例分割框架,可在任意指令下进行分割。将指令驱动的实例分割建模为集合结构查询预测问题,设计显式推理-实例查询接口,连接视觉语言模型(VLM)与SAM3。在VLM中引入可学习的实例查询池,结合指令和视觉信息上下文化,使每个查询成为实例感知的槽位。混合注意力机制促进查询、视觉标记和指令标记间的交互,提升实例枚举能力并减少重复预测。最终生成的LLM条件查询被投影至SAM3检测器查询空间,实现单次前向传播下的精准多实例分割。该设计赋予SAM3高层指令理解、组合推理和实例级集合预测能力,且不修改其核心架构。为支持训练与评估,构建了包含自由形式指令与实例级掩码的大规模高质量数据集Inst2Seg。大量实验表明,仅使用20亿参数的InstructSAM,在复杂指令驱动和短语级指代分割基准上表现优异,优于先前端到端方法和SAM3的代理管道,同时实现高效单次通过多实例预测。
原文摘要 · Abstract (English)
In this paper, we introduce InstructSAM, a unified and streamlined framework designed for multi-instance segmentation under arbitrary instructions. We formulates instruction-driven instance segmentation as a set-structured query prediction problem and propose an explicit reasoning-to-instance query interface that elegantly bridges a vision-language model (VLM) and SAM3. Specifically, a bank of learnable instance queries is injected into the VLM and contextualized with instruction and visual information, enabling each query to serve as an instance-aware slot. A hybrid-attention mechanism further promotes interaction among these queries, visual tokens, and instruction tokens, improving instance enumeration and reducing duplicate predictions. The resulting LLM-conditioned queries are projected into SAM3's detector query space to drive accurate multi-instance segmentation in a single forward pass. This design equips SAM3 with high-level instruction understanding, compositional reasoning, and instance-level set prediction without modifying its core architecture. To support training and evaluation, we further construct Inst2Seg, a high-quality and large-scale instruction-based instance segmentation dataset and benchmark that couples free-form instructions with instance-level masks. Extensive experiments show that only 2B-scale InstructSAM achieves strong results across complex instruction-driven and phrase-level referring segmentation benchmarks, outperforming prior end-to-end methods and SAM3's agentic pipeline while enabling efficient single-pass multi-instance prediction.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。