WU-CVGL / BAD-Gaussians

[ECCV 2024] "BAD-Gaussians: Bundle Adjusted Deblur Gaussian Splatting". ⚡Train a scene from real-world blurry images in minutes!
https://lingzhezhao.github.io/BAD-Gaussians/
Apache License 2.0
137 stars 4 forks source link

`ns-train bad-gaussians -h` gives error #5

Closed ichsan2895 closed 3 months ago

ichsan2895 commented 3 months ago

The code that causes error:

>> ns-train bad-gaussians -h
Traceback (most recent call last):
  File "/usr/local/bin/ns-train", line 5, in <module>
    from nerfstudio.scripts.train import entrypoint
  File "/workspace/NERFSTUDIO_v102/nerfstudio/nerfstudio/scripts/train.py", line 62, in <module>
    from nerfstudio.configs.method_configs import AnnotatedBaseConfigUnion
  File "/workspace/NERFSTUDIO_v102/nerfstudio/nerfstudio/configs/method_configs.py", line 724, in <module>
    all_methods, all_descriptions = merge_methods(all_methods, all_descriptions, *discover_methods())
  File "/workspace/NERFSTUDIO_v102/nerfstudio/nerfstudio/plugins/registry.py", line 43, in discover_methods
    spec = discovered_entry_points[name].load()
  File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 171, in load
    module = import_module(match.group('module'))
  File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/workspace/BAD-GAUSSIAN/BAD-Gaussians/bad_gaussians/bad_config_method.py", line 12, in <module>
    from bad_gaussians.image_restoration_dataparser import ImageRestorationDataParserConfig
ModuleNotFoundError: No module named 'bad_gaussians.image_restoration_dataparser'

How to install it

# clean up previous version
pip uninstall gsplat bad-gaussians

git clone --branch 8e0c68754b2c440e2d83864fac586cddcac52dc4 https://github.com/nerfstudio-project/nerfstudio
cd nerfstudio
pip install -e .

pip install git+https://github.com/LingzheZhao/gsplat

cd ../

git clone https://github.com/WU-CVGL/BAD-Gaussians
cd BAD-Gaussians
pip install -e .

System information:

Ubuntu 22.04 LTS
Python 3.10
Pytorch 2.0.1+cu118

This error happens after this commit https://github.com/WU-CVGL/BAD-Gaussians/commit/25155be35f3c2dbdb13af1fb439e90d0523c98ba

Volleria commented 3 months ago

when l run this command ns-train bad-gaussians -h I also meet similar issues : ╭─ Parsing error ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │ Argument │ │ {depth-nerfacto,dnerf,generfacto,instant-ngp,instant-ngp-bounded,mipnerf,nerfacto,nerfacto-big,nerfacto-huge,neus,neus-facto,phototourism,semantic-nerfw,spl │ │ atfacto,splatfacto-big,tensorf,vanilla-nerf,igs2gs,in2n,in2n-small,in2n-tiny,kplanes,kplanes-dynamic,lerf,lerf-big,lerf-lite,nerfplayer-nerfacto,nerfplayer- │ │ ngp,pynerf,pynerf-occupancy-grid,pynerf-synthetic,seathru-nerf,seathru-nerf-lite,tetra-nerf,tetra-nerf-original,volinga,zipnerf}: invalid choice: │ │ 'bad-gaussians' (choose from 'depth-nerfacto', 'dnerf', 'generfacto', 'instant-ngp', 'instant-ngp-bounded', 'mipnerf', 'nerfacto', 'nerfacto-big', │ │ 'nerfacto-huge', 'neus', 'neus-facto', 'phototourism', 'semantic-nerfw', 'splatfacto', 'splatfacto-big', 'tensorf', 'vanilla-nerf', 'igs2gs', 'in2n', │ │ 'in2n-small', 'in2n-tiny', 'kplanes', 'kplanes-dynamic', 'lerf', 'lerf-big', 'lerf-lite', 'nerfplayer-nerfacto', 'nerfplayer-ngp', 'pynerf', │ │ 'pynerf-occupancy-grid', 'pynerf-synthetic', 'seathru-nerf', 'seathru-nerf-lite', 'tetra-nerf', 'tetra-nerf-original', 'volinga', 'zipnerf') │ │ ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── │ │ For full helptext, run ns-train --help │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

It runs on WSL

LingzheZhao commented 3 months ago

Hi, @Volleria I haven't try WSL but it seems bad_gaussians was not correctly installed and the nerfstudio cannot find it. Could you run

pip list | grep bad

to check if bad_gaussians is installed? The output should be:

bad_gaussians                 1.0.2
chensh1127 commented 3 months ago

l run this command ns-train bad-gaussians -h, I meet the same error. My python version is 3.08, Pytorch 2.0.1+cu118. I tried pip uninstall bad_gaussians, then pip install -e . it does not work. I tried pip list | grep bad, and the output is "bad_gaussians 1.0.2". Why does the error still exist?

LingzheZhao commented 3 months ago

@chensh1127 @Volleria Hi, I am trying to reproduce the errors. Could you try upgrading setuptools & pip and install bad_gaussians again?

pip install --upgrade pip setuptools
pip uninstall bad_gaussians
# cd /path/to/BAD-Gaussians if you are not in it
git pull
pip install -e .
ns-train bad-gaussians -h
LingzheZhao commented 3 months ago

@ichsan2895 Sorry my mistake here, I forgot to commit the bad_config_method.py I was busy with other projects and just found this... fixed now!

Volleria commented 3 months ago

@chensh1127 @Volleria Hi, I am trying to reproduce the errors. Could you try upgrading setuptools & pip and install bad_gaussians again?

pip install --upgrade pip setuptools
pip uninstall bad_gaussians
# cd /path/to/BAD-Gaussians if you are not in it
git pull
pip install -e .
ns-train bad-gaussians -h

thanks! it runs correctly now