3f947e0f507f890d5e929a4cb90b6dd92c3a19b6
👀 cv-model-pt_to_hef Overview
Convert Computer Vision model .pt to .hef for Rasberry Pi 5 Hailo AI HAT
🔎 Preparation
1. Prepare docker enviroment
Follow these steps:
sudo systemctl stop docker.socket
sudo systemctl stop docker.service
sudo systemctl status docker
sudo systemctl status docker.socket
sudo mv /var/lib/docker /home/$USER/docker_data
sudo ln -s /home/$USER/docker_data /var/lib/docker
sudo systemctl start docker
sudo systemctl enable docker
Docker Root Dir: /home/$USER/docker_data
Go to theHAILO AI DEVELOPER ZONEadress and download .zip file with this configration: Software Package[AI Software Suite], Software Sub-Package[AI Software Suite], Architecture[x86], OS[Linux], Python Version[3.8]In model training, place 60%–80% of the photos you use into the train/images folder. The photos should be raw, unlabelled images — there should be no labeling process applied to them. You don’t need labels or a classes.txt file; only the images folder is required.
3. Get your .pt model and convert it to .onnx
- Run this .py code at the same directory with your .pt model:
!pip install ultralytics
from ultralytics import YOLO
model = YOLO("model.pt")
model.export(format="onnx")
/home/$USER/docker_hailo/hailo8_ai_sw_suite_2025-10_docker.zip
/home/$USER/docker_hailo/train/images/(60%–80% of your photos)
/home/$USER/docker_hailo/shared_with_docker/models/model.onnx
/home/bob/Docker_hailo/shared_with_docker/doc/
📦 Setup
unzip hailo8_ai_sw_suite_2025-10_docker.zip -d /home/$USER/docker_hailoEdit your .sh document and delete these lines:-v /etc/timezone:/etc/timezone:ro
-v /etc/localtime:/etc/localtime:ro`./hailo_ai_sw_suite_docker_run.sh --override
🎉 Run
``