YOLOv5WithOpenCVForUnityExample
An example of using OpenCV dnn module with YOLOv5, YOLOv6 and YOLOv7. (ObjectDetection, Segmentation, Classification)
Install / Use
/learn @EnoxSoftware/YOLOv5WithOpenCVForUnityExampleREADME
YOLOv5 With OpenCVForUnity Example
- An example of using OpenCV dnn module with YOLOv5. https://github.com/ultralytics/yolov5
- This example can also work for YOLOv6, YOLOv7 models, which has the same input/output shapes as the YOLOv5 model.

Environment
- Windows / Mac / Linux / WebGL / Android / iOS
- Unity >= 2021.3.35f1+
- Scripting backend MONO / IL2CPP
- OpenCV for Unity 3.0.0+
Setup
- Download the latest release unitypackage. YOLOv5WithOpenCVForUnityExample.unitypackage
- Create a new project. (YOLOv5WithOpenCVForUnityExample)
- Import OpenCVForUnity.
- Import the YOLOv5WithOpenCVForUnityExample.unitypackage.
- Add the "Assets/YOLOv5WithOpenCVForUnityExample/*.unity" files to the "Scenes In Build" list in the "Build Settings" window.
- Build and Deploy.
Training from custom data and export to ONNX
- YOLOv5_export_to_OpenCVDNN_ONNX
- YOLOv5_segment_export_to_OpenCVDNN_ONNX
- YOLOv5_classify_export_to_OpenCVDNN_ONNX
- YOLOv6_export_to_OpenCVDNN_ONNX
- YOLOv7_export_to_OpenCVDNN_ONNX
Tutorials
Works with Multi-Object Tracking (MOT)
ScreenShot

