-
Notifications
You must be signed in to change notification settings - Fork 48
Open
Description
Hi!
Great work! I was running the plain version of depth anything V2 using your version pf dpt.py and I got the following error:
Traceback (most recent call last):
File "run.py", line 57, in <module>
depth = depth_anything.infer_image(raw_image, args.input_size)
File "/usr/local/lib/python3.8/dist-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "/home/naisr/naisr_ws/nn_engine/Depth-Anything-V2/depth_anything_v2/dpt.py", line 193, in infer_image
depth = F.interpolate(depth[:, None], (h, w), mode="bilinear", align_corners=True)[0, 0]
File "/usr/local/lib/python3.8/dist-packages/torch/nn/functional.py", line 3916, in interpolate
raise ValueError(
ValueError: Input and output must have the same number of spatial dimensions, but got input with spatial dimensions of [1, 518, 924] and output size of (1080, 1920). Please provide input tensor in (N, C, d1, d2, ...,dK) format and output size in (o1, o2, ...,oK) format.
which I tracked down to a squeeze statement commented out here. Is there a particular reason it is commented out?
Best,
Jakub
Metadata
Metadata
Assignees
Labels
No labels