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.43k stars 619 forks source link

Сrash when using in notebook #192

Closed JargeZ closed 1 year ago

JargeZ commented 1 year ago

Hello! I am using the following jupiter notebook https://github.com/deforum/stable-diffusion/blob/main/Deforum_Stable_Diffusion.ipynb

When setting up the environment, the following line causes problems https://github.com/isl-org/MiDaS/blob/eaa249ff68fde82cad78982d0a36523e3ebfbfdf/midas/backbones/next_vit.py#L8

It looks like it wasn't intended to be used this way.

milesgray commented 1 year ago

You need to run install_next_vit.sh that is in the root of the repo, but it should be run from the root of the repo - not from, in the case of colab, /content

if you cloned using this command (resulting in the repo root being /deps/MiDaS/) !git clone -q https://github.com/isl-org/MiDaS.git /deps/MiDaS

then you could use this trick to ensure the files end up in the right place !cd /deps/MiDaS/; bash /deps/MiDaS/install_next_vit.sh

tsound97 commented 1 year ago

Same issue when using colab

GwendalC commented 1 year ago

I want to take the opportunity to thank you warmly all of you guys, these AI notebooks give in my hands an artistic revolution. Hope you'll fix it soon Thank you so much !

thias15 commented 1 year ago

We are working on a fix. Thanks for raising this issue.

thias15 commented 1 year ago

Fixed with #194