Hello Hailo-Community,
I am working with the Hailo-Platform for 2 Weeks now and reached the Point where I want to deploy my custom model on the Hailo8-Device for inference.
My setup:
- YOLOv8s Model for Object detection and classification
- Converted to .onnx using Ultralytics
- Converted to .har and then .hef using Hailo Dataflow Compiler
- Running the model with degirum
What I have tried:
- I checked if my degirum pipeline is working with the model from the hailo examples in the DeGirum git
- This runs through and gives detections in the output
- I changed the model to my custom YOLOv8s model and i get this Error: degirum.exceptions.DegirumException: Failed to perform model âyolov8s_quantized_modelâ inference: Model âyolov8s_quantized_modelâ inference failed: [ERROR]Incorrect value of parameter
Hailo Async Runtime: Input DG Tensor type DG_FLT does not match Hailo input type DG_UINT8
hailo_plugin_impl.cpp: 136 [{anonymous}::to_hailo_tensor]
When running model âyolov8s_quantized_modelâ
What i found out so far:
When i check the models Architecture of the model from the Degirum git it looks like this:
Architecture HEF was compiled for: HAILO8
Network group name: yolov8n_relu6_coco, Single Context
Network name: yolov8n_relu6_coco/yolov8n_relu6_coco
VStream infos:
Input yolov8n_relu6_coco/input_layer1 UINT8, NHWC(640x640x3)
Output yolov8n_relu6_coco/conv47 UINT8, FCR(80x80x64)
Output yolov8n_relu6_coco/conv59 UINT8, FCR(40x40x64)
Output yolov8n_relu6_coco/conv70 UINT8, FCR(20x20x64)
Output yolov8n_relu6_coco/conv48 UINT8, FCR(80x80x80)
Output yolov8n_relu6_coco/conv60 UINT8, FCR(40x40x80)
Output yolov8n_relu6_coco/conv71 UINT8, FCR(20x20x80)
If I check my custom model it looks like this:
Architecture HEF was compiled for: HAILO8
Network group name: yolov8s, Multi Context - Number of contexts: 2
Network name: yolov8s/yolov8s
VStream infos:
Input yolov8s/input_layer1 UINT8, F8CR(640x640x3)
Output yolov8s/yolov8_nms_postprocess FLOAT32, HAILO NMS BY CLASS(number of classes: 2, maximum bounding boxes per class: 100, maximum frame size: 4008)
Operation:
Op YOLOV8
Name: YOLOV8-Post-Process
Score threshold: 0.250
IoU threshold: 0.45
Classes: 2
Max bboxes per class: 100
Image height: 640
Image width: 640
Only mayor difference I have noticed is the format of the input Tensor being F8CR instead of NHWC. I dont know if that causes the issue.
My .json file for the Model looks like this:
{
âChecksumâ: âd6c4d0b9620dc2e5e215dfab366510a740fe86bf2c5d9bd2059a6ba3fe62ee63â,
âConfigVersionâ: 10,
âDEVICEâ: [
{
âDeviceTypeâ: âHAILO8â,
âRuntimeAgentâ: âHAILORTâ,
âSupportedDeviceTypesâ: âHAILORT/HAILO8â,
âThreadPackSizeâ: 6
}
],
âMODEL_PARAMETERSâ: [
{
âModelPathâ: âyolov8s_quantized_model.hefâ
}
],
âPOST_PROCESSâ: [
{
âLabelsPathâ: âorientation_labels.jsonâ,
âOutputNumClassesâ: 2,
âOutputPostprocessTypeâ: âDetectionYoloV8â
}
],
âPRE_PROCESSâ: [
{
âInputNâ: 1,
âInputHâ: 640,
âInputWâ: 640,
âInputCâ: 3,
âInputQuantEnâ: true
}
]
}
I hope you can help me out with this.
Thank you in advance and best regards,
Simon