Unable to Find hailomc to Convert ONNX (from YOLOv5) to .hef – ROS 2 Project on Raspberry Pi 5 with Hailo AI HAT+

Hello,

I’m working on an autonomous driving project on Raspberry Pi 5 using the Hailo AI HAT+. The project involves:

ROS 2 Humble, running inside a Docker container (hailo_ros2)
YOLOv5 model that detects traffic signs, exported from .pt to .onnx
Goal: Convert the ONNX model to .hef to run inference on the Hailo hardware

Current Setup:

  • Hailo SDK 4.20.0 (as confirmed by dpkg -l | grep hailo)
  • hailortcli scan successfully detects the device:

yaml

CopyEdit

Hailo Devices:
[-] Device: 0001:01:00.0
  • ROS 2 works inside Docker, though numpy throws a missing libblas.so.3 error, which I can resolve separately.

Problem:

I cannot find the Hailo Model Compiler (hailomc), which I need to convert my ONNX model to .hef. I’ve tried:

  • Running which hailomc – no result
  • Searching entire system with find / -name "hailomc" – nothing found
  • Attempted to download hailo-sdk-4.20.0.run from the Developer Zone – returns 404 Not Found
  • Installed all available .deb packages (hailo-all, hailort, hailo-tappas-core, etc.)
  • The model (yolov5_back.onnx) is on the host Raspberry Pi (not inside Docker)

What I Need:

I believe hailomc is part of the full SDK or development toolchain that isn’t bundled in the .deb packages. Can you please:

  1. Provide access to hailomc (e.g., full SDK or separate installer)?
  2. Confirm whether it’s compatible to run on Raspberry Pi 5?
  3. If it’s only available on x86, can I compile the .hef on a PC and then deploy it to the Pi?

->Related ROS 2 Docker Environment:

Inside the Docker container running ROS 2:

bash

CopyEdit

docker start -ai hailo_ros2

ROS 2 runs, but certain CLI tools (ros2 doctor, ros2 wtf) throw errors due to missing NumPy dependencies (libblas.so.3). These are likely Python/Numpy environment issues unrelated to Hailo, but just sharing for full context.


TL;DR:
ONNX → HEF conversion blocked due to missing hailomc. All Hailo packages installed; device detected; working on ROS 2 in Docker. Need access to hailomc for YOLOv5-based traffic sign model.

Thank you for your help!

Best regards,
Saiteja Jampula

Welcome to the Hailo Community!

To convert a model from ONNX to .hef, you need an x86-based machine running Ubuntu 20.04 or 22.04 with a lot of RAM (Model Build Computer - image below left side). For certain optimizations, a high-performance NVIDIA GPU is recommended.

Inference can run on a wide range of hosts, including the Raspberry Pi with the Hailo-8 M.2 module (image below right side).

In the Developer Zone you will find the Hailo AI Software Suite Docker that will provide all necessary tools. The suite comes with built in tutorials. Run the following command to start a Jupyter Notebook server with notebooks for each step of the workflow.

hailo tutorial

Hello Hailo community,

I am trying to convert my YOLOv5 ONNX model to HEF format using the Hailo Model Zoo CLI tool (hailomz). I have followed the instructions from the official tutorial and placed my model (best.onnx) and calibration dataset in the appropriate directories.

I run the following command to compile the model:

bash

CopyEdit

hailomz compile yolov5s --ckpt=~/best.onnx --hw-arch hailo8l --calib-path ~/Downloads/train/images --classes 80 --performance

However, I encounter the following error:

pgsql

CopyEdit

Traceback (most recent call last):
  File "/home/aravind/Downloads/hailodfc/bin/hailomz", line 33, in <module>
    sys.exit(load_entry_point('hailo-model-zoo', 'console_scripts', 'hailomz')())
  File "/home/aravind/Downloads/hailo_model_zoo/hailo_model_zoo/main.py", line 122, in main
    run(args)
  File "/home/aravind/Downloads/hailo_model_zoo/hailo_model_zoo/main.py", line 101, in run
    from hailo_model_zoo.main_driver import compile, evaluate, optimize, parse, profile
  File "/home/aravind/Downloads/hailo_model_zoo/hailo_model_zoo/main_driver.py", line 16, in <module>
    from hailo_model_zoo.core.main_utils import (
  File "/home/aravind/Downloads/hailo_model_zoo/hailo_model_zoo/core/main_utils.py", line 18, in <module>
    from hailo_model_zoo.core.infer import infer_factory
  File "/home/aravind/Downloads/hailo_model_zoo/hailo_model_zoo/core/infer/infer_factory.py", line 14, in <module>
    discovered_plugins = {name: importlib.import_module(name) for _, name, _ in iter_namespace(hailo_model_zoo.core.infer)}
  File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/home/aravind/Downloads/hailo_model_zoo/hailo_model_zoo/core/infer/hw_infer_utils.py", line 6, in <module>
    from hailo_platform import (
ModuleNotFoundError: No module named 'hailo_platform'

I have tried the following:

  • Ensured I am running the command inside my Python virtual environment (hailodfc)
  • Verified that numpy and other dependencies are installed
  • Tried pip install hailo_platform but the package was not found in PyPI

Environment details:

  • Ubuntu 22.04
  • Python 3.10 (virtual environment hailodfc)
  • Hailo SDK version: 3.28.0 (and also tried 3.31.0)
  • ONNX model: YOLOv5s exported with ONNX 1.18.0
  • Calibration images path: ~/Downloads/train/images
  • Command used:

bash

CopyEdit

hailomz compile yolov5s --ckpt=~/best.onnx --hw-arch hailo8l --calib-path ~/Downloads/train/images --classes 80 --performance

Questions:

  • How do I properly install or set up the missing hailo_platform Python package?
  • Is there any environment setup script I might have missed after installing the Hailo SDK?
  • Is this error caused by incomplete installation of the Hailo SDK or dependencies?
  • Any recommended steps to fully set up the environment so hailomz can run without this error?

Additional notes:

I am following the tutorial here:

Any help to resolve this issue will be highly appreciated!

I recommend to install the Hailo AI Software Suite Docker. It solves most dependency issues and provides the easiest way to install and update all Hailo tools.

1 Like

Hi @KlausK ,

Thank you for suggesting Hailo AI Software Suite Docker. I have converted my model to .hef format.

Hello Hailo community,

I am working on running the hailo_object_detection_pkg ROS 2 Humble package on my Raspberry Pi 5. I have set up a Python virtual environment (venv_hailo_rpi5_examples) and installed the Hailo SDK Python packages inside it.

When I run the node inside the virtual environment using:

ros2 run hailo_object_detection_pkg hailo_node

I get the following error:

Failed to import hailo python module. Make sure you are in hailo virtual environment.
[ros2run]: Process exited with failure 1

Details and what I have tried:

  1. I activated the virtual environment before running the command.

  2. I verified that hailort and hailo_platform Python packages are installed in the virtual environment.

  3. When running the node, it still fails to import the hailo module.

  4. I suspect it may be related to environment variables or how ROS 2 invokes Python nodes with the virtual environment.

  5. I have also seen previous errors related to libhailort.so missing.

  6. I want to run the ROS 2 node leveraging the Hailo AI acceleration on Raspberry Pi 5.

My questions:

  1. How do I correctly run ROS 2 Python nodes that depend on the Hailo SDK inside a Python virtual environment?

  2. Are there special steps needed so ROS 2 uses the virtual environment’s Python interpreter and packages?

  3. Should I set specific environment variables (e.g., PYTHONPATH, LD_LIBRARY_PATH) before running ROS 2 nodes?

  4. Is it recommended to use the Hailo Docker image for ROS 2 instead of a virtual environment on the host OS?

  5. Any sample instructions or launch examples for running Hailo-accelerated ROS 2 nodes on Raspberry Pi 5?

Thank you very much for your support!