92c4c4a2d0 | ||
---|---|---|
Assets | ||
models | ||
README.md | ||
screenshot01.jpg | ||
screenshot02.jpg | ||
screenshot03.jpg |
README.md
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 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 2.6.4+
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.
Export YOLOv5 model to ONNX
- YOLOv5_export_to_OpenCVDNN_ONNX.ipynb
- YOLOv5_segment_export_to_OpenCVDNN_ONNX.ipynb
- YOLOv5_classify_export_to_OpenCVDNN_ONNX.ipynb