Issue Converting RESA Lane Detection Model to Hailo – Discrepancy Between ONNX and HAR(Native) Outputs

Hello,

I am currently working on converting my RESA lane detection model to the Hailo platform. However, I am encountering an issue where the native output from the generated HAR file does not match the results from the original ONNX model.

Here are some details about my environment and the steps I have taken:

  • ONNX version: 1.14.0
  • ONNX Runtime: 1.12.0
  • ONNX Simplifier: 0.4.19
  • Hailo Dataflow Compiler: Latest Docker container (released July 2025)

I have tried parsing both the original and the simplified ONNX files into HAR, but the outputs remain inconsistent with the ONNX results in both cases.

I would greatly appreciate any advice or suggestions to help resolve this issue.

Thank you for your support.



BTW, If you need the code or ONNX files for further investigation, please let me know. I can provide all the files I have used so far—just let me know if you can share a link for uploads.

Hey @KunWoo_Park ,

Welcome to the Hailo Community!

When you see differences between ONNX-Runtime and Hailo outputs, it’s usually due to parsing issues, quantization noise, or post-compilation problems. Here’s how to debug it systematically:

1. Check if it’s a parsing problem first Run full-precision emulation to see if your model parses correctly before quantization:

runner = ClientRunner(hw_arch="hailo8")
runner.translate_onnx_model("model.onnx", "resa")
runner.optimize_full_precision(calib_dataset)
fp_out = runner.infer(runner.ctxs.SDK_FP_OPTIMIZED, data_loader)

If this already differs from ONNX-Runtime, you have a parsing/model-script issue (wrong shapes, normalization, etc.). If it matches, the problem is in quantization.

2. Find which layers are causing quantization noise

hailo analyze-noise resa_quantized.har --data-path calib_set.npy --batch-size 1 --data-count 64
hailo profiler resa_quantized.har  # check "Accuracy" tab

This shows you exactly which layers have low signal-to-noise ratio.

3. Fix noisy layers For problematic layers, try:

  • Use 16-bit precision: quantization_param(convXX, precision_mode=a16_w16)

  • Offload activations: change_output_activation(convXX, sigmoid)

Hi Omria,

I have already checked the original parsed HAR inference values using the SDK_NATIVE method, as shown in the attached image.

All input values are set to one, which is the same as in the ONNX inference.

Here are the ONNX results:

However, I am seeing differences between the results, even though I ran the ONNX → HAR parsing immediately after.

How can I resolve this issue? Could it be related to the parsing process?

If you have any suggestions or recommended steps to verify or correct the parsing, please let me know.

Thank you for your help.