T-Rex2: Towards Generic Object Detection via Text-Visual Prompt Synergy

Qing Jiang, Feng Li, Zhaoyang Zeng, Tianhe Ren, Shilong Liu +1 more
2/14/2026

No official code found. Best implementation: IDEA-Research/T-Rex (2,683 stars, last commit 2025-10-15). 1 more below.

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}.

View on arXivView PDF

Code Implementations(2)

IDEA-Research/T-RexCommunity100%

[ECCV2024] API code for T-Rex2: Towards Generic Object Detection via Text-Visual Prompt Synergy

2,683171PythonNov 11, 20231 years agoNOASSERTION
interactiveobject-countingobject-detectionopen-settext-prompt+1 more
MIT

T-Rex2: Towards Generic Object Detection via Text-Visual Prompt Synergy

295C++, CudaFeb 6, 20251 years agoMIT
object-detectionvisual-prompt

Similar Papers

Cite this paper

@article{jiang2026trex,
  title  = {T-Rex2: Towards Generic Object Detection via Text-Visual Prompt Synergy},
  author = {Qing Jiang and Feng Li and Zhaoyang Zeng and Tianhe Ren and Shilong Liu and Lei Zhang},
  year   = {2026},
  eprint = {2403.14610},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2403.14610},
  journal = {ECCV 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2403.14610.svg)](https://codeofpaper.com/paper/2403.14610)

Discussion