Hailo Dataflow Compiler Error in the last layers of the model, expected conv but found concat layer.

Hi @user1132,

This is a known issue that happens when the DFC’s auto-parser picks the wrong end nodes for your model. Looking at your log, the parser fell back to /model.22/Concat and /model.22/Sigmoid as end nodes, but the NMS postprocess expects the model to end at 6 specific conv layers (before the YOLO decode head). When it finds a concat layer there instead, it throws that error.

You might try re-running the compile command with the end node names specified explicitly:

hailomz compile \
    --ckpt your_model.onnx \
    --hw-arch hailo8 \
    --calib-path /path/to/calibration/images \
    --yaml yolov8m.yaml \
    --classes <your_num_classes> \
    --end-node-names \
        /model.22/cv2.0/cv2.0.2/Conv \
        /model.22/cv3.0/cv3.0.2/Conv \
        /model.22/cv2.1/cv2.1.2/Conv \
        /model.22/cv3.1/cv3.1.2/Conv \
        /model.22/cv2.2/cv2.2.2/Conv \
        /model.22/cv3.2/cv3.2.2/Conv

However, since the auto-parser didn’t detect the standard YOLOv8 NMS structure (it usually prints “NMS structure of yolov8 was detected” - yours didn’t), it’s possible your ONNX model has non-standard layer names. To verify, you could open your .onnx file in https://netron.app and check whether those 6 conv layer names actually exist in your model graph. If the layer names are different, you’ll need to find the equivalent conv layers right before the detection head’s concat/decode operations and use those instead.

Also worth checking - how did you export from .pt to .onnx? The standard Ultralytics export (yolo export model=best.pt format=onnx opset=11 imgsz=640) should produce a graph structure the parser recognizes. If the model was exported through Roboflow or a different tool, the graph structure might differ.

For a related thread where other users solved this same error, see Running hailomz optimize reports layer yolov8n/conv41 doesn't have one output layer and Error while compile ONXX TO HEF

Thanks,
Michael.