Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for onnx and onnx-tf #216

Open
gotoorder opened this issue Feb 5, 2020 · 12 comments
Open

Support for onnx and onnx-tf #216

gotoorder opened this issue Feb 5, 2020 · 12 comments
Labels

Comments

@gotoorder
Copy link

I need convert models from ONNX to Tensorflow. But I cannot find onnx packages. pls add it , thanks!

@mhsmith
Copy link
Member

mhsmith commented Feb 6, 2020

Thanks for the request. This package contains native components, so it would have to be built into a wheel file. If you'd like to try doing this yourself, follow the instructions here. And if you're successful, please make a pull request so we can add the package to the public repository.

If anyone else wants this package too, let us know by clicking the thumbs-up button above.

@liuwenhua6666
Copy link

now I cannot find onnxruntime packages

@mhsmith
Copy link
Member

mhsmith commented Jun 10, 2022

If you have an existing onnx model you want to use with Chaquopy, you can try the following:

  • Use a different machine to convert the model to TensorFlow Lite format, or another TensorFlow format if necessary, Please search elsewhere for details on this.
  • Then run the model on Chaquopy with the tflite-runtime or tensorflow packages.

@istvmunkacsi
Copy link

Is support for onnx planned in near future?

@mhsmith
Copy link
Member

mhsmith commented Jul 6, 2022

Not in the near future, sorry. But you can always try building it yourself as mentioned above.

@BentiGorlich
Copy link

I have been trying to build the onnxruntime for days now, but I am getting nowhere. Their build script is aparently able to output wheel files, but I just can't get it to work. Is somebody here that is able to do that? I am not at all familiar with C and C++ build scripts and compilers, etc...

@bouchnam
Copy link

bouchnam commented Jul 9, 2024

Hello,
I am wondering if there have been any updates regarding the support for ONNX/ONNXRuntime in Chaquopy. Our current project requires the use of ONNX models, and we are unable to convert these models to TensorFlow due to compatibility issues with tree models in the onnx2tf package. Adding ONNX/ONNXRuntime support would greatly benefit our development process. Thanks!

@mhsmith
Copy link
Member

mhsmith commented Jul 10, 2024

Sorry, there's no update. But we do also support PyTorch (version 1.8.1) and TensorFlow Lite (version 2.5.0) – could you convert your model to one of those formats?

@s16exe
Copy link

s16exe commented Oct 18, 2024

Is support for onnx planned in near future?
are the wheel files in the link, compatible with chaquopy??
https://www.wheelodex.org/projects/onnxruntime/

@mhsmith
Copy link
Member

mhsmith commented Oct 18, 2024

Sorry, the status is is still the same as in my previous comment.

@briliantnugraha
Copy link

Hi @mhsmith, thanks for you guys great work for "Pythonizing" android, which I really like TBH.

Btw, could I know, does pytorch or tflite inference with Chaquopy utilizes GPU? or is it CPU only? And is the model performance similar to native tflite in Flutter/Kotlin (ignore the postprocess)

Thanks in advance

@mhsmith
Copy link
Member

mhsmith commented Oct 30, 2024

We've made no attempt to enable GPU support for these Python packages, so they're probably CPU-only. This means they may have worse performance than the official Android tflite packages for Java/Kotlin, but how much worse will depend on your application.

I tried an official tflite image classification demo for Android a few years ago, and I think the GPU mode was about twice as fast as the CPU mode. But things could have changed a lot since then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants