MCPcopy Index your code
hub / github.com/IDEA-Research/T-Rex

github.com/IDEA-Research/T-Rex @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
31 symbols 145 edges 10 files 11 documented · 35% updated 8mo ago★ 2,68314 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

T-Rex is an interactive object counting model that can first detect then count any objects through visual prompting

Static Badge arXiv preprint Static Badge Homepage Hits


What is T-Rex 🦖

  • T-Rex is an object counting model that can first detect then count any objects through visual prompting, which is highlighted by the following features:
  • Open-Set: T-Rex possess the capacity to count any object, without constraints on predefined categories.
  • Visual Promptable: Users can provide visual examples to specify the objects for counting.
  • Intuitive Visual Feedback: T-Rex is a detection-based model that allows for visual feedback (i.e. detected boxes), enabling users to assess the accuracy of the result.
  • Interactive: Users can actively participate in the counting process to rectify any errors.

How Does T-Rex Work ⚙️

  • T-Rex provides three major workflows for interactive object counting / detection.
  • Positive-only Prompt Mode: T-Rex can detect then count similar objects in an image with just a single click or box drawing. Additional visual prompts can be added for densely packed or small objects.
  • Positive with Negative Prompt Mode: To address false detections caused by similar objects, users can correct the outcome by applying negative prompts to the erroneously detected objects.
  • Cross Image Prompt Mode: This feature supports counting across different reference and target images, ideal for automatic annotation. Users prompt on one image, and T-Rex annotates the others automatically.

What Can T-Rex Do 📝

  • T-Rex can be applyed to various domains for counting including but not limited to Agriculture, Industry, Livestock, Biology, Medical, Retail, Electronic, Transportation, Logistics, Human, etc.
  • T-Rex can also serve as an open-set object detector, which can be applied for automatic annotaion. It process exponential zero-shot detection capability, and offers strong performance in dense and overlapping scenes.
  • We list some of the potential applications of T-Rex below:

Try Demo 🚀

  • Waiting for DDS

BibTeX 📚

Wating for technical report

Acknowledgement 🙏

  • We would like to thank the DeepDataSpace team for building the demo.

TODO List 📝

  • [ ] A more detailed version of paper
  • [ ] Release the code

Core symbols most depended-on inside this repo

visual_prompt_inference
called by 5
trex/model_wrapper.py
encode_image
called by 3
trex/model_wrapper.py
visualize
called by 3
trex/visualize.py
parse_visual_prompt
called by 2
gradio_demo.py
parse_require_file
called by 2
setup.py
call_api
called by 2
trex/model_wrapper.py
postprocess
called by 2
trex/model_wrapper.py
arg_parse
called by 1
gradio_demo.py

Shape

Function 23
Method 7
Class 1

Languages

Python100%

Modules by API surface

gradio_demo.py12 symbols
trex/model_wrapper.py9 symbols
setup.py5 symbols
trex/visualize.py1 symbols
demo_examples/interactive_inference.py1 symbols
demo_examples/generic_inference.py1 symbols
demo_examples/embedding_inference.py1 symbols
demo_examples/customize_embedding.py1 symbols

For agents

$ claude mcp add T-Rex \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact