open-mmlab / mmdetection

OpenMMLab Detection Toolbox and Benchmark
https://mmdetection.readthedocs.io
Apache License 2.0
28.5k stars 9.28k forks source link

Any plan support RT-DETR? #10186

Open zugofn opened 1 year ago

zugofn commented 1 year ago

Describe the feature

Motivation There is a recent paper https://arxiv.org/abs/2304.08069 which is very helpful for Object Detection in DETR style. The proposed RT-DETR-L achieves 53.0% AP on COCO val2017 and 114 FPS on T4 GPU, while RT-DETR-X achieves 54.8% AP and 74 FPS, outperforming all YOLO detectors of the same scale in both speed and accuracy.

Related resources The official code release. https://github.com/PaddlePaddle/PaddleDetection/tree/develop/configs/rtdetr

Additional context Add any other context or screenshots about the feature request here. If you would like to implement the feature and create a PR, please leave a comment here and that would be much appreciated.

futurev commented 1 year ago

+1 for this

MINGtoMING commented 1 year ago

+1 for this

glenn-jocher commented 1 year ago

We've implemented RT-DETR now in ultralytics! Here's an example:

Install Ultralytics

pip install ultralytics

Predict with RT-DETR

from ultralytics import RTDETR

# Load the model
model = RTDETR("rtdetr-l.pt")

# Run inference
results = model.predict("https://ultralytics.com/images/bus.jpg")

For details see https://docs.ultralytics.com/models/rtdetr

MINGtoMING commented 1 year ago

@glenn-jocher Thanks, amazing speed, too curly!

MINGtoMING commented 1 year ago

@glenn-jocher Does it already support training, or does it currently support inference?

AyushExel commented 1 year ago

It supports prediction and validation currently. We'll work on supporting training soon

nijkah commented 1 year ago

https://github.com/open-mmlab/mmdetection/pull/10498 Stay tuned please 😄

op-newman commented 1 year ago

im waitingggggg

Zunon commented 1 year ago

@nijkah @hhaAndroid is there an ETA regarding this? I tried to clone the branch in which your pull request is merging, however when I try to run tools/test.py on the config and model, I get the following error:

Traceback (most recent call last):
  File "C:\<omitted>\mmrtdetr\tools\test.py", line 149, in <module>
    main()
  File "C:\<omitted>\mmrtdetr\tools\test.py", line 131, in main
    runner = Runner.from_cfg(cfg)
  File "C:\<omitted>\mmrtdetr\venv\lib\site-packages\mmengine\runner\runner.py", line 439, in from_cfg
    runner = cls(
  File "C:\<omitted>\mmrtdetr\venv\lib\site-packages\mmengine\runner\runner.py", line 406, in __init__
    self.model = self.build_model(model)
  File "C:\<omitted>\mmrtdetr\venv\lib\site-packages\mmengine\runner\runner.py", line 813, in build_model
    model = MODELS.build(model)
  File "C:\<omitted>\mmrtdetr\venv\lib\site-packages\mmengine\registry\registry.py", line 548, in build
    return self.build_func(cfg, *args, **kwargs, registry=self)
  File "C:\<omitted>\mmrtdetr\venv\lib\site-packages\mmengine\registry\build_functions.py", line 250, in build_model_from_cfg
    return build_from_cfg(cfg, registry, default_args)
  File "C:\<omitted>\mmrtdetr\venv\lib\site-packages\mmengine\registry\build_functions.py", line 100, in build_from_cfg
    raise KeyError(
KeyError: 'RTDETR is not in the model registry. Please check whether the value of `RTDETR` is correct or it was registered 
as expected. More details can be found at https://mmengine.readthedocs.io/en/latest/advanced_tutorials/config.html#import-the-custom-module'
nijkah commented 1 year ago

Hi @Zunon , did you run pip install -e . in the cloned branch? The model registry should work if you installed it correctly. I tested right now.

lyuwenyu commented 1 year ago

I provided a clean code version for RT-DETR that you can try if you are interested, including benchmark (tensorrt inference), rtdetr_paddle, rtdetr_pytorch.

For details see https://github.com/lyuwenyu/RT-DETR

lyuwenyu commented 10 months ago

Release pytorch rtdetr, try it in https://github.com/lyuwenyu/RT-DETR/tree/main/rtdetr_pytorch

op-newman commented 10 months ago

发布pytorch rtdetr,在https://github.com/lyuwenyu/RT-DETR/tree/main/rtdetr_pytorch中尝试一下

thank you! the next work is train in cocodataset.

HaoLiuHust commented 8 months ago

any progress?

dhddxdhd commented 7 months ago

mm系列会更新rt-detr吗,非常期待

GGD777 commented 1 month ago

嗨,你在克隆的分支中跑了吗?如果正确安装,模型注册表应该可以正常工作。我现在测试了。pip install -e . ![Uploading 736a474fce8350c6ef82ad52ea58305.png…]() Could you tell me how to register?