2

TensorFlow.js version

tensorflow.js 1.5.2

posenet 2.2.1

Browser version

Google Chrome Version 80.0.3987.149 (Official Build) (64-bit)

Problem

I am trying to do pose estimation with my camera passing the video element to posenet but the position results in 0,0. Is the video element not supported? I have no problem with canvas.

posenet.load({
    inputResolution: { width: 320, height: 240 }
}).then(function(net){
    net.estimateSinglePose(videoElement).then(function(framePose){
        console.log(framePose);
    });
});

Returns:

0:
   score: 0.9994046688079834
   part: "nose"
   position: {x: 0, y: 0}
1:
   score: 0.9995356202125549
   part: "leftEye"
   position: {x: 0, y: 0}

Thank you!

Rogelio Gámez
  • 477
  • 1
  • 4
  • 5

1 Answers1

4

Credit to edkeveked, I just want to make their comment into an official answer.

You need to have your HTML video element's dimension set, which in this case would be 320 by 240. This fixed the issue for me.

Areisner
  • 85
  • 4