Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

custom model do not detect object #57

Open
masgh21 opened this issue May 20, 2022 · 12 comments
Open

custom model do not detect object #57

masgh21 opened this issue May 20, 2022 · 12 comments

Comments

@masgh21
Copy link

masgh21 commented May 20, 2022

@kkarahainko

Hello I am student and trained my custom model with colab
[https://github.com/ultralytics/yolov5/wiki/Train-Custom-Data
]
(https://github.com/ultralytics/yolov5/wiki/Train-Custom-Data)

it works with detect.py
But after I convert it to onnx , it doesn't detect anything
what Is Problem ?

image_2022-05-20_16-08-53

I upload my model this link and
my test image
onnx Model
https://drive.google.com/file/d/1FpNythBNten9OKu3TlLamIcDtZQd980_/view?usp=sharing
test Image
h1

thanks

@masgh21
Copy link
Author

masgh21 commented May 27, 2022

@keesschollaart81
Hello
Can you help me ?

@MasIgor
Copy link

MasIgor commented May 27, 2022

how did you convert it to onnx? are you running it still with detect.py as onnx or in a different environemnt?

@masgh21
Copy link
Author

masgh21 commented May 27, 2022

Hello @tanzerlana
I test it with detect.py and with .pt format and it works.
after converted it to onnx ,
it didnt detect anything .

@keesschollaart81
Copy link
Contributor

This has not much to do with this repo I believe. I think you're better of creating an issue of the Yolov5 repo, right? Then I also suggest to include this commands you run for the export to onnx and (if possible) the original pt file.

@masgh21
Copy link
Author

masgh21 commented May 27, 2022

@tanzerlana
@keesschollaart81
i upload my .ppt model here.
model

@keesschollaart81
Copy link
Contributor

I'm not going to look at it, I'm sorry. If you have issues with Yolov5 conversion/quality, please report at their repo. This repo only is about doing inference with a working model using .NET.

@masgh21
Copy link
Author

masgh21 commented May 27, 2022

I want to use it with yolov5net
and i don't know how to use it.
@keesschollaart81

@keesschollaart81
Copy link
Contributor

Before you can use it with yolov5-net, the onnx version first need to work, if you have an issue with that --> https://github.com/ultralytics/yolov5/issues

When the model works with native yolov5 (python) and you have issues with the .NET inference, discuss here.

@masgh21
Copy link
Author

masgh21 commented May 27, 2022

@keesschollaart81
my problem is
onnx version
and it does not work , and i need help to use onnx and yolov5net .

@masgh21
Copy link
Author

masgh21 commented May 27, 2022

@keesschollaart81
I converted my .pt model to onnx
after that i couldn't load it and I got this Error

public override int Dimensions { get; set; } = 6;
public override List Labels { get; set; } = new List()
{
new YoloLabel { Id = 1, Name = "helmet" }
};

image

@MasIgor
Copy link

MasIgor commented May 27, 2022

verify that your onnx file is properly working. run detect.py and input the onnx file instead of the pt file. so you know that your onnx file is ok in the first place.

@masgh21
Copy link
Author

masgh21 commented May 27, 2022

@tanzerlana
I test it with detect.py now and it works with onnx format

image

in visual studio i got same error
IndexError

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants