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
2.61k stars 303 forks source link

Timm integration #332

Open ramonhollands opened 5 months ago

ramonhollands commented 5 months 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 5 months 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 5 months 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 5 months ago

Yes, you can open a pr for this feature.