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.27k stars 599 forks source link

Error while loading dpt_swin2_large_384 model #219

Closed kloukiniotisandreas closed 1 year ago

kloukiniotisandreas commented 1 year ago

Hello, I am getting errors of missing keys in state_dict and some mismatched layers when I am trying to load dpt_swin2_base_384 and any other swin model. I am using python run.py --model_type dpt_swin2_base_384 --input_path input --output_path output --height 384

AnukritiSinghh commented 1 year ago

hey, how did you resolve this?

kloukiniotisandreas commented 1 year ago

I created from scratch the env from the .yaml and it worked

ViktorLiang commented 1 year ago

The 'downsample' module have different size in newer version of timm. I reinstalled the older version of timm==0.6.12 and the issue disappeared. pip install timm==0.6.12