YOLO Pose Estimation on the Raspberry Pi AI Hat+ | Writing Custom Python Code

Hello forum goers,

We just released another guide on using the AI HAT, this time with some YOLO pose estimation. We do some cool stuff such as setting up some basic gesture control, controlling hardware with your arms, and creating a motion-controlled game of Fruit Ninja

This is another really fun one, and the Fruit Ninja alone is worth giving it a go if you have a HAT lying around: “YOLO Pose Estimation on the Raspberry Pi AI Hat+ | Writing Custom Python Code”



In this guide, we will be setting up and using YOLO pose estimation with the Raspberry Pi AI HAT, as well as exploring how to use it alongside your own Python code so you can use pose estimation in your projects. We will be taking a look at how to i…

Read more

4 Likes

Thanks for your excellent blogs and guides on the PI AI hat. Question: do you also plan to do a tutorial on the Hailo CLIP project?

Thx Stephan

2 Likes

Hey Stephan,

It’s definitely on our list to get around to sometime, no guarantee when though!

1 Like

Thanks. Recently I have started working with YOLO.

3 Likes

Hello Jaryd,
Great guide & thank you so much sharing your project with all the details!

I tried your code in Gesture Media Control part, pretty much copy & pasted it exception of “subprocess.run([‘wtype’, ‘k’])” line 37 & replaced that line with “print(“gesture detected”)” to see detection outcome directly from terminal on my pi5 8gb, ai hat, pi3cam noir in fresh installed bookworm with all update & Hailo package installed

I noticed this code detect & triggers detection on either one (left or right) or both hand wrist raised above nose even the if statement in line 33 calls condition that only both wrist raised higher than nose x coordinate is true and this was tested on sitting position on chair in front of camera in about 3 feet distance. what’s strange is this; pose detection actually shows estimated position of hip & below body point although camera can not see it from sitting position because they are covered under my desk.

Further test of standing position that camera can see below hip & upper whole body including nose & head then it works (condition works as in statement; that both wrist higher than nose trigger detection)

I know you put so much into this project & really appreciate that; I’m seeking any suggestion to solve this or make it work even lower body is not visible?

I’m old but newbie

Hey Martin, welcome to the forums!

Are you saying that the gesture was being triggered when a single hand was raised above the nose when the code is meant to only be for both hands?

And is the other issue to do with the jumble of body parts being estimated off-screen? We have tried to fix that and stop it from being estimated, but that behaviour is coded very deep into the model itself, I don’t think it’s possible to remove it without re-training a model.

Thank you Jaryd for following up!

I think that jumble (when body parts are not clearly visible) is what’s causing of false triggering and I thought that too is model related issue.

Your project & code works well when most of body parts are shown in frame and thank you so much again!

I did let Hailo aware of this issue & hopefully they’ll have better pose model availble soon

2 Likes