https://github.com/enoxsoftware/yolov8withopencvforunityexample
An example of using OpenCV dnn module with YOLOv8, YOLOv5u, YOLOv9, YOLOv11, YOLOv12. (ObjectDetection, Segmentation, Classification, PoseEstimation)
https://github.com/enoxsoftware/yolov8withopencvforunityexample
dnn object-detection opencv unity unity3d-plugin yolo yolov8n
Last synced: 23 days ago
JSON representation
An example of using OpenCV dnn module with YOLOv8, YOLOv5u, YOLOv9, YOLOv11, YOLOv12. (ObjectDetection, Segmentation, Classification, PoseEstimation)
- Host: GitHub
- URL: https://github.com/enoxsoftware/yolov8withopencvforunityexample
- Owner: EnoxSoftware
- License: mit
- Created: 2023-12-05T11:03:25.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2025-07-12T19:25:56.000Z (3 months ago)
- Last Synced: 2025-08-25T00:00:20.291Z (about 1 month ago)
- Topics: dnn, object-detection, opencv, unity, unity3d-plugin, yolo, yolov8n
- Language: Jupyter Notebook
- Homepage:
- Size: 81.3 MB
- Stars: 27
- Watchers: 2
- Forks: 3
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# YOLOv8 With OpenCVForUnity Example
- An example of using OpenCV dnn module with YOLOv8. [https://docs.ultralytics.com/models/yolov8/](https://docs.ultralytics.com/models/yolov8/)
- This example can also work for [YOLOv5u](https://docs.ultralytics.com/models/yolov5/), [YOLOv9](https://docs.ultralytics.com/models/yolov9/), ~~[YOLOv10](https://docs.ultralytics.com/models/yolov10/)~~, [YOLOv11](https://docs.ultralytics.com/models/yolov11/), [YOLOv12](https://docs.ultralytics.com/models/yolov12/) models, which has the same input/output shapes as the YOLOv8 model.
## Environment
- Windows / Mac / Linux / WebGL / Android / iOS
- Unity >= 2021.3.35f1+
- Scripting backend MONO / IL2CPP
- [OpenCV for Unity](https://assetstore.unity.com/packages/tools/integration/opencv-for-unity-21088?aid=1011l4ehR) 3.0.0+## Setup
1. Download the latest release unitypackage. [YOLOv8WithOpenCVForUnityExample.unitypackage](https://github.com/EnoxSoftware/YOLOv8WithOpenCVForUnityExample/releases)
1. Create a new project. (YOLOv8WithOpenCVForUnityExample)
1. Import OpenCVForUnity.
1. Import the YOLOv8WithOpenCVForUnityExample.unitypackage.
1. Add the "Assets/YOLOv8WithOpenCVForUnityExample/*.unity" files to the "Scenes In Build" list in the "Build Settings" window.
1. Build and Deploy.## Training from custom data and export to ONNX
1. [YOLOv8_export_to_OpenCVDNN_ONNX](https://github.com/EnoxSoftware/YOLOv8WithOpenCVForUnityExample/tree/master/models/YOLOv8/)
1. [YOLOv5u_export_to_OpenCVDNN_ONNX](https://github.com/EnoxSoftware/YOLOv8WithOpenCVForUnityExample/tree/master/models/YOLOv5u/)
1. [YOLOv9_export_to_OpenCVDNN_ONNX](https://github.com/EnoxSoftware/YOLOv8WithOpenCVForUnityExample/tree/master/models/YOLOv9/)
1. [YOLOv10_export_to_OpenCVDNN_ONNX](https://github.com/EnoxSoftware/YOLOv8WithOpenCVForUnityExample/tree/master/models/YOLOv10/)
1. [YOLOv11_export_to_OpenCVDNN_ONNX](https://github.com/EnoxSoftware/YOLOv8WithOpenCVForUnityExample/tree/master/models/YOLOv11/)
1. [YOLOv12_export_to_OpenCVDNN_ONNX](https://github.com/EnoxSoftware/YOLOv8WithOpenCVForUnityExample/tree/master/models/YOLOv12/)## Tutorials
1. [How to Train Ultralytics YOLOv8 models on Your Custom Dataset in Google Colab](https://www.youtube.com/watch?v=LNwODJXcvt4)## Works with Multi-Object Tracking (MOT)
1. [MultiObjectTrackingExample](https://github.com/EnoxSoftware/OpenCVForUnity/tree/master/Assets/OpenCVForUnity/Examples/Advanced/MultiObjectTrackingExample)## ScreenShot



