yasenh / libtorch-yolov5

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

.toTuple() Error occured #48

Open blackCmd opened 3 years ago

blackCmd commented 3 years ago

Load and predict is OK. But when I try .toTuple() Error occured. How to solve it?

Jelly123456 commented 2 years ago

I solved it by running the below command when exporting to "torchscript": python export.py --weights yolov5l.pt --device 0 --inplace

But when I export with the above command, there is some performance depreciation. It means that the objects which are detected with pytorch detection function are not detected with C++ libtorch for the same image.

I don't know why.

blackCmd commented 2 years ago

I solved it by running the below command when exporting to "torchscript": python export.py --weights yolov5l.pt --device 0 --inplace

But when I export with the above command, there is some performance depreciation. It means that the objects which are detected with pytorch detection function are not detected with C++ libtorch for the same image.

I don't know why.

Wow Thank you. I wondering about the performance depreciation problem too. Does anyone know what is the cause?