Coding with Hailo on Raspberry pi 5

Hello,how can I run that code using hailo on raspberry pi 5?

import cv2

from ultralytics import YOLO

import hailo_platform as hp

img=cv2.imread(“kedi.jpg”)

img=cv2.resize(img,(1200,600))

model=YOLO(“yolov8n.hef”)

results=model(img)[0]

boxes=results.boxes

for box in boxes:

x1,y1,x2,y2=map(int,box.xyxy[0])

cv2.rectangle(img,(x1,y1),(x2,y2),(255,0,0),2)

cv2.imshow(“img”,img)

cv2.waitKey(0)

cv2.destroyAllWindows()

Hey @faikkom66,

Please follow the guide for installing PyHailoRT on the Raspberry Pi 5, but skip Step 7—you only need to complete Step 6.

For examples on how to use Python API, check out this link: Hailo Application Code Examples.

Hello,me again.I downloaded code from github but I got error.How can I solve that?
Code:
with VDevice(device_ids=devices) as target:
configure_params = ConfigureParams.create_from_hef(hef, interface=HailoStreamInterface.PCIe)
network_group = target.configure(hef, configure_params)[0]
Error:
[HailoRT] [error] CHECK failed - max_desc_page_size given 16384 is bigger than hw max desc page size 4096
[HailoRT] [error] CHECK_SUCCESS failed with status=HAILO_INTERNAL_FAILURE(8)
[HailoRT] [error] CHECK_SUCCESS failed with status=HAILO_INTERNAL_FAILURE(8)
[HailoRT] [error] CHECK_SUCCESS failed with status=HAILO_INTERNAL_FAILURE(8)
Exception has occurred: HailoRTException
libhailort failed with error: 8 (HAILO_INTERNAL_FAILURE)
hailo_platform.pyhailort._pyhailort.HailoRTStatusException: 8

The above exception was the direct cause of the following exception:

File “/home/halil/hailo_platform_venv/son.py”, line 23, in
network_group = target.configure(hef, configure_params)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
hailo_platform.pyhailort.pyhailort.HailoRTException: libhailort failed with error: 8 (HAILO_INTERNAL_FAILURE)