Hailo/Hailo-15/AI Applications/Run an Example Application: Difference between revisions

From RidgeRun Developer Wiki
(Created page with "<noinclude> {{Hailo/Head |previous=https://developer.ridgerun.com/wiki/index.php/Hailo/Hailo-15/Image_Building/Booting_a_Yocto_Image_on_the_Hailo-15_from_an_SD_Card |next=https://developer.ridgerun.com/wiki/index.php/Hailo/Available_Source_Code |title=Run an AI Example Application on Hailo-15 }} </noinclude> <br> == 1. Connect and boot the Hailo-15 == Before proceeding with the next steps, it's important that you have connected and prepared the Hailo by following all...")
 
Line 55: Line 55:


And in your host machine you will see the output of the GStreamer transmission, as follows:
And in your host machine you will see the output of the GStreamer transmission, as follows:
[[File:Screenshot from 2024-10-11 10-16-50.png|center|thumb|687x687px|Execution of Yolov5 detection model using GStreamer and a Hailo-15]]
[[File:Hailo-Yolov5 detection model-output.png|center|thumb|687x687px|Execution of Yolov5 detection model using GStreamer and a Hailo-15]]


<br />
<br />

Revision as of 19:31, 16 December 2024






1. Connect and boot the Hailo-15

Before proceeding with the next steps, it's important that you have connected and prepared the Hailo by following all the steps outlined in this wiki: Booting a Yocto Image on the Hailo-15 from an SD Card

Once the Hailo-15 has completed the boot process, you will see the following in your terminal:

 root@hailo15:~#

Once there, you can inspect the directories and files present in the Hailo's home directory using the following command:

 root@hailo15:~# ls
 apps  gstshark_2024-07-31_17:59:02  hailort.log  medialib.1.log  medialib.log  tests

2. Navigate to the apps folder

In the apps folder, you will find various example applications that you can run, as shown below:

 root@hailo15:~# cd apps
 root@hailo15:~/apps# ls
 ai_example_app	basic_security_camera_streaming  detection  encoder_pipelines  encoder_pipelines_new_api  internals  license_plate_recognition	resources  vision_preproc 

3. Running an object detection example

For this example, we will run the object detection example. Now, proceed to enter the detection folder as shown below. In this folder, you will find several files similar to the following:

   
 root@hailo15:~# cd detection/
 root@hailo15:~/apps/detection# ls
 detection.sh  detection.sh~  hailort.log  medialib.1.log  medialib.log	resources\

4. Setup your Host machine

Now, connect your computer to the Hailo-15 via the Ethernet port, and make sure that the IP address is set to 10.0.0.2 and that port 5000 is available.

Then run the following GStreamer pipeline in your Host machine:

gst-launch-1.0 udpsrc port=5000 address=10.0.0.2 ! application/x-rtp,encoding-name=H264 ! queue max-size-buffers=30 max-size-bytes=0 max-size-time=0 leaky=no ! rtpjitterbuffer mode=0 ! queue max-size-buffers=30 max-size-bytes=0 max-size-time=0 leaky=no ! rtph264depay ! queue max-size-buffers=30 max-size-bytes=0 max-size-time=0 leaky=no ! h264parse ! avdec_h264 ! queue max-size-buffers=30 max-size-bytes=0 max-size-time=0 leaky=downstream ! videoconvert n-threads=8 ! queue max-size-buffers=30 max-size-bytes=0 max-size-time=0 leaky=no ! fpsdisplaysink text-overlay=false sync=false

5. Execute the object detection example

Finally run the following command in the Hailo-15 terminal:

 root@hailo15:~/apps/detection# ./detection.sh

And in your host machine you will see the output of the GStreamer transmission, as follows:

Execution of Yolov5 detection model using GStreamer and a Hailo-15