How do I make handedness output from model?

#2
by ledeus - opened

How can I modify the Sentis Blaze Hand project to output handedness (left or right) alongside hand detection? What specific changes or additional data do I need to implement? I’ve been trying to get it to work for left/right detection in Unity, similar to the WebGL examples.

Unity Technologies org
•
edited Oct 1, 2024

According to the model card the handedness should be one of the outputs of the model.
The onnx model looks like this:
image.png
So I believe one of 'Identity_1' and 'Identity_2' should be the handedness, the other one is presence.
Try and return these outputs from the landmarker model as we do with the positions:
"var landmarksAwaitable = (m_HandLandmarkerWorker.PeekOutput("Identity") as Tensor).ReadbackAndCloneAsync();
var handednessAwaitable = (m_HandLandmarkerWorker.PeekOutput("Identity_1"/"Identity_1") as Tensor).ReadbackAndCloneAsync();"
and then do a readback.
model card: https://storage.googleapis.com/mediapipe-assets/Model%20Card%20Hand%20Tracking%20(Lite_Full)%20with%20Fairness%20Oct%202021.pdf

Thanks! It was as you said. "var handednessAwaitable = (m_HandLandmarkerWorker.PeekOutput("Identity_2") as Tensor).ReadbackAndCloneAsync();"

ledeus changed discussion status to closed

Sign up or log in to comment