Training with Roboflow

Hy, i trained a model in Roboflow AGPL 3.0 for yolo V8.

I have the dataset (yaml) and the weights.pt file. After training the statistics look good for training 12 classes on 5000 images.

I have problems in creating *.hef so i can run the model on my rasp.pi5-ai hat+2 (Hailo10h)

  1. *.onnx in some cases i had diferent numbers of classes
  2. *.hef runs but i have a different type of class (diferent name)
  3. *.hef is running but detecting verry bad or not at all
  4. *.hef has 145/80 LCU and it stops creating file

Is there a script for this type of conversion,

*.pt –> *.onnx–>*.har–>*.har_optimiesed–>*.hef?

That includes NMS and is optimised and calibrated, like the hailo 80 class model on github?

What options do i have?

Thank you

Hi @user604,

It sounds like you might be running into a few separate issues at once, so rather than trying to solve them all together, you might want to start with the end-to-end retraining-to-HEF example we have that targets exactly your setup (Hailo-10H on RPi5):

That guide walks through .pt → .onnx → .hef using hailomz compile in a single command, including NMS and calibration - just swap in your own .onnx file, point --calib-path to your validation images, and set --classes 12 for your class count. The key command would look roughly like:

hailomz compile \
    --ckpt best.onnx \
    --hw-arch hailo10h \
    --calib-path /path/to/your/valid/images \
    --yaml yolov8s.yaml \
    --classes 12 \
    --performance

You’ll need the Hailo Dataflow Compiler and Hailo Model Zoo wheels installed - both available at https://hailo.ai/developer-zone/software-downloads/

Regarding the different class names you’re seeing - that’s likely not a model issue but rather the application-side labels config still pointing to the default COCO 80 classes. The LCU overflow (145/80) might mean the model variant is too large - if you’re using yolov8s you might try yolov8n instead.

If you’re still stuck after following the guide, it would help if you could share your exact compile command and the full error output so we can pinpoint what’s going wrong.

1 Like