Hi all,
I am using my hailo-8L with frigate in home assistant and I downloaded the yolov11s model which is impressively accurate also at night. Anyway inference time is around 26 ms, which is a bit high. The model is compiled at 640x640 and it would be beneficial to have it at 320x320 (which is also the size suggested in Frigate docs). Is there a place from which I can download yolov11s model compiled at 320x320?
thank you in advance
Cristiano
P.S. I have a macos laptop and I can’t not make hailo software suite work to build the .hef file myself
Hi @cridemichel,
Unfortunately Hailo doesn’t currently provide pre-compiled YOLOv11s HEF files at 320x320 - the Model Zoo only ships 640x640 variants.
To get a 320x320 HEF you’d need to compile it yourself using the Hailo Dataflow Compiler (DFC) with something like hailomz compile yolov11s --hw-arch hailo8l --resize 320 320 , which does require an x86_64 Linux environment.
Since you’re on macOS, you might try running the DFC inside a Docker container Convert Ultralytics yolov8n.pt to yolov8n.hef fails.
Alternatively, as a quicker workaround to reduce inference time without recompiling, you might try switching to yolov11n (the nano variant) at 640x640, which should be noticeably faster on the 8L while still providing reasonable accuracy for most Frigate use cases.
Thanks,
Michael.
Dear Michael,
I would like to stick to yolov11s because it is significantly more accurate
than n variant night time. I do have access to a linux machine, in order to execute
hailomz, do I need to install the whole hailo software suite on this linux machine?
What file do I have to supply to hailomz? Sorry for the silly question but I am newbie to this,
thank you,
Cristiano
Cristiano De Michele
cristiano.demichele@gmail.com
Hi @cridemichel,
The easiest path might be to install the full suite since it bundles everything together and ensures version compatibility, but if you prefer a lighter setup, you could install just the DFC and the Model Zoo. Here’s roughly what you’d do on your Linux machine:
- Go to https://hailo.ai/developer-zone/sw-downloads/ and download the Dataflow Compiler wheel file (for Hailo-8L, you’d want the v3.x branch — currently v3.33.0). You might need to create a free Hailo developer account if you don’t have one.
- Set up a Python virtualenv and install it:
virtualenv hailo_venv
source hailo_venv/bin/activate
pip install hailo_dataflow_compiler-3.33.0-py3-none-linux_x86_64.whl
- Clone and install the Model Zoo (use the v2.x branch for Hailo-8L):
git clone https://github.com/hailo-ai/hailo_model_zoo.git
cd hailo_model_zoo
pip install -e .
- You’ll also need a folder of calibration images (typically ~64 images from COCO val2017 or similar should work). The Model Zoo might handle downloading the ONNX checkpoint for yolov11s automatically, but if not, you can export it from Ultralytics with
yolo export model=yolov11s.pt format=onnx imgsz=320.
- Then compile:
hailomz compile yolov11s --hw-arch hailo8l --calib-path /path/to/calibration/images --performance
Regarding the 320x320 input size - you might need to modify the model’s YAML config in the Model Zoo (hailo_model_zoo/cfg/networks/yolov11s.yaml) to change the input resolution from 640 to 320, or export the ONNX at 320x320 and supply it via --ckpt ./yolov11s_320.onnx. The system requirements are Ubuntu 22.04/24.04 x86_64 with 16+ GB RAM - a GPU is helpful for the optimization step (faster and potentially better quantization) but the process can run on CPU only, just slower and with a warning about reduced optimization. Note that without a GPU the accuracy of the quantized model might be slightly lower, but it should still work fine for most use cases.
Thanks,
Michael.
thank you very very much!
Any reason why not yolo26s? 11 is pretty old now.
yolo26s is much slower than yolov11s but of course if I will be able to recompile these models at 320x320 I will give it a try, thank you for pointing it out,
best Cristiano
I just tried yolo26s and with my hailo-8L on my rpi5 I am surprisingly getting around 24 ms of inference speed!
…the only problem with yolo26s used for frigate is that I am getting 0 detection,
pertaining part of frigate configuration is the following one:
detectors:
hailo:
type: hailo8l
device: PCIe
model:
width: 640
height: 640
input_tensor: nhwc
input_pixel_format: rgb
input_dtype: int
model_type: yolo-generic
labelmap_path: /labelmap/coco-80.txt
is there anything I have to change or simply yolo26s does not fall into the category of yolo-generic models?
best C.
Dear Michael,
I did installation steps and everything went fine until I issued the command
pip install -e .
which gives me
error: subprocess-exited-with-error
× Getting requirements to build editable did not run successfully.
│ exit code: 1
╰─> [26 lines of output]
Traceback (most recent call last):
File “/home/demichel/HAILO/hailo_venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py”, line 389, in
main()
File “/home/demichel/HAILO/hailo_venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py”, line 373, in main
json_out[“return_val”] = hook(**hook_input[“kwargs”])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/demichel/HAILO/hailo_venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py”, line 157, in get_requires_for_build_editable
return hook(config_settings)
^^^^^^^^^^^^^^^^^^^^^
File “/tmp/pip-build-env-fy3_2upn/overlay/lib/python3.12/site-packages/setuptools/build_meta.py”, line 481, in get_requires_for_build_editable
return self.get_requires_for_build_wheel(config_settings)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/tmp/pip-build-env-fy3_2upn/overlay/lib/python3.12/site-packages/setuptools/build_meta.py”, line 333, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/tmp/pip-build-env-fy3_2upn/overlay/lib/python3.12/site-packages/setuptools/build_meta.py”, line 301, in _get_build_requires
self.run_setup()
File “/tmp/pip-build-env-fy3_2upn/overlay/lib/python3.12/site-packages/setuptools/build_meta.py”, line 520, in run_setup
super().run_setup(setup_script=setup_script)
File “/tmp/pip-build-env-fy3_2upn/overlay/lib/python3.12/site-packages/setuptools/build_meta.py”, line 317, in run_setup
exec(code, locals())
File “”, line 19, in
importlib.metadata.PackageNotFoundError: No package metadata was found for
The Dataflow Compiler package ‘hailo-dataflow-compiler’ was not found.
Please verify working in the correct virtualenv.
If you are not an Hailo customer, please visit us at https://hailo.ai/
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed to build ‘file:///home/demichel/HAILO/hailo_model_zoo’ when getting requirements to build editable
how can I fix this?
thank you in advance
Cristiano
regarding my previous post, issue was that I was not using python 3.10, moreover I discovered that with hailo model zoo v2.18 there is a bug which prevents compilation but switching to v2.17 fixes the problem, now I am finally compiled yolov11s at 320x320
and it works in frigate with an impressive inference time of 12 ms,
Now, if I want to recompile also yolo26s at 320 to make it work in frigate, what I have to do?
just to share with others whart I did, the final worflow to recompile a yolo model for hailo-8L is the following one
-
install wsl with ubuntu 22.04 LTS
-
update the list of packages:
sudo apt update
-
install some missing packages:
sudo apt install -y libpython3-dev python3-venv unzip cmake python3-dev python3-pip python3-tk graphviz graphviz-dev build-essential virtualenv python3-torch
[ I am not sure whether python3-torch is really needed ]
virtualenv hailo_venv
source hailo_venv/bin/activate
- install the data flow compiler:
pip install hailo_dataflow_compiler-3.33.0-py3-none-linux_x86_64.whl
- clone the v2.17 branch of hailo model zoo and install other python packages
git clone -b v2.17 GitHub - hailo-ai/hailo_model_zoo: The Hailo Model Zoo includes pre-trained models and a full building and evaluation environment · GitHub
cd hailo_model_zoo
pip install -e .
hailomz compile yolov11s --hw-arch hailo8l --calib-path /path/to/calibration/images --performance
a curiosity: without GPU, the compiler uses just 64 images for calibration, how much accuracy is lost this way? Could you provide an estimate?