Skip to content

Latest commit

 

History

History
52 lines (45 loc) · 1.43 KB

model-zoo-compilation.md

File metadata and controls

52 lines (45 loc) · 1.43 KB

3.1 Compiling the Model using Hailo Model Zoo

WORK IN PROGRESS

This guide outlines how to compile your YOLOv8 model for object detection using Hailo Model Zoo.

Prerequisites

1. Copy files and images to VM

Put best.onnx, dataset.yaml and data.zip in a folder and compile to files.zip.

scp PATH_TO/files.zip USERNAME@EXTERNALIP:/home/USERNAME

Unzip the file

unzip files.zip
unzip data.zip

2. Install Hailo Model Zoo

  1. Activate the hailo-dfs environment:
. hailo-dfc/bin/activate
  1. Clone the Hailo Model Zoo repository:
git clone https://github.com/hailo-ai/hailo_model_zoo.git
  1. cd into the folder and install all requirements:
cd hailo_model_zoo
pip install -e .
  1. cd back to you working directory
cd ..

3. Convert the onnx file to a hef file with model zoo

  1. Adjust classes number accordingly to your model:
hailomz compile yolov8s --ckpt=best.onnx --hw-arch hailo8l --calib-path data/train/images --classes 3 --performance

You can run without --performance to test the command 2. Finally, use scp from your local terminal to copy the yolov8s.hef file from your VM to your local machine. Replace the placeholders with your VM username, and desired local path:

scp USERNAME@EXTERNALIP:yolov8s.hef /LOCAL_PATH

Continue with Deploy Model on Raspberry Pi 5.