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

Help with using Yolov5l.onnx #7

Closed
Nisse123 opened this issue Aug 12, 2021 · 6 comments
Closed

Help with using Yolov5l.onnx #7

Nisse123 opened this issue Aug 12, 2021 · 6 comments

Comments

@Nisse123
Copy link

First, thank you for posting this code.
I am trying to use another Yolov5 model but I do not understand what to change.
In Netron, the model has 3 outputs (screen shoot).
I changed UseDetect to false and Outputnames to { "out0", "out1", "out2" }; but the result is garbage
I do not understand the relation between all the parameters here, could you please point out what needs to be changed?

I notice in Netron that there are different yolov5s.onnx models. The one you have has a detection layer but other only have the outputs, how come?

Thanks,

image

image

@kkarahainko
Copy link
Contributor

@Nisse123 hi, did you export the default yolov5l (with coco dataset) model or it's something custom trained?

@kkarahainko
Copy link
Contributor

@Nisse123 outputs should look like https://i.imgur.com/iEMv3A7.png, maybe you have an older version, outputs look strange, try export with the latest yolov5 release https://github.com/ultralytics/yolov5.

@kkarahainko
Copy link
Contributor

@Nisse123 just exported the latest yolov5l.pt to onnx, works good https://drive.google.com/file/d/1HwqT_P_svYux6J1z-FXAVXWlq-C4PlPR/view, pls try.

@Nisse123
Copy link
Author

Thank you!
I must have picked a bad model, my mistake.

Would you like to point out what need to be changed if I want to test the higher resolution models like YOLOv5m6?
Is it to change Width and Height to 1280 or do I need to change more parameters?

If I want to learn the specification for output,651, 712,773 , the meaning of the order of the parameters, could you please point out some tutorial or something. I have really tried to google it and it seems only be documented by convention in different python code libraries.

Thanks again for the help.

image

@kkarahainko
Copy link
Contributor

@Nisse123 I've just added P6 example, take a look, I don't think I'll have enough time and knowledge to write yolov5 paper ;) it'll be better to wait for the official paper, docs from the author. Anyway, yolo5 docs and code are quite clear, you may find anchors (for example) here https://github.com/ultralytics/yolov5/blob/master/models/hub/anchors.yaml, shapes, and all other parameters are available in Netron, so try and experiment.

@kkarahainko
Copy link
Contributor

@Nisse123 to try P6 just change the model type here https://i.imgur.com/pWhUTaM.png to YoloCocoP6Model.

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

2 participants