Pose Estimation

This example demonstrates human pose estimation. It uses the yolov8s_pose model.

1. Detection of the video

Terminal input,

Then enter the command to enter the virtual environment

Enter the command. Run the video to detect

Where the .mp4 suffix indicates the path of the video

image-20240809180526799

To close it, press ctrl+c.

Contents in this example:

The Callback function shows how to get the pose estimation metadata from the network output. Each pesron is represented as a with 17 key points (objects). The code parses the landmarks and extracts the left and right eye coordinates and prints them to the terminal. If the flag is set, the eyes are drawn on the user frame. The key point dictionary can be obtained from the function. HAILO_DETECTION``HAILO_LANDMARKS``--use-frame``get_keypoints

2. Real-time detection of camera images

In the virtual environment terminal, enter the following command. By default, these examples run with a USB camera (/dev/video0). You can change the input source using the --input flag according to the real-time situation.

image-20240809180715715

If the camera does not display properly, you can check which video devices are available by running the following command:

You can test whether the camera is working properly by running the following command:

If you encounter an error, try another device, such as /dev/video2.

Troubleshooting and known issues

If the camera example suddenly stops running in the middle, you can refer to the solution steps below. If it still does not work, you need to restart the Raspberry Pi.

Solution steps:

1.Identify the device: Typically, Hailo devices are located at . Make sure this is the correct device file for your setup. /dev/hailo0

2.Find processes using the device: Run the following command to list any processes currently using the Hailo device:

3.Kill the process: Kill the process using the PID (Process ID) from the output of the previous command. Replace with the actual PID. <PID>