bmild / nerf

Code release for NeRF (Neural Radiance Fields)
http://tancik.com/nerf
MIT License
9.97k stars 1.39k forks source link

3d model from real images #30

Closed TheShasa closed 4 years ago

TheShasa commented 4 years ago

Hello, thanks for this great work!

Can you give me a hint how can we create the 3d model same as in lego extract_mesh.ipynb example using real life images?

Sch1nken commented 4 years ago

If I understand the readme correct, then you could try this:

Extracting geometry from a NeRF

Check out extract_mesh.ipynb for an example of running marching cubes to extract a triangle mesh from a trained NeRF network. You'll need the install the PyMCubes package for marching cubes plus the trimesh and pyrender packages if you want to render the mesh inside the notebook:

pip install trimesh pyrender PyMCubes

TheShasa commented 4 years ago

Thanks for your reply So first we need to train it on our 'real images' example?

bmild commented 4 years ago

Yes, you would have to train a network on your real images. Extracting a mesh in this case is a bit more complicated since it's harder to separate the object from the background than with the synthetic data that is isolated in space.

TheShasa commented 4 years ago

Great, thank you for clarification!