Where to insert my code?

Hello

I just installed Hailo 8 on my Raspberry Pi 5.

Installation went smoothly.

I’m enjoying the showcases (I’m only interested in Python).

However, I’m missing something, perhaps an understanding of where to insert my Python code.

In older YOLO installations, I could simply insert my code into the loop that processed the video frames. This code would then perform a specific action (e.g., activate a relay) after an object was detected.

I’m referring to the code in “object_detection.py”.

Is there any documentation for this code?

How can I identify which object is currently being detected?

Sorry for these really basic questions, but I would appreciate it if someone could point me in the right direction.

Torsten

Hi @Boogiebox ,

Right here: hailo-apps/hailo_apps/python/pipeline_apps/detection/detection.py at main · hailo-ai/hailo-apps · GitHub

Thank you for your reply.
I known where to find the python file and i have used it with my MP4-Files and USB-webcam. Works wonderful.
I do not understand, where to place my code for my action.

Torsten

Hi @Boogiebox ,

Inside the callback function - the link directs to a specific line in the code.

Thanks,

Thanks a lot, now i got it.

Case can be closed.

1 Like