yolo v5 export to torchscript: how to generate constants.pkl

19 Views Asked by At

i cloned yolo5 and

  • setted up an virtenv
  • pip install -r requirements.txt
  • python export.py --weights yolov5s-seg.pt --include torchscript --img 640 --device cpu

all went fine: TorchScript: export success ✅ 1.6s, saved as yolov5s-seg.torchscript

But if i use this Model, i get

panic: libtorch API Error: PytorchStreamReader failed locating file constants.pkl: file not found

The archive yolov5s-seg.pt contains no constants.pkl.

How can i generate constants.pkl?

0

There are 0 best solutions below