Issues with converting Onnx to HEF file for Yolo models - Hailo 8

I’m trying to convert my Onnx models to HEF files. I have both a yolov8 and a yolov11 onnx model that I would like to convert.

I first tried to convert the yolov11 model with a jupyter notebook I found on here, and the issue is that its getting stuck on an iteration 19 and then not moving forward for hours/days, so if someone knows why that is it would help.

Second thing is that I tried converting the yolov8 model with hailo model zoo, which from what I saw supports v8 and doesn’t support v11. I tried this in the other jupyter notebook which I got the guide from a github link, and this is giving an error in the compilation step that I’m not sure how to fix.

!USER=root hailomz compile
–ckpt /content/yolov8s.onnx
–calib-path /content/drive/MyDrive/calibration_imgs
–yaml /content/hailo_model_zoo/hailo_model_zoo/cfg/networks/yolov8s.yaml
–classes 3
–hw-arch hailo10h
–performance
–end-node-names
/model.22/cv3.0/cv3.0.2/Conv
/model.22/cv3.1/cv3.1.2/Conv
/model.22/cv3.2/cv3.2.2/Conv
/model.22/cv2.0/cv2.0.2/Conv
/model.22/cv2.1/cv2.1.2/Conv
/model.22/cv2.2/cv2.2.2/Conv

Start run for network yolov8s …
Initializing the hailo10h runner…
[info] Translation started on ONNX model yolov8s
[info] Restored ONNX model yolov8s (completion time: 00:00:00.43)
[info] Extracted ONNXRuntime meta-data for Hailo model (completion time: 00:00:01.93)
[info] Start nodes mapped from original model: ‘images’: ‘yolov8s/input_layer1’.
[info] End nodes mapped from original model: ‘/model.22/cv3.0/cv3.0.2/Conv’, ‘/model.22/cv3.1/cv3.1.2/Conv’, ‘/model.22/cv3.2/cv3.2.2/Conv’, ‘/model.22/cv2.0/cv2.0.2/Conv’, ‘/model.22/cv2.1/cv2.1.2/Conv’, ‘/model.22/cv2.2/cv2.2.2/Conv’.
[info] Translation completed on ONNX model yolov8s (completion time: 00:00:03.16)
[info] Hailo HW architecture: hailo10h
[info] Saved HAR to: /content/yolov8s.har
Using generic alls script found in /usr/local/lib/python3.12/dist-packages/hailo_model_zoo/cfg/alls/generic/yolov8s.alls because there is no specific hardware alls
Preparing calibration data…
[info] Loading model script commands to yolov8s from /usr/local/lib/python3.12/dist-packages/hailo_model_zoo/cfg/alls/generic/yolov8s.alls
[info] Loading model script commands to yolov8s from string
[info] Starting Model Optimization
[warning] Reducing optimization level to 1 (the accuracy won’t be optimized and compression won’t be used) because there’s less data than the recommended amount (1024)
[info] Model received quantization params from the hn
[info] Notice: For optimal performance, if your model has more than 10M parameters, it is recommended to set the compression level to 4. (Current model has 11.13M parameters.)
[info] Notice: For optimal accuracy with compressed models, it is recommended to set the optimization level to 4.
[info] MatmulDecompose skipped
[info] Starting Mixed Precision
[info] Add precision change Layer skipped
[info] Add Normalization Layer skipped
[info] Model Optimization Algorithm Mixed Precision is done (completion time is 00:00:00.44)
[info] LayerNorm Decomposition skipped
[info] Starting Statistics Collector
[info] Using dataset with 64 entries for calibration
Calibration: 100% 64/64 [00:45<00:00, 1.41entries/s]
[info] Model Optimization Algorithm Statistics Collector is done (completion time is 00:00:47.69)
[info] Starting Fix zp_comp Encoding
[info] Model Optimization Algorithm Fix zp_comp Encoding is done (completion time is 00:00:00.00)
[info] Matmul Equalization skipped
[info] Starting MatmulDecomposeFix
[info] Model Optimization Algorithm MatmulDecomposeFix is done (completion time is 00:00:00.00)
[info] Finetune encoding skipped
[info] Starting Bias Correction
[info] The algorithm Bias Correction will use up to 1.99 GB of storage space
[info] Using dataset with 64 entries for Bias Correction
Bias Correction: 100% 73/73 [06:30<00:00, 5.36s/blocks, Layers=[‘yolov8s/postprocess_output_layer’]]
[info] Model Optimization Algorithm Bias Correction is done (completion time is 00:06:39.02)
[info] Adaround skipped
[info] Quantization-Aware Fine-Tuning skipped
[info] Starting Layer Noise Analysis
Full Quant Analysis: 0% 0/2 [00:00<?, ?iterations/s]E0000 00:00:1774231131.855142 68507 meta_optimizer.cc:966] layout failed: INVALID_ARGUMENT: Size of values 1 does not match size of permutation 4 @ fanin shape inlat_model_1/normalization1_5/act_op_1/SelectV2-1-TransposeNHWCToNCHW-LayoutOptimizer
Full Quant Analysis: 100% 2/2 [02:46<00:00, 83.46s/iterations]
[info] Model Optimization Algorithm Layer Noise Analysis is done (completion time is 00:02:53.57)
[info] Model Optimization is done
[info] Saved HAR to: /content/yolov8s.har
Using generic alls script found in /usr/local/lib/python3.12/dist-packages/hailo_model_zoo/cfg/alls/generic/yolov8s.alls because there is no specific hardware alls
[info] Loading model script commands to yolov8s from /usr/local/lib/python3.12/dist-packages/hailo_model_zoo/cfg/alls/generic/yolov8s.alls
[info] ParsedPerformanceParam command, setting optimization_level(max=2)
[info] Appending model script commands to yolov8s from string
[info] ParsedPerformanceParam command, setting optimization_level(max=2)
[error] Failed to produce compiled graph
[error] TypeError: expected str, bytes or os.PathLike object, not NoneType

If someone has any idea why these errors are happening (I only need one of them fixed to get a hef file) it would help

Hi @user930,

YOLOv11 stuck at iteration 19: Can you please share the full YOLOv11 log? It will help pinpoint the issue.

YOLOv8 TypeError: expected str, bytes or os.PathLike object, not NoneType: Install DFC inside a clean Python virtual environment or use the Hailo AI Software Suite Docker image where paths are pre-configured.

DFC version supports hailo10h requires DFC 3.31+.

Also - calibration set has only 64 images (the log warns it’s below the recommended 1024). Using more calibration images will improve quantization accuracy.

Thanks,