YOLOv8, YOLOv9, YOLO11, YOLO12 in Unity 6 using Inference Engine
YOLO is a real-time multi-object recognition model. Small and Nano model sizes are included for YOLO version 8 and above (except version 10 which uses NMS-free approach).
How to Use
- Create a new scene in Unity 6;
- Install
com.unity.ai.inferencefrom the package manager; - Add the
RunYOLO.csscript to the Main Camera; - Drag an appropriate
.onnxfile from themodelsfolder into theModel Assetfield; - Drag the
classes.txtfile into theClasses Assetfield; - Create a
GameObject > UI > Raw Imageobject in the scene, set its width and height to 640, and link it as theDisplay Imagefield; - Drag the
Border Texture.pngfile into theBorder Texturefield; - Select an appropriate font in the
Fontfield; - Put a video file in the
Assets/StreamingAssetsfolder and set theVideo Filenamefield to the filename of the video.
Preview
Enter play mode. If working correctly you should see something like this:
Inference Engine
Inference Engine is a neural network inference library for Unity. Find out more here.
- Downloads last month
- 35
