Yolov5 NCNN have low performance compared to python model.

hxzsmxv2  于 4个月前  发布在  Python
关注(0)|答案(2)|浏览(73)

Hi @nihui ,

Thank you for your efforts.

I tried Yolov5 NCNN model (using c++ https://github.com/Tencent/ncnn/blob/master/examples/yolov5.cpp ) and found the inference is slow compared to python model. On further analysis found that the output extraction step takes majority of the inference time.

ex.extract("output", out); - takes an average of 72.5666 millisecond out of total Inference time is 98.093 millisecond. Please advise what steps can be done to reduce the time. Thanks.

but5z9lq

but5z9lq1#

Python inference log

Speed: 1.0ms pre-process, 14.0ms inference, 5.0ms NMS per image at shape (1, 3, 1280, 1280)

From above log, we can see that the inference time is 14 milliseconds for the same model and input.

x7rlezfr

x7rlezfr2#

OS - Windows 10
GPU - 2080 Ti
Vulkan - VulkanSDK-1.2.189.2

相关问题