We’ve been compiling some fairly off-the-beaten-track models onto the Hailo-8 (well outside the usual vision networks), and hit a handful of snags that I reckon are common to anyone converting their own model. For the typical camera/detection project most of this is smooth sailing — but if you’re downloading a model off Hugging Face, or crazy enough to write your own, these are the bits that bite:
1. Grab the matching compiler — and the right branch. The Developer Zone will cheerfully offer you Dataflow Compiler 5.x, but that’s for the Hailo-10/15. For a Hailo-8 you want the 3.x branch, matched to your HailoRT/firmware version (e.g. firmware 4.23 pairs with DFC 3.33). If the downloads page only shows you 5.x, the older versions are under the Archive option. A mismatch gives you a compiled model that won’t load, with an unhelpful error.
2. The compiler runs on a PC, not the Pi. It’s x86 Linux only, ships as a Python wheel, and is fussy about the Python version (3.10). A container or a matched virtual-env avoids a lot of pain. You compile on a laptop/desktop, then copy the result to the Pi to run.
3. Fix your input size before compiling. The Hailo only compiles static shapes. A lot of models pulled off the internet have a flexible input size — re-export yours at one fixed resolution (your camera’s) first, or the compile will complain.
4. Keep the “glue” off the chip. The Hailo is brilliant at the network itself, but the surrounding steps — image resize, NMS, arg-max, boolean masks, anything exotic — often aren’t supported and will fail the compile. Helpfully, the compiler tells you exactly where to cut; run those bits on the Pi’s CPU and let the accelerator do the heavy lifting.
5. ONNX is the smoother on-ramp than TFLite if you built or converted the model yourself. (For the ready-made models in Hailo’s zoo, the provided path is fine.)
6. Quantisation needs a proper calibration set. The int8 conversion is where the speed comes from, but feed it a representative handful of real images — not random noise, not three samples — or accuracy suffers. Worth checking accuracy on the full-precision model first, before blaming the chip.