LiheYoung / Depth-Anything

[CVPR 2024] Depth Anything: Unleashing the Power of Large-Scale Unlabeled Data. Foundation Model for Monocular Depth Estimation
https://depth-anything.github.io
Apache License 2.0
6.39k stars 492 forks source link

TypeError: "__init__()"miss 1 requirement positional argument:"config" #211

Open guoyanzhongwgfufg opened 5 days ago

guoyanzhongwgfufg commented 5 days ago

I just run CLI : python3 run.py --encoder vist --img-path 12.png --outdir dep_predict , it made the following error. I have placed 12.png in the current directory.

Traceback (most recent call last): File "run.py", line 34, in depth_anything = DepthAnything.from_pretrained('LiheYoung/depthanything{}14'.format(args.encoder)).to(DEVICE).eval() File "/usr/local/lib/python3.8/dist-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn return fn(*args, kwargs) File "/usr/local/lib/python3.8/dist-packages/huggingface_hub/hub_mixin.py", line 558, in from_pretrained instance = cls._from_pretrained( File "/usr/local/lib/python3.8/dist-packages/huggingface_hub/hub_mixin.py", line 778, in _from_pretrained model = cls(model_kwargs) TypeError: init() missing 1 required positional argument: 'config'

How did it run and where is i go wrong? please guide me ,thanks.

LiheYoung commented 3 days ago

You may follow this to load our model.

guoyanzhongwgfufg commented 3 days ago

您好,邮件我已收到,我会尽快处理,谢谢。