YOLOP
YOLOP copied to clipboard
Is `demo.py` supposed to work with *ONNX* models ?
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!