VITA-Group / FSGS

[ECCV 2024]"FSGS: Real-Time Few-Shot View Synthesis using Gaussian Splatting", Zehao Zhu*, Zhiwen Fan*, Yifan Jiang, Zhangyang Wang
Other
417 stars 34 forks source link

Error while downloading sub-modules #52

Closed ankuraditya98 closed 4 months ago

ankuraditya98 commented 4 months ago

Hi,

While installing submodules, I got the error

pip install submodules/diff-gaussian-rasterization-confidence/ Error:

Processing ./submodules/diff-gaussian-rasterization-confidence
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [8 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/work/pi_dganesan_umass_edu/aaditya_umass_edu/pycode/FSGS/submodules/diff-gaussian-rasterization-confidence/setup.py", line 13, in <module>
          from torch.utils.cpp_extension import CUDAExtension, BuildExtension
        File "/work/pi_dganesan_umass_edu/aaditya_umass_edu/.conda/envs/fsgs_new/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 28, in <module>
          from pkg_resources import packaging  # type: ignore[attr-defined]
      ImportError: cannot import name 'packaging' from 'pkg_resources' (/work/pi_dganesan_umass_edu/aaditya_umass_edu/.conda/envs/fsgs_new/lib/python3.8/site-packages/pkg_resources/__init__.py)
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

I figured out that the dependencies provided by authors in environment.yml seems to be not correct. So for all those who get this error try the following:

Installation Steps:

conda create -n fsgs python=3.8.1 pip install torch==2.1.2 torchvision==0.16.2 torchaudio==2.1.2 --index-url https://download.pytorch.org/whl/cu118

module load cuda/11.8.0
module load gcc/10.2.0

pip install setuptools==69.5.1 pip install submodules/diff-gaussian-rasterization-confidence/ pip install submodules/simple-knn/

After This: pip install matplotlib==3.5.3 torchmetrics==1.2.0 timm==0.9.12 opencv_python==4.8.1.78 imageio==2.31.2 open3d==0.17.0

And then proceed to train using: python train.py --source_path dataset/nerf_llff_data/orchids/ --model_path output/orchids --eval --n_views 3 --sample_pseudo_interval 1 I hope this helps!!