Optimization Error - End Nodes?

Hello,

Currently trying to compile a modified version of YoloV11 that I retrained, but I keep running into the error below:

However, I already rechecked the end nodes with netron, and they seem right as far as I can tell. My modified version of YoloV11 has P4/P5 detection, as I removed P3.

Here is my parsing step:

from hailo_sdk_client import ClientRunner

# Define the ONNX model path and configuration
onnx_path = "/content/modified_run_3.onnx"
onnx_model_name = "modified_run_3_renamed"
chosen_hw_arch = "hailo8"  # Specify the target hardware architecture

# Initialize the ClientRunner
runner = ClientRunner(hw_arch=chosen_hw_arch)

# Use the recommended end node names for translation
end_node_names = [
    "/model.14/cv2.0/cv2.0.2/Conv",  # P4 regression
    "/model.14/cv2.1/cv2.1.2/Conv",  # P4 classification
    "/model.14/cv3.0/cv3.0.2/Conv",  # P5 regression
    "/model.14/cv3.1/cv3.1.2/Conv",  # P5 classification
]

try:
    # Translate the ONNX model to Hailo's format
    hn, npz = runner.translate_onnx_model(
        onnx_path,
        onnx_model_name,
        end_node_names = end_node_names,
        net_input_shapes={"input": [16, 3, 640, 640]},  # Adjust input shapes if needed
    )
    print("Model translation successful.")
except Exception as e:
    print(f"Error during model translation: {e}")
    raise

# Save the Hailo model HAR file
hailo_model_har_name = f"{onnx_model_name}_hailo_model.har"
try:
    runner.save_har(hailo_model_har_name)
    print(f"HAR file saved as: {hailo_model_har_name}")
except Exception as e:
    print(f"Error saving HAR file: {e}")

I already referenced others issues on this topic, and they just said to check the end nodes, as there should be two end nodes per feature map, so I have 4, so was just wondering if someone could help double check my nodes. Below is my optimization step.

YoloV11 ONNX

Can someone just verify my steps? I have no idea what I did wrong.

I was able to solve my error, I’m running the entire thing through google colab, despite it being a managed environment the DFC still has to be installed in there.

Basically inside colab, installed all package dependancies there then ran my scripts that I saved to files locally, will post a guide on how to do this.

!my_env/bin/python translate_model.py