Convert to hef file for yolov11 model

Hi everyone,

I am trying to convert a yolov11s-pose model (a .pt file) into a .hef file so it can run in a Raspberry Pi. I am very new to Hailo and this is my first time trying the conversion process. I am trying to follow the routine of .pt → .onnx → Hailo parser → Hailo optimize → Hailo compiler ->get .hef file.

During my very first time, I use the YOLO11s-pose.pt released by Ultralytics and convert it into .onnx using colab, following the tutorial on the guide here:Guide to using the DFC to convert a modified YoloV11 on Google Colab. Then I run with the following commands:

hailo parser onnx yolov11s-pose-modified.onnx with recommended endnode names

hailo optimize yolov11s-pose-modified.har --use-random-calib-set

and hailo compiler yolov11s-pose_optimized.har, which gives me the error:


(Complete error message is at the bottom part)

I searched for previous post against this error and find this post: Concat17 error during custom yolov8m.pt compilation using DFC which suggests to split large concat operations into small ones.

So I then dive into the source code(ultralytics package) and split the large concat operations that I could find. Then I found that the CLI used to convert .pt into .onnx this time no longer work and produces this error:

I then follow the code in the guide to convert my new .pt file into .onnx file in python and this time it works.

Then when I tried to use hailo parser onnx yolov11s-pose-modified.onnx to get .har file, the recommended endnodes does not work this time. I select a set of endnodes using netron (6 nodes in total) and succeed this time. However, when I am trying to optimize with command hailo parser onnx yolov11s-pose-modified.onnx , I got this error:

I am a little confused on if I am on the right track to solve the very first error(the concat21 one) and also on how to solve the ‘could not infer’ error above. I suppose a .script file might help? But I am not very sure on how the script file should be to solve my problem.

Any help is appreciated, thanks in advance!

The following are complete error messages for errors mentioned above:
[Here is the complete error message of the Concat21 error]
[info] Current Time: 10:48:45, 06/13/25
[info] CPU: Architecture: x86_64, Model: Intel(R) Xeon(R) Silver 4210R CPU @ 2.40GHz, Number Of Cores: 40, Utilization: 0.0%
[info] Memory: Total: 125GB, Available: 123GB
[info] System info: OS: Linux, Kernel: 5.15.0-139-generic
[info] Hailo DFC Version: 3.30.0
[info] HailoRT Version: 4.20.0
[info] PCIe: No Hailo PCIe device was found
[info] Running hailo compiler yolov11s-pose_optimized.har
[info] Compiling network
[info] To achieve optimal performance, set the compiler_optimization_level to “max” by adding performance_param(compiler_optimization_level=max) to the model script. Note that this may increase compilation time.
[info] Loading network parameters
[info] Starting Hailo allocation and compilation flow
[error] Mapping Failed (allocation time: 19s)
No successful assignments: concat21 errors:
Agent infeasible
feature_splitter11 errors:
Agent infeasible
concat22 errors:
Agent infeasible

[error] Failed to produce compiled graph
[error] BackendAllocatorException: Compilation failed: No successful assignments: concat21 errors:
Agent infeasible
feature_splitter11 errors:
Agent infeasible
concat22 errors:
Agent infeasible

and **[error message for the ‘cannot infer’ error]
[info] Current Time: 11:16:50, 06/13/25
[info] CPU: Architecture: x86_64, Model: Intel(R) Xeon(R) Silver 4210R CPU @ 2.40GHz, Number Of Cores: 40, Utilization: 0.2%
[info] Memory: Total: 125GB, Available: 123GB
[info] System info: OS: Linux, Kernel: 5.15.0-139-generic
[info] Hailo DFC Version: 3.30.0
[info] HailoRT Version: 4.20.0
[info] PCIe: No Hailo PCIe device was found
[info] Running hailo optimize yolov11s-pose-modified.har --use-random-calib-set --hw-arch hailo8l
[warning] hw_arch from HAR is hailo8 but client runner was initialized with hailo8l. Using hailo8l
[info] For NMS architecture yolov8 the default engine is cpu. For other engine please use the ‘engine’ flag in the nms_postprocess model script command. If the NMS has been added during parsing, please parse the model again without confirming the addition of the NMS, and add the command manually with the desired engine.
[info] The layer yolov11s-pose-modified/conv51 was detected as reg_layer.
Traceback (most recent call last):
File “/local/workspace/hailo_virtualenv/bin/hailo”, line 8, in
sys.exit(main())
File “/local/workspace/hailo_virtualenv/lib/python3.10/site-packages/hailo_sdk_client/tools/cmd_utils/main.py”, line 111, in main
ret_val = client_command_runner.run()
File “/local/workspace/hailo_virtualenv/lib/python3.10/site-packages/hailo_platform/tools/hailocli/main.py”, line 64, in run
ret_val = self._run(argv)
File “/local/workspace/hailo_virtualenv/lib/python3.10/site-packages/hailo_platform/tools/hailocli/main.py”, line 111, in _run
return args.func(args)
File “/local/workspace/hailo_virtualenv/lib/python3.10/site-packages/hailo_sdk_client/tools/optimize_cli.py”, line 113, in run
self._runner.optimize_full_precision(calib_data=dataset)
File “/local/workspace/hailo_virtualenv/lib/python3.10/site-packages/hailo_sdk_common/states/states.py”, line 16, in wrapped_func
return func(self, *args, **kwargs)
File “/local/workspace/hailo_virtualenv/lib/python3.10/site-packages/hailo_sdk_client/runner/client_runner.py”, line 2031, in optimize_full_precision
self._optimize_full_precision(calib_data=calib_data, data_type=data_type)
File “/local/workspace/hailo_virtualenv/lib/python3.10/site-packages/hailo_sdk_client/runner/client_runner.py”, line 2034, in _optimize_full_precision
self._sdk_backend.optimize_full_precision(calib_data=calib_data, data_type=data_type)
File “/local/workspace/hailo_virtualenv/lib/python3.10/site-packages/hailo_sdk_client/sdk_backend/sdk_backend.py”, line 1591, in optimize_full_precision
model, params = self._apply_model_modification_commands(model, params, update_model_and_params)
File “/local/workspace/hailo_virtualenv/lib/python3.10/site-packages/hailo_sdk_client/sdk_backend/sdk_backend.py”, line 1482, in _apply_model_modification_commands
model, params = command.apply(model, params, hw_consts=self.hw_arch.consts)
File “/local/workspace/hailo_virtualenv/lib/python3.10/site-packages/hailo_sdk_client/sdk_backend/script_parser/nms_postprocess_command.py”, line 397, in apply
self._update_config_file(hailo_nn)
File “/local/workspace/hailo_virtualenv/lib/python3.10/site-packages/hailo_sdk_client/sdk_backend/script_parser/nms_postprocess_command.py”, line 558, in _update_config_file
self._update_config_layers(hailo_nn)
File “/local/workspace/hailo_virtualenv/lib/python3.10/site-packages/hailo_sdk_client/sdk_backend/script_parser/nms_postprocess_command.py”, line 608, in _update_config_layers
self._set_yolo_config_layers(hailo_nn)
File “/local/workspace/hailo_virtualenv/lib/python3.10/site-packages/hailo_sdk_client/sdk_backend/script_parser/nms_postprocess_command.py”, line 664, in _set_yolo_config_layers
self._set_anchorless_yolo_config_layer(branch_layers, decoder, f_out)
File “/local/workspace/hailo_virtualenv/lib/python3.10/site-packages/hailo_sdk_client/sdk_backend/script_parser/nms_postprocess_command.py”, line 710, in _set_anchorless_yolo_config_layer
raise AllocatorScriptParserException(msg)
hailo_sdk_client.sdk_backend.sdk_backend_exceptions.AllocatorScriptParserException: Cannot infer bbox conv layers automatically. Please specify the bbox layer in the json configuration file.

Hi @w_rz
Welcome to the Hailo community. At DeGirum, we developed a cloud compiler to help hailo community users compile yolo models. You can find details at: Early Access to DeGirum Cloud Compiler

Thank you so much for your help. I will give it a try right away lol

Hi Shashi,

I’ve tried the Cloud Compiler and it’s incredibly powerful — really impressive! However, I’m currently facing an issue where I seem to be getting uint8 keypoints, while I’m expecting float format` keypoints. When I run my application, I encounter the following error:

This postprocess does not support uint keypoints format

I noticed that during the compiler setup, after selecting the Runtime type (HAILORT) and Device type (Hailo-8), the Quantization option is automatically set to “Quant” and cannot be changed.

Is there any way to configure the compiler to output floating-point keypoints instead of quantized outputs?

Hi @w_rz
Happy to hear that you find the cloud compiler useful. How are you running the model? Can you share any code snippet? All compiled models are integrated to PySDK which provides the postprocessor as well.

Hi @shashi

Here is the error message:

For the code, I have a customized version based on the example here hailo-rpi5-examples/basic_pipelines/pose_estimation.py at main · hailo-ai/hailo-rpi5-examples · GitHub. . I’m running the model using GStreamer with the hailonet and hailofilter elements provided by the Hailo GStreamer plugin.

The model is compiled into a .hef file and integrated into the pipeline via hailonet.

I’m using hailofilter with the following config to apply the postprocessor:

f’hailofilter name=pose_filter so-path=libhailo_post_process.so config-path=pose_config.ini function-name=post_process_pose’

Here’s a simplified snippet of the GStreamer pipeline:

pipeline = (
f"videotestsrc ! video/x-raw,width=640,height=640 ! "
f"videoconvert ! "
f"hailonet hef-path=yolov11s-pose–640x640_quant_hailort_multidevice_1.hef ! "
f"hailofilter so-path=libhailo_post_process.so config-path=pose_config.ini function-name=post_process_pose ! "
f"appsink"
)

I’m also using a custom Python callback to handle the appsink output and broadcast results.
I’m not directly using the PySDK postprocessor in code — it’s handled inside hailofilter via the shared object (.so) and config.

I have checked the json file created with the hef file, with the following content:

ConfigVersion 6
Checksum b7e074ca1fba6330b1c0bcf129ce3e602574d16abcd11ec09bc1a66030272db9
DEVICE
0
DeviceType HAILO8L
RuntimeAgent HAILORT
SupportedDeviceTypes HAILORT/HAILO8L, HAILORT/HAILO8
PRE_PROCESS
0
InputN 1
InputH 640
InputW 640
InputC 3
InputQuantEn true
MODEL_PARAMETERS
0
ModelPath yolov11s-pose–640x640_quant_hailort_multidevice_1.hef
POST_PROCESS
0
OutputPostprocessType PoseDetectionYoloV8
OutputNumClasses 1
LabelsPath labels_yolov11s-pose.json
OutputNumLandmarks 17

The configuration specifies OutputPostprocessType as PoseDetectionYoloV8. Could the issue be caused by the fact that this post-processing type expects floating-point keypoints, while the model outputs quantized (uint8) values instead?

By the way, for the PYSDK, is there some way to transfer uint8 ver .hef to float ver?

Any guidance on how to resolve this issue would be greatly appreciated.

Hi @w_rz
Thanks for providing the details. Since, you are not using PySDK, the model JSON does not matter. Also, since you are using gstreamer pipeline with some Hailo postprocessor .so file, there could be some mismatch in the format expected. Unfortunately, we cannot help in debugging this problem. One of the main reasons we suggest PySDK is the in-built postprocessors as integrating postprocessors is rather difficult (especially for pose and segmentation). If you do not want to use PySDK, my suggestion is to compile the model by yourself as it gives you the freedom to adjust compilation parameters to your needs.

Hi @w_rz
We were able to debug your issue. The main problem is that the Hailo postprocessor code assumes specific order of output tensors. Their code works for yolov8s-pose which has the following output order:

Network name: yolov8s_pose/yolov8s_pose
        VStream infos:
            Input  yolov8s_pose/input_layer1 UINT8, NHWC(640x640x3)
            Output yolov8s_pose/conv70 UINT8, FCR(20x20x64)
            Output yolov8s_pose/conv71 UINT8, NHWC(20x20x1)
            Output yolov8s_pose/conv72 UINT16, FCR(20x20x51)
            Output yolov8s_pose/conv57 UINT8, FCR(40x40x64)
            Output yolov8s_pose/conv58 UINT8, NHWC(40x40x1)
            Output yolov8s_pose/conv59 UINT16, FCR(40x40x51)
            Output yolov8s_pose/conv43 UINT8, FCR(80x80x64)
            Output yolov8s_pose/conv44 UINT8, NHWC(80x80x1)
            Output yolov8s_pose/conv45 UINT16, FCR(80x80x51)

We do not know the exact model you are using, but we compiled a yolo11n-pose model and found that the order is:

Network name: yolo11n-pose_v8/yolo11n-pose_v8
        VStream infos:
            Input  yolo11n-pose_v8/input_layer1 UINT8, NHWC(640x640x3)
            Output yolo11n-pose_v8/conv59 UINT8, FCR(80x80x64)
            Output yolo11n-pose_v8/conv74 UINT8, FCR(40x40x64)
            Output yolo11n-pose_v8/conv93 UINT8, FCR(20x20x64)
            Output yolo11n-pose_v8/conv63 UINT8, NHWC(80x80x1)
            Output yolo11n-pose_v8/conv78 UINT8, NHWC(40x40x1)
            Output yolo11n-pose_v8/conv97 UINT8, NHWC(20x20x1)
            Output yolo11n-pose_v8/conv60 UINT16, FCR(80x80x51)
            Output yolo11n-pose_v8/conv75 UINT16, FCR(40x40x51)
            Output yolo11n-pose_v8/conv94 UINT16, FCR(20x20x51)

As you can see, same tensor shapes but in different order. Hence, when you use your hef, it throws an error even though the keypoint tensors have the correct precision (UINT16).

So, you have a couple of options:

  1. Modify the Hailo postprocessor code to infer the right tensors. This is doable as box tensors, score tensors, and keypoint tensors can be differentiated by their dimension in the last axis (64 vs 1 vs 51).
  2. Use DeGirum PySDK as it handles postprocessor order internally