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

error when import onnx of yolo8 #1686

Open
xuexl opened this issue Apr 24, 2024 · 3 comments
Open

error when import onnx of yolo8 #1686

xuexl opened this issue Apr 24, 2024 · 3 comments
Labels
bug Something isn't working onnx

Comments

@xuexl
Copy link

xuexl commented Apr 24, 2024

I have one onnx file of trained from yolo8. I want to use it in burn, as the backend. Then i import the onnx file , and an error is throwed. The error like this:

checking outputs DEBUG burn_import::onnx::from_onnx: output name: /model.22/Shape_4_output_0 DEBUG burn_import::onnx::proto_conversion: Converting ONNX node with type "Concat" DEBUG burn_import::onnx::from_onnx: renaming node "/model.22/Concat_3" ERROR burn_import::logger: PANIC => panicked at /home/lin/.cargo/registry/src/mirrors.tuna.tsinghua.edu.cn-df7c3c540f42cdbd/burn-import-0.13.0/src/onnx/dim_inference.rs:178:10: calledOption::unwrap()on aNone` value

--- stderr
thread 'main' panicked at /home/lin/.cargo/registry/src/mirrors.tuna.tsinghua.edu.cn-df7c3c540f42cdbd/burn-import-0.13.0/src/onnx/dim_inference.rs:178:10:
called Option::unwrap() on a None value`

This is a bug or not , i don't know. So, anyone can help me , please. thanks .

@laggui
Copy link
Member

laggui commented Apr 24, 2024

Not all ops are supported for ONNX import yet, but in this case it seems to have failed at the Concat node (as pointed out by the panic at this line).

Is your model publicly available?

@xuexl
Copy link
Author

xuexl commented Apr 25, 2024

@laggui First, thanks your reply.
And the model is exported by yolo8 project of ultralytics. So, can you try it when you have some time.
The yolo8 is so good , and many people use it. Now, i use yolo8 model by tch-rs. And, i want to try it in burn .
By export, and then import onnx file, it is a bridge from pytorch to burn. It is a good way . And the other way is that writing the modle script again in burn from pytorch to burn , it is not good .
Most CNN models are trained by pytorch, So if you give a simple way from pytorch to burn, i think it must be excellent.

@antimora
Copy link
Collaborator

It would be great if you could link the onnx file so we could try out.

@antimora antimora added bug Something isn't working onnx labels Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working onnx
Projects
None yet
Development

No branches or pull requests

3 participants