Seg-VAR: Image Segmentation with Visual Autoregressive Modeling
Rongkun Zheng, Lu Qi, Xi Chen, Yi Wang, Kun Wang, Hengshuang Zhao
TL;DR
Seg-VAR reframes segmentation as a conditional autoregressive mask generation problem by learning discrete seglat tokens via a location-aware color mapping and recovering masks through a hierarchical transformer decoder. The method combines an image encoder that provides latent priors, a seglat latent encoder/decoder, and a latent encoder/decoder to align image-derived latents with seglat distributions using an ELBO objective with a KL term. A three-stage training procedure—seglat learning, latent learning, and image-prior alignment—enables cross-task performance, achieving state-of-the-art results on COCO, Cityscapes, and ADE20K across semantic, instance, and panoptic segmentation. Empirical results and ablations show the value of spatially aware latents and multi-scale autoregressive decoding for precise, context-aware segmentation. This work suggests a broadly applicable pathway for integrating autoregressive reasoning into spatial vision systems and opens avenues for future extensions to video and other structured perception tasks.
Abstract
While visual autoregressive modeling (VAR) strategies have shed light on image generation with the autoregressive models, their potential for segmentation, a task that requires precise low-level spatial perception, remains unexplored. Inspired by the multi-scale modeling of classic Mask2Former-based models, we propose Seg-VAR, a novel framework that rethinks segmentation as a conditional autoregressive mask generation problem. This is achieved by replacing the discriminative learning with the latent learning process. Specifically, our method incorporates three core components: (1) an image encoder generating latent priors from input images, (2) a spatial-aware seglat (a latent expression of segmentation mask) encoder that maps segmentation masks into discrete latent tokens using a location-sensitive color mapping to distinguish instances, and (3) a decoder reconstructing masks from these latents. A multi-stage training strategy is introduced: first learning seglat representations via image-seglat joint training, then refining latent transformations, and finally aligning image-encoder-derived latents with seglat distributions. Experiments show Seg-VAR outperforms previous discriminative and generative methods on various segmentation tasks and validation benchmarks. By framing segmentation as a sequential hierarchical prediction task, Seg-VAR opens new avenues for integrating autoregressive reasoning into spatial-aware vision systems. Code will be available at https://github.com/rkzheng99/Seg-VAR.
