Tfjs: Detect >1 hand with HandPose

Created on 22 Mar 2020  路  3Comments  路  Source: tensorflow/tfjs

TensorFlow.js version

"@tensorflow/tfjs-core": "^1.7.0"

Browser version

Version 80.0.3987.149 (Official Build) (64-bit)

Describe the problem or feature request

Using https://github.com/tensorflow/tfjs-models/tree/master/handpose
I cannot seem to use HandPose to detect more than one hand

Code to reproduce the bug / link to feature request

Despite channing model.maxHandNumber=2 model still predicts only one hand.
Full main method:

const main = async () => {
    model = await handpose.load();
    model.maxHandsNumber = 2;
    let video;
    try {
        video = await loadVideo();
    } catch (e) {
        console.log(e);
        throw e;
    }
    landmarksRealTime(video);
};

...
const landmarksRealTime = async video => {
        const predictions = await model.estimateHands(video); // returns one prediction 
}
Handpose support

Most helpful comment

Thank you, sent out a PR here .

All 3 comments

This is not yet implemented and you can expect this in future releases , stay tuned.Thank you for bringing this.
cc @annxingyuan

@rthadur thanks, and props for a great model. Might be good to clarify that in the README & blogpost as it seems already possible:

if (predictions.length > 0) {
    /*
    `predictions` is an array of objects describing each detected hand, for example:
    [
      {

Thank you, sent out a PR here .

Was this page helpful?
0 / 5 - 0 ratings