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.23k stars 246 forks source link

How does the pytorch version test GFLOPs and FPS, author #401

Open 2308700388 opened 1 month ago

2308700388 commented 1 month ago

Star RTDETR 请先在RTDETR主页点击star以支持本项目 Star RTDETR to help more people discover this project.


Describe the bug A clear and concise description of what the bug is. If applicable, add screenshots to help explain your problem.

To Reproduce Steps to reproduce the behavior.

lyuwenyu commented 1 month ago

You can use torch.profiler

https://pytorch.org/tutorials/recipes/recipes/profiler_recipe.html

2308700388 commented 1 month ago

Hello author, I understand what you mean, but I used the model variable in the model to test the model of the model on the 3090 device, the input is (1,13,640,640), and the gflops of the test R18RTDETR is 30, I don't know if this is probably correct or not

2308700388 commented 1 month ago

I just don't know how long it takes to calculate FPS and GFLIPs in RTDETR plus post-processing process

lyuwenyu commented 1 month ago
  1. RTDETR-R18 has 60 FLOPs
  2. only need once forward pass
20231211 commented 1 month ago

@lyuwenyu 请问RTDETR-R50的FLOPs是88G吗

lyuwenyu commented 1 month ago

见主页文档 @20231211

image
syl07061 commented 1 month ago

Dear Author,

I downloaded the rtdetr_r50vd model you provided to calculate the GFLOPs with an input of (1, 3, 640, 640). The result I obtained was only 69 GFLOPs, which is significantly different from the 108 GFLOPs mentioned on your homepage. Why is there such a discrepancy? What was the input data size used in your tests? I look forward to your response.