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

About render_3d() method #12

Open
nnop opened this issue Nov 3, 2022 · 0 comments
Open

About render_3d() method #12

nnop opened this issue Nov 3, 2022 · 0 comments

Comments

@nnop
Copy link

nnop commented Nov 3, 2022

The render_3d() method has an rot=False argument.

def render_3d(self, pose_embeddings, center, scale, img_size, color, with_texture=False, flow=None, image=None, rot=False, location=None):

It seems the argument prohibit the verts from being translated to world frame:

T3DP/models/hmar.py

Lines 141 to 151 in de6aeb6

# transform vertices to world coordinates
pred_cam_t_bs = pred_cam_t.unsqueeze_(1).repeat(1, pred_vertices.size(1), 1)
verts = pred_vertices #+ pred_cam_t_bs
if(rot):
# bs x 6890 x 3, 3 x 3
rot_y = torch.eye(3, device='cuda')*0
rot_y[0,2] = 1
rot_y[1,1] = 1
rot_y[2,0] = -1
pred_vertices = torch.matmul(pred_vertices, rot_y)
verts = pred_vertices + pred_cam_t_bs

Is that right?

@nnop nnop changed the title About the render_3d() method About render_3d() method Nov 3, 2022
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