[Paper Review] PolyFormer: Referring Image Segmentation as Sequential Polygon Generation
PolyFormer formulates referring image segmentation as sequential polygon generation using a novel sequence-to-sequence Transformer framework that directly predicts continuous 2D coordinates via regression, avoiding quantization errors. It achieves state-of-the-art performance with 5.40% and 4.52% absolute mIoU improvements on RefCOCO+ and RefCOCOg, respectively, and generalizes well to referring video segmentation without fine-tuning.
In this work, instead of directly predicting the pixel-level segmentation masks, the problem of referring image segmentation is formulated as sequential polygon generation, and the predicted polygons can be later converted into segmentation masks. This is enabled by a new sequence-to-sequence framework, Polygon Transformer (PolyFormer), which takes a sequence of image patches and text query tokens as input, and outputs a sequence of polygon vertices autoregressively. For more accurate geometric localization, we propose a regression-based decoder, which predicts the precise floating-point coordinates directly, without any coordinate quantization error. In the experiments, PolyFormer outperforms the prior art by a clear margin, e.g., 5.40% and 4.52% absolute improvements on the challenging RefCOCO+ and RefCOCOg datasets. It also shows strong generalization ability when evaluated on the referring video segmentation task without fine-tuning, e.g., achieving competitive 61.5% J&F on the Ref-DAVIS17 dataset.
Motivation & Objective
- To address the limitations of pixel-wise segmentation in referring image segmentation by modeling object boundaries as structured polygon sequences.
- To improve geometric localization accuracy by replacing discrete coordinate quantization with continuous regression for vertex prediction.
- To unify referring image segmentation and referring expression comprehension under a single sequence-to-sequence framework.
- To enable zero-shot generalization to video-based referring segmentation tasks without fine-tuning.
- To design a flexible multi-modal sequence modeling framework that naturally fuses visual and textual features for structured output generation.
Proposed method
- PolyFormer employs a sequence-to-sequence Transformer architecture that takes a concatenated sequence of image patch tokens and text query tokens as input.
- The model autoregressively generates a sequence of polygon vertices, with each prediction conditioned on all previous vertices to preserve spatial structure.
- A regression-based decoder predicts precise floating-point coordinates using bilinear interpolation over indexed embeddings, eliminating quantization error from discrete binning.
- The framework supports multi-task learning by jointly predicting polygons and bounding boxes, with separator tokens for handling multi-polygon instances.
- Polygon vertices are ordered clockwise, starting from the point closest to the image origin, to ensure consistent and meaningful sequence construction.
- Data augmentation is applied during training to generate polygons at varying levels of granularity, improving robustness and generalization.

Experimental results
Research questions
- RQ1Can referring image segmentation be effectively reformulated as sequential polygon generation instead of dense pixel-wise prediction?
- RQ2Does a regression-based decoder for continuous 2D coordinate prediction outperform classification-based methods in geometric localization tasks?
- RQ3Can a unified sequence-to-sequence framework jointly handle referring image segmentation and referring expression comprehension with shared multi-modal features?
- RQ4To what extent does the proposed framework generalize to zero-shot referring video segmentation without fine-tuning?
- RQ5How do design choices such as polygon ordering, data augmentation, and multi-task learning affect performance in polygon generation?
Key findings
- PolyFormer achieves 76.94% mIoU on RefCOCO, 72.15% on RefCOCO+, and 71.15% on RefCOCOg, setting new state-of-the-art results with absolute improvements of 2.48%, 5.40%, and 4.52% respectively.
- The regression-based decoder outperforms classification-based baselines by +1.86 and +2.38 mIoU on RefCOCO+ for RIS and REC tasks, respectively, demonstrating superior localization accuracy.
- The model achieves 61.5% J&F on Ref-DAVIS17 for referring video segmentation without fine-tuning, showing strong zero-shot generalization capability.
- Polygon ordering is critical, improving mIoU by 12.43% over random ordering, and data augmentation and multi-task learning each contribute significant gains of 3.72% and 3.07%.
- The addition of a <SEP> token for multi-polygon handling yields a 0.82% mIoU increase, indicating its utility despite low frequency of multi-polygon instances.
- Visualization shows cross-attention maps concentrate on the referred object and dynamically track its boundary during polygon generation, confirming attention alignment with semantic intent.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.