torinmb / mediapipe-touchdesigner

GPU Accelerated MediaPipe Plugin for TouchDesigner
MIT License
637 stars 31 forks source link

Hand gesture tracking #4

Closed domisjustanumber closed 1 year ago

domisjustanumber commented 1 year ago

This is a pretty significant change: I've added Hand Gesture tracking to all the places, so you need the new Media_Pipe tox and the hand_tracking tox files, as well as new js scripts.

Currently the gesture tracking data gets exported from Media_Pipe in the hand_results output, so if you have hand and gesture tracking enabled at the same time, they will step on each other. The hand_tracking tox is only set up to parse gestures and will ignore hand landmarks on their own.

It seems like using gestures instead of hand landmarks adds about 1ms of detection time, but it's a pretty nifty feature so I'm tempted to just use that and ditch hand landmarks entirely, but would like your thoughts.

Also did some minor tidyup to other tasks. The detectTime now gets extracted by the WS server instead of the client, just so it's not constantly spamming the output DAT of the client and you can see the parameter exchange messages easier.

I also fixed a flag for showing the overlays.

More on Gestures: https://developers.google.com/mediapipe/solutions/vision/gesture_recognizer