EnoxSoftware / YOLOv8WithOpenCVForUnityExample

An example of using OpenCV dnn module with YOLOv8. (ObjectDetection, Segmentation, Classification, PoseEstimation)
15 stars 2 forks source link

Some custom trained models do not work #2

Open Wayne-nulitics opened 8 months ago

Wayne-nulitics commented 8 months ago

When I train a model and test it in Python it works, if I then use the same .onnx file in Unity it does not detect the objects.

Wayne-nulitics commented 8 months ago

I tested the onnx model with Unity Barracude v3 and it also works there, so definatly a problem with OpenCV Yolov8 implementation

RoadwayVR commented 6 months ago

@Wayne-nulitics have you fixed the issue?

Wayne-nulitics commented 5 months ago

@Wayne-nulitics have you fixed the issue?

@RoadwayVR yes, I'm using the new new version 1.05, I think, the training is using Ultralytics Yolov8, we do all our models and training offline, no cloud services, due to confidentiality of content/images, for this we use PyTorch and then convert the .pt file to .onnx version 12, this works well in Yolov8 from OpenCV

Wayne-nulitics commented 5 months ago

Solved by using new version 1.05 of example and Ultralytics YOLOv8.1.30

dmm489 commented 3 months ago

What did you change in the scripts to get it working on a custom model? I'm trying to do it myself but am getting errors. I swapped the .onnx and coco.names files and changed the num_classes variable in ObjectDetector.cs but I'm still having trouble. Any help would be appreciated