Lite-HRNet icon indicating copy to clipboard operation
Lite-HRNet copied to clipboard

some test about the inference time

Open ccsvd opened this issue 3 years ago • 5 comments

hi, @ycszen , i test the native-hrnet and lite-hrnet mnn model on my pc, although theirs flops is 309M vs 203M,but their inference time is almost the same. i thank is the reason lite-hrnet has more memory read or write than native-hrnet when inference. is that right? here is some info: parameters infer memory(MB) MAdd Flops MemRead(B) MemWrite(B) duration native-hrnet: 未命名1618905887 lite-hrnet : 未命名1618905982

ccsvd avatar Apr 20 '21 08:04 ccsvd

@ccsvd Hi,

  1. From the info you provided, the Flops, MemRead(B) and MemWrite(B) of native-hrnet are all larger than lite-hrnet, but you said "lite-hrnet has more memory read or write than native-hrnet when inference". Is there some mistake?
  2. the inference time of lite-hrnet is almost 2.5 times than native-hrnet, but you said "their inference time is almost the same". Is there some mistake?

YaqiLYU avatar Apr 21 '21 08:04 YaqiLYU

I did similar experments. The conclusion is consistent.

I use onnxruntime to profile exported two onnx files on rtx3090. Inference code is exactly the same except for the onnx files to be tested.

for hrnet_w32_384x288, avg infer time is 11.7ms for lite_hrnet_30_384x288, avg infer time is 35.3ms

clover978 avatar Apr 25 '21 03:04 clover978

Hi @clover978, @ccsvd Could you give me file to inference an input image. I am not familiar with mmpose so I don't know how to use. Thanks!

tucachmo2202 avatar Apr 26 '21 17:04 tucachmo2202

so why lite-hrnet cost more time than hrnet? then why we need lite-hrnet? @clover978

fire717 avatar Jul 14 '21 08:07 fire717

so why lite-hrnet cost more time than hrnet? then why we need lite-hrnet? @clover978

Maybe lite-hrnet result in better efficiency on specific hardware (e.g. CPU, FPGA),since it does have smaller FLOPS in theory.

clover978 avatar Jul 14 '21 09:07 clover978