jackd / template_ffd

Code for paper "Learning Free-Form Deformations for 3D Object Reconstruction"
80 stars 21 forks source link

How can I test on a new image? #14

Open WangZixuan opened 5 years ago

WangZixuan commented 5 years ago

Thanks for your work, but your README does not provide a way to reconstruct a mesh from a new image. How can I achieve this? Thank you.

jackd commented 5 years ago

I'm afraid I'm fairly flat out with another conference deadline for the next couple of weeks. I'll be refactoring this heavily after that, but in the mean-time you can check out inference.meshaes.InferredMeshManager.get_lazy_dataset, or model.template_ffd_builder.TemplateFfdBuilder.get_prediction_to_mesh_fn. scripts.vis.meshes should also help.

In short, for a template mesh with vertices and faces (V, F) you decompose V into its bernstein basis V = B P, infer dP using the trained model, then use mesh (V_deformed, F), where V_deformed = B (P + dP)

WangZixuan commented 5 years ago

Thank you, I will check it soon. Wish you good luck in the coming conference!