Hello,
I am converting my custom onnx model to hef format. I succeeded in the first step of parsing and now I have problems with optimization.
The steps that I have performed:
python3.8 -m venv hailo_env
source hailo_env/bin/activate
pip install hailo_dataflow_compiler-3.27.0-py3-none-linux_x86_64.whl
pip install hailo_model_zoo-2.11.0-py3-none-any.whl
git clone GitHub - hailo-ai/hailo_model_zoo: The Hailo Model Zoo includes pre-trained models and a full building and evaluation environment
(hailo_env) sensorama@sensorama-ubuntu-pc:~/convert_to_hef$ hailomz parse --hw-arch hailo8l --ckpt ./best.onnx yolov8n
Start run for network yolov8n …
Initializing the runner…
[info] Translation started on ONNX model yolov8n
[info] Restored ONNX model yolov8n (completion time: 00:00:00.17)
[info] Extracted ONNXRuntime meta-data for Hailo model (completion time: 00:00:00.80)
[info] NMS structure of yolov8 (or equivalent architecture) was detected.
[info] In order to use HailoRT post-processing capabilities, these end node names should be used: /model.22/cv2.0/cv2.0.2/Conv /model.22/cv3.0/cv3.0.2/Conv /model.22/cv2.1/cv2.1.2/Conv /model.22/cv3.1/cv3.1.2/Conv /model.22/cv2.2/cv2.2.2/Conv /model.22/cv3.2/cv3.2.2/Conv.
[info] Start nodes mapped from original model: ‘images’: ‘yolov8n/input_layer1’.
[info] End nodes mapped from original model: ‘/model.22/cv2.0/cv2.0.2/Conv’, ‘/model.22/cv3.0/cv3.0.2/Conv’, ‘/model.22/cv2.1/cv2.1.2/Conv’, ‘/model.22/cv3.1/cv3.1.2/Conv’, ‘/model.22/cv2.2/cv2.2.2/Conv’, ‘/model.22/cv3.2/cv3.2.2/Conv’.
[info] Translation completed on ONNX model yolov8n (completion time: 00:00:01.55)
[info] Saved HAR to: /home/sensorama/convert_to_hef/yolov8n.har
(hailo_env) sensorama@sensorama-ubuntu-pc:~/convert_to_hef$ hailomz optimize --hw-arch hailo8l --har ./yolov8n.har yolov8n
Start run for network yolov8n …
Initializing the hailo8l runner…
Traceback (most recent call last):
File “/home/sensorama/hailo_env/bin/hailomz”, line 8, in
sys.exit(main())
File “/home/sensorama/hailo_env/lib/python3.8/site-packages/hailo_model_zoo/main.py”, line 122, in main
run(args)
File “/home/sensorama/hailo_env/lib/python3.8/site-packages/hailo_model_zoo/main.py”, line 111, in run
return handlersargs.command
File “/home/sensorama/hailo_env/lib/python3.8/site-packages/hailo_model_zoo/main_driver.py”, line 220, in optimize
model_script = _extract_model_script_path(
File “/home/sensorama/hailo_env/lib/python3.8/site-packages/hailo_model_zoo/main_driver.py”, line 55, in _extract_model_script_path
else resolve_alls_path(networks_alls_script, hw_arch=hw_arch, performance=performance)
File “/home/sensorama/hailo_env/lib/python3.8/site-packages/hailo_model_zoo/core/main_utils.py”, line 38, in resolve_alls_path
return path_resolver.resolve_alls_path(Path(hw_arch) / Path(“base” if not performance else “performance”) / path)
File “/home/sensorama/hailo_env/lib/python3.8/site-packages/hailo_model_zoo/utils/path_resolver.py”, line 29, in resolve_alls_path
raise FileNotFoundError(“no alls found for requested hw_arch”)
FileNotFoundError: no alls found for requested hw_arch
I don’t understand where the error is, because the yolov8n.alls file is in the generic folder and I also moved it to the hailo8l folder
Please, help me with this problem.