nerfstudio-project / nerfstudio

A collaboration friendly studio for NeRFs
https://docs.nerf.studio
Apache License 2.0
9.58k stars 1.31k forks source link

[InstantNGP] File Not found error #1136

Closed gowriaddepalli closed 1 year ago

gowriaddepalli commented 1 year ago

Hi,

I am trying to train my model using instant-ngp on nerf synthetic lego dataset using the following command ns-train instant-ngp --data data/nerf_synthetic/lego and i face the following issue. No such file found "/data/nerf_synthetic/lego/train/r_0" though r_0.png exists. Please let me know what can be done here. Thanks in advance for your help.

tancik commented 1 year ago

To train with blender data you need to add blender-data to the end of the command so that the blender dataparser is used. Also if you are using the latest git version, I'd recommend using instant-ngp-bounded model for bounded synthetic scenes.

gowriaddepalli commented 1 year ago

Thanks for the quick reply. I tried training with ns-train instant-ngp-bounded --data blender-data and i get the following error ns-train: error: argument {nerfacto,instant-ngp,mipnerf,semantic-nerfw,vanilla-nerf,tensorf,dnerf,phototourism}: invalid choice: 'instant-ngp-bounded' (choose from 'nerfacto', 'instant-ngp', 'mipnerf', 'semantic-nerfw', 'vanilla-nerf', 'tensorf', 'dnerf', 'phototourism') and my git version is 2.25.1 I also tried training with ns-train instant-ngp --data blender-data but got the following error `FileNotFoundError: [Errno 2] No such file or directory: 'blender-data/transforms.json' Can you please let me know how to proceed ahead. Thanks for the help @tancik

gowriaddepalli commented 1 year ago

I was also curious @tancik https://docs.nerf.studio/en/latest/nerfology/methods/nerf.html if you could share few examples to reproduce the benchmarks as stated in https://docs.nerf.studio/en/latest/nerfology/methods/nerf.html#blender-synthetic using nerfstudio.

gowriaddepalli commented 1 year ago

@tancik i also tried to download blender data using ns-download-data blender and i am redirected to a google drive link: https://drive.google.com/uc?id=18JxhpWD-4ZmuFKLzKlAw-w5PpzZxXOcG and also throws an error FileNotFoundError: [Errno 2] No such file or directory: 'data/blender_data.zip' Using the google drive link data throws the error: FileNotFoundError: [Errno 2] No such file or directory: 'blender-data/transforms.json`

tancik commented 1 year ago

blender-data only specifies the dataparser, you still need to point to the data source, try the following: ns-train instant-ngp --data data/nerf_synthetic/lego blender-data

To use the instant-ngp-bounded you need to grab the latest git version of nerfstudio. This method is not yet in the pip package.

For the benchmarks, take a look at https://docs.nerf.studio/en/latest/developer_guides/debugging_tools/benchmarking.html

The FileNotFoundError is due to maxing out google drive requests. If you scroll up in the error, it will probably provide a link for manually downloading the data. We are in the process of moving the data to our own servers to avoid these access limit issues.

gowriaddepalli commented 1 year ago

Thanks @tancik for the quick reply. Do you know which of these methods is the fastest on blender-data as training seems to be taking time using instant-ngp. Thanks.

tancik commented 1 year ago

How long is a "long time"? You should expect to see good results after a couple of minutes. Note the base instant-ngp model won't produce good results for the blender scenes, you will need to use the bounded version.

gowriaddepalli commented 1 year ago

@tancik 27% training time is taking 2 hrs nearly with instant-ngp. Am i doing something wrong? i am building the docker file from the main branch and just doing ns-train instant-ngp --data data/nerf_synthetic/lego blender-data on the terminal. Please let me know if you need more details. Thanks @tancik for quick reply.

tancik commented 1 year ago

This is what I get after 500 iterations (~10 seconds of training)

image

This is using the following training command

ns-train instant-ngp-bounded --pipeline.model.background-color white --data data/blender/lego blender-data
gowriaddepalli commented 1 year ago

ok i am just using instant-ngp and nothing shows up in the viewer (I have changed port, i hope this doesn't matter). Will check on this thanks @tancik

gowriaddepalli commented 1 year ago

This is what I get after 500 iterations (~10 seconds of training) image This is using the following training command

ns-train instant-ngp-bounded --pipeline.model.background-color white --data data/blender/lego blender-data

@tancik thanks for the reply. Can you please share GPU configurations you used to achieve this speed, Is this multi-gpu setting?

tancik commented 1 year ago

This is one 3080 GPU

gowriaddepalli commented 1 year ago

Thanks @tancik is training by chance slower on synthetic/blender data than nerfstudio data.

tancik commented 1 year ago

The example I shared above is blender synthetic data. If anything it is faster in the synthetic data.

gowriaddepalli commented 1 year ago

@tancik thanks for the trouble. i am using a A100 GPU and 17% (% done) training is taking 2 hours on synthetic lego data and nothing shows up on viewer apart from images. Please let me know if i am doing something wrong.

I am just using the following command: ns-train instant-ngp-bounded --pipeline.model.background-color white -- data /home/data/nerf_synthetic/lego --viewer.websocket-port 7209 blender-data

gowriaddepalli commented 1 year ago

This is one 3080 GPU

Can you please let me know the tinycudann version you are using @tancik

tancik commented 1 year ago

My tinycudann version is 1.6. You should ignore the % done for the blender scenes. It should look basically done after a couple %. My guess is that it is working, but just not showing up in the viewer. This is an issue for some users, it seems to depend on network setting (firewalls, vpn, corp restrictions). You can try running with the extra argument --viewer.skip-openrelay True to see if that fixes it.

tancik commented 1 year ago

Also consider joining our discord to ask these troubleshooting questions. They can get lost pretty easily in these github issues, especially now that the issue has diverged from the title issue. I'm going to close this for now, feel free to reopen if you think appropriate.

kevinchan04 commented 1 year ago

Hi, may I ask what is difference between instant-ngp and instant-ngp-bounded version?

tancik commented 1 year ago

There is some info here - https://github.com/nerfstudio-project/nerfstudio/issues/1099

kevinchan04 commented 1 year ago

There is some info here - #1099

Thanks!