lyuwenyu / RT-DETR

[CVPR 2024] Official RT-DETR (RTDETR paddle pytorch), Real-Time DEtection TRansformer, DETRs Beat YOLOs on Real-time Object Detection. 🔥 🔥 🔥
Apache License 2.0
1.64k stars 178 forks source link

Timm integration #332

Open ramonhollands opened 2 weeks ago

ramonhollands commented 2 weeks ago

I have added an option to switch to Timm backbones, and added a configuration for 'mobilenetv3_small_050.lamb_in1k' and 'resnet18.fb_swsl_ig1b_ft_in1k'

See my fork/commit: https://github.com/ramonhollands/RT-DETR/commit/48d3cd5a262f0871bb2b87635d8c1e717e3dcc6e#diff-de84c8254886e48ab647c681d7a13014fea4e70df9d9e50fdecd22e559cdf027

Question: It trains on a simple dataset. But I doubt whether I have the most optimal connection between backbone and neck/head. What would you recommend? https://github.com/ramonhollands/RT-DETR/blob/main/rtdetr_pytorch/src/nn/backbone/timm.py

lyuwenyu commented 2 weeks ago

Question: It trains on a simple dataset. But I doubt whether I have the most optimal connection between backbone and neck/head. What would you recommend?

It looks good to me. ( you should known the channels of ouput features, and it is useful in neck initialization

@ramonhollands

ramonhollands commented 2 weeks ago

@lyuwenyu Ok thanks for having a look. Are you interested in a pull request to add this feature? Let me know and I will prepare one.

lyuwenyu commented 2 weeks ago

Yes, you can open a pr for this feature.