Accidental Incorrect class names

Hello!
I recently compiled a model into .hef using custom dataset, however I believe ive got the class names wrong. The use case for my project is to detect plants however, it names it as “person”. It may be a mistake from me during the complilation I don’t really remember

python basic_pipelines/detection.py -i rpi --hef /home/admin/best.hef --labels-json lab
els.json

Has it got something with the --labels-json parameter? I removed it and then saw no labels at all.

{
        "detection_threshold":0.5,
        "max_boxes":200,
        "labels": [
        "background",
        "plants"
        ]
}

thx for your time

Hi @Nitish_K This issue is related to the labels-json file path. If the labels-json file path is not accurate, it will, by-default, use coco labels where class id 0 is assigned to person. That is why you see “person” as labels.

To verify, please follow below steps:

python basic_pipelines/detection.py --input resources/barcode.mp4 --hef resources/yolov8s-hailo8l-barcode.hef --labels-json resources/barcode-labels.json

This should show correct labels (“barcode”) in the video preview.

1 Like

Hello harshil, thank you for your reply. You were right, it was an issue related to labels filepath. I retrained a new model (although was not needed) but the issue is fixed, thanks

1 Like