ONNX to HEF Conversion Model Script - YOLOv11n on Raspberry Pi 5 with AI HAT+

Okay, here’s a revised version of your forum post incorporating the additional details you provided:

Title: ONNX to HEF Conversion Model Script - YOLOv11n on Raspberry Pi 5 with AI HAT+

Body:

I’m working on deploying a YOLOv11n object detection model on a Raspberry Pi 5 with the Raspberry Pi AI HAT+ (13 TOPS). I trained the YOLOv11n model using Python code and have successfully converted it to ONNX format. I’ve also generated a HAR (Hardware Architecture Representation) file using the AI Suite.

My next step is to compile the ONNX model to HEF (presumably for use with the AI HAT+). I understand I need to create a “model script” for this compilation process, but I’m unsure how to do this.

I’m currently working within the AI Suite Docker container on Docker Desktop. I am not familiar with google colab.

Could anyone provide a template or example of such a model script, specifically one that targets the Raspberry Pi AI HAT+?

Hi @saavedrajerico,

We recommend going over our DFC tutorial.

In our guide, you can also find all the information on the model script (alls file) and the commands that you can add to it.