ONNX Runtime Plugin for Unity
npm install com.github.asus4.onnxruntime 
Pre-built ONNX Runtime libraries for Unity.
https://github.com/asus4/onnxruntime-unity-examples
Yolox-Nano
NanoSAM
Yolo11 Seg
- Unity: 6000.0.43f1 (LTS)
- ONNX Runtime: 1.23.2
- ONNX Runtime Extensions: 0.14.0
- ONNX Runtime GenAI: 0.11.4
#### Execution Providers
Execution Providers are hardware acceleration libraries for each platform. See official docs for more details.
| Platform | CPU | CoreML | NNAPI | CUDA | TensorRT | DirectML | XNNPACK |
| --- | --- | --- | --- | --- | --- | --- | --- |
| macOS | :white_check_mark: | :white_check_mark: | | | | | |
| iOS | :white_check_mark: | :white_check_mark: | | | | | :construction: |
| Android | :white_check_mark: | | :white_check_mark: | | | | :construction: |
| Windows | :white_check_mark: | | | :construction: | :construction: | :white_check_mark: | |
| Linux | :white_check_mark: | | | :construction: | :construction: | | |
ONNX Runtime Extensions are a set of pre/post-processing.
| Platform | Extensions |
| --- | --- |
| macOS | :construction: |
| iOS | :construction: |
| Android | :construction: |
| Windows | :construction: |
| Linux | :construction: |
:white_check_mark: : Supported in Unity Core library
:construction: : Experimental Preview
Pre-built libraries are available on NPM. Add the following scopedRegistries and dependencies in Packages/manifest.json.
``json`
"scopedRegistries": [
{
"name": "NPM",
"url": "https://registry.npmjs.com",
"scopes": [
"com.github.asus4"
]
}
]
"dependencies": {
"com.github.asus4.onnxruntime": "0.4.4",
"com.github.asus4.onnxruntime.unity": "0.4.4",
"com.github.asus4.onnxruntime-extensions": "0.4.4",
... other dependencies
}
- com.github.asus4.onnxruntime : Core librarycom.github.asus4.onnxruntime.unity
- CPU provider for all platforms
- GPU provider for iOS, Android, macOS and Windows(only DirectML)
- : (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
-
Each package is licensed under the MIT License - see the LICENSE file under the package folder for details.