Python api support in 'hailo-all'

I have a RPI-5 with an AI kit. I am trying to run .hef models. But dont seem to find a way other than use Gstreamer as shown in hailo-rpi5-examples I did try installing hailort and pcie driver manually along with pyhailort which led to a lot of issues for version 4.18(hailort). I started fresh and installed rpi os again but most of the solutions seem to work fine with ubuntu and not rpi os. Is there any proper solution to overcome these issues or is installing ubuntu the only solution as of now.

Hey @hyperwolf,

Welcome to the Hailo Community!

We’d like to help you with your installation issues on the Raspberry Pi OS. Could you please provide more details about the specific problems you’re encountering?

Update Status: We’ve released an update to the Raspberry Pi servers, and we’re waiting for Raspberry Pi to make it available to users.

In the meantime, here’s a workaround you can try:

Download these components:

  1. PCIe driver
  2. HailoRT
  3. PyHailoRT (compatible with Python 3.11)

Installation Steps:

  1. Remove all previous Hailo installations:
  • Ensure hailo-pcie.ko is completely removed before proceeding
  1. Install the new PCIe driver
  2. Install HailoRT
  3. Install PyHailoRT:
  • We recommend doing this in a Python virtual environment

If you run into any issues during this process, please let us know, and we’ll be happy to assist you further.

1 Like

Before I proceed with installing all the mentioned requirements. I have hailo-all installed and when I try running a model or try update fw config I get the following errors

keerthi-gowda@raspberrypi:~/Desktop/hailo-test $ hailortcli benchmark ssd_mobilenet_v1.hef 
Starting Measurements...
Measuring FPS in hw_only mode
[HailoRT] [error] CHECK failed - HEF file length does not match
[HailoRT] [error] CHECK_SUCCESS failed with status=HAILO_INVALID_HEF(26)
[HailoRT] [error] Failed parsing HEF file
[HailoRT] [error] Failed creating HEF
[HailoRT] [error] CHECK_SUCCESS failed with status=HAILO_INVALID_HEF(26)
[HailoRT CLI] [error] CHECK_SUCCESS failed with status=HAILO_INVALID_HEF(26) - Failed reading hef file ssd_mobilenet_v1.hef
[HailoRT CLI] [error] CHECK_SUCCESS failed with status=HAILO_INVALID_HEF(26) - hw_only measuring failed
keerthi-gowda@raspberrypi:~/Desktop/hailo-test $ hailortcli monitor
keerthi-gowda@raspberrypi:~/Desktop/hailo-test $ hailortcli fw-config read --output-file config.json
Executing on device: 0000:01:00.0
[HailoRT] [warning] Failed to examine user config, as it is not loaded or is not supported by the device.
[HailoRT] [error] Firmware control has failed. Major status: 0x4003003b, Minor status: 0x401a0004
[HailoRT] [error] Firmware major status: CONTROL_PROTOCOL_STATUS_USER_CONFIG_EXAMINE_FAILED
[HailoRT] [error] Firmware minor status: FIRMWARE_CONFIGS_STATUS_USER_CONFIG_NOT_LOADED
[HailoRT] [error] CHECK_SUCCESS failed with status=HAILO_FW_CONTROL_FAILURE(18)
[HailoRT] [error] CHECK_SUCCESS failed with status=HAILO_FW_CONTROL_FAILURE(18) - Failed to examine user config
[HailoRT CLI] [error] CHECK_SUCCESS failed with status=HAILO_FW_CONTROL_FAILURE(18) - Failed reading user config from device
Failed to execute on device: 0000:01:00.0. status= HAILO_FW_CONTROL_FAILURE(18)
keerthi-gowda@raspberrypi:~/Desktop/hailo-test $ hailortcli fw-control identify
Executing on device: 0000:01:00.0
Identifying board
Control Protocol Version: 2
Firmware Version: 4.17.0 (release,app,extended context switch buffer)
Logger Version: 0
Board Name: Hailo-8
Device Architecture: HAILO8L
Serial Number: HLDDLBB241900011
Part Number: HM21LB1C2LAE
Product Name: HAILO-8L AI ACC M.2 B+M KEY MODULE EXT TMP

How to proceed with this in line, remove hailo-all and install the pcie driver and hailo rt fresh or is there a solution with hailo-all itself.
My major intention here is before I start running my .hef models I need a stable environment. Also is hailo_platform included with pyhailort installation?

Here’s a revised and structured version of your message:

Let’s break this down:

  1. HEF File Compatibility Issue:

    • The first error occurs because you’re attempting to run a HEF file compiled with DFC 3.28 in a HailoRT 4.17 environment.
    • We made a minor change to the HEF file after updating to DFC 3.28 and HailoRT 4.18.
    • Recommendation: Always use the ‘run’ command to view FPS and other measurements.
  2. Hailo_FW_Control Issue:

    • This appears to be related to the configuration itself.

Additional Information:

  • Hailo-all Package:

    • Currently, there’s no immediate solution.
    • We’re awaiting Raspberry Pi to update their servers, after which all packages will be installable.
  • Hailo Platform:

    • This is included within pyHailoRT.
    • You’ll need to install all the components I mentioned previously.

Installation Instructions:

  • For detailed information on package installation, please follow the guide in the HailoRT documentation (applicable for both Linux and Raspberry Pi OS):
    HailoRT v4.18.0

Important Note:
Before upgrading to version 4.18, ensure you remove all Hailo-related components from your system.

So even to use ‘run’ I have to be in latest firmware 4.18?
My current fw version is 4.17 on hailo-all. Should I wait for an official package release from apt or get a manual install as in some posts I have read that it is not the best solution at the moment with some breakages observed in 4.18.

To clarify:

  1. The ‘run’ command is included in HailoRT.
  2. If you choose to continue using version 4.17:
  • You must use models specifically trained for HailoRT 4.17.
  • You won’t be able to use the Python API.
  1. Compatibility:
  • Models trained for newer versions (like 4.18) are not compatible with HailoRT 4.17.
  • The Python API is not available in version 4.17.