Skip to main content
QUICK REVIEW

[Paper Review] T-Rex2: Towards Generic Object Detection via Text-Visual Prompt Synergy

Qing Jiang, Feng Li|arXiv (Cornell University)|Mar 21, 2024
Handwritten Text Recognition TechniquesComputer Science3 citations
TL;DR

T-Rex2 introduces a unified, prompt-based object detection framework that synergizes text and visual prompts via contrastive learning to enable robust zero-shot detection across open-set, long-tailed scenarios. By jointly encoding textual descriptions and visual exemplars (points/boxes), it achieves state-of-the-art performance on LVIS and COCO benchmarks, demonstrating mutual enhancement between modalities.

ABSTRACT

We present T-Rex2, a highly practical model for open-set object detection. Previous open-set object detection methods relying on text prompts effectively encapsulate the abstract concept of common objects, but struggle with rare or complex object representation due to data scarcity and descriptive limitations. Conversely, visual prompts excel in depicting novel objects through concrete visual examples, but fall short in conveying the abstract concept of objects as effectively as text prompts. Recognizing the complementary strengths and weaknesses of both text and visual prompts, we introduce T-Rex2 that synergizes both prompts within a single model through contrastive learning. T-Rex2 accepts inputs in diverse formats, including text prompts, visual prompts, and the combination of both, so that it can handle different scenarios by switching between the two prompt modalities. Comprehensive experiments demonstrate that T-Rex2 exhibits remarkable zero-shot object detection capabilities across a wide spectrum of scenarios. We show that text prompts and visual prompts can benefit from each other within the synergy, which is essential to cover massive and complicated real-world scenarios and pave the way towards generic object detection. Model API is now available at \url{https://github.com/IDEA-Research/T-Rex}.

Motivation & Objective

  • Address the limitations of existing open-set object detection methods that rely solely on text prompts, which struggle with rare or hard-to-describe objects due to data scarcity and linguistic ambiguity.
  • Overcome the shortcomings of visual prompts, which lack generalization to abstract object categories despite strong specificity for novel instances.
  • Develop a unified model that dynamically switches between text and visual prompts to handle diverse real-world detection scenarios.
  • Enable zero-shot detection for both common and long-tailed objects by leveraging complementary strengths of text and visual prompts.
  • Achieve high inference efficiency and interactivity through a late-fusion design that supports real-time user interaction with visual prompts.

Proposed method

  • Adopt an end-to-end DETR-based architecture with two parallel encoders: one for text prompts (using CLIP’s text encoder) and one for visual prompts (a novel deformable attention-based visual prompt encoder).
  • Introduce a contrastive learning module that explicitly aligns text and visual prompt embeddings, enabling mutual enhancement during training.
  • Support four inference workflows: text-only, visual-only, interactive visual prompt (via boxes/points on a single image), and hybrid text-visual prompt fusion.
  • Use late fusion to minimize inference cost—image features are extracted once via backbone and image encoder, while prompt encoders and decoder are run iteratively for user interactions.
  • Leverage diverse data engines: Bamboo dataset for diverse text categories and SA-1B for visual prompt generalization, with TAP for weak supervision.
  • Optimize the model using contrastive loss to align text and visual prompts, allowing visual prompts to inherit abstract generality and text prompts to gain concrete descriptive power.
Figure 2 : Long-tailed curve of object frequency and the number of categories that can be detected. We suggest that the text prompt can cover the middle part of the long-tailed curve, while the visual prompt can cover the tail.
Figure 2 : Long-tailed curve of object frequency and the number of categories that can be detected. We suggest that the text prompt can cover the middle part of the long-tailed curve, while the visual prompt can cover the tail.

Experimental results

Research questions

  • RQ1Can combining text and visual prompts through contrastive learning improve zero-shot generalization in open-set object detection?
  • RQ2How does the synergy between text and visual prompts affect performance on long-tailed object distributions, especially for rare or hard-to-describe objects?
  • RQ3To what extent can visual prompts enhance the descriptive capability of text prompts, and vice versa, in a unified model?
  • RQ4Does the hybrid prompt inference mode outperform single-modality approaches on benchmarks with diverse and long-tailed categories?
  • RQ5Can the model maintain real-time inference speed during interactive visual prompting while preserving high accuracy?

Key findings

  • T-Rex2 achieves 42.5 AP on COCO-Val and 41.7 $AP_{f}$ on LVIS-Val in zero-shot detection using combined text and visual prompts, outperforming both single-modality baselines.
  • On LVIS, the hybrid prompt mode improves $AP_{r}$ by 2.7 points and $AP_{f}$ by 1.5 points compared to text-only, demonstrating strong generalization on rare categories.
  • The visual prompt encoder enables real-time interaction with 33.33 FPS on Swin-T, making it suitable for applications like automatic image annotation.
  • Adding the Bamboo dataset boosts text prompt performance on LVIS by +3.8 AP, indicating that diverse category coverage enhances zero-shot generalization.
  • The SA-1B data engine improves visual prompt capability but slightly degrades generic performance, suggesting a need for better weak supervision in visual prompt learning.
  • Ablation shows that combining both prompt types leads to performance degradation on COCO (e.g., 45.8 AP for text-only vs. 42.5 for hybrid), indicating potential interference in common object scenarios.
Figure 3 : Overview of the T-Rex2 model. T-Rex2 mainly follows the design principles of DETR [ 1 ] which is an end-to-end object detection model. Visual prompt and text prompt are introduced through deformable cross attention [ 55 ] and CLIP [ 32 ] text encoder, respectively, and are aligned through
Figure 3 : Overview of the T-Rex2 model. T-Rex2 mainly follows the design principles of DETR [ 1 ] which is an end-to-end object detection model. Visual prompt and text prompt are introduced through deformable cross attention [ 55 ] and CLIP [ 32 ] text encoder, respectively, and are aligned through

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.