An example of using OpenCV dnn module with YOLOv5. (ObjectDetection, Segmentation, Classification)
Перейти к файлу
EnoxSoftware 92c4c4a2d0 v1.0.6 Updated OpenCVForUnity version to 2.6.4. Change to image source input using MultiSource2MatHelper. 2024-11-12 02:00:01 +09:00
Assets v1.0.6 Updated OpenCVForUnity version to 2.6.4. Change to image source input using MultiSource2MatHelper. 2024-11-12 02:00:01 +09:00
models Update LICENSE 2023-09-07 05:43:20 +09:00
README.md v1.0.6 Updated OpenCVForUnity version to 2.6.4. Change to image source input using MultiSource2MatHelper. 2024-11-12 02:00:01 +09:00
screenshot01.jpg v1.0.0 2023-02-02 05:09:47 +09:00
screenshot02.jpg v1.0.0 2023-02-02 05:09:47 +09:00
screenshot03.jpg v1.0.0 2023-02-02 05:09:47 +09:00

README.md

YOLOv5 With OpenCVForUnity Example

Environment

  • Windows / Mac / Linux / WebGL / Android / iOS
  • Unity >= 2021.3.35f1+
  • Scripting backend MONO / IL2CPP
  • OpenCV for Unity 2.6.4+

Setup

  1. Download the latest release unitypackage. YOLOv5WithOpenCVForUnityExample.unitypackage
  2. Create a new project. (YOLOv5WithOpenCVForUnityExample)
  3. Import OpenCVForUnity.
  4. Import the YOLOv5WithOpenCVForUnityExample.unitypackage.
  5. Add the "Assets/YOLOv5WithOpenCVForUnityExample/*.unity" files to the "Scenes In Build" list in the "Build Settings" window.
  6. Build and Deploy.

Export YOLOv5 model to ONNX

  1. YOLOv5_export_to_OpenCVDNN_ONNX.ipynb
  2. YOLOv5_segment_export_to_OpenCVDNN_ONNX.ipynb
  3. YOLOv5_classify_export_to_OpenCVDNN_ONNX.ipynb

Works with Multi-Object Tracking (MOT)

  1. MultiObjectTrackingExample

ScreenShot

screenshot01.jpg screenshot02.jpg screenshot03.jpg

Tutorials

  1. How to Train YOLO v5 on a Custom Dataset
  2. Example of custom training for dice roll detection