I have a custom yolov7_tiny model (with custom dataset and classes) converted to onnx. Currently I’m trying to convert it into a hef file to run on the Hailo8 board. I’m trying to convert it on my x86 pc (without hailo installed in it) using dfc that hailo model zoo requires. I created a script with code provided here: https://www.macnica.co.jp/en/business/semiconductor/articles/hailo/144843/, and got this error message while trying to run the script to convert my model:
python dfc_script.py 1 ✘ 4s hailo_model_zoo
[info] Translation started on ONNX model yolov7_tiny
[info] Restored ONNX model yolov7_tiny (completion time: 00:00:00.07)
[info] Extracted ONNXRuntime meta-data for Hailo model (completion time: 00:00:00.27)
[info] Simplified ONNX model for a parsing retry attempt (completion time: 00:00:00.64)
Traceback (most recent call last):
File “/run/media/issatays/ADATAExternal/GitStuffD/hailo_model_zoo/.venv/lib/python3.8/site-packages/hailo_sdk_client/sdk_backend/parser/parser.py”, line 220, in translate_onnx_model
parsing_results = self._parse_onnx_model_to_hn(
File “/run/media/issatays/ADATAExternal/GitStuffD/hailo_model_zoo/.venv/lib/python3.8/site-packages/hailo_sdk_client/sdk_backend/parser/parser.py”, line 300, in _parse_onnx_model_to_hn
return self.parse_model_to_hn(
File “/run/media/issatays/ADATAExternal/GitStuffD/hailo_model_zoo/.venv/lib/python3.8/site-packages/hailo_sdk_client/sdk_backend/parser/parser.py”, line 340, in parse_model_to_hn
converter = ONNXConverter(
File “/run/media/issatays/ADATAExternal/GitStuffD/hailo_model_zoo/.venv/lib/python3.8/site-packages/hailo_sdk_client/model_translator/onnx_translator/onnx_translator.py”, line 170, in init
super().init(
File “/run/media/issatays/ADATAExternal/GitStuffD/hailo_model_zoo/.venv/lib/python3.8/site-packages/hailo_sdk_client/model_translator/edge_nn_translator.py”, line 27, in init
super().init(graph, start_node_names, end_node_names)
File “/run/media/issatays/ADATAExternal/GitStuffD/hailo_model_zoo/.venv/lib/python3.8/site-packages/hailo_sdk_client/model_translator/translator.py”, line 51, in init
self._calculate_valid_subgraph_scope()
File “/run/media/issatays/ADATAExternal/GitStuffD/hailo_model_zoo/.venv/lib/python3.8/site-packages/hailo_sdk_client/model_translator/translator.py”, line 388, in _calculate_valid_subgraph_scope
current_vertex.in_valid_subgraph = True
AttributeError: ‘NoneType’ object has no attribute ‘in_valid_subgraph’
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “dfc_script.py”, line 22, in
hn, npz = runner.translate_onnx_model(onnx_path, model_name, start_node_names=[start_node], end_node_names=end_node, net_input_shapes=input_shape)
File “/run/media/issatays/ADATAExternal/GitStuffD/hailo_model_zoo/.venv/lib/python3.8/site-packages/hailo_sdk_common/states/states.py”, line 16, in wrapped_func
return func(self, *args, **kwargs)
File “/run/media/issatays/ADATAExternal/GitStuffD/hailo_model_zoo/.venv/lib/python3.8/site-packages/hailo_sdk_client/runner/client_runner.py”, line 1158, in translate_onnx_model
parser.translate_onnx_model(
File “/run/media/issatays/ADATAExternal/GitStuffD/hailo_model_zoo/.venv/lib/python3.8/site-packages/hailo_sdk_client/sdk_backend/parser/parser.py”, line 260, in translate_onnx_model
parsing_results = self._parse_onnx_model_to_hn(
File “/run/media/issatays/ADATAExternal/GitStuffD/hailo_model_zoo/.venv/lib/python3.8/site-packages/hailo_sdk_client/sdk_backend/parser/parser.py”, line 300, in _parse_onnx_model_to_hn
return self.parse_model_to_hn(
File “/run/media/issatays/ADATAExternal/GitStuffD/hailo_model_zoo/.venv/lib/python3.8/site-packages/hailo_sdk_client/sdk_backend/parser/parser.py”, line 340, in parse_model_to_hn
converter = ONNXConverter(
File “/run/media/issatays/ADATAExternal/GitStuffD/hailo_model_zoo/.venv/lib/python3.8/site-packages/hailo_sdk_client/model_translator/onnx_translator/onnx_translator.py”, line 170, in init
super().init(
File “/run/media/issatays/ADATAExternal/GitStuffD/hailo_model_zoo/.venv/lib/python3.8/site-packages/hailo_sdk_client/model_translator/edge_nn_translator.py”, line 27, in init
super().init(graph, start_node_names, end_node_names)
File “/run/media/issatays/ADATAExternal/GitStuffD/hailo_model_zoo/.venv/lib/python3.8/site-packages/hailo_sdk_client/model_translator/translator.py”, line 51, in init
self._calculate_valid_subgraph_scope()
File “/run/media/issatays/ADATAExternal/GitStuffD/hailo_model_zoo/.venv/lib/python3.8/site-packages/hailo_sdk_client/model_translator/translator.py”, line 388, in _calculate_valid_subgraph_scope
current_vertex.in_valid_subgraph = True
AttributeError: ‘NoneType’ object has no attribute ‘in_valid_subgraph’
How can I tackle this issue?