facebookresearch / CODD

CODD ("Temporally Consistent Online Depth Estimation in Dynamic Scenes"), WACV 2023.
Other
62 stars 3 forks source link

Installation issue #5

Open drozzy opened 1 year ago

drozzy commented 1 year ago

I am doing something wrong. When I follow the proposed install instructions:

conda create --name codd python=3.8 -y
conda activate codd
pip install scipy pyyaml terminaltables natsort
pip install torch==1.12.1+cu113 torchvision==0.13.1+cu113 torchaudio==0.12.1 --extra-index-url https://download.pytorch.org/whl/cu113 # pytorch
pip install --no-index --no-cache-dir pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/py38_cu113_pyt1121/download.html # pytorch3d

The last command causes:

ERROR: Could not find a version that satisfies the requirement fvcore (from pytorch3d) (from versions: none)
ERROR: No matching distribution found for fvcore

I'm on ubuntu 18.04.

drozzy commented 1 year ago

Fixing this with pip install fvcore.

drozzy commented 1 year ago

pip install git+https://github.com/princeton-vl/lietorch.git fails with:

 The detected CUDA version (10.2) mismatches the version that was used to compile
      PyTorch (11.3). Please make sure to use the same CUDA versions.

      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for lietorch
  Running setup.py clean for lietorch
Failed to build lietorch
ERROR: Could not build wheels for lietorch, which is required to install pyproject.toml-based projects
mli0603 commented 1 year ago

Your CUDA version is older than the instructions.

Instead of

pip install torch==1.12.1+cu113 torchvision==0.13.1+cu113 torchaudio==0.12.1 --extra-index-url https://download.pytorch.org/whl/cu113 # pytorch

Can you try

pip install torch==1.12.1+cu102 torchvision==0.13.1+cu102 torchaudio==0.12.1 --extra-index-url https://download.pytorch.org/whl/cu102
drozzy commented 1 year ago

That seems to have fixed the lietorch. Now when I try:

python benchmark_speed.py configs/models/codd.py

/home/adrozdyuk/.conda/envs/codd/lib/python3.8/site-packages/mmcv/__init__.py:20: UserWarning: On January 1, 2023, MMCV will release v2.0.0, in which it will remove components related to the training process and add a data transformation module. In addition, it will rename the package names mmcv to mmcv-lite and mmcv-full to mmcv. See https://github.com/open-mmlab/mmcv/blob/master/docs/en/compatibility.md for more details.
...
    import mmengine
ModuleNotFoundError: No module named 'mmengine'
mli0603 commented 1 year ago

Hi @drozzy

You did not install mmcv, probably mmseg too

pip install mmcv-full==1.7.0 -f https://download.openmmlab.com/mmcv/dist/cu102/torch1.12/index.html
pip install mmsegmentation 
drozzy commented 1 year ago

I ran both of those. Same result. I'll try again from the beginning.

drozzy commented 1 year ago

Unfortunately I cannot get this to work. This is the error that occurs every time. I'll close this for now.

(codd) adrozdyuk-dt:CODD$ python benchmark_speed.py configs/models/codd.py
/home/adrozdyuk/.conda/envs/codd/lib/python3.8/site-packages/mmcv/__init__.py:20: UserWarning: On January 1, 2023, MMCV will release v2.0.0, in which it will remove components related to the training process and add a data transformation module. In addition, it will rename the package names mmcv to mmcv-lite and mmcv-full to mmcv. See https://github.com/open-mmlab/mmcv/blob/master/docs/en/compatibility.md for more details.
  warnings.warn(
Traceback (most recent call last):
  File "benchmark_speed.py", line 9, in <module>
    from model.builder import build_estimator
  File "/home/adrozdyuk/.../codd/CODD/model/__init__.py", line 3, in <module>
    from .builder import *
  File "/home/adrozdyuk/.../codd/CODD/model/builder.py", line 5, in <module>
    from mmseg.models.builder import MODELS
  File "/home/adrozdyuk/.conda/envs/codd/lib/python3.8/site-packages/mmseg/__init__.py", line 5, in <module>
    import mmengine
ModuleNotFoundError: No module named 'mmengine'
drozzy commented 1 year ago

I can't even install pip requirements as indicated. For example, install of fvcore is required to make it work for me (before I get further errors).

Can someone try creating the conda environment from scratch and following the pip install instructions in the readme? Because in my experience, conda should be relatively bulletproof.

mli0603 commented 1 year ago

I wonder if this is due to Ubuntu 18.04. I have not tested systems with CUDA 10.2 or earlier.