Yolov8m-seg onnx to hef with integrated nms

Hello Hailo Team,

I am converting a custom yolov8m_seg model from onnx to hef on hailo8 and would like to integrate nms into the hef.
My .alls file contains:

normalization1 = normalization([0.0, 0.0, 0.0], [255.0, 255.0, 255.0])
change_output_activation(conv61, sigmoid) 
change_output_activation(conv79, sigmoid) 
change_output_activation(conv94, sigmoid) 
nms_postprocess(meta_arch=yolov8, engine=cpu)

When I add the nms_postprocess(...) line and run hailomz compile, the compilation fails with an error.
Could you please clarify:

  • Is nms_postprocess(meta_arch=yolov8) supported for yolov8-seg models?
  • Can yolov8m-seg generate a hef with integrated nms?
  • If not, what is the recommended workflow for yolov8-seg on hailo8?

Thank you for your help.

HailoRT NMS support is only available for a subset of models. You can find the post-processing configuration files for supported models in the Hailo Model Zoo:

GitHub - Hailo Model Zoo - Postprocess Config Files

The yolov8m_seg model does not currently include NMS support.

For models without built-in NMS support, post-processing must be performed in the host application. Hailo provides example implementations for many supported models. For custom models, you may need to implement the required post-processing logic yourself as part of the model deployment workflow.

For yolov8m_seg , you can refer to the following examples in the Hailo Apps repository:

Python (Instance Segmentation):
GitHub - hailo-apps - Python - Instance Segmentation

C++ (Instance Segmentation):
GitHub - hailo-apps - CPP - Instance Segmentation

Alternatively you can also download and parse the pre-compiled HEF files from our Model Zoo GitHub repository.
Use the hailortcli parse-hef model.hef command.

The output for a model with NMS will look like this (yolov8m):

HEF Compatible for: HAILO8
Network group name: yolov8m, Multi Context - Number of contexts: 3
    Network name: yolov8m/yolov8m
        VStream infos:
            Input  yolov8m/input_layer1 UINT8, NHWC(640x640x3)
            Output yolov8m/yolov8_nms_postprocess FLOAT32, HAILO NMS BY CLASS(number of classes: 80, maximum bounding boxes per class: 100, maximum frame size: 160320)
            Operation:
                Op YOLOV8
                Name: YOLOV8-Post-Process
                Score threshold: 0.200
                IoU threshold: 0.70
                Classes: 80
                Max bboxes per class: 100
                Image height: 640
                Image width: 640

All other models e.g. yolov8m_seg will show raw output layers:

HEF Compatible for: HAILO8
Network group name: yolov8m_seg, Multi Context - Number of contexts: 3
    Network name: yolov8m_seg/yolov8m_seg
        VStream infos:
            Input  yolov8m_seg/input_layer1 UINT8, NHWC(640x640x3)
            Output yolov8m_seg/conv93 UINT8, NHWC(20x20x64)
            Output yolov8m_seg/conv94 UINT8, NHWC(20x20x80)
            Output yolov8m_seg/conv95 UINT8, NHWC(20x20x32)
            Output yolov8m_seg/conv78 UINT8, FCR(40x40x64)
            Output yolov8m_seg/conv79 UINT8, FCR(40x40x80)
            Output yolov8m_seg/conv80 UINT8, FCR(40x40x32)
            Output yolov8m_seg/conv60 UINT8, FCR(80x80x64)
            Output yolov8m_seg/conv61 UINT8, FCR(80x80x80)
            Output yolov8m_seg/conv62 UINT8, FCR(80x80x32)
            Output yolov8m_seg/conv64 UINT8, FCR(160x160x32)