Back to rankings

IDEA-Research/detrex

Pythondetrex.readthedocs.io/en/latest/

detrex is a research platform for DETR-based object detection, segmentation, pose estimation and other visual recognition tasks.

detrobject-detectionpytorchdinostate-of-the-artdab-detrdeformable-detrconditional-detrdn-detrgroup-detrh-detrmask-dino
Star Growth
Stars
2.3k
Forks
248
Weekly Growth
Issues
79
5001k1.5k2k
Sep 2022Dec 2023Apr 2025Jul 2026
ArtifactsPyPIpip install detrex
README

🦖detrex: Benchmarking Detection Transformers

release docs Documentation Status GitHub PRs Welcome open issues

Introduction

detrex is an open-source toolbox that provides state-of-the-art Transformer-based detection algorithms. It is built on top of Detectron2 and its module design is partially borrowed from MMDetection and DETR. Many thanks for their nicely organized code. The main branch works with Pytorch 1.10+ or higher (we recommend Pytorch 1.12).

Major Features
  • Modular Design. detrex decomposes the Transformer-based detection framework into various components which help users easily build their own customized models.

  • Strong Baselines. detrex provides a series of strong baselines for Transformer-based detection models. We have further boosted the model performance from 0.2 AP to 1.1 AP through optimizing hyper-parameters among most of the supported algorithms.

  • Easy to Use. detrex is designed to be light-weight and easy for users to use:

Apart from detrex, we also released a repo Awesome Detection Transformer to present papers about Transformer for detection and segmentation.

Fun Facts

The repo name detrex has several interpretations:

  • detr-ex : We take our hats off to DETR and regard this repo as an extension of Transformer-based detection algorithms.

  • det-rex : rex literally means 'king' in Latin. We hope this repo can help advance the state of the art on object detection by providing the best Transformer-based detection algorithms from the research community.

  • de-t.rex : de means 'the' in Dutch. T.rex, also called Tyrannosaurus Rex, means 'king of the tyrant lizards' and connects to our research work 'DINO', which is short for Dinosaur.

What's New

v0.5.0 was released on 16/07/2023:

Please see changelog.md for details and release history.

Installation

Please refer to Installation Instructions for the details of installation.

Getting Started

Please refer to Getting Started with detrex for the basic usage of detrex. We also provides other tutorials for:

Although some of the tutorials are currently presented with relatively simple content, we will constantly improve our documentation to help users achieve a better user experience.

Documentation

Please see documentation for full API documentation and tutorials.

Model Zoo

Results and models are available in model zoo.

Supported methods

Please see projects for the details about projects that are built based on detrex.

License

This project is released under the Apache 2.0 license.

Acknowledgement

  • detrex is an open-source toolbox for Transformer-based detection algorithms created by researchers of IDEACVR. We appreciate all contributions to detrex!
  • detrex is built based on Detectron2 and part of its module design is borrowed from MMDetection, DETR, and Deformable-DETR.

Citation

If you use this toolbox in your research or wish to refer to the baseline results published here, please use the following BibTeX entries:

  • Citing detrex:
@misc{ren2023detrex,
      title={detrex: Benchmarking Detection Transformers}, 
      author={Tianhe Ren and Shilong Liu and Feng Li and Hao Zhang and Ailing Zeng and Jie Yang and Xingyu Liao and Ding Jia and Hongyang Li and He Cao and Jianan Wang and Zhaoyang Zeng and Xianbiao Qi and Yuhui Yuan and Jianwei Yang and Lei Zhang},
      year={2023},
      eprint={2306.07265},
      archivePrefix={arXiv},
      primaryClass={cs.CV}
}
Citing Supported Algorithms
@inproceedings{carion2020end,
  title={End-to-end object detection with transformers},
  author={Carion, Nicolas and Massa, Francisco and Synnaeve, Gabriel and Usunier, Nicolas and Kirillov, Alexander and Zagoruyko, Sergey},
  booktitle={European conference on computer vision},
  pages={213--229},
  year={2020},
  organization={Springer}
}

@inproceedings{
  zhu2021deformable,
  title={Deformable {\{}DETR{\}}: Deformable Transformers for End-to-End Object Detection},
  author={Xizhou Zhu and Weijie Su and Lewei Lu and Bin Li and Xiaogang Wang and Jifeng Dai},
  booktitle={International Conference on Learning Representations},
  year={2021},
  url={https://openreview.net/forum?id=gZ9hCDWe6ke}
}

@inproceedings{meng2021-CondDETR,
  title       = {Conditional DETR for Fast Training Convergence},
  author      = {Meng, Depu and Chen, Xiaokang and Fan, Zejia and Zeng, Gang and Li, Houqiang and Yuan, Yuhui and Sun, Lei and Wang, Jingdong},
  booktitle   = {Proceedings of the IEEE International Conference on Computer Vision (ICCV)},
  year        = {2021}
}

@inproceedings{
  liu2022dabdetr,
  title={{DAB}-{DETR}: Dynamic Anchor Boxes are Better Queries for {DETR}},
  author={Shilong Liu and Feng Li and Hao Zhang and Xiao Yang and Xianbiao Qi and Hang Su and Jun Zhu and Lei Zhang},
  booktitle={International Conference on Learning Representations},
  year={2022},
  url={https://openreview.net/forum?id=oMI9PjOb9Jl}
}

@inproceedings{li2022dn,
  title={Dn-detr: Accelerate detr training by introducing query denoising},
  author={Li, Feng and Zhang, Hao and Liu, Shilong and Guo, Jian and Ni, Lionel M and Zhang, Lei},
  booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  pages={13619--13627},
  year={2022}
}

@inproceedings{
  zhang2023dino,
  title={{DINO}: {DETR} with Improved DeNoising Anchor Boxes for End-to-End Object Detection},
  author={Hao Zhang and Feng Li and Shilong Liu and Lei Zhang and Hang Su and Jun Zhu and Lionel Ni and Heung-Yeung Shum},
  booktitle={The Eleventh International Conference on Learning Representations },
  year={2023},
  url={https://openreview.net/forum?id=3mRwyG5one}
}

@InProceedings{Chen_2023_ICCV,
  author    = {Chen, Qiang and Chen, Xiaokang and Wang, Jian and Zhang, Shan and Yao, Kun and Feng, Haocheng and Han, Junyu and Ding, Errui and Zeng, Gang and Wang, Jingdong},
  title     = {Group DETR: Fast DETR Training with Group-Wise One-to-Many Assignment},
  booktitle = {Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV)},
  month     = {October},
  year      = {2023},
  pages     = {6633-6642}
}

@InProceedings{Jia_2023_CVPR,
  author    = {Jia, Ding and Yuan, Yuhui and He, Haodi and Wu, Xiaopei and Yu, Haojun and Lin, Weihong and Sun, Lei and Zhang, Chao and Hu, Han},
  title     = {DETRs With Hybrid Matching},
  booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
  month     = {June},
  year      = {2023},
  pages     = {19702-19712}
}

@InProceedings{Li_2023_CVPR,
  author    = {Li, Feng and Zhang, Hao and Xu, Huaizhe and Liu, Shilong and Zhang, Lei and Ni, Lionel M. and Shum, Heung-Yeung},
  title     = {Mask DINO: Towards a Unified Transformer-Based Framework for Object Detection and Segmentation},
  booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
  month     = {June},
  year      = {2023},
  pages     = {3041-3050}
}

@article{yan2023bridging,
  title={Bridging the Gap Between End-to-end and Non-End-to-end Multi-Object Tracking},
  author={Yan, Feng and Luo, Weixin and Zhong, Yujie and Gan, Yiyang and Ma, Lin},
  journal={arXiv preprint arXiv:2305.12724},
  year={2023}
}

@InProceedings{Chen_2023_CVPR,
  author    = {Chen, Fangyi and Zhang, Han and Hu, Kai and Huang, Yu-Kai and Zhu, Chenchen and Savvides, Marios},
  title     = {Enhanced Training of Query-Based Object Detection via Selective Query Recollection},
  booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
  month     = {June},
  year      = {2023},
  pages     = {23756-23765}
}
Related repositories
open-mmlab/mmdetection

OpenMMLab Detection Toolbox and Benchmark

PythonPyPIApache License 2.0object-detectioninstance-segmentation
mmdetection.readthedocs.io
32.8k9.8k
PaddlePaddle/PaddleDetection

Object Detection toolkit based on PaddlePaddle. It supports object detection, instance segmentation, multiple object tracking and real-time multi-person keypoint detection.

PythonPyPIApache License 2.0object-detectioninstance-segmentation
14.3k3k
roboflow/rf-detr

RF-DETR is a real-time object detection and segmentation model architecture developed by Roboflow, SOTA on COCO, designed for fine-tuning. [ICLR 2026]

PythonPyPIApache License 2.0computer-visiondetr
rfdetr.roboflow.com
8.6k1.1k
wang-xinyu/tensorrtx

Implementation of popular deep learning networks with TensorRT network definition API

C++MIT Licensetensorrtmnasnet
7.8k1.9k
cmhungsteve/Awesome-Transformer-Attention

An ultimately comprehensive paper list of Vision Transformer/Attention, including papers, codes, and related websites

transformerattention-mechanism
5k497
dk-liang/Awesome-Visual-Transformer

Collect some papers about transformer with vision. Awesome Transformer with Computer Vision (CV)

transformer-cvtransformer
3.6k404
Peterande/D-FINE

D-FINE: Redefine Regression Task of DETRs as Fine-grained Distribution Refinement [ICLR 2025 Spotlight]

PythonPyPIApache License 2.0detrobject-detection
3.2k315
lucasjinreal/yolov7_d2

🔥🔥🔥🔥 (Earlier YOLOv7 not official one) YOLO with Transformers and Instance Segmentation, with TensorRT acceleration! 🔥🔥🔥

PythonPyPIGNU General Public License v3.0yoloyolox
3.1k470
Intellindust-AI-Lab/DEIM

[CVPR 2025] DEIM: DETR with Improved Matching for Fast Convergence

PythonPyPIOtherdetrmal
shihuahuang.cn/DEIM/
1.6k200
Yangzhangcst/Transformer-in-Computer-Vision

A paper list of some recent Transformer-based CV works.

transformertransformer-cv
1.5k155