isl-org / MiDaS

Code for robust monocular depth estimation described in "Ranftl et. al., Towards Robust Monocular Depth Estimation: Mixing Datasets for Zero-shot Cross-dataset Transfer, TPAMI 2022"
MIT License
4.39k stars 617 forks source link

Installation problem #82

Closed EtienneAb3d closed 3 years ago

EtienneAb3d commented 3 years ago

Hi! I have runtime problems:

...
File "/home/etienne/.cache/torch/hub/facebookresearch_WSL-Images_master/hubconf.py", line 23, in _resnext
    model = ResNet(block, layers, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'groups'

Searching on this, it seems it's because of a bad torchvision version. I do not succeed in solving all version conflicts. Is it possible to have a minimal set of command lines to install all in the right version?

EtienneAb3d commented 3 years ago

As a workaround, this 3d-photo-inpainting installation procedure is also properly installing MiDaS: https://github.com/vt-vl-lab/3d-photo-inpainting

3dsf commented 3 years ago

It looks like the library you sighted is 11 months old; there is a newer better model that came out last fall and I'd recommend it for the improvements in depth models. Midas is executed with python code and I would imagine you could download the new model from github and switch in the new model name.


Or I can try and help you install midas if you like.

EtienneAb3d commented 3 years ago

I may use vitualenv or conda. XUbuntu 20.10 I'm currently testing with IntelCoreI7, GTX 1050 Ti, 16G RAM, but I may use an other one. As said, I just need a minimal set of command lines to install all properly, with all dependencies in the good version. Whatever this set of command line, I think I will be able to adapt to my own configuration to make it running. Without this, I spent several hours to try without success, certainly mainly due to the fact that I got version incompatibilities in dependencies.

3dsf commented 3 years ago

to install the environment :
conda create -n midas python=3.7 pytorch torchvision opencv cudatoolkit=10.1 cupti -c pytorch -c conda-forge

3dsf commented 3 years ago

@EtienneAb3d

Did you have any luck with that environment? I used to think that conda environments were immutable, but they are only as immutable as you make them; I can specify packages more in detail if required.

You should be able to clone the MiDaS repo and use it within that environment with little issue.
If it is not working for you, I'll pull out a 18.04 Ubuntu install to help you troubleshoot further within an environment or for your system environment.

EtienneAb3d commented 3 years ago

Seems to work now! Thanks!

It would be nice if this command line could be put in place of the currently displayed one in the README (with its activation command line, of course): image

3dsf commented 3 years ago

Glad it is working for you now, sorry I didn't reach out to you sooner.
The environment is specific to cuda cards and I think that is why the developer chose not to include it.