Spaces:
Running
on
Zero
error in windows environment
i get the following error message:
udokl@PC-3060TI MINGW64 /d/DepthAnything/Depth-Anything-V2 (main)
$ python run.py --encoder vitl --img-path /d/DepthAnything/Depth-Anything-V2/_test-in --outdir /d/DepthAnything/Depth-Anything-V2/test-out --pred-only --grayscale
xFormers not available
xFormers not available
Traceback (most recent call last):
File "D:\DepthAnything\Depth-Anything-V2\run.py", line 37, in
depth_anything.load_state_dict(torch.load(f'checkpoints/depth_anything_v2{args.encoder}.pth', map_location='cpu'))
File "C:\Users\udokl\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\serialization.py", line 998, in load
with _open_file_like(f, 'rb') as opened_file:
File "C:\Users\udokl\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\serialization.py", line 445, in _open_file_like
return _open_file(name_or_buffer, mode)
File "C:\Users\udokl\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\serialization.py", line 426, in init
super().init(open(name, mode))
FileNotFoundError: [Errno 2] No such file or directory: 'checkpoints/depth_anything_v2_vitl.pth'
can anyone help?
DepthAnything-V1 works without errors under Windows
download the required model and store in a folder "checkpoints".
ex: I downloaded the small version:
Folder structure:
Depth-Anything-V2/
โ
โโโ checkpoints/
โ โโโ depth_anything_v2_vits.pth
โ
โโโ assets/
โ โโโ examples/
โ
โโโ run.py
โโโ ...
execute:
python run.py --encoder vits --img-path assets/examples --outdir depth_vis
@DasDani99 thanks for the tip, it helped me a lot. now it also works for me on windows. the new models are very impressive