Initialization of posenet
const net = await posenet.load();
const pose = await net.estimateSinglePose(videoElement, {
flipHorizontal: false
});
Output
part: "leftEye"
position: {x: 0, y: 0}
score: 0.9931495785713196
My question is I always get position 0,0 for every body parts even though the score is high.
I figured out the solution. Make sure you add width and height to source element (image or video). Notice that if you add width and height from css it will not work, you need to add it programmatically.
video = document.getElementById("video");
//must add the following
video.width = 500;
video.height = 500;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With