DAMO-YOLO nms_postprocess

Hi there,

Does nms_postprocess work with DAMO-YOLO? despite it being in the NMSMetaArchitectures (‘damoyolo’) there doesn’t seem to be an nms json config file in the model zoo.

If not i’m assuming i’ll have to make my own custom script for reshaping the output layers and doing nms?

Any help with this would be greatly appreciated.

Hi @piers.turner
Welcome to the Hailo community. We developed a python package called PySDK that simplifies developing with Hailo devices: Simplifying Edge AI Development with DeGirum PySDK and Hailo. One of the features of PySDK is integration of postprocessors. In fact, DAMO-YOLO is one the post processors we added and other users have been able to use them: DAMOYOLO inference and postprocessing example - General - Hailo Community

Welcome to the Hailo Community!

the precompiled DAMO-YOLO models in the Hailo Model Zoo do not contain NMS. So currently it is not supported as built in NMS postprocess. Maybe my R&D colleagues want to add this in the future.

You can use the following command to test this:

hailortcli parse-hef model.hef

The output for the damoyolo currently looks like this:

Architecture HEF was compiled for: HAILO8
Network group name: damoyolo_tinynasL35_M, Multi Context - Number of contexts: 4
    Network name: damoyolo_tinynasL35_M/damoyolo_tinynasL35_M
        VStream infos:
            Input  damoyolo_tinynasL35_M/input_layer1 UINT8, NHWC(640x640x3)
            Output damoyolo_tinynasL35_M/conv83 UINT8, FCR(80x80x68)
            Output damoyolo_tinynasL35_M/conv84 UINT8, FCR(80x80x81)
            Output damoyolo_tinynasL35_M/conv97 UINT8, FCR(40x40x68)
            Output damoyolo_tinynasL35_M/conv98 UINT8, FCR(40x40x81)
            Output damoyolo_tinynasL35_M/conv110 UINT8, FCR(20x20x68)
            Output damoyolo_tinynasL35_M/conv111 UINT8, FCR(20x20x81)

compared to this for the yolov8 model with NMS:

Architecture HEF was compiled 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
                Cross classes: false
                NMS results order: BY_CLASS
                Max bboxes per class: 100
                Image height: 640
                Image width: 640