New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to convert the coordinates from mixamo to normal 2d pose coordinates? #29
Comments
We used blender 2.79/2.80, so maybe you encountered a version problem. The pipeline for getting 2d pose coordinates is simply to 1) extract global 3d coordinates from the character(the function you referenced) 2) project 3d coordinates into 2d by orthogonal projection (
|
Thanks for your quick reply. My question is why we should extract the global 3D coordinates like the function I referenced before. I am confused with it. Could you give me more information? |
I see. I guess your confusion is mainly about this line, right? 2D-Motion-Retargeting/dataset/fbx2joints3d.py Line 104 in 7eaae7e
The rationale behind is that the |
OK, why do we need *vector((0,0,0))? |
The last item is local displacement of each bone, which can be queried by |
Due to the version incompatibility of 2.9 and 2.8 etc, the code with |
What about using |
Yes, it works. I have to check if the output is correct later. |
Hi, I test the code, but find some 2d coordinates are negative. By the way, could explain the code below and why do we need subtracting centers and adding velocities?
|
Subtracting the center point is to normalize the data so that poses in each frame are now local. In other words, subtracting the center point gives the local motion representation. This is beneficial because same poses performed in different global position will now have the same representation (i.e. their arrays will become identical). The negative 2d coordinates come from here. However, subtracting the center point will lost the information for the global position. So we additionally include the global velocity to retain the global information. The final representation becomes local motion + global velocity. |
Hi. How do we rescale the pose coordinates from this negative range to the range 0, image_size? I need to pass the value to motion2video function in order to generate skeleton images. Thanks |
The function trans_motion_inv should be able to convert normalized motion back to original scale. |
Just to clarify, am I supposed to pass the initial 3D points that I get from fbx (which in range roughly -1 to 1) to the trans_motion_inv function? Cz I never explicitly normalize the motion anywhere. I was trying to pass the 3d joints generated through fbx to the trans_motion function as suggested above in this thread |
No, I mean that you can use
I think another simple solution for you is to remove this line in the trans_motion3d function:
trans_motion2d would do some normalizations. Then trans_motion3d only does a 3d to 2d projection, and you can apply it to the initial 3D points that I get from fbx. But note that the result may not lie in the center of the image.
|
Gotcha! That worked perfectly. Thank you very much. |
Hi, can tell me the pipeline for getting 2d pose coordinates from files from mixamo? I run your code (
2D-Motion-Retargeting/dataset/fbx2joints3d.py
Line 89 in 7eaae7e
The text was updated successfully, but these errors were encountered: