Xiaolong Wang1 ·
Lixiang Ru1 ·
Ziyuan Huang1 ·
Kaixiang Ji1
Dandan Zheng1 ·
Jingdong Chen1 ·
Jun Zhou1
1Ant Group · NeurIPS 2025
We propose a novel AutoRegressive Generation-based paradigm for image Segmentation (ARGenSeg), achieving multimodal understanding and pixel-level perception within a unified framework. Prior works integrating image segmentation into multimodal large language models (MLLMs) typically employ either boundary points representation or dedicated segmentation heads. These methods rely on discrete representations or semantic prompts fed into task-specific decoders, which limits the ability of the MLLM to capture fine-grained visual details. To address these challenges, we introduce a segmentation framework for MLLM based on image generation, which naturally produces dense masks for target objects. We leverage MLLM to output visual tokens and detokenize them into images using an universal VQ-VAE, making the segmentation fully dependent on the pixel-level understanding of the MLLM. To reduce inference latency, we employ a next-scale-prediction strategy to generate required visual tokens in parallel. Extensive experiments demonstrate that our method surpasses prior state-of-the-art approaches on multiple segmentation datasets with a remarkable boost in inference speed, while maintaining strong understanding capabilities. Key Innovations:
- Novel Framework: First segmentation paradigm built on a unified multimodal understanding-generation architecture, eliminating task-specific modules.
- SOTA without Extra Heads: Demonstrates unified MLLMs achieve state-of-the-art segmentation without dedicated segmentation heads.
- Efficiency & Robustness: Proposes next-scale prediction to accelerate inference; reveals coarse-to-fine mask generation inherently enhances robustness.
In this codebase, we release:
- ARGenSeg-8B checkpoint
- Training, evaluation, and inference code
- [2026-05-15] We release the inference code, training code, and checkpoints for ARGenSeg.
- [2025-10-23] We release the paper on arXiv.
- [2025-09-18] ARGenSeg has been accepted by NeurIPS 2025! 🔥🔥🔥
conda create -n argenseg python=3.10
conda activate argensegpip install -r requirements.txtwget https://github.com/Dao-AILab/flash-attention/releases/download/v2.5.7/flash_attn-2.5.7+cu122torch2.2cxx11abiFALSE-cp310-cp310-linux_x86_64.whl
pip install flash_attn-2.5.7+cu122torch2.2cxx11abiFALSE-cp310-cp310-linux_x86_64.whlmkdir -p internvl/model/var_vae/pretrained_weights
wget -O internvl/model/var_vae/pretrained_weights/vae_ch160v4096z32.pth \
https://huggingface.co/FoundationVision/var/resolve/main/vae_ch160v4096z32.pthDownload the checkpoint from HuggingFace and extract it to pretrained/InternVL2_5-ARGenSeg-8B/.
python demos/seg_demo.pypython demos/seg_demo_chat.pyFollow the InternVL documentation for detailed download instructions.
Example meta_path: example/internvl_1_2_finetune.json
Follow the PSALM Dataset Documentation for data preparation.
Example annotation format: example/anns/refcoco.jsonl
Example meta_path: example/data_seg.json
Merge the understanding and segmentation JSON files for mixed training.
Example: example/mix_seg_usd.json
sh scripts/train_argenseg.shPlease refer to eval/README.md for detailed evaluation instructions on:
- RefCOCO Series (comprehension & segmentation)
- VQA (TextVQA, VQAv2)
- POPE
- MMMU
If you find this work useful, please cite:
@article{wang2025argenseg,
title={ARGenSeg: Image Segmentation with Autoregressive Image Generation Model},
author={Wang, Xiaolong and Ru, Lixiang and Huang, Ziyuan and Ji, Kaixiang and Zheng, Dandan and Chen, Jingdong and Zhou, Jun},
journal={arXiv preprint arXiv:2510.20803},
year={2025}
}We sincerely thank the contributors of InternVL, VAR, and PSALM for their foundational work and open-source spirit.
This project is licensed under the MIT License - see the MIT License file for details.
