how can i send custom dataset labels after converting from yolo to .hef format @omria @Omer @Nadav @
I have successfully compiled and generated the .hef file. I am using this to run inference on the Raspberry Pi Hailo AI kit with the trained classes. However, during inference, the detected objects are not displaying the correct class names. Is there a specific order I need to follow for the labels? I am using the Hailo-RPi5 for running the inference for detection. Please help me resolve this issue. @omria @Omer @Nadav
Can you please provide how you display the labels , or what labels are displayed instead of other ?
hi @omria thank you for replay i have passing
{
“detection_threshold”: 0.5,
“max_boxes”:200,
“labels”: [
“unlabeled”,
“barcode”,
“QR code”
]
} labels like this (this is not my labels) but i have passing like this format while inferening in hailo-rpi5-examples detection.py
i want display on images with bounding box
To resolve the issue of incorrect class names during inference with detection.py
, consider these recommendations:
- Label Mapping Accuracy: Verify that your
labels_json
file contains the correct labels in the exact order used during model training. Misalignment between detection results and model output often stems from label order discrepancies or missing labels.
- Ensure you’re passing the label file via the
--labels-json
argument, and that its contents match the model’s training data sequence.
- Label Index Verification: In the
app_callback
function, check howdetection.get_label()
retrieves the object’s label. If it returns indices instead of names, modify your code to use the label list:
label_id = detection.get_class_id() # or equivalent method
label = your_label_list[label_id]
- JSON Structure Confirmation: Ensure your
labels.json
file is correctly structured with proper class ID to label mappings. For example:
{
"0": "unlabeled",
"1": "barcode",
"2": "QR code"
}
The model’s class ID output should correspond to the keys in this JSON.
it also not works while convertion is it able to pass trained labels or how can it takes labels while convertion @omria @Omer @Nadav
@omria @Omer @Nadav can you tell me while convertion from onnx model to hef format should pass the labels.txt files of class names used while trining onnx model
This json structure keeps giving “json config file doesn’t follow schema rules” error