In my first blog post about Hailo last year, not using a Docker container to create a Python 3.10 environment caused me significant troubles, and I actually failed to complete the demonstration. Today, we are going to walk through the entire Hailo process again.
Note: Since my Raspberry Pi 5 comes with Python 3.11 pre-installed, I have selected the Python 3.11 version. You should choose the appropriate version that matches your Python environment for installation.
Executing on device: 0001:03:00.0 Identifying board Control Protocol Version: 2 Firmware Version: 4.22.0 (release,app,extended context switch buffer) Logger Version: 0 Board Name: Hailo-8 Device Architecture: HAILO8L Serial Number: HLDDLBB243201887 Part Number: HM21LB1C2LAE Product Name: HAILO-8L AI ACC M.2 B+M KEY MODULE EXT TMP
➜ ~
Mine is a HAILO8L.
2 Models
2.1 Download .hefs
For simplicity, I directly downloaded some .hef files from HAILO8L Models
2.2 hailortcli run.hefs
The .hef (Hailo Executable File) format is platform-independent: a single .hef file can be executed on both x86_64 hosts and aarch64 (ARM64) hosts, as long as the system has the appropriate Hailo runtime (HailoRT) and driver installed.
This is possible because the .hef file does not contain host-specific binaries or compiled CPU code. Instead, it encapsulates the compiled Hailo neural network graph targeted for the Hailo hardware accelerator itself. The host platform - whether x86_64 or aarch64 - acts mainly as a controller that loads the .hef into the Hailo device, configures it, and orchestrates inference.
In other words, the .hef file is tied to the Hailo hardware (e.g., Hailo-8, Hailo-8L, Hailo-10) but is independent of the host CPU architecture. This allows the same .hef model file to be deployed seamlessly across development environments (for example, a workstation with an x86_64 CPU and PCIe card) and edge devices (for example, a Raspberry Pi 5 or Jetson board with an ARM64 CPU and M.2 card).
3. Demonstration
3.1 Single Image - Object Detection and Image Segmentation
In this demonstration, 2 famous images from Ultralytics are respectively adopted for object detection and image segmentation:
Like other dedicated AI hardware platforms, Hailo‘s software stack involves compiling a trained model, converting it from the standard ONNX format into its proprietary HEF (Hailo Executable Format) file optimized for its own architecture.