Forums - How to convert yolov4.onnx to DLC file on SNPE

1 post / 0 new
How to convert yolov4.onnx to DLC file on SNPE
hironobu.kobayashi
Join Date: 24 Feb 21
Posts: 1
Posted: Wed, 2021-04-21 01:16

Hi, I'm trying to convert yolov4.onnx to dlc file. 

first, I got yolov4.onnx from Github.

https://github.com/onnx/models/tree/master/vision/object_detection_segme...

second, I am trying to covert this ONNX file to DLC file using this command :

snpe-onnx-to-dlc --input_network yolov4.onnx --output_path yolov4.dlc

I am getting following error:

Encountered Error: Negative/placeholder dimensions is not supported.Expected shape: [0, 416, 416, 3] > 0
Note: Dynamic input batch_size not supported. Use --input_dim command to provide a static batch value
 
Stack Trace:
Traceback (most recent call last):
  File "/mnt/snpe-sdk/bin/x 86_64-linux-clang/snpe-onnx-to-dlc", line 41, in <module>
    graph = converter.convert()
  File "/mnt/snpe-sdk/lib/python/qti/aisw/converters/onnx/onnx_to_ir.py", line 115, in convert
    onnx_translations.OnnxTranslationBase.ADD_INPUT, value_info, self.graph)
  File "/mnt/snpe-sdk/lib/python/qti/aisw/converters/common/converter_ir/translation.py", line 51, in apply_method_to_op
    return translation.apply_method(method_name, *args, **kwargs)
  File "/mnt/snpe-sdk/lib/python/qti/aisw/converters/common/converter_ir/translation.py", line 17, in apply_method
    return self.indexed_methods[method_name](*args, **kwargs)
  File "/mnt/snpe-sdk/lib/python/qti/aisw/converters/onnx/onnx_translations.py", line 245, in add_input
    'Use --input_dim command to provide a static batch value'.format(shape))
RuntimeError: Negative/placeholder dimensions is not supported.Expected shape: [0, 416, 416, 3] > 0
Note: Dynamic input batch_size not supported. Use --input_dim command to provide a static batch value
 
How can I convert YOLO to DLC files?
 
Any help will be appreciated.
 
Thanks.
 
  • Up0
  • Down0

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.