yasenh / libtorch-yolov5

A LibTorch inference implementation of the yolov5
MIT License
372 stars 114 forks source link

how to speed up the post-process? #53

Open Ivan-VV opened 2 years ago

Ivan-VV commented 2 years ago

Thx for your great work! I found the speed of post-process is too slow, and the bottleneck is torch::masked_select() function ,as the picture shows. 1 And then I set the environment variable CUDA_LAUNCH_BLOCKING=1 as #3, I found the speed of inference is too slow. 2 So would you like to give me any advice about solving this problem? Thank you very much!

lvdonghan5 commented 2 years ago

The problem also troubles me.The post-processing part takes a lot of time only using CPU instead of GPU.