Hailo_timeout(4)

I am trying to run inference on Hailo 8 hardware with custom trained yolov8n model, code as shown:

model_name = 'yolov8n'
compiled_model_har_path = f'{model_name}_compiled_model.har'
runner = ClientRunner(hw_arch='hailo8', har=compiled_model_har_path)

with runner.infer_context(InferenceContext.SDK_HAILO_HW) as ctx:
    nms_output = runner.infer(ctx, test_dataset_new)

It gives following error msg:

[HailoRT] [error] CHECK failed - UserBuffQEl13yolov8n_official/conv41 (D2H) failed with status=HAILO_TIMEOUT(4) (timeout=10000ms)
[HailoRT] [error] Failed waiting for threads with status HAILO_TIMEOUT(4)
[HailoRT] [error] CHECK failed - UserBuffQEl6yolov8n_official/conv63 (D2H) failed with status=HAILO_TIMEOUT(4) (timeout=10000ms)
[HailoRT] [error] CHECK failed - UserBuffQEl15yolov8n_official/conv52 (D2H) failed with status=HAILO_TIMEOUT(4) (timeout=10000ms)
[HailoRT] [error] CHECK failed - UserBuffQEl12yolov8n_official/conv42 (D2H) failed with status=HAILO_TIMEOUT(4) (timeout=10000ms)
[HailoRT] [error] Failed waiting for threads with status HAILO_TIMEOUT(4)
[HailoRT] [error] Failed waiting for threads with status HAILO_TIMEOUT(4)
[HailoRT] [error] CHECK failed - UserBuffQEl11yolov8n_official/conv62 (D2H) failed with status=HAILO_TIMEOUT(4) (timeout=10000ms)
[HailoRT] [error] Failed waiting for threads with status HAILO_TIMEOUT(4)
[HailoRT] [error] Failed waiting for threads with status HAILO_TIMEOUT(4)
Backend TkAgg is interactive backend. Turning interactive mode on.

What is the issue here?

hey @ShingHin.Hung ,

you have to run it using the “yolov8n.hef” not the .har .

if you don’t have the hef , you can extract it from the ‘{model_name}_compiled_model.har’.

Hope this fixes the issue, please let me know.
Regards,
Omri

Hi @omria , I have the .hef file but how do I deploy it onto the Hailo 8 hardware?

To my knowledge ClientRunner does not take hef as an argument.

I also tried this:

runner = ClientRunner(hw_arch='hailo8', har=compiled_model_har_path)
runner.compile()

but it doesn’t work.

Could you provide a simple sample code for me?

Thank you!

hey @ShingHin.Hung

you can check full examples in here :

there are several good examples for yolov8n , like object detection or detection with tracker.

I would recommend you begin by looking at this inference :

Hope this fixes the issue, please let me know.

@omria thanks for the sample codes, I believe this what I need.

However I ran into a version issue. In the “requirement.txt”, it states that the package supervision == 0.19.0 is required:

During installation, the system shows that it requires pillow >= 9.4 to install supervision 0.19.0, and I am needed to upgrade pillow version:

However, after the upgrade, Hailo Model Zoo crashed because it requires pillow <= 9.2.0:

Isnt’t it a contradiction of versions?

But anyway, I downgrade the pillow back to 9.2.0 and everything seems working.

Hi @ShingHin.Hung,

To avoid compatibility issues, it’s best to leave the DFC/MZ venv for their tools. So once you have a compiled model, you can use the hef on a separate venv for the inference.

2 Likes