4.2 Running Pose Estimation on GPU
To run this example, perform the following steps:
- Download the file mpf_an522_v2023v2_jb.zip from AN5522.
- Copy the file
linux_imx477_pose_estimation.py
into the folderholoscan-sensor-bridge/examples
- Open a new terminal and navigate to
the
holoscan-sensor-bridge
folder by using the following command.cd <PATH/TO/holoscan-sensor-bridge>
- The next step involves downloading
ffmpeg and ultralytics packages to run
the pose estimation demo from Running Holoscan Sensor Bridge examples - NVIDIA
Docs. Rather than going to the link above, type the following in the console
apt-get update && apt-get install -y ffmpeg pip3 install ultralytics onnx cd examples yolo export model=yolov8n-pose.pt format=onnx cd -
Note:This conversion step only needs to be executed once; the yolov8n-pose.onnx file contains the converted model and is all that’s needed for the demo to run. The installed components will be forgotten when the container is exited; those do not need to be present in future runs of the demo.
- To run the sensor bridge
demonstration container, from a terminal in the GUI, Note: Ignore the step if the docker is running already
xhost + sh docker/demo.sh
- To run the pose estimation
demo,
python examples/linux_imx477_pose_estimation.py
- Close the Holoviz application and exit the docker to terminate the application