techwingslab/yolov5-net

my custom model.onnx work perfectly in detect.py but not in yolov5-net

Closed this issue · 5 comments

MacOS 10.15
Visual Studio for Mac 17.0.3

I have tried image and model (yolov5s.onnx) in the depository.

This is the image.
trial

And, I get the result.
result
So, I think I have set up things correctly in Visual Studio.

My custom model.onnx work perfectly with detect.py after converting from .pt to .onnx.

When I use yolov5-net and laod my custom model.onnx, I can load the model.onnx too and it gives the result. But the result is not the same as detect.py. It just can't detect anything.

Result I get from detect.py:
trial1

Result I get from yolov5-net
result1

I have tried more examples but it still can't detect anything with yolov5-net.

May you help me to solve the problem? I need to deploy my model in C#.

image

Thank you! 🙏

.

Thanks!!

image

image

I think I have inherited from YoloModel and overridden all the required properties and methods. Am I doing it correctly?
My custom model still can't detect anything.

classes:
0: face
1: mobile
2: camera
3: laptop
4: tablet

Thanks!!

image image

I think I have inherited from YoloModel and overridden all the required properties and methods. Am I doing it correctly? My custom model still can't detect anything.

classes: 0: face 1: mobile 2: camera 3: laptop 4: tablet

Dimensions=10

It works!!!! Thank you so much. ☺️
May I know what is dimension? And how it is calculated?
THANK YOU!!!

I understand now. Because the output dimension is num_class + 4 (x1, y1, x2, y2 coordinates) + 1 (confidence score).