Skip to content
Advertisement

How to remove specific hand landmarks with mediapipe (Remove thumb)?

I want to remove the thumb from the Hand landmark tracking Mediapipe model to only track my 4 fingers without the thumb. How can I do that?

Here’s what I have done so far and I was able to remove the unwanted CONNECTIONS by defining a custom connections list. But still landmark dots/points visible. How can I remove them?. Thank You.

need to remove thumb landmark points

JavaScript

Advertisement

Answer

You could just change the drawing function. To do that, open drawing_utils.py, go to draw_landmarks()and at the beginning of the for loop that iterates over the landmarks (for idx, landmark in enumerate(landmark_list.landmark):) and those two lines (where in the square bracket you would put the indices that you want to skip

JavaScript

so instead of this:

JavaScript

you should have this:

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement