I’m trying to compile a custom YOLOv5s model using Hailo Model Zoo but encountering the following error:
(hailodfc) csn24@HSUNdesktop:~/hailo_model_zoo$ hailomz compile yolov5s --ckpt=/home/csn24/best.onnx --hw-arch hailo8l --calib-path /home/csn24/train --classes 2 --performance
Traceback (most recent call last):
File "/home/csn24/hailodfc/bin/hailomz", line 8, in <module>
sys.exit(main())
File "/home/csn24/hailodfc/lib/python3.10/site-packages/hailo_model_zoo/main.py", line 115, in main
parser = *create*args_parser()
File "/home/csn24/hailodfc/lib/python3.10/site-packages/hailo_model_zoo/main.py", line 89, in *create*args_parser
command_parser = command.parser_fn()
File "/home/csn24/hailodfc/lib/python3.10/site-packages/hailo_model_zoo/plugin/cascade_main.py", line 16, in get_argparser
configurations = [d.name for d in Path(CASCADES_DIR).iterdir() if d.is_dir()]
File "/home/csn24/hailodfc/lib/python3.10/site-packages/hailo_model_zoo/plugin/cascade_main.py", line 16, in <listcomp>
configurations = [d.name for d in Path(CASCADES_DIR).iterdir() if d.is_dir()]
File "/usr/lib/python3.10/pathlib.py", line 1017, in iterdir
for name in self._accessor.listdir(self):
FileNotFoundError: [Errno 2] No such file or directory: '/home/csn24/hailodfc/lib/python3.10/site-packages/hailo_model_zoo/cfg/cascades'
What I’m Trying to Do
I’m trying to compile a custom-trained YOLOv5s model (exported as ONNX) for the Hailo8L hardware. The model is trained for a 2-class detection task. I’m using the Hailo Model Zoo CLI to perform the compilation.
Questions
Why is the system looking for a ‘cascades’ directory that doesn’t exist?
Could this be related to an incomplete installation of the Hailo Model Zoo?
What’s the correct way to compile a custom YOLOv5s model using hailomz?
Any guidance or workarounds would be greatly appreciated. Thank you!
I recommend to install the Hailo Ai Software Suite Docker. That makes installation and upgrading easier.
This option will ask the Hailo Dataflow Compiler to try harder to get the best performance. It will increase compilation time significantly. I recommend to only use this options once you know the model compiles correctly.
Thank you for your suggestion about using the Hailo AI Software Suite Docker. That seems like the best solution for my issue.
Could you please provide more details on how to install the Hailo AI Software Suite Docker? Specifically:
Where can I find the official installation instructions for the Hailo AI Software Suite Docker?
Are there any specific system requirements I should be aware of?
After installing Docker, what are the exact commands to pull and run the Hailo AI Software Suite container?
Will this Docker container include all necessary components including the Model Zoo and the cascade directories that seem to be missing in my current setup?
I’m currently using WSL2 on Windows with Linux kernel 5.15.167.4. Would this environment support the Docker installation properly?
In the Developer Zone - Software Downloads right next to the download is a link to the installation instructions.
Yes, this is part of the installation instruction.
Yes, the Docker contains everything except the PCIe driver. If you have a Hailo device installed in your model build machine you can install the PCIe driver and run inference from within the Docker.
No. This WSL2 support is not intended for normal use. It is there to allow vendors of Windows tools for machine vision to run the Hailo Dataflow Compiler under the hood. Please install the Hailo AI Software Suite Docker on Ubuntu directly.