Is it necessary to insert the Hailo-8L into the computer when installing Hailo Software, using the M.2 interface?
I want to retrain the model, but it’s clear that the conversion from PT to ONNX to HEF cannot be done on a Raspberry Pi. Therefore, I am currently using WSL2 (Ubuntu 22.04). Do I need to take the Hailo AI kit from the Raspberry Pi and install it on a Windows machine in order to install the Hailo Software?
Hello @KNN2157,
Welcome to the Hailo Community!
There’s no need to physically insert the Hailo8L into your computer. However, you will need to install the DFC on your PC and utilize it to create your custom HEF.
I trust this provides the information you were seeking. Should you have additional inquiries, don’t hesitate to reach out.
Best regards,
Alright, thanks. I’ll first complete the installation of HailoSoftware.
Windows can only inference with HailoRT (windows Ver)
To use DFC, you can use Linux Ubuntu os version that is compatible with the DFC version.
Regarding the installation of Hailo Suite Software Docker, must the Docker version be 20.10.07 or 0.6? Is it feasible to use newer versions, such as 20.10.12 or above?
Should be okay usingr newer versions, but we didn’t validate.
alright,i will try it!
HI,Omria;This is hailo info:
[info] Current Time: 17:45:47, 07/16/24
[info] CPU: Architecture: x86_64, Model: 12th
[info] Memory: Total: 15GB, Available: 14GB
[info] System info: OS: Linux, Kernel: 5.15.153.1-microsoft-standard-WSL2
[info] Hailo DFC Version: 3.28.0
[info] HailoRT Version: Not Installed
[info] PCIe: No Hailo PCIe device was found
i use this command----hailomz compile --ckpt yolov5s.onnx --calib-path /path/to/calibration/imgs/dir/ --yaml path/to/yolov5s.yaml --start-node-names name1 name2 --end-node-names name1 --classes 80.
But,it’s doesn’t work. error— hailomz: command not found.I’m just converting from onnx to hef on wsl2. now what should i do next step. i saw hailo -h, using hailo compiler but arguments --hw0arch need hailo hardware. i have a hailo-8l hardware on the raspberry pi 5.converting from onnx to hef must use hailo hardware?
Hey @KNN2157,
It looks like you’re encountering an issue with the hailomz
command not being found. This suggests that you haven’t installed the Hailo Model Zoo in the same virtual environment as the DFC (Deep Fusion Compiler).
To resolve this, you’ll need to ensure that the Hailo Model Zoo is installed in the same virtual environment as the DFC. You can do this by cloning the Hailo Model Zoo repository and then running the setup.py
script. For more information, please check out the instructions in the Hailo Model Zoo repository:
As for your hardware-related question, you’ll need to add the --hw-arch hailo8l
flag when using the DFC to create your model.
For more details on how to create models using the DFC, please refer to the DFC guide in the Hailo developer documentation: https://hailo.ai/developer-zone/documentation/
There’s also a simplified post that covers the process of creating custom HEF files using the DFC and the Hailo Model Zoo:
You can see the flow in hailomz as follows :
Let me know if you have any other questions!
Best regards,
I finished installing the hailo model zoo。
use command :
hailomz compile --ckpt /root/model_onnx/yolov5s.onnx --calib-path /root/model_onnx/images --yaml /root/DFC_hailo/hailo_model_zoo/hailo_model_zoo/cfg/networks/yolov5s.yaml --start-node-names ‘start-name1’ ‘name2’ --end-node-names ‘name1’ --classes 80
error info:
Start run for network yolov5s …
Initializing the hailo8 runner…
[info] Translation started on ONNX model yolov5s
[info] Restored ONNX model yolov5s (completion time: 00:00:00.09)
[info] Extracted ONNXRuntime meta-data for Hailo model (completion time: 00:00:00.50)
[info] Simplified ONNX model for a parsing retry attempt (completion time: 00:00:01.22)
Traceback (most recent call last):
File “/root/pyhailo/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 “/root/pyhailo/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 “/root/pyhailo/lib/python3.8/site-packages/hailo_sdk_client/sdk_backend/parser/parser.py”, line 340, in parse_model_to_hn
converter = ONNXConverter(
File “/root/pyhailo/lib/python3.8/site-packages/hailo_sdk_client/model_translator/onnx_translator/onnx_translator.py”, line 170, in init
super().init(
File “/root/pyhailo/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 “/root/pyhailo/lib/python3.8/site-packages/hailo_sdk_client/model_translator/translator.py”, line 51, in init
self._calculate_valid_subgraph_scope()
File “/root/pyhailo/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 “/root/pyhailo/bin/hailomz”, line 33, in
sys.exit(load_entry_point(‘hailo-model-zoo’, ‘console_scripts’, ‘hailomz’)())
File “/root/DFC_hailo/hailo_model_zoo/hailo_model_zoo/main.py”, line 122, in main
run(args)
File “/root/DFC_hailo/hailo_model_zoo/hailo_model_zoo/main.py”, line 111, in run
return handlersargs.command
File “/root/DFC_hailo/hailo_model_zoo/hailo_model_zoo/main_driver.py”, line 250, in compile
_ensure_optimized(runner, logger, args, network_info)
File “/root/DFC_hailo/hailo_model_zoo/hailo_model_zoo/main_driver.py”, line 73, in _ensure_optimized
_ensure_parsed(runner, logger, network_info, args)
File “/root/DFC_hailo/hailo_model_zoo/hailo_model_zoo/main_driver.py”, line 108, in _ensure_parsed
parse_model(runner, network_info, ckpt_path=args.ckpt_path, results_dir=args.results_dir, logger=logger)
File “/root/DFC_hailo/hailo_model_zoo/hailo_model_zoo/core/main_utils.py”, line 97, in parse_model
model_name = translate_model(runner, network_info, ckpt_path, tensor_shapes=start_node_shapes)
File “/root/DFC_hailo/hailo_model_zoo/hailo_model_zoo/utils/parse_utils.py”, line 28, in translate_model
runner.translate_onnx_model(
File “/root/pyhailo/lib/python3.8/site-packages/hailo_sdk_common/states/states.py”, line 16, in wrapped_func
return func(self, *args, **kwargs)
File “/root/pyhailo/lib/python3.8/site-packages/hailo_sdk_client/runner/client_runner.py”, line 1158, in translate_onnx_model
parser.translate_onnx_model(
File “/root/pyhailo/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 “/root/pyhailo/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 “/root/pyhailo/lib/python3.8/site-packages/hailo_sdk_client/sdk_backend/parser/parser.py”, line 340, in parse_model_to_hn
converter = ONNXConverter(
File “/root/pyhailo/lib/python3.8/site-packages/hailo_sdk_client/model_translator/onnx_translator/onnx_translator.py”, line 170, in init
super().init(
File “/root/pyhailo/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 “/root/pyhailo/lib/python3.8/site-packages/hailo_sdk_client/model_translator/translator.py”, line 51, in init
self._calculate_valid_subgraph_scope()
File “/root/pyhailo/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’
I have traced the relevant code according to the error, but it has not been solved, because it is a command line, and it cannot be debugged.
Hi @KNN2157, can you share a picture of Netron with the last Conv’s of hte ONNX? It might be the the end node names are different on your ONNX file.
sure
by the way I have no problem using your yolov5s.onxx to convert.Might as well look at the new problem About DFC and hailo_zoo_model - #11 by KNN2157
Please make sure that the 3 last Conv names are as written in the netowrk yaml
Is it necessary to write all the names pointed to by the arrows in the YAML file? Change from the first image below to the second image.
yes, these are the nodes that the tool looks for
Then he made a new mistake For Hailo Software - #15 by KNN2157
Ok, so you’ve made progress! you’ve passed the parsing stage. Now, before the optimization the tool wants to stitch the NMS on the end layers, but amybe the names were changed. One way of checking the names is with hailo visualizer <MY FILE>.har
See what are the names, and put it in the NMS Json config:
This is taken from this file:
hailo_model_zoo/hailo_model_zoo/cfg/postprocess_config/yolov5s_nms_config.json at master · hailo-ai/hailo_model_zoo (github.com)
Thanks a lot .it’s look like worked.
This is the picture. There shouldn’t be any problem, right?
BTW,Where should I find DFC version 3.27,because i have seen other posts suggesting this is an issue of incompatibility between Firmware Version: 4.17.0 (release, app, extended context switch buffer) and DFC version 3.28.
But,the offical web currently only has version 3.28.
This looks ok, the compilation is successfull