Instructions to use unity/inference-engine-yolo with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- unity-sentis
How to use unity/inference-engine-yolo with unity-sentis:
string modelName = "[Your model name here].sentis"; Model model = ModelLoader.Load(Application.streamingAssetsPath + "/" + modelName); IWorker engine = WorkerFactory.CreateWorker(BackendType.GPUCompute, model); // Please see provided C# file for more details
- Notebooks
- Google Colab
- Kaggle
Update RunYOLO.cs
Browse filesUpdating to new InputSystem
- RunYOLO.cs +3 -2
RunYOLO.cs
CHANGED
|
@@ -1,9 +1,10 @@
|
|
| 1 |
-
|
| 2 |
using System.Collections.Generic;
|
| 3 |
using System.IO;
|
| 4 |
using Unity.InferenceEngine;
|
| 5 |
using UnityEngine;
|
| 6 |
using UnityEngine.UI;
|
|
|
|
| 7 |
using UnityEngine.Video;
|
| 8 |
|
| 9 |
/*
|
|
@@ -133,7 +134,7 @@ public class RunYOLO : MonoBehaviour
|
|
| 133 |
{
|
| 134 |
ExecuteML();
|
| 135 |
|
| 136 |
-
if (
|
| 137 |
{
|
| 138 |
Application.Quit();
|
| 139 |
}
|
|
|
|
| 1 |
+
using System;
|
| 2 |
using System.Collections.Generic;
|
| 3 |
using System.IO;
|
| 4 |
using Unity.InferenceEngine;
|
| 5 |
using UnityEngine;
|
| 6 |
using UnityEngine.UI;
|
| 7 |
+
using UnityEngine.InputSystem;
|
| 8 |
using UnityEngine.Video;
|
| 9 |
|
| 10 |
/*
|
|
|
|
| 134 |
{
|
| 135 |
ExecuteML();
|
| 136 |
|
| 137 |
+
if (Keyboard.current != null && Keyboard.current.escapeKey.wasPressedThisFrame)
|
| 138 |
{
|
| 139 |
Application.Quit();
|
| 140 |
}
|