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

ONNX import issue: index out of bounds #2058

Closed
SimonBrandner opened this issue Jul 24, 2024 · 5 comments
Closed

ONNX import issue: index out of bounds #2058

SimonBrandner opened this issue Jul 24, 2024 · 5 comments
Labels

Comments

@SimonBrandner
Copy link

Trying to import this model results in the following error:

ERROR burn_import::logger: PANIC => panicked at /home/simon/.cargo/git/checkouts/burn-178c6829f420dae1/53c77ae/crates/onnx-ir/src/dim_inference.rs:331:
41:
  index out of bounds: the len is 3 but the index is 3    

  --- stderr
  thread 'main' panicked at /home/simon/.cargo/git/checkouts/burn-178c6829f420dae1/53c77ae/crates/onnx-ir/src/dim_inference.rs:331:41:
  index out of bounds: the len is 3 but the index is 3
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Link to model: https://drive.google.com/file/d/1YDQycQf6RLy4RElEqGSgezvd4WjULebi/view?usp=drive_link

@antimora antimora added the onnx label Jul 24, 2024
@SimonBrandner SimonBrandner changed the title Error importing the new FaceONNX detector model (yolov5s_face.onnx) ONNX import issue: index out of bounds Aug 5, 2024
@SimonBrandner
Copy link
Author

No longer valid

@SimonBrandner SimonBrandner closed this as not planned Won't fix, can't repro, duplicate, stale Aug 5, 2024
@antimora
Copy link
Collaborator

antimora commented Aug 5, 2024

@SimonBrandner BTW, the onnx file should now work but the file has to go through a couple of transformation:

  1. Run through onnxsim to simplify gather + reshape nodes
  2. Rename numeric nodes (we still haven't fixed this on our end) using this python script: https://github.com/antimora/face-onnx/blob/main/rename_node_input_output.py

@SimonBrandner
Copy link
Author

I really ought to figure out how to run onnxsim on NixOS...

@antimora
Copy link
Collaborator

antimora commented Aug 5, 2024

I really ought to figure out how to run onnxsim on NixOS...

Nix seems more trouble than a help😅

I gave up on nix.

@SimonBrandner
Copy link
Author

Haha, I feel like for me the pros outweigh the cons but it took quite some time and I am still very far away from being good at Nix itself and run into a wall at times (like this for example) 😅

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

No branches or pull requests

2 participants