Pre-built ONNX Runtime libraries for Unity.
https://github.com/asus4/onnxruntime-unity-examples
Yolox
2023-12-25-onnx-yolox.mp4
NanoSAM
2024-02-16-nanosam.mp4
Execution Providers are hardware acceleration libraries for each platform. See official docs for more details.
Platform | CPU | CoreML | NNAPI | CUDA | TensorRT | DirectML | XNNPACK |
---|---|---|---|---|---|---|---|
macOS | ✅ | ✅ | |||||
iOS | ✅ | ✅ | 🚧 | ||||
Android | ✅ | ✅ | 🚧 | ||||
Windows | ✅ | 🚧 | 🚧 | ✅ | |||
Linux | ✅ | 🚧 | 🚧 |
ONNX Runtime Extensions are a set of pre/post-processing.
Platform | Extensions |
---|---|
macOS | 🚧 |
iOS | 🚧 |
Android | 🚧 |
Windows | 🚧 |
Linux | 🚧 |
✅ : Supported in Unity Core library
🚧 : Experimental Preview
Pre-built libraries are available on NPM. Add the following scopedRegistries
and dependencies
in Packages/manifest.json
.
"scopedRegistries": [
{
"name": "NPM",
"url": "https://registry.npmjs.com",
"scopes": [
"com.github.asus4"
]
}
]
"dependencies": {
"com.github.asus4.onnxruntime": "0.2.6",
"com.github.asus4.onnxruntime.unity": "0.2.6",
"com.github.asus4.onnxruntime.win-x64-gpu": "0.2.6",
"com.github.asus4.onnxruntime-extensions": "0.2.6",
... other dependencies
}
com.github.asus4.onnxruntime
: Core library- CPU provider for all platforms
- GPU provider for iOS, Android, macOS and Windows(only DirectML)
com.github.asus4.onnxruntime.unity
: (Optional) Utilities for Unitycom.github.asus4.onnxruntime.win-x64-gpu
: (Optional) GPU provider for Windowscom.github.asus4.onnxruntime.linux-x64-gpu
: (Optional) GPU provider for Linuxcom.github.asus4.onnxruntime-extensions
: (Optional) ONNX Runtime Extensions