nerfstudio icon indicating copy to clipboard operation
nerfstudio copied to clipboard

seathru_NeRF implentation

Open Jordan-Pierce opened this issue 2 years ago • 11 comments

Is your feature request related to a problem? Please describe. No

Describe the solution you'd like NA

Describe alternatives you've considered NA

Additional context Hey nerfstudio, thanks again for creating this resource. I was wondering if you had seen or would consider adding seathru_NeRF as an additional method? Nothing better than standardized and consolidated code.

SeaThru is physics-based approach to dehaze images collected underwater, and required a SfM-type setup. Since NeRFs, the original authors implemented the technique as a NeRF implementation.

Links to repo, both the original paper, and the NeRF paper, and some media for your viewing pleasure. Cheers.

Jordan-Pierce avatar Aug 22 '23 21:08 Jordan-Pierce

Hi @Jordan-Pierce, it has not been added as a method, however I know someone on the discord channel has been trying to implement the method using nerfstudio and has gotten pretty far with it, but it is still a work in progress :D It seems to be a bit challenging due to some differences between the google mip-nerf original code and nerfstudio.

maturk avatar Aug 23 '23 07:08 maturk

Hi @Jordan-Pierce!

I have implemented it (with a few deviations from the original paper and repo) and am getting comparable results on the SeaThru-NeRF dataset. I am happy to collaborate if you would like to look into it:)

acse-pms122 avatar Aug 23 '23 16:08 acse-pms122

Hi, I'm looking forward to the SeaThru-NeRF implementation. I have several green water photogrammetry datasets that I would love to try with SeaThru-NeRF.

longhose avatar Dec 27 '23 22:12 longhose

@longhose I finished a basic implementation, you can check it out here: https://github.com/AkerBP/seathru_nerf

psetinek avatar Dec 31 '23 13:12 psetinek

@psetinek, thank you very much for sharing this implementation and for the clear installation instructions.

I initially ran into the CUDA_OUT_MEMORY_ERROR. I got Seathru_NeRF to run on my GTX 1065 4GB GPU by setting the following: --pipeline.datamanager.train-num-rays-per-batch 2048 --pipeline.datamanager.eval-num-rays-per-batch 512 --pipeline.datamanager.pixel-sampler.num-rays-per-batch 512

I'm testing it with a dataset from the green waters of Maple Bay on Vancouver Island BC, Canada. The results are slightly better than with nerfacto: better color saturation and more transparent water. But, there are still a lot floating ghosts.

https://github.com/nerfstudio-project/nerfstudio/assets/34402981/9ca78853-21bd-4d6d-bdc9-2e3041549161

longhose avatar Jan 01 '24 01:01 longhose

@longhose I would say the most critical hyperparameter to get right is the beta, as it controls the separation of medium and objects. Are you able to filter out the water effects? (when rendering out a video of J and not rgb?)

psetinek avatar Jan 02 '24 09:01 psetinek

@psetinek well done! I'll test it out later this week and share some results here. Do you plan to make a PR with nerfstudio?

Jordan-Pierce avatar Jan 02 '24 14:01 Jordan-Pierce

@psetinek I am able to filter J, rgb and bs renders. The differences between the j and rgb are visible but light despite a clear bs. I started playing with the beta hyperparameter. I see the default value is 100.0. What would be the valid range for this parameter?

image

image

image

longhose avatar Jan 03 '24 01:01 longhose

@Jordan-Pierce cool! let me know how it works for you! Yes, I am planning to make a PR so a documentation of the method is featured in nerfstudio.

psetinek avatar Jan 12 '24 10:01 psetinek

@longhose Hi, it seems like you have some separation between objects and medium, not a bad start! Concerning hyperparams: I got the best results for my dataset using this value. I have sadly not had the time to properly test it on different datasets. If you contact me directly (e.g. on discord: psetinek), I could send you my master's thesis report where I discuss some of the most important hyperparams and the experiments I tried:)

psetinek avatar Jan 12 '24 10:01 psetinek

@longhose Hi, it seems like you have some separation between objects and medium, not a bad start! Concerning hyperparams: I got the best results for my dataset using this value. I have sadly not had the time to properly test it on different datasets. If you contact me directly (e.g. on discord: psetinek), I could send you my master's thesis report where I discuss some of the most important hyperparams and the experiments I tried:)

@psetinek, I'd like a look at the thesis, request via discord sent

Jordan-Pierce avatar Jan 12 '24 14:01 Jordan-Pierce