Problem Yolov8 Can't Detection

I retrained my YOLOv8s model, increasing the number of classes from 3 to 5, and successfully compiled it into a .hef file using the Hailo Model Zoo compiler.
However, when I deployed this new .hef file on my Raspberry Pi with the Hailo-8, the model ran without any errors but did not detect any objects or produce bounding boxes, even though the previous 3-class model worked perfectly and displayed proper detections.

The compilation logs indicated normal optimization and successful completion.

Here is the command I used to compile the ONNX model into HEF:

hailomz compile yolov8s --hw-arch hailo8 --calib-path ./images --resize 640 640 --classes 5 --har yolov8s.har --performance

I guess you should look into the postprocessing code, since the number of class changed, and how could the program know which label is for which class?

Hey @Bintang_Amirul_Mukmi,

Welcome to the Hailo Community!

Like @chrysler.chen said, it looks like the label JSON isn’t getting passed through to the file – it’s probably just using the default labels instead. Here’s what you should check:

Make sure your post-processing knows about the 5 classes

  • The --classes flag only updates the post-processing config if there’s actually a YOLO post-process defined in your model’s YAML/ALLS file. If your YAML/ALLS doesn’t have a YOLO post-process (or if your runtime isn’t using it), that flag won’t do anything when you run it on the Pi. I’d double-check that your YAML/ALLS includes the YOLO post-process and that you compiled/optimized it with --classes 5.

If you can share the app code or let me know which repo it’s based on, I can probably help you more specifically!

Hope this helps!