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

visualize training data some problems #121

Closed
Gzzgz opened this issue Mar 2, 2022 · 3 comments
Closed

visualize training data some problems #121

Gzzgz opened this issue Mar 2, 2022 · 3 comments
Assignees

Comments

@Gzzgz
Copy link

Gzzgz commented Mar 2, 2022

I converted surreal or h36m data for training. I want to make sure the label of one img is right. so I visualize them.
eg:
for keypoints3d:
图片
this is a res from surreal data. the kpts3d positions misalign to the img.
may be it wrong? What shall I do?

THX

@WenjiaWang0312
Copy link
Collaborator

@LazyBusyYang

@LazyBusyYang
Copy link
Collaborator

3D keypoints have a different coordinate from 2D image, which means that you cannot overlay locations of a 3d point on img.
If you have the correct camera parameter, here's a possible way.

  1. Construct an instance of CameraParameter with K, R, T, H, W.
  2. Call camera_parameter.export_to_perspective_cameras() to get a camera in pytorch3d.
  3. Project kp3d back to 2d camera spcae. keypoints2d = pytorch3d_perspective_camera.transform_points_screen( points=keypoints3d[..., :3])[..., :2]
  4. Visualize kp2d by visualize_kp2d, offering keypoints2d and images at the same time.
    note: It may fail because of wrong cam parameters. If it happens, a simple try with inversed extrinsic might do.

@Gzzgz
Copy link
Author

Gzzgz commented Mar 4, 2022

OK.THX

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

4 participants