Hi there, I’ve been using the Hailo Suite to retrain a Yolov8 model with a custom dataset, to run on a RPi5+Hailo8l, but when I run the model, the object is detected but label showed on the bounding box is incorrect.
My custom dataset has a small set of images of flame from a lighter. Labels were created on Roboflow platform and downloaded in Yolov8 format. The dataset has only one label, “flame”, on index 0, as example below:
“0 0.48203125 0.490625 0.1140625 0.28125”
The sequence of steps used for retraining are:
- yolo detect train data=data.yaml model=yolov8m.pt name=retrain_yolov8m epochs=200 batch=16
- yolo export model=/path/to/trained/best.pt imgsz=640 format=onnx opset=11 # export at 640x640
- hailomz compile --ckpt fire_yolov8m.onnx --hw-arch hailo8l --calib-path ./test/images/ --yaml ./yolov8m.yaml --classes 1
My data.yaml has:
train: ./flame/train/images
val: ./flame/valid/images
test: ./flame/test/images
nc: 1
names: [flame]
I am testing using the rpicam postprocessing, as:
rpicam-hello --post-processing-file flame.json
and my flame.json file has:
{
"rpicam-apps":
{
"lores":
{
"width": 640,
"height": 640,
"format": "rgb"
}
},
"hailo_yolo_inference":
{
"hef_file": "flame.hef",
"max_detections": 20,
"threshold": 0.4,
"temporal_filter":
{
"tolerance": 0.1,
"factor": 0.75,
"visible_frames": 6,
"hidden_frames": 3
}
},
"object_detect_draw_cv":
{
"line_thickness" : 2
}
}
But when I run the model, the label showed around the bouding box is “person”, which I noticed is normally the first label of the list on some object detection models.
From ChatGPT I learned that the .hef file does not contain any labels, so, I wonder where is that label coming from when I execute the model?
Does it come from the yolov8.pt model used on the “yolo detect train” step?
What can I change to enforce label 0 as being “flame” and not “person”?