RT-DETR icon indicating copy to clipboard operation
RT-DETR copied to clipboard

How does the pytorch version test GFLOPs and FPS, author

Open 2308700388 opened this issue 1 year ago • 7 comments

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.

2308700388 avatar Aug 01 '24 11:08 2308700388

You can use torch.profiler

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

lyuwenyu avatar Aug 02 '24 02:08 lyuwenyu

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 avatar Aug 02 '24 05:08 2308700388

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

2308700388 avatar Aug 02 '24 06:08 2308700388

  1. RTDETR-R18 has 60 FLOPs
  2. only need once forward pass

lyuwenyu avatar Aug 02 '24 06:08 lyuwenyu

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

20231211 avatar Aug 02 '24 09:08 20231211

见主页文档 @20231211 image

lyuwenyu avatar Aug 02 '24 09:08 lyuwenyu

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.

syl07061 avatar Aug 06 '24 16:08 syl07061

你好,我之前得到的结果是图片大小为512512的,用640640的和原作者的是一致的

---Original--- From: @.> Date: Wed, Nov 6, 2024 20:31 PM To: @.>; Cc: @.@.>; Subject: Re: [lyuwenyu/RT-DETR] How does the pytorch version test GFLOPs andFPS, author (Issue #401)

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.

Do you have the answer yet, I got almost 68 GFlops as well

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

20231211 avatar Nov 06 '24 12:11 20231211

不是不是😂是我搞错了,我记得我当时是用的训练图片大小不一样所以FLOPS才和官方文档里不一样,但是我一开始没发现,之后用和官方一样大小的图就是一致的

---Original--- From: @.> Date: Wed, Nov 6, 2024 20:41 PM To: @.>; Cc: @.@.>; Subject: Re: [lyuwenyu/RT-DETR] How does the pytorch version test GFLOPs andFPS, author (Issue #401)

你好,我之前得到的结果是图片大小为512512的,用640640的和原作者的是一致的 … ---Original--- From: @.> Date: Wed, Nov 6, 2024 20:31 PM To: @.>; Cc: @.@.>; Subject: Re: [lyuwenyu/RT-DETR] How does the pytorch version test GFLOPs andFPS, author (Issue #401) 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. Do you have the answer yet, I got almost 68 GFlops as well — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

您好,您的意思是作者原来搞错了吗?68GFLOPs是512*512的?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

20231211 avatar Nov 06 '24 12:11 20231211

不好意思,我不太清楚,我用的是pytorch

---Original--- From: @.> Date: Wed, Nov 6, 2024 20:51 PM To: @.>; Cc: @.@.>; Subject: Re: [lyuwenyu/RT-DETR] How does the pytorch version test GFLOPs andFPS, author (Issue #401)

不是不是😂是我搞错了,我记得我当时是用的训练图片大小不一样所以FLOPS才和官方文档里不一样,但是我一开始没发现,之后用和官方一样大小的图就是一致的 … ---Original--- From: @.> Date: Wed, Nov 6, 2024 20:41 PM To: @.>; Cc: @.@.>; Subject: Re: [lyuwenyu/RT-DETR] How does the pytorch version test GFLOPs andFPS, author (Issue #401) 你好,我之前得到的结果是图片大小为512512的,用640640的和原作者的是一致的 … ---Original--- From: @.> Date: Wed, Nov 6, 2024 20:31 PM To: @.>; Cc: @.@.>; Subject: Re: [lyuwenyu/RT-DETR] How does the pytorch version test GFLOPs andFPS, author (Issue #401) 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. Do you have the answer yet, I got almost 68 GFlops as well — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.> 您好,您的意思是作者原来搞错了吗?68GFLOPs是512512的? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.*>

您好,我跑的最初的paddle 代码RTDETR r50,测出68GFLOPS,为啥现在是一百多呀,你知道吗

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

20231211 avatar Nov 06 '24 12:11 20231211