Hi,
I’m trying to compile a custom YOLOv8 model (single class = “rat”) to HEF for Hailo-8L using the Hailo Dataflow Compiler 3.33.0 on an AWS EC2 instance.
Environment:
-
Hailo DFC: 3.33.0
-
Python: 3.12 (venv)
-
OS: Ubuntu on AWS EC2 (t2.large)
-
HW arch: hailo8l
-
Model: custom YOLOv8, exported to ONNX (rat_yolo_best.onnx)
What I did
1. Parse ONNX → HAR
hailo parser onnx rat_yolo_best.onnx --hw-arch hailo8l
This produced:
rat_yolo_best.har
hailo har info shows:
-
NMS Meta Architecture: Yolov8
-
Files in HAR:
- rat_yolo_best.hn
- rat_yolo_best.alls
- rat_yolo_best.nms.json
- rat_yolo_best.npz
- rat_yolo_best.original_model_meta.json
- rat_yolo_best.HARFileNames.POSTPROCESS.onnx
- rat_yolo_best.metadata.json
2. Extract NMS + model script
hailo har extract rat_yolo_best.har --model-script-path rat_yolo_best.alls
hailo har extract rat_yolo_best.har --nms-config-path rat_yolo_best.nms.json
3. Optimize
hailo optimize rat_yolo_best.har \
-–hw-arch hailo8l
-–use-random-calib-set
-–model-script rat_yolo_best.alls
-–output-har-path rat_yolo_best_opt.har
It starts modifying YOLO layers, then crashes:
NMSConfigPostprocessException:
The layer rat_yolo_best/conv43 doesn’t have one output layer
Earlier, I had also seen:
AllocatorScriptParserException:
Cannot infer bbox conv layers automatically.
Please specify the bbox layer in the json configuration file.
I tried adjusting rat_yolo_best.nms.json manually, but it’s clear I’m not matching what DFC expects….
-
What is the correct way to configure NMS (rat_yolo_best.nms.json) and/or the model script (rat_yolo_best.alls) for this HAR so that optimize works?
-
Alternatively, is there a recommended way to compile this HAR without built-in NMS, and run NMS later on the host (Raspberry Pi + Hailo-8L)?
If needed, I can provide:
rat_yolo_best.onnx
rat_yolo_best.har
rat_yolo_best.alls
rat_yolo_best.nms.json
acceleras.log
hailo_sdk.client.log
Any help getting a working .hef would mean a lot.
Thank you