Closed mheriyanto closed 3 years ago
Hi @mheriyanto, so my env is PyTorch 1.5.1, and I can export the model with onnx 1.7.0 (but I didn't test it with onnxruntime). Anyway for this project, you only need the TorchScript version of model, could you give a try with PyTorch 1.5.1? And meanwhile I can test with PyTorch 1.6.0 as well.
Hello @yasenh , I exported the TorchScript version of model using PyTorch 1.6.0 but model can't be used like before. So yesterday, I exported the TorchScript version of model using torch 1.5.1, torchvision 0.6.1 and onnx 1.7.0, I got yolov5s.torchscript.pt and yolov5s.onnx but there is warning about CoreML like this:
When I use weight (yolov5s.torchscript.pt) to run inference, I got these (on CPU):
on GPU:
@mheriyanto whats your libtorch version?
@yasenh LibTorch 1.4.0, OpenCV 4.2.0, CUDA 10.1, and Ubuntu 18.04.
@mheriyanto Could you try LibTorch 1.5.1? wget https://download.pytorch.org/libtorch/cu101/libtorch-cxx11-abi-shared-with-deps-1.5.1%2Bcu101.zip
@yasenh I tried LibTorch 1.5.1 with CUDA 10.1 and it worked for me. Thank you.
I installed Python>=3.8 and PyTorch>=1.6 and also ONNX>=1.7. I used export.py with your suggestion here: https://github.com/yasenh/libtorch-yolov5#torchscript-model-export
and I got these results, just got yolov5s.torchscript.pt, I didn't get yolov5s.onnx:
When I use weight (yolov5s.torchscript.pt) to run inference, I got these:
Is there any advice? Thank you.