I want to create a line for detecting objects that enter the defined line or zone but do not display on the screen.

I’m currently developing a project to detect objects moving across a line or entering a defined zone using an Raspberry Pi camera. I’m running the model through the Hailo system on a Raspberry Pi 5, using the GStreamer pipeline for real-time display.

I’ve already created line drawing code in Python (specifying the coordinates of the detected line) and added it to my script. However, when I run it using this command:

python3 basic_pipelines/detection.py
–labels-json resources/license_plate.json
–hef resources/license_plate.hef
–input rpi

The lines I drew are not showing on the screen that displays the video stream from the camera. Only the camera image and the object detection frame are showing.

Please give me some advice on how to make it or how you can actually use it.

:folded_hands: :folded_hands: :folded_hands: :folded_hands: :folded_hands: :folded_hands: :folded_hands: :folded_hands: :folded_hands: :folded_hands: :folded_hands: :folded_hands: :folded_hands: :folded_hands: :folded_hands: :folded_hands: :folded_hands: :folded_hands: :folded_hands: :folded_hands: :folded_hands: :folded_hands: :folded_hands: :folded_hands: :folded_hands:

Hi @user246

At DeGirum (A SW partner of Hailo), we developed PySDK, a python package that makes edge AI development easier with Hailo devices. We have a usage example that really aims at counting objects in a predefined zone.

hailo_examples/examples/024_object_in_zone_counting_video_stream.ipynb at main · DeGirum/hailo_examples

We support webcam, RTSP URL and video files as input but we also have a way to use your custom video frame generator in case you want to use Gstreamer. You can find an example of how to use custom frame generator here : hailo_examples/examples/016_custom_video_source.ipynb at main · DeGirum/hailo_examples

Let me know if you face any issues in implementing this. Thanks !

Hi @user246

here is an example for counting objects crossing a line (this includes tracker): hailo_examples/examples/023_multi_object_tracking_video_file.ipynb at main · DeGirum/hailo_examples