A problem about the Version

#3
by KL-Shi - opened

Hello! Thank you for creating such great work.
I'm a student from China,and i want to use your Model as a learning platform.
But my target program is based on the version of bebc4b2,which was committed on Jul 2, 2024(https://github.com/lpiccinelli-eth/UniDepth/tree/bebc4b2fdda5c223693c390739db76897aee42e5)
So when i run my program, there will be something wrong:

Traceback (most recent call last):
File "/home/shi/clone/ViewExtrapolator/monocular/UniDepth/./scripts/demo.py", line 42, in
model = UniDepthV2.from_pretrained(f"lpiccinelli/{name}")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/anaconda3/envs/ViewExtra_Mono/lib/python3.11/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "/root/anaconda3/envs/ViewExtra_Mono/lib/python3.11/site-packages/huggingface_hub/hub_mixin.py", line 566, in from_pretrained
instance = cls._from_pretrained(
^^^^^^^^^^^^^^^^^^^^^
File "/root/anaconda3/envs/ViewExtra_Mono/lib/python3.11/site-packages/huggingface_hub/hub_mixin.py", line 789, in _from_pretrained
model = cls(**model_kwargs)
^^^^^^^^^^^^^^^^^^^
File "/home/shi/clone/ViewExtrapolator/monocular/UniDepth/unidepth/models/unidepthv2/unidepthv2.py", line 134, in init
self.build(config)
File "/home/shi/clone/ViewExtrapolator/monocular/UniDepth/unidepth/models/unidepthv2/unidepthv2.py", line 348, in build
self.shape_constraints = config["data"]["shape_constraints"]
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
KeyError: 'shape_constraints'

and i think there may be something wrong with the version of your model
Can you give me the link to the model which can match the version of bebc4b2, which was committed on Jul 2, 2024(https://github.com/lpiccinelli-eth/UniDepth/tree/bebc4b2fdda5c223693c390739db76897aee42e5)
屏幕截图 2025-04-16 171956.png

Forgive me for my broken English.
Thank you very much!!!

Sign up or log in to comment