MCPcopy
hub / github.com/lyuwenyu/RT-DETR

github.com/lyuwenyu/RT-DETR @v1.0 sqlite

repository ↗ · DeepWiki ↗ · release v1.0 ↗
1,887 symbols 4,918 edges 166 files 399 documented · 21%
README

English | 简体中文

RT-DETR: DETRs Beat YOLOs on Real-time Object Detection

<a href="https://github.com/lyuwenyu/RT-DETR/blob/main/LICENSE">
    <img alt="license" src="https://img.shields.io/github/license/lyuwenyu/RT-DETR">
</a>
<a href="https://github.com/lyuwenyu/RT-DETR/pulls">
    <img alt="prs" src="https://img.shields.io/github/issues-pr/lyuwenyu/RT-DETR">
</a>
<a href="https://github.com/lyuwenyu/RT-DETR/issues">
    <img alt="issues" src="https://img.shields.io/github/issues/lyuwenyu/RT-DETR?color=pink">
</a>
<a href="https://github.com/lyuwenyu/RT-DETR">
    <img alt="issues" src="https://img.shields.io/github/stars/lyuwenyu/RT-DETR">
</a>
<a href="https://arxiv.org/abs/2304.08069">
    <img alt="arXiv" src="https://img.shields.io/badge/arXiv-2304.08069-red">
</a>
<a href="mailto: lyuwenyu@foxmail.com">
    <img alt="emal" src="https://img.shields.io/badge/contact_me-email-yellow">
</a>

This is the official implementation of the paper "DETRs Beat YOLOs on Real-time Object Detection".

🚀 Updates

  • [2024.02.27] Our work has been accepted to CVPR 2024!
  • [2024.01.23] Fix difference on data augmentation with paper in rtdetr_pytorch #84.
  • [2023.11.07] Add pytorch ✅ rtdetr_r34vd for requests #107, #114.
  • [2023.11.05] Upgrade the logic of remap_mscoco_category to facilitate training of custom datasets, see detils in Train custom data part. #81.
  • [2023.10.23] Add discussion for deployments, supported onnxruntime, TensorRT, openVINO.
  • [2023.10.12] Add tuning code for pytorch version, now you can tuning rtdetr based on pretrained weights.
  • [2023.09.19] Upload ✅ pytorch weights convert from paddle version.
  • [2023.08.24] Release RT-DETR-R18 pretrained models on objects365. 49.2 mAP and 217 FPS.
  • [2023.08.22] Upload ✅ rtdetr_pytorch source code. Please enjoy it!
  • [2023.08.15] Release RT-DETR-R101 pretrained models on objects365. 56.2 mAP and 74 FPS.
  • [2023.07.30] Release RT-DETR-R50 pretrained models on objects365. 55.3 mAP and 108 FPS.
  • [2023.07.28] Fix some bugs, and add some comments. 1, 2.
  • [2023.07.13] Upload ✅ training logs on coco.
  • [2023.05.17] Release RT-DETR-R18, RT-DETR-R34, RT-DETR-R50-m(example for scaled).
  • [2023.04.17] Release RT-DETR-R50, RT-DETR-R101, RT-DETR-L, RT-DETR-X.

📍 Implementations

Model Epoch Input shape Dataset $AP^{val}$ $AP^{val}_{50}$ Params(M) FLOPs(G) T4 TensorRT FP16(FPS)
RT-DETR-R18 6x 640 COCO 46.5 63.8 20 60 217
RT-DETR-R34 6x 640 COCO 48.9 66.8 31 92 161
RT-DETR-R50-m 6x 640 COCO 51.3 69.6 36 100 145
RT-DETR-R50 6x 640 COCO 53.1 71.3 42 136 108
RT-DETR-R101 6x 640 COCO 54.3 72.7 76 259 74
RT-DETR-HGNetv2-L 6x 640 COCO 53.0 71.6 32 110 114
RT-DETR-HGNetv2-X 6x 640 COCO 54.8 73.1 67 234 74
RT-DETR-R18 5x 640 COCO + Objects365 49.2 66.6 20 60 217
RT-DETR-R50 2x 640 COCO + Objects365 55.3 73.4 42 136 108
RT-DETR-R101 2x 640 COCO + Objects365 56.2 74.6 76 259 74

Notes: - COCO + Objects365 in the table means finetuned model on COCO using pretrained weights trained on Objects365.

💡 Introduction

We propose a Real-Time DEtection TRansformer (RT-DETR, aka RTDETR), the first real-time end-to-end object detector to our best knowledge. Our RT-DETR-R50 / R101 achieves 53.1% / 54.3% AP on COCO and 108 / 74 FPS on T4 GPU, outperforming previously advanced YOLOs in both speed and accuracy. Furthermore, RT-DETR-R50 outperforms DINO-R50 by 2.2% AP in accuracy and about 21 times in FPS. After pre-training with Objects365, RT-DETR-R50 / R101 achieves 55.3% / 56.2% AP.

🦄 Performance

🏕️ Complex Scenarios

🌋 Difficult Conditions

Citation

If you use RT-DETR in your work, please use the following BibTeX entries:

@misc{lv2023detrs,
      title={DETRs Beat YOLOs on Real-time Object Detection},
      author={Yian Zhao and Wenyu Lv and Shangliang Xu and Jinman Wei and Guanzhong Wang and Qingqing Dang and Yi Liu and Jie Chen},
      year={2023},
      eprint={2304.08069},
      archivePrefix={arXiv},
      primaryClass={cs.CV}
}

Core symbols most depended-on inside this repo

get
called by 98
rtdetr_paddle/ppdet/utils/stats.py
print
called by 98
rtdetr_pytorch/src/misc/dist.py
copy
called by 35
rtdetr_paddle/ppdet/core/workspace.py
update
called by 30
rtdetr_paddle/ppdet/optimizer/ema.py
printEntry
called by 29
rtdetr_paddle/ppdet/metrics/mot_metrics.py
linear_init_
called by 28
rtdetr_paddle/ppdet/modeling/initializer.py
setup_logger
called by 28
rtdetr_paddle/ppdet/utils/logger.py
max
called by 26
rtdetr_paddle/ppdet/utils/stats.py

Shape

Method 1,168
Function 390
Class 327
Route 2

Languages

Python100%

Modules by API surface

rtdetr_paddle/ppdet/data/transform/operators.py213 symbols
rtdetr_paddle/ppdet/modeling/layers.py72 symbols
rtdetr_paddle/ppdet/metrics/mot_metrics.py44 symbols
rtdetr_paddle/ppdet/engine/callbacks.py42 symbols
rtdetr_paddle/ppdet/modeling/backbones/vit_mae.py37 symbols
rtdetr_paddle/ppdet/metrics/metrics.py36 symbols
rtdetr_paddle/ppdet/data/source/dataset.py32 symbols
rtdetr_paddle/ppdet/modeling/backbones/vision_transformer.py30 symbols
rtdetr_paddle/ppdet/metrics/mcmot_metrics.py30 symbols
rtdetr_paddle/ppdet/modeling/backbones/trans_encoder.py29 symbols
rtdetr_paddle/ppdet/modeling/transformers/deformable_transformer.py28 symbols
rtdetr_paddle/ppdet/modeling/heads/detr_head.py28 symbols

Dependencies from manifests, versioned

onnx1.14.0 · 1×
onnxruntime1.15.1 · 1×
opencv-python4.6.0 · 1×
paddlepaddle-gpu2.4.2 · 1×
torch2.0.1 · 1×
torchvision0.15.2 · 1×
visualdl2.2.0 · 1×

For agents

$ claude mcp add RT-DETR \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact