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

Question about "dmtet_tutorial.ipynb" #713

Open
ug-kim opened this issue May 1, 2023 · 0 comments
Open

Question about "dmtet_tutorial.ipynb" #713

ug-kim opened this issue May 1, 2023 · 0 comments

Comments

@ug-kim
Copy link

ug-kim commented May 1, 2023

Hi, thank you for sharing this awesome work.

I have some questions about dmtet_tutorial.ipynb.

tet_verts = torch.tensor(np.load('../samples/{}_verts.npz'.format(grid_res))['data'], dtype=torch.float, device=device)
tets = torch.tensor(([np.load('../samples/{}_tets_{}.npz'.format(grid_res, i))['data'] for i in range(4)]), dtype=torch.long, device=device).permute(1,0

...

pred = model(tet_verts) # predict SDF and per-vertex deformation
sdf, deform = pred[:,0], pred[:,1:]
verts_deformed = tet_verts + torch.tanh(deform) / grid_res # constraint deformation to avoid flipping tets
mesh_verts, mesh_faces = kaolin.ops.conversions.marching_tetrahedra(verts_deformed.unsqueeze(0), tets, sdf.unsqueeze(0)) # running MT (batched) to extra

In the above code, what is the difference between tets_verts and tets?
I understood about this like that tets_verts is a vertex with deformation and tets is the tetrahedral grid which is not changed because it is the grid basis.

Is is correct or could you give more explanations about these?

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