Relative Content

Tag Archive for javascripthtmltensorflowthree.js3d

3D object rotation based on tensorflow handpose landmarks

So I am currently working on a project that is using @tensorflow-models/handpose to detect hand landmarks and then I am matching the x and y of the landmark 0 to a 3d model. However. I am using info to try to match the rotations of my hand wit the 3d object’s rotation. however what I can’t figure out is:
when for example I hold my hand vertically and then rotate it around itself the watch rotates with it, however when I do it horizontally the watch seems to rotate badly. also as you can figure out I think when i translate my hand from vertical to horizontal my watch(3D) object is also rotating around the z axis.
I am stuck with this for a while now and don’t know what to do. Any help would be really appreciated.
Here is the code: