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

[CLIFF] About J2d Full Projection #175

Open
Timkeeper2018 opened this issue Apr 3, 2023 · 4 comments
Open

[CLIFF] About J2d Full Projection #175

Timkeeper2018 opened this issue Apr 3, 2023 · 4 comments

Comments

@Timkeeper2018
Copy link

Timkeeper2018 commented Apr 3, 2023

Sorry to bother you, my own code level is not very good, and I have some questions about how to calculate the projection of 2D joint points
`def projection(pred_joints, pred_camera, center, scale, f_cliff, imge_shape):

# t full
pred_cam_t = cam_crop2full(pred_camera, center, scale, imge_shape, f_cliff)

batch_size = pred_joints.shape[0]
camera_center = torch.zeros(batch_size, 2)
pred_keypoints_2d = perspective_projection(pred_joints,
                                           rotation=torch.eye(3).unsqueeze(0).expand(batch_size, -1, -1).to(pred_joints.device),
                                           translation=pred_cam_t,
                                           focal_length=5000.,
                                           camera_center=camera_center)
# Normalize keypoints to [-1,1]
pred_keypoints_2d = pred_keypoints_2d / (256. / 2.)
return pred_keypoints_2d`

The perspective_projection function is consistent with that in SPIN
After obtaining t full crop, is the projection calculation method mentioned in the HMR with a focal length of 5000 used when calculating the projection? Is camera_center still (0,0)?

@zhihaolee
Copy link
Contributor

  • The focal length is not 5000 anymore, its calculation is described in the paper.
  • The camera center is still (0, 0).

@124518
Copy link

124518 commented May 22, 2023

@Timkeeper2018 Hello, sorry to bother you, how did your experiment work,whether it become better,it is my pleasure if you can tell me.

@wulalah
Copy link

wulalah commented Oct 6, 2023

  • The focal length is not 5000 anymore, its calculation is described in the paper.
  • The camera center is still (0, 0).

pred_keypoints_2d = pred_keypoints_2d / (256. / 2.)归一化这里应该不准确吧。不是应该除以不同数据集中图片的长宽的一半嘛

1 similar comment
@wulalah
Copy link

wulalah commented Oct 6, 2023

  • The focal length is not 5000 anymore, its calculation is described in the paper.
  • The camera center is still (0, 0).

pred_keypoints_2d = pred_keypoints_2d / (256. / 2.)归一化这里应该不准确吧。不是应该除以不同数据集中图片的长宽的一半嘛

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