I’m using a .hef model compiled with hailomz, based on a YOLOv8s model fine-tuned with my own custom classes. The model makes correct predictions at the class index level (for example, index 4 corresponds to “person” in my dataset), but during inference, the displayed class names are those of the COCO dataset instead of my custom classes.
Here is what I have done so far:
Modified the yolov8s.yaml file by adding the correct number of classes and listing my class names under the postprocessing field.
Created a custom_labels.json file containing my class labels and referenced the path to custom_labels.json in the postprocessing section of yolov8s.yaml using the attribute postprocess_config_file.
Despite these changes, the inference output still shows COCO class names, not mine.
Has anyone faced this issue before or can suggest what else might be missing?
So here’s the deal with your label issue - the HEF file itself doesn’t actually store your custom label strings. What you’re seeing at inference time (those class names) is coming from whatever runner you’re using - whether that’s TAPPAS/GStreamer, the Model Zoo infer tool, or your own HailoRT application.
Most of the sample apps just default to using a standard COCO labels file unless you tell them otherwise. When you update the yolov8s.yaml file and add that postprocess_config_file, that only affects the Model Zoo’s training/evaluation/export process - it doesn’t change what labels the runtime actually uses when it’s drawing or printing the class names.
If you’re working with hailo-apps-infra or the rpi5-examples, you’ve got a couple options to fix this:
Use the --labels-json flag when running your app
Or modify your program to include your custom labels as the default
Either approach should sort out your labeling problem. Let me know if you need help with the specific implementation!