NagabhushanSN95 / ViP-NeRF

Official code release accompanying the paper - "ViP-NeRF: Visibility Prior for Sparse Input Neural Radiance Fields"
MIT License
67 stars 7 forks source link

Error when running sparse depth prior generation #3

Closed yankeesong closed 1 year ago

yankeesong commented 1 year ago

I got the following error when running "python DepthEstimator05_DTU.py":

Configs mismatch while resuming generation: {'values_changed': {"root['database_dirpath']": {'new_value': 'DTU/data', 'old_value': 'DTU/Data'}}} Traceback (most recent call last): File "/nobackup/users/yankeson/tencent/ViP-NeRF/src/prior_generators/sparse_depth/DepthEstimator05_DTU.py", line 130, in main() File "/nobackup/users/yankeson/tencent/ViP-NeRF/src/prior_generators/sparse_depth/DepthEstimator05_DTU.py", line 122, in main demo1() File "/nobackup/users/yankeson/tencent/ViP-NeRF/src/prior_generators/sparse_depth/DepthEstimator05_DTU.py", line 99, in demo1 start_generation(gen_configs) File "/nobackup/users/yankeson/tencent/ViP-NeRF/src/prior_generators/sparse_depth/DepthEstimator05_DTU.py", line 52, in start_generation save_configs(output_dirpath, gen_configs) File "/nobackup/users/yankeson/tencent/ViP-NeRF/src/prior_generators/sparse_depth/DepthEstimator05_DTU.py", line 39, in save_configs raise RuntimeError(f'Configs mismatch while resuming generation: {DeepDiff(old_configs, configs)}') RuntimeError: Configs mismatch while resuming generation: {'values_changed': {"root['database_dirpath']": {'new_value': 'DTU/data', 'old_value': 'DTU/Data'}}}

NagabhushanSN95 commented 1 year ago

Looks like you have made some changes to the configs from the previous run and re-running the prior generator. Delete the existing configs file and run the prior generator. It should work.

This check is there to prevent data overwriting.

yankeesong commented 1 year ago

No that was my first run. Are you referring to the config files in "runs" directory? They are already there in the repo.

NagabhushanSN95 commented 1 year ago

Right! My bad. I've fixed it. Can you pull the latest changes and try it out?

yankeesong commented 1 year ago

Hi,

I've pulled the changes. However I encountered a bunch of additional errors. I think it's not the best idea to report them one by one here. Is it possible you pull-from-scratch and fix the code once? Thanks so much!

NagabhushanSN95 commented 1 year ago

My apologies for the errors and the delayed response. I am off work to attend SIGGRAPH. I will check the errors.

NagabhushanSN95 commented 1 year ago

@yankeesong I have fixed any bugs with DTU and LLFF data extraction and priors generation. It should work fine now. I haven't tried full training on both datasets yet. I'll likely validate that in a couple of weeks. You can try it now. Let me know if you still run into any errors.

RealEstate-10k still needs to be finished. If you want to train on RE10K, check this out.

yankeesong commented 1 year ago

I got a lot of error of this kind when running depth prior generation:

============================================================================== Loading database

Loading cameras... 1 in 0.000s Loading matches... 1 in 0.000s Loading images... 2 in 0.000s (connected 2) Building correspondence graph... in 0.000s (ignored 0)

Elapsed time: 0.000 [minutes]

F0814 17:42:27.807054 1851304 reconstruction.cc:79] Check failed: existing_image.Name() == image.second.Name() (0001.png vs. 0000.png) Check failure stack trace: @ 0x7f3dfc5771c3 google::LogMessage::Fail() @ 0x7f3dfc57c25b google::LogMessage::SendToLog() @ 0x7f3dfc576ebf google::LogMessage::Flush() @ 0x7f3dfc5776ef google::LogMessageFatal::~LogMessageFatal() @ 0x558ed517c401 colmap::Reconstruction::Load() @ 0x558ed530ec62 colmap::IncrementalMapper::BeginReconstruction() @ 0x558ed50d45a0 colmap::RunPointTriangulatorImpl() @ 0x558ed50d504e colmap::RunPointTriangulator() @ 0x558ed5087fc2 main @ 0x7f3dfa970083 __libc_start_main @ 0x558ed508fabe _start Aborted (core dumped)

Any ideas?

After a lot of these errors, I only see 3 subfolders: DE02, DE03, DE04 in the /DTU/data/all/estimated_depths folder.

Would you mind updating the README file to show what we are supposed to get after each step, so that we have some sanity checks?

Thanks!

NagabhushanSN95 commented 1 year ago

This is actually an error in the colmap reconstruction. Probably because it couldn't find enough accurately matched points among the input images. This happens with some DTU scenes, since they're very simple (like a homogeneous sphere/ball). In some cases, re-running the colmap (or out code) fixes it. Even for the scenes where colmap fails, ViP-NeRF works by utilizing the visibility prior. Sparse depth prior can be suppressed.

Per your request, I will update the README file.

NagabhushanSN95 commented 1 year ago

@yankeesong I have updated the README file. Hope this helps.

HarshaMupparaju commented 1 year ago

I got a lot of error of this kind when running depth prior generation:

==============================================================================

Loading database Loading cameras... 1 in 0.000s Loading matches... 1 in 0.000s Loading images... 2 in 0.000s (connected 2) Building correspondence graph... in 0.000s (ignored 0)

Elapsed time: 0.000 [minutes]

F0814 17:42:27.807054 1851304 reconstruction.cc:79] Check failed: existing_image.Name() == image.second.Name() (0001.png vs. 0000.png) Check failure stack trace: @ 0x7f3dfc5771c3 google::LogMessage::Fail() @ 0x7f3dfc57c25b google::LogMessage::SendToLog() @ 0x7f3dfc576ebf google::LogMessage::Flush() @ 0x7f3dfc5776ef google::LogMessageFatal::~LogMessageFatal() @ 0x558ed517c401 colmap::Reconstruction::Load() @ 0x558ed530ec62 colmap::IncrementalMapper::BeginReconstruction() @ 0x558ed50d45a0 colmap::RunPointTriangulatorImpl() @ 0x558ed50d504e colmap::RunPointTriangulator() @ 0x558ed5087fc2 main @ 0x7f3dfa970083 __libc_start_main @ 0x558ed508fabe _start Aborted (core dumped)

Any ideas?

After a lot of these errors, I only see 3 subfolders: DE02, DE03, DE04 in the /DTU/data/all/estimated_depths folder.

Would you mind updating the README file to show what we are supposed to get after each step, so that we have some sanity checks?

Thanks!

The error here is due to a mismatch in image names in database.db and the images.txt file that is being created. Check this out for more clarity by the author of COLMAP, also check this issue which is similar to your error for more explanation.