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

Is demo.py supposed to work with *ONNX* models ? #211

Open
vyi opened this issue Feb 23, 2024 · 0 comments
Open

Is demo.py supposed to work with *ONNX* models ? #211

vyi opened this issue Feb 23, 2024 · 0 comments

Comments

@vyi
Copy link

vyi commented Feb 23, 2024

It seems that running the demo.py script with argument --weights=weights/yolop-640-640.onnx causes a pickling error.

Even though demo.py has provision for passing it a model, it could be the case that authors didn't implement the ONNX compatibility in demo.py.

Here's the error log when I run demo.py with ONNX model args:

Traceback (most recent call last):
  File "/home/bla/Documents/2024/yoloP_local/tools/demo.py", line 180, in <module>
    detect(cfg,opt)
  File "/home/bla/Documents/2024/yoloP_local/tools/demo.py", line 55, in detect
    checkpoint = torch.load(opt.weights[0], map_location= device)
  File "/home/bla/anaconda3/lib/python3.9/site-packages/torch/serialization.py", line 608, in load
    return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
  File "/home/bla/anaconda3/lib/python3.9/site-packages/torch/serialization.py", line 777, in _legacy_load
    magic_number = pickle_module.load(f, **pickle_load_args)
_pickle.UnpicklingError: invalid load key, '\x08'.

System info:

  • Ubuntu with a cuda supported gpu
  • pytorch 1.10.1

Somebody help out with this confusion. Thanks in advance!

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

1 participant