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

How to modify the code if I want to use four or even five views for training. #22

Open
YufanJia opened this issue Jul 18, 2021 · 1 comment

Comments

@YufanJia
Copy link

Hi,@walsvid, thanks for your sharing! It' really an excellent idea. Since I'm new to all this, I don't know many things very well. I want to use four views to train the model, but I don't know how to modify it, if it's convenient, can you tell me how to do it?
Regards.

@topinfrassi01
Copy link
Contributor

Hey, I'm not a maintainer of this project but I've looked at the source code quite a bit.

It really depends if you want to always use the same number of views or if it could vary. If you're set on always using four views, for example, the modifications aren't too exhaustive.

Regarding the model itself, the images are used by the GraphProjection and LocalGraphProjection layers. At lines 208 and 371 of layers.py, there is a parameter named view_number, you could simply change this from 3 to 4.

Next, you need to change how the data is fed into the model. I'll take for example the train_mvp2m.py file, but it's the same for train_p2mpp and their test equivalent.

Inside the placeholders, starting at line 30, you'd need to change the first dimension of img_inp and cameras from 3 to 4.

Finally, inside the dataloader.py file, well you'd need to change the code so that it outputs four images instead of three. It's not too complicated and well, by 'Ctrl+F'ing the number 3 inside this file you should be able to figure out where to make the changes.

Good luck!

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

2 participants