kerrj / lerf

Code for LERF: Language Embedded Radiance Fields
https://www.lerf.io/
MIT License
668 stars 65 forks source link

Scene Redering isn't working on Nerfstudio #24

Closed PhucNDA closed 1 year ago

PhucNDA commented 1 year ago

Hi, thanks for the wonderful project.

I have followed the Lerf detailed instruction for installation on the latest version of the Nerfstudio. Take the "bookstore" dataset for example. The training does go on with multi-view images but the scene rendering is not working. I don't know if the visualization phase has not been yet fully adopted when integrated to Nerfstudio. With the same dataset, Nerfactor does render the full scene.

Correct me if I am wrong or something. Again, thanks for significant work.

atonderski commented 1 year ago

I have the same (or similar) issue! The only option for the output renderer is "not set", so something probably crashes along the way. The training progresses smoothly though. Will debug more tomorrow, but let me know if you find the issue.

kerrj commented 1 year ago

Could you provide some more information about the crashes? if rendering is crashing in the viewer it should print an error message from the render thread in the terminal output. Try setting --logging.local-writer.max-log-size 0 to prevent over-writing output error messages in the logging too.

PhucNDA commented 1 year ago

error_rendering Here's the example of the scene rendering is not working as the training procedure goes on.

I use the torch==1.12.1+cu113 torchvision==0.13.1+cu113. The others follow the setup file of Lerf, instead, I use the downgraded functorch version of 0.2.1. This environment can work well with other method (nerfacto,...). I'm still trying to debug the error, but I guess it is because of the overridden function get_outputs_for_camera_ray_bundle.

Could you provide some more information about the crashes? if rendering is crashing in the viewer it should print an error message from the render thread in the terminal output. Try setting --logging.local-writer.max-log-size 0 to prevent over-writing output error messages in the logging too.

kerrj commented 1 year ago

Hm that's strange, let me know if you find an error message. It could also be worth upgrading pytorch/cuda driver, 1.12 is quite old (nerfstudio is going to support >2.0 going forward)

atonderski commented 1 year ago

@PhucNDA did you find a fix for this?

PhucNDA commented 1 year ago

Yes, the author has just recently comitted the version of 0.1.1 which addresses our issue: image

@PhucNDA did you find a fix for this?

atonderski commented 1 year ago

ah I see, thanks!

anas-zafar commented 1 year ago

Hi @PhucNDA , could you please guide me regarding the training. I followed the instructions. Downloaded the bookstore data for example. When I try to run the training, I get the following error:

Traceback (most recent call last):
  File "/usr/bin/ns-train", line 5, in <module>
    from nerfstudio.scripts.train import entrypoint
  File "/usr/lib/python3.9/site-packages/nerfstudio/scripts/train.py", line 62, in <module>
    from nerfstudio.configs.method_configs import AnnotatedBaseConfigUnion
  File "/usr/lib/python3.9/site-packages/nerfstudio/configs/method_configs.py", line 53, in <module>
    from nerfstudio.models.depth_nerfacto import DepthNerfactoModelConfig
  File "/usr/lib/python3.9/site-packages/nerfstudio/models/depth_nerfacto.py", line 30, in <module>
    from nerfstudio.models.nerfacto import NerfactoModel, NerfactoModelConfig
  File "/usr/lib/python3.9/site-packages/nerfstudio/models/nerfacto.py", line 27, in <module>
    from torchmetrics.functional import structural_similarity_index_measure
  File "/usr/lib/python3.9/site-packages/torchmetrics/__init__.py", line 14, in <module>
    from torchmetrics import functional  # noqa: E402
  File "/usr/lib/python3.9/site-packages/torchmetrics/functional/__init__.py", line 120, in <module>
    from torchmetrics.functional.text._deprecated import _bleu_score as bleu_score
  File "/usr/lib/python3.9/site-packages/torchmetrics/functional/text/__init__.py", line 18, in <module>
    from torchmetrics.functional.text.edit import edit_distance
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 846, in exec_module
  File "<frozen importlib._bootstrap_external>", line 978, in get_code
  File "<frozen importlib._bootstrap_external>", line 647, in _compile_bytecode
EOFError: marshal data too short