Issue with YOLOv5s Model Compilation in Hailo Model Zoo

Environment

  • Hailo DFC Version: 3.30.0
  • OS: Linux, Kernel: 5.15.167.4-microsoft-standard-WSL2
  • System: AMD Ryzen 7 5800X 8-Core Processor, 31GB RAM

The Issue

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

  1. Why is the system looking for a ‘cascades’ directory that doesn’t exist?
  2. Could this be related to an incomplete installation of the Hailo Model Zoo?
  3. What’s the correct way to compile a custom YOLOv5s model using hailomz?

Any guidance or workarounds would be greatly appreciated. Thank you!

Welcome to the Hailo Community!

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:

  1. Where can I find the official installation instructions for the Hailo AI Software Suite Docker?
  2. Are there any specific system requirements I should be aware of?
  3. After installing Docker, what are the exact commands to pull and run the Hailo AI Software Suite container?
  4. 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?

Thanks for your help!

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.

Hi, thank you for the clarification earlier.

I successfully compiled my own .onnx model into a .hef using the Hailo Dataflow Compiler — the process worked fine.

I then deployed the compiled .hef model on a Raspberry Pi 5 using the official hailo-rpi5-examples. I ran inference using both:

  • hailortcli run /path/to/custom_yolov5s.hef — inference runs correctly with ~123 FPS
  • detection.py from basic_pipelines with proper --hef-path, --labels-json, and --input arguments

Inference runs smoothly (video plays, frame count increases), and logs like:

QoS message received from avdec_h264-0  
Frame count: 409

appear in the terminal.

However, no bounding boxes are drawn, and no detection results are printed, even though I used --use-frame and lowered the NMS score threshold.

I confirmed:

  • The model was retrained on a single class barcode
  • The .json file is formatted per Hailo postprocess schema (with labels, num_classes, meta_arch, device_pre_post_layers)
  • The .hef includes NMS (nms: true in YAML)
  • I added the correct pipeline YAML to set nms-score-threshold: 0.1

So far, the model appears to run, but no objects are detected or drawn.

Any ideas what could be wrong? Could the issue be due to improper postprocessing config or dimension mismatch?

Thanks in advance!