SeqTR: A Simple Yet Universal Network for Visual Grounding

Chaoyang Zhu, Yiyi Zhou, Yunhang Shen, Gen Luo, Xingjia Pan, Mingbao Lin, Chao Chen, Liujuan Cao, Xiaoshuai Sun, Rongrong Ji

Abstract

Visual grounding—the task of locating objects in images via natural language—traditionally requires specialized architectural heads for different output formats, such as bounding boxes for Referring Expression Comprehension (REC) and pixel-level masks for Referring Expression Segmentation (RES). SeqTR reformulates these tasks as a unified point prediction problem. By serializing geometric outputs into sequences of discrete coordinate tokens, SeqTR utilizes a standard Transformer architecture and a single cross-entropy loss to achieve state-of-the-art performance across multiple benchmarks with minimal task-specific engineering.

Introduction

Historically, visual grounding has been bifurcated into REC and RES. REC models typically output four-dimensional bounding box coordinates, while RES models generate high-resolution binary masks. This fragmentation necessitated a "zoo" of hand-crafted loss functions (e.g., GIoU, Dice, focal loss) and complex decoders. SeqTR aims to eliminate this complexity by treating visual grounding as a sequence-to-sequence prediction task, drawing inspiration from language modeling.

Methodology: The Point Prediction Paradigm

The core innovation of SeqTR is the serialization and quantization of spatial outputs. Instead of predicting continuous values or pixel grids, the model predicts a sequence of discrete tokens representing coordinates.

SeqTR reformulates visual grounding by serializing bounding boxes and segmentation masks into coordinate sequences derived from a natural language query.

Serialization and Quantization

  • Bounding Boxes: Represented as a simple four-token sequence $[x_1, y_1, x_2, y_2]$.
  • Binary Masks: SeqTR predicts a sequence of $N$ points along the object's contour. The authors employ a uniform clockwise sampling scheme, which preserves fine details more effectively than radial sampling.
  • Quantization: Coordinates are normalized and quantized into discrete integer "bins" (e.g., 1000 bins), transforming the regression task into a classification problem over a fixed vocabulary.

Architecture

The SeqTR architecture is designed for simplicity and efficiency. It consists of three primary stages: feature extraction, multi-modal fusion, and transformer processing.

The SeqTR pipeline involves fusing visual and linguistic features, followed by a Transformer encoder-decoder that auto-regressively predicts the target coordinate sequence.
  1. Encoders: A DarkNet-53 backbone extracts visual features, while a bi-directional GRU processes the text query.
  2. Fusion: A simple element-wise Hadamard product fuses the vision and language features.
  3. Transformer: A standard Transformer encoder-decoder (6 encoder layers, 3 decoder layers) processes the fused features. The decoder predicts coordinate tokens auto-regressively, guided by a single cross-entropy loss.

Experimental Results

SeqTR was evaluated on five major benchmarks, including RefCOCO, RefCOCO+, RefCOCOg, ReferItGame, and Flickr30K Entities.

  • REC Performance: SeqTR established new state-of-the-art results on RefCOCOg, achieving a +6.27% absolute improvement over previous Transformer-based models like TransVG.
  • RES Performance: Despite lacking a convolutional mask decoder, SeqTR reached 71.70 mIoU on RefCOCO (val) when pre-trained, outperforming many specialized segmentation models.
  • Efficiency: The model is highly efficient, with an inference speed of approximately 50ms on a GTX 1080 Ti, making it roughly 6x faster than traditional two-stage models like MAttNet.

Discussion and Limitations

While SeqTR offers a powerful and simple framework, it faces certain constraints. The use of a finite number of contour points imposes a theoretical upper bound on mask accuracy (approximately 95% mIoU). Additionally, as an auto-regressive model, it is susceptible to sequential error propagation, where an early mistake in the coordinate sequence can degrade subsequent predictions. Finally, the authors noted "negative transfer" when training REC and RES tasks simultaneously, suggesting that multi-task optimization in this paradigm remains an area for future research.

Conclusion

SeqTR demonstrates that visual grounding can be effectively unified under a point prediction paradigm. By leveraging the simplicity of Transformers and discrete coordinate sequences, it provides a robust, fast, and accurate solution that bridges the gap between bounding box localization and pixel-level segmentation.

Summary updated

BibTeX
@inproceedings{zhu2022seqtr,
  author = {Chaoyang Zhu and Yiyi Zhou and Yunhang Shen and Gen Luo and Xingjia Pan and Mingbao Lin and Chao Chen and Liujuan Cao and Xiaoshuai Sun and Rongrong Ji},
  title = {{SeqTR: A Simple Yet Universal Network for Visual Grounding}},
  booktitle = {European Conference on Computer Vision},
  year = {2022},
  doi = {10.1007/978-3-031-19833-5\_35},
}
Figure