Forums - yolov8m convert to dlc failed

2 posts / 0 new
Last post
yolov8m convert to dlc failed
andy.linluo
Join Date: 14 Aug 21
Posts: 10
Posted: Mon, 2023-05-22 22:03

Hi, I tried to convert yolov8m.pt (https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8m.pt) to dlc

with snpe-2.10.0.4541 but an error occured. Please find the details below. Please let me know how to fix it.

snpe-pytorch-to-dlc --input_network yolov8m/yolov8m.pt --input_dim input "1,3,640,640" --output_path yolov8m/yolov8m.dlc
2023-05-22 21:52:21,008 - 209 - ERROR - Encountered Error: [enforce fail at inline_container.cc:222] . file not found: yolov8m/constants.pkl
Traceback (most recent call last):
  File "/home/aluo/qualcomm/snpe-2.10.0.4541/bin/x86_64-linux-clang/snpe-pytorch-to-dlc", line 47, in main
    converter = PyTorchConverterFrontend(args)
  File "/home/aluo/qualcomm/snpe-2.10.0.4541/lib/python/qti/aisw/converters/pytorch/pytorch_to_ir.py", line 23, in __init__
    **kwargs)
  File "/home/aluo/qualcomm/snpe-2.10.0.4541/lib/python/qti/aisw/converters/relay/relay_to_ir.py", line 282, in __init__
    self.importer.convert_to_relay(self.input_model_path)
  File "/home/aluo/qualcomm/snpe-2.10.0.4541/lib/python/qti/aisw/converters/relay/importers/pytorch_importer.py", line 374, in convert_to_relay
    pytorch_model = torch.jit.load(input_model_path)
  File "/home/aluo/.local/lib/python3.6/site-packages/torch/jit/_serialization.py", line 161, in load
    cpp_module = torch._C.import_ir_module(cu, str(f), map_location, _extra_files)
RuntimeError: [enforce fail at inline_container.cc:222] . file not found: yolov8m/constants.pkl

  • Up0
  • Down0
weihuan
Join Date: 12 Apr 20
Posts: 270
Posted: Fri, 2023-05-26 22:05

Dear developer,

Thanks for sharing this new model to us and try to convert on SNPE SDK.

You could export this model to onnx as onnx converter would be better than torch.

BR.

Wei

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.