MhLiao / DB

A PyTorch implementation of "Real-time Scene Text Detection with Differentiable Binarization".
2.1k stars 479 forks source link

How to convert pytroch to ONNX #243

Open tranducanhbk opened 3 years ago

tranducanhbk commented 3 years ago

@MhLiao Could you add code for converting Pytorch to ONNX file. Many thank

lbdalmendray commented 3 years ago

I need to know how to convert a trained model based on totaltext_resnet50 model to Onnx. My pytorch version : 1.8.0+cu111 . The exception message I received : ONNX export failed: Couldn't export Python operator Scatter Defined at: C:\Program Files (x86)\Microsoft Visual Studio\Shared ....

I was trying using the following links: https://deci.ai/resources/blog/how-to-convert-a-pytorch-model-to-onnx/ https://michhar.github.io/convert-pytorch-onnx/

I would prefer python code that solves this problem. Thanks.

lbdalmendray commented 3 years ago

Hi @tranducanhbk , Did you find the way to convert to Onnx ? I would appreciate any suggestions.