{"id":28640430,"url":"https://github.com/asus4/onnxruntime-unity-examples","last_synced_at":"2025-07-26T11:18:55.274Z","repository":{"id":211090977,"uuid":"728179494","full_name":"asus4/onnxruntime-unity-examples","owner":"asus4","description":"Examples for ONNX Runtime Unity Plugin","archived":false,"fork":false,"pushed_at":"2025-07-14T07:31:23.000Z","size":1284,"stargazers_count":76,"open_issues_count":0,"forks_count":16,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-07-14T10:04:06.945Z","etag":null,"topics":["onnxruntime","unity"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/asus4.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"asus4"}},"created_at":"2023-12-06T11:55:44.000Z","updated_at":"2025-07-14T07:31:27.000Z","dependencies_parsed_at":"2025-06-12T20:06:46.166Z","dependency_job_id":"c7c251a9-c1e6-4526-b55b-58b89d929185","html_url":"https://github.com/asus4/onnxruntime-unity-examples","commit_stats":null,"previous_names":["asus4/onnxruntime-unity-examples"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/asus4/onnxruntime-unity-examples","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asus4%2Fonnxruntime-unity-examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asus4%2Fonnxruntime-unity-examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asus4%2Fonnxruntime-unity-examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asus4%2Fonnxruntime-unity-examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/asus4","download_url":"https://codeload.github.com/asus4/onnxruntime-unity-examples/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asus4%2Fonnxruntime-unity-examples/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267156151,"owners_count":24044415,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-26T02:00:08.937Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["onnxruntime","unity"],"created_at":"2025-06-12T20:06:41.304Z","updated_at":"2025-07-26T11:18:55.267Z","avatar_url":"https://github.com/asus4.png","language":"C#","funding_links":["https://github.com/sponsors/asus4"],"categories":[],"sub_categories":[],"readme":"# ONNX Runtime examples for Unity\n\n[![upm](https://img.shields.io/npm/v/com.github.asus4.onnxruntime?label=upm)](https://www.npmjs.com/package/com.github.asus4.onnxruntime)\n\nExamples of [ONNX Runtime Unity Plugin](https://github.com/asus4/onnxruntime-unity).\n\n**Yolox-Nano**  \n\n\u003chttps://github.com/asus4/onnxruntime-unity-examples/assets/357497/96ed9913-41b7-401d-a634-f0e2de4fc3c7\u003e\n\n**NanoSAM**  \n\n\u003chttps://github.com/asus4/onnxruntime-unity-examples/assets/357497/5e2b8712-87cc-4a3a-82b7-f217087a0ed1\u003e\n\n**Yolo11 Seg**  \n\n\u003chttps://github.com/user-attachments/assets/93c3dccd-569c-4a93-826b-0c9b5b60ebe9\u003e\n\n## Tested environment\n\n- Unity: 6000.0.43f1 (LTS)\n- ONNX Runtime: 1.21.0\n- macOS, iOS, Android, Windows, Linux.\n  - Complete List for [:link: Supported Execution Providers](https://github.com/asus4/onnxruntime-unity?tab=readme-ov-file#execution-providers)\n\n## How to Run\n\n### Try all examples\n\n\u003e [!IMPORTANT]  \n\u003e Install [Git-LFS](https://git-lfs.github.com/) to try this repository.\n\nONNX examples are available in the `Assets/Examples` folder. Pull the repository and open the project in Unity.\n\nThe following demos are available:\n\n- [MobileOne](https://github.com/apple/ml-mobileone): Image classification\n- [Yolox](https://github.com/Megvii-BaseDetection/YOLOX): Object detection\n- [RT-DETRv2](https://github.com/lyuwenyu/RT-DETR): Object detection\n- [NanoSAM](https://github.com/NVIDIA-AI-IOT/nanosam/): Object Segmentation\n- [Yolo11-Seg](https://github.com/ultralytics/ultralytics/tree/main/examples/YOLOv8-Segmentation-ONNXRuntime-Python): Object detection and segmentation\n\n### Install pre-built ONNX Runtime via Unity Package Manager (UPM)\n\nAdd the following `scopedRegistries` and `dependencies` in `Packages/manifest.json` to install the ONNX Runtime plugin into your project.  \nCheck out the [asus4/onnxruntime-unity](https://github.com/asus4/onnxruntime-unity) repository for more details.\n\n```json\n  \"scopedRegistries\": [\n    {\n      \"name\": \"NPM\",\n      \"url\": \"https://registry.npmjs.com\",\n      \"scopes\": [\n        \"com.github.asus4\"\n      ]\n    }\n  ]\n  \"dependencies\": {\n    // Core library\n    \"com.github.asus4.onnxruntime\": \"0.4.2\",\n    // (Optional) Utilities for Unity\n    \"com.github.asus4.onnxruntime.unity\": \"0.4.2\",\n    ... other dependencies\n  }\n```\n\n## How to convert Onnx to Ort format\n\nOn the mobile platform, the *.onnx model is not recommended, although it's supported. Convert the Onnx model to Ort format.\n\nPlease refer to the [ORT model format](https://onnxruntime.ai/docs/performance/model-optimizations/ort-format-models.html) for more details.\n\n```sh\n# Recommend using python virtual environment\npip install onnx\npip install onnxruntime\n\n# In general,\n# Use --optimization_style Runtime, when running on mobile GPU\n# Use --optimization_style Fixed, when running on mobile CPU\npython -m onnxruntime.tools.convert_onnx_models_to_ort your_onnx_file.onnx --optimization_style Runtime\n```\n\n## Acknowledgements\n\n- [PINTO_model_zoo](https://github.com/PINTO0309/PINTO_model_zoo): Some ORT models are converted from this repository.\n\n## License\n\nMy code is licensed under MIT.  \nPlease refer to the original licenses of each example in the `Assets/Samples/*` folder.\n\n```markdown\nMIT License\n\nCopyright (c) Koki Ibukuro\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasus4%2Fonnxruntime-unity-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasus4%2Fonnxruntime-unity-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasus4%2Fonnxruntime-unity-examples/lists"}