Skip to content

aicelen/Onnx-Kivy-Android

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Onnx on Android using Kivy and Pyjnius

This is a "Hello World" for running onnx models on android.

Usage

The inference class is located in model.py. An example use is located it main.py.

You also need to update your buildozer.spec:

requirements = python3, kivy, numpy
android.api = 35
android.gradle_dependencies = com.microsoft.onnxruntime:onnxruntime-android:1.22.0

Performance

Performance is in general not that great because onnxruntime-android only supports gpu acceleration through nnapi. Only a few models are fully compatible with nnapi since it requires a static model and supports only a handful of operations. That's why it's often worth it to convert the model to tflite and run it using LiteRT.

Contributing

PRs welcome :)

License

MIT © Enno A

About

Run onnx models in a kivy android app

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages