Commit
·
6c8bec2
1
Parent(s):
c29c2ec
update to inference engine
Browse files- README.md +7 -10
- RunYOLO.cs +4 -6
- classes.txt → data/classes.txt +0 -0
- info.json +10 -10
- {Models → models}/yolo11n.onnx +0 -0
- {Models → models}/yolo11s.onnx +0 -0
- {Models → models}/yolo12n.onnx +0 -0
- {Models → models}/yolo12s.onnx +0 -0
- {Models → models}/yolov8n.onnx +0 -0
- {Models → models}/yolov8s.onnx +0 -0
- {Models → models}/yolov9s.onnx +0 -0
- {Models → models}/yolov9t.onnx +0 -0
README.md
CHANGED
|
@@ -1,8 +1,11 @@
|
|
| 1 |
---
|
|
|
|
| 2 |
library_name: unity-sentis
|
| 3 |
pipeline_tag: object-detection
|
|
|
|
|
|
|
| 4 |
---
|
| 5 |
-
# YOLOv8, YOLOv9, YOLO11, YOLO12 validated for
|
| 6 |
|
| 7 |
[YOLO](https://docs.ultralytics.com/models/) is a real-time multi-object recognition model.
|
| 8 |
Small and Nano model sizes are included for YOLO version 8 and above (except version 10 which uses NMS-free approach).
|
|
@@ -10,7 +13,7 @@ Small and Nano model sizes are included for YOLO version 8 and above (except ver
|
|
| 10 |
## How to Use
|
| 11 |
|
| 12 |
* Create a new scene in Unity 6;
|
| 13 |
-
* Install `com.unity.
|
| 14 |
* Add the `RunYOLO.cs` script to the Main Camera;
|
| 15 |
* Drag an appropriate `.onnx` file from the `Models` folder into the `Model Asset` field;
|
| 16 |
* Drag the `classes.txt` file into the `Classes Asset` field;
|
|
@@ -24,11 +27,5 @@ If working correctly you should see something like this:
|
|
| 24 |
|
| 25 |

|
| 26 |
|
| 27 |
-
##
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
## Unity Sentis
|
| 31 |
-
Unity Sentis is the inference engine that runs in Unity 3D. More information can be found at [here](https://unity.com/products/sentis)
|
| 32 |
-
|
| 33 |
-
## License
|
| 34 |
-
The YOLO models use the GPLv3 license.
|
|
|
|
| 1 |
---
|
| 2 |
+
license: gpl-3.0
|
| 3 |
library_name: unity-sentis
|
| 4 |
pipeline_tag: object-detection
|
| 5 |
+
tags:
|
| 6 |
+
- unity-inference-engine
|
| 7 |
---
|
| 8 |
+
# YOLOv8, YOLOv9, YOLO11, YOLO12 validated for Inference Engine 2 in Unity 6
|
| 9 |
|
| 10 |
[YOLO](https://docs.ultralytics.com/models/) is a real-time multi-object recognition model.
|
| 11 |
Small and Nano model sizes are included for YOLO version 8 and above (except version 10 which uses NMS-free approach).
|
|
|
|
| 13 |
## How to Use
|
| 14 |
|
| 15 |
* Create a new scene in Unity 6;
|
| 16 |
+
* Install `com.unity.ai.inference` from the package manager;
|
| 17 |
* Add the `RunYOLO.cs` script to the Main Camera;
|
| 18 |
* Drag an appropriate `.onnx` file from the `Models` folder into the `Model Asset` field;
|
| 19 |
* Drag the `classes.txt` file into the `Classes Asset` field;
|
|
|
|
| 27 |
|
| 28 |

|
| 29 |
|
| 30 |
+
## Inference Engine
|
| 31 |
+
Inference Engine is a neural network inference library for Unity. Find out more [here](https://docs.unity3d.com/Packages/com.unity.ai.inference@latest).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RunYOLO.cs
CHANGED
|
@@ -1,17 +1,17 @@
|
|
| 1 |
using System.Collections.Generic;
|
| 2 |
-
using Unity.
|
| 3 |
using UnityEngine;
|
| 4 |
using UnityEngine.UI;
|
| 5 |
using UnityEngine.Video;
|
| 6 |
using System.IO;
|
| 7 |
-
using FF = Unity.
|
| 8 |
|
| 9 |
/*
|
| 10 |
* YOLO Inference Script
|
| 11 |
* ========================
|
| 12 |
-
*
|
| 13 |
* Place this script on the Main Camera and set the script parameters according to the tooltips.
|
| 14 |
-
*
|
| 15 |
*/
|
| 16 |
|
| 17 |
public class RunYOLO : MonoBehaviour
|
|
@@ -67,7 +67,6 @@ public class RunYOLO : MonoBehaviour
|
|
| 67 |
public string label;
|
| 68 |
}
|
| 69 |
|
| 70 |
-
|
| 71 |
void Start()
|
| 72 |
{
|
| 73 |
Application.targetFrameRate = 60;
|
|
@@ -89,7 +88,6 @@ public class RunYOLO : MonoBehaviour
|
|
| 89 |
}
|
| 90 |
void LoadModel()
|
| 91 |
{
|
| 92 |
-
|
| 93 |
//Load model
|
| 94 |
var model1 = ModelLoader.Load(modelAsset);
|
| 95 |
|
|
|
|
| 1 |
using System.Collections.Generic;
|
| 2 |
+
using Unity.InferenceEngine;
|
| 3 |
using UnityEngine;
|
| 4 |
using UnityEngine.UI;
|
| 5 |
using UnityEngine.Video;
|
| 6 |
using System.IO;
|
| 7 |
+
using FF = Unity.InferenceEngine.Functional;
|
| 8 |
|
| 9 |
/*
|
| 10 |
* YOLO Inference Script
|
| 11 |
* ========================
|
| 12 |
+
*
|
| 13 |
* Place this script on the Main Camera and set the script parameters according to the tooltips.
|
| 14 |
+
*
|
| 15 |
*/
|
| 16 |
|
| 17 |
public class RunYOLO : MonoBehaviour
|
|
|
|
| 67 |
public string label;
|
| 68 |
}
|
| 69 |
|
|
|
|
| 70 |
void Start()
|
| 71 |
{
|
| 72 |
Application.targetFrameRate = 60;
|
|
|
|
| 88 |
}
|
| 89 |
void LoadModel()
|
| 90 |
{
|
|
|
|
| 91 |
//Load model
|
| 92 |
var model1 = ModelLoader.Load(modelAsset);
|
| 93 |
|
classes.txt → data/classes.txt
RENAMED
|
File without changes
|
info.json
CHANGED
|
@@ -3,19 +3,19 @@
|
|
| 3 |
"RunYOLO.cs"
|
| 4 |
],
|
| 5 |
"models": [
|
| 6 |
-
"yolov8n.onnx",
|
| 7 |
-
"yolov8s.onnx",
|
| 8 |
-
"yolov9t.onnx",
|
| 9 |
-
"yolov9s.onnx",
|
| 10 |
-
"yolo11n.onnx",
|
| 11 |
-
"yolo11s.onnx",
|
| 12 |
-
"yolo12n.onnx",
|
| 13 |
-
"yolo12s.onnx"
|
| 14 |
],
|
| 15 |
"data": [
|
| 16 |
-
"classes.txt"
|
| 17 |
],
|
| 18 |
"version": [
|
| 19 |
-
"2.
|
| 20 |
]
|
| 21 |
}
|
|
|
|
| 3 |
"RunYOLO.cs"
|
| 4 |
],
|
| 5 |
"models": [
|
| 6 |
+
"models/yolov8n.onnx",
|
| 7 |
+
"models/yolov8s.onnx",
|
| 8 |
+
"models/yolov9t.onnx",
|
| 9 |
+
"models/yolov9s.onnx",
|
| 10 |
+
"models/yolo11n.onnx",
|
| 11 |
+
"models/yolo11s.onnx",
|
| 12 |
+
"models/yolo12n.onnx",
|
| 13 |
+
"models/yolo12s.onnx"
|
| 14 |
],
|
| 15 |
"data": [
|
| 16 |
+
"data/classes.txt"
|
| 17 |
],
|
| 18 |
"version": [
|
| 19 |
+
"2.2.0"
|
| 20 |
]
|
| 21 |
}
|
{Models → models}/yolo11n.onnx
RENAMED
|
File without changes
|
{Models → models}/yolo11s.onnx
RENAMED
|
File without changes
|
{Models → models}/yolo12n.onnx
RENAMED
|
File without changes
|
{Models → models}/yolo12s.onnx
RENAMED
|
File without changes
|
{Models → models}/yolov8n.onnx
RENAMED
|
File without changes
|
{Models → models}/yolov8s.onnx
RENAMED
|
File without changes
|
{Models → models}/yolov9s.onnx
RENAMED
|
File without changes
|
{Models → models}/yolov9t.onnx
RENAMED
|
File without changes
|