onnx / tutorials

Tutorials for creating and using ONNX models
Apache License 2.0
3.34k stars 626 forks source link

How to convert a pth file (Pointpillars) to onnx format? #289

Open aatefi2 opened 3 months ago

aatefi2 commented 3 months ago

Hi,

I used Pointpillars for 3D object detection on my own dataset (just pointcloud data) using Pytorch (https://github.com/shangjie-li/pointpillars/blob/master/pointpillar.py). The format of the trained model is *.pth. I need to convert the trained model to *.onnx format. I know I should define a model and a dummy tensor/input in this regard. I think the model should be defined based on the link above, but honestly I am not sure how to determine these parameters (model and dummy tensor). Is there any example for converting the Pointpillars pth file to onnx format?

I appreciate any help in advance.

Thank you, Abbas