Skip to content
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 obtain the GT rotation matrix and euler angles labels of each object in Objectron? #22

Open
hnuzhy opened this issue Feb 25, 2024 · 0 comments

Comments

@hnuzhy
Copy link

hnuzhy commented Feb 25, 2024

Thank you for your released code. Recently, I'm doing a project using the Objectron dataset. Now, I need obtain the GT rotation matrix and euler angles labels of each object. The given labels of Objectron contain the possible answer of GT rotation matrix (either camera.transform or camera.view_matrix). This is also explained by an official related issue in Objectron.

Then, I utilized the camera.view_matrix multipling object.rotation for each instance as the GT rotation matrix, and wanted to further visualize the orientation of each object. I have to convert the GT rotation matrix into corresponding euler angles. Below is my code.

from scipy.spatial.transform import Rotation
rot_mat_2 = np.transpose(rot_mat)  # rot_mat is the GT rotation matrix
euler_angles = Rotation.from_matrix(rot_mat_2).as_euler("zxy", degrees=True)  # is this order right?
[roll, pitch, yaw] = euler_angles 

I plotted three euler angles for further checking. However, the orientation is not always visually right. Some examples are shown below.

positive / right examples:

negative / wrong examples:

I'm not sure if this is my fault or just the GT labels of orientation have large noise caused by human annotators. I noticed that you have shown right visualiztion of object orientation by euler angles in your paper. But I cannot find the corresponding code in this repo. Could you please share your processing steps? Thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant