CascadeTabNet icon indicating copy to clipboard operation
CascadeTabNet copied to clipboard

do you have the script that convert you pytorch model to onnx

Open phamquiluan opened this issue 4 years ago • 9 comments

do you have the script that convert you pytorch model to onnx

phamquiluan avatar Dec 18 '20 09:12 phamquiluan

No, We haven't worked on that. But you can refer to this link for converting the pytorch model to onnx

ManishDV avatar Dec 19 '20 04:12 ManishDV

@phamquiluan maybe this helps -- https://gist.github.com/pbamotra/d48b2940d84a214475dff9be6b5dab8c

pbamotra avatar Apr 25 '21 01:04 pbamotra

Hey @pbamotra can you tell me about inference script? i have converted onnx from your gist.

kbrajwani avatar Apr 30 '21 10:04 kbrajwani

@kbrajwani please refer to https://github.com/open-mmlab/mmdetection/blob/v2.10.0/tools/deployment/pytorch2onnx.py

pbamotra avatar Apr 30 '21 16:04 pbamotra

I have already converted pytorch to onnx. But don't know how to inference from it.

kbrajwani avatar Apr 30 '21 16:04 kbrajwani

Check out the verification part in that script -- https://github.com/open-mmlab/mmdetection/blob/bec24ea4ff55767256ac873c4b2e856d3f1dba1e/tools/deployment/pytorch2onnx.py#L72

Line 72 onwards where the authors compare the outputs of pytorch model and onnx model

pbamotra avatar Apr 30 '21 16:04 pbamotra

Thanks i will look into it.

kbrajwani avatar Apr 30 '21 16:04 kbrajwani

Hey i have converted model and testing it with api and threads. It's taking much memory at every inference time. Might be onnx model stores computation in cache. Has anyone encounter and solve the same problem?

kbrajwani avatar May 19 '21 06:05 kbrajwani

Hi @kbrajwani Just wondering if you were successful in converting the model to onnx and using it in inference mode. I have run into multiple issues. I see many warnings but no errors but I cannot visualise the generated model. Are you please able to share some script/links for conversion and inference? thanks!

shubhasrao avatar Jun 09 '22 02:06 shubhasrao

Bai!

phamquiluan avatar Sep 01 '23 03:09 phamquiluan