handtrack.js icon indicating copy to clipboard operation
handtrack.js copied to clipboard

Ignoring Faces?

Open tinchoforever opened this issue 3 years ago • 2 comments

Hello everyone, we are creating a simple gesture app that will understand when hands move from left to right and viceverse. The problem that we are finding is that if the user has it camera point to the face, the default config always detect faces and the hand over the face is never recognized. Is there any way to configure handtrackjs to ignore faces vs hands ?

Regards

tinchoforever avatar Apr 14 '21 18:04 tinchoforever

Hi @tinchoforever

Thanks for reporting this. Handtrack.js reports all predictions it (below the threshold you specify). It probably still finds a face but that does not show up because of a low confidence value. Some options you can explore:

  • Reduce the scoreThreshold parameter. This should return more predictions in general and you then select a threshold that works for you (e.g. check if hand intersects with or is close to face and use a lower threshold).

  • Downgrad to handtrack.js v 0.0.13 which predicts only hands but does not ignore hands over face (you will need another lib to track face if needed).

In the mean time, I'll work to finetune the underlying handtrack.js model with more data that covers the hand + face scenario so it does a better job of detecting both hands and face when they overlap/intersect. This way, the model should more confidently predict

-V

victordibia avatar Apr 14 '21 20:04 victordibia

Bump. I would also like to be able to ignore the face (totally unneeded for my use case of gesture controls, and only eats performance/needs to be filtered out from results)

Zireael07 avatar Aug 05 '23 12:08 Zireael07