airalcorn2 / pytorch-nerf

Minimal PyTorch implementations of NeRF and pixelNeRF.
MIT License
230 stars 26 forks source link

number of views used for training #10

Closed ankan2709 closed 4 weeks ago

ankan2709 commented 2 months ago

Hi, thank you for the amazing work.

I have a question about how to change the number of views used for training a particular scene or object. thank you.

airalcorn2 commented 2 months ago

Can you provide more information?

ankan2709 commented 2 months ago

In the pixel nerf paper the authors talk about pixel nerf can be used for sparse inputs containing 1, 3 or 5 input views. I wanted to know if the code has an option to decide how many images or views to train for a particular scene?

For each object in the "car" folder there are 50 images. How many images per object or scene are used for training?

airalcorn2 commented 2 months ago

My implementation only conditions on a single view, but it should be straightforward to extend the code to condition on multiple views using Section 4.2 and Figure 18 as a guide. Essentially, you independently run pixelNeRF partially for each input view (i.e., using the relative transformations for the target view relative to each input view), take the average of the representations obtained halfway through the MLP, and then pass that averaged representation through the final layers of the MLP.

ankan2709 commented 2 months ago

Thanks for your inputs. I am going to try this out.