OpenCVForUnity icon indicating copy to clipboard operation
OpenCVForUnity copied to clipboard

YOLOv8 support

Open tv-gc opened this issue 2 years ago • 8 comments

Hi!

I would like to ask if OpenCVForUnity will support YOLO version 8 and if so, when will the example be shared?

Cheers!

tv-gc avatar Nov 30 '23 12:11 tv-gc

it is already supported!

dragan07-07 avatar Nov 30 '23 12:11 dragan07-07

Oh really? I thought you had to make predictors and detectors for it because YoloV5 is on a different repository.

Is there references on how to use v8 that you could share?

Thanks!

tv-gc avatar Dec 04 '23 16:12 tv-gc

Sorry for the delay in responding. It seems that opencv's dnn module is capable of inferring yolov8 models in onnx format. https://github.com/opencv/opencv/pull/24611

We have a YOLOv5 example repository on our OpenCVForUnity GitHub, but that example is not applicable to yolov8 models. The data structure of the inference results is different between yolov5 and yolov8, so you need to implement yolov8-specific code. We have created a new repository containing examples of yolov8 object detection models. Please try it out. https://github.com/EnoxSoftware/YOLOv8WithOpenCVForUnityExample

EnoxSoftware avatar Dec 05 '23 11:12 EnoxSoftware

Examples of Segmentation and Classification models have also been added!

EnoxSoftware avatar Dec 06 '23 08:12 EnoxSoftware

Tnx it is very useful!

dragan07-07 avatar Dec 14 '23 16:12 dragan07-07

It seems when using CUDA backend with dnn, the returned bounding boxes are all 0. Using inference on CPU works fine. That seems to be an OpenCV 4.2.8 problem.

wimvanhenden-tool avatar Dec 23 '23 10:12 wimvanhenden-tool

@wimvanhenden-tool This problem seems to have been reported in the opencv repository. https://github.com/opencv/opencv/issues/23977

EnoxSoftware avatar Dec 24 '23 10:12 EnoxSoftware