Running HEF file on RasberryPI

Hi. I’ve been studying how to use hailo8. I converted my custom pt file to hef file and it worked on my rasberryPI 5 by executing this command on the terminal:

python basic_pipelines/detection.py --labels-json resources/test-labels.json --hef-path ./yolov8s.hef --input /dev/video0

now I want to run my hef file by just typing

python detection.py

on terminal.

but I have no idea how to do so. Is there any guide or example about this?

You should consider to write a wrap Python file where inside of it there are hardcoded the —options which will be run from the wrapper with subprocess, for example:

import subprocess

result = subprocess.run([“ls”, “-l”], capture_output=True, text=True)
print(result.stdout)

This program runs the command ls -l into prompt and display the result with print, you can change the command with “python my_script.py —myoptions…”

Hey @Jaewon_Ahn ,

What @Andrew92 suggested is a great option.

You can also change it in the detection_pipeline.py file and make it the default for you’re application