[Paper Review] Obj2Seq: Formatting Objects as Sequences with Class Prompt for Visual Tasks
Obj2Seq proposes a unified, object-centric framework that reformulates diverse visual tasks—such as detection, classification, and pose estimation—as sequence generation problems conditioned on class prompts. By treating objects as sequence units and using a Prompted Visual Indicator and General Sequence Predictor, it achieves 45.7% AP on COCO object detection, 89.0% AP on multi-label classification, and 65.0% AP on human pose estimation, demonstrating strong generalization across tasks with minimal task-specific adaptation.
Visual tasks vary a lot in their output formats and concerned contents, therefore it is hard to process them with an identical structure. One main obstacle lies in the high-dimensional outputs in object-level visual tasks. In this paper, we propose an object-centric vision framework, Obj2Seq. Obj2Seq takes objects as basic units, and regards most object-level visual tasks as sequence generation problems of objects. Therefore, these visual tasks can be decoupled into two steps. First recognize objects of given categories, and then generate a sequence for each of these objects. The definition of the output sequences varies for different tasks, and the model is supervised by matching these sequences with ground-truth targets. Obj2Seq is able to flexibly determine input categories to satisfy customized requirements, and be easily extended to different visual tasks. When experimenting on MS COCO, Obj2Seq achieves 45.7% AP on object detection, 89.0% AP on multi-label classification and 65.0% AP on human pose estimation. These results demonstrate its potential to be generally applied to different visual tasks. Code has been made available at: https://github.com/CASIA-IVA-Lab/Obj2Seq.
Motivation & Objective
- To address the challenge of unifying diverse visual tasks with heterogeneous output formats and high-dimensional object-level outputs.
- To enable flexible, task-agnostic inference by allowing users to specify target categories via class prompts.
- To design a unified framework that decouples object recognition from attribute sequence generation for diverse visual tasks.
- To improve model controllability and generalization across tasks without task-specific head design or fine-tuning.
- To explore the feasibility of extending sequence-to-sequence paradigms from NLP to vision, particularly for object-level tasks.
Proposed method
- The framework takes images and class prompts as input, using the Prompted Visual Indicator to detect objects of specified categories.
- The Prompted Visual Indicator employs learnable or CLIP-initialized class prompt vectors to guide object detection and object query initialization.
- Object features are processed by an Object Transformer Decoder to generate context-aware representations for each detected object.
- A General Sequence Predictor generates a task-specific sequence of attributes (e.g., bounding boxes, keypoints, labels) for each object in a unified, autoregressive manner.
- The model is trained end-to-end with sequence matching loss to align predicted sequences with ground-truth targets for each task.
- A retention policy mechanism allows filtering of irrelevant categories during inference, with class existence scores used to stabilize predictions under policy changes.
Experimental results
Research questions
- RQ1Can object-level visual tasks be unified under a single sequence generation framework with minimal architectural changes?
- RQ2How does the use of class prompts improve model controllability and adaptability to user-defined target categories?
- RQ3To what extent can a single model achieve competitive performance across diverse visual tasks like detection, classification, and pose estimation?
- RQ4How robust is the framework to changes in inference-time retention policies for object categories?
- RQ5Can sequence-based modeling in vision achieve performance comparable to task-specific models without task-specific head design?
Key findings
- Obj2Seq achieves 45.7% AP on MS COCO object detection when trained for detection, demonstrating strong performance on a standard benchmark.
- The model attains 89.0% AP on multi-label image classification, showing strong generalization to multi-class output formats.
- It achieves 65.0% AP on human pose estimation with keypoint annotations, indicating effective modeling of structured attribute sequences.
- Using CLIP-initialized prompt vectors improves performance by 0.3% over random initialization, but fine-tuning is necessary for optimal alignment.
- The model remains robust under varying retention policies in inference, with mAP fluctuating within 0.2% across different top-K and threshold-based filtering strategies.
- Including class existence scores in the objectness branch improves robustness when retention policies differ between training and inference.
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.