Category Archives: Python

Improved Gesture Recognition in Python and MediaPipe

In this video lesson we show you how you can improve the accuracy of your gesture recognition program developed in the last lesson. We do this by normalizing the hand landmarks distance matrix to a standard size. By doing this, you get accurate results independent of the distance your hand is from the camera. For your convenience, I include the code below which we develop in this lesson. Enjoy!

 

s lesson. Enjoy!

AI for Everyone LESSON 26: Accurate Gesture Recognition using Python and MediaPipe

In this lesson we demonstrate how to use mediaPipe and Python to create an AI system that can accurately recognize hand gestures. This is follow on work to what we developed in Lesson 25. The code we developed is presented below.

 

Using an Arduino with Python LESSON 4: Visual Display of Measured Voltage in Visual Python

In this lesson we show how you can measure a voltage from a potentiometer using Arduino, and then pass that data to Visual Python over the serial port. Then we use visual python to create a 3D model that is animated by the live data.

On the Arduino side we use the following code to measure the voltage from the potentiometer:

Then on the python side we read and display the data with the following code:

Watch the video for a complete explanation of the code.

AI for Everyone LESSON 25: First Attempt at Using MediaPipe for Gesture Detection

In this lesson we describe what our approach will be to creating a gesture detection and recognition algorithm using mediaPipe. We will demonstrate the algorithm with some simple code demos. In future lessons we will further develop the algorithm.  The code below is the initial algorithm developed in this video. Enjoy!

 

Parsing Mediapipe Data for Face Mesh, Pose, and Hand Landmarks

We all love the incredibly powerful features of the Mediapipe AI library. But, lets face it, the data is very hard to interpret, and the returned data structures are complex, and poorly documented. The purpose of this lesson is to show you how to parse the complex data structures coming from Mediapipe, and to create simple, intuitive arrays for the landmark data. We create classes in python which do the parsing, and the classes are easy to work with. With these classes, you can use mediapipe simply, and get simple to understand data structures back. The video explains what we are doing and how we are doing it. For your convenience the resulting code is posted below.