Error converting ONNX to .hef

I have the following problem. I haven’t been able to successfully convert from ONNX to .hef. I know that I need to first “parse,” then “optimize,” and later “compile.”

  • I started by using a trained YOLOv8 model, and after it didn’t work, I decided to use the base model from Ultralytics, but I still haven’t been able to get it to work.
  • I made sure that the ONNX version in each repository, Hailo Zoo, and YOLO Ultralytics, was the same. Exporting to ONNX isn’t the problem, and I also tried different “opset” values and with the simplify option but nothing.
  • I encountered different versions of an error where I was suggested to use “parse recommendation.” One was “[‘/model.22/dfl/Reshape_1’],” and others suggested “[‘/model.22/Sigmoid’,‘/model.22/dfl/Reshape_1’],” and I even encountered one that had 4 nodes to recommend me.
  • In the end, it managed to parse, but when running the optimize step, it failed.

I am doing this with the following command: hailo parser onnx yolov8n.onnx --hw-arch hailo8l

I also tried: hailomz compile yolov8n --ckpt=yolov8n.onnx --hw-arch hailo8l --classes 2 --performance

Without success. I have DFC installed correctly, and it doesn’t give me any errors; I can run “hailomz” and “hailo.”

“Hailo Dataflow Compiler v3.28.0” and “Hailo Model Zoo v2.12.0”

Can you guide me with this problem? I have read quite a bit on the forum, but I can’t find the solution.

Aside from these errors, I want to understand the concept of “start nodes” and “end nodes” better. Where can I read more about this? From what I’ve read, this might be where the solution lies.

And my other question is, with the Hailo 8L chip, can I run any other model? Could I run a “DINO” or a “SAM”? What would I need to do?

1 Like

Hi @diego,
I would first start with removing the --performance flag, that would ease up the work on the compiler. It will be good sign it the compiler is able to pull it through like that.

DINO is not officially supported at the moment, but if you have the time to convert it to Hailo that would be awesome.

fastSAM is already part of the model-zoo, and you can use it on the Hailo-8L.

Thanks for the response.

How I would convert a model to hailo? Its too difficult? were I can start? In reality I was asking for DINO but I wanna use other models that are not very common.

Its feasible to an external person being able to pull this off and successfully convert a model to run it in a hailo chip? What skills are necessary? Or in reality its difficult and its recommended that we wait?

For example browsing into “papers with code” an take one model from there and use it, that is what I am looking for.

Thanks in advance