Open shersoni610 opened 1 year ago
isl-org_ZoeDepth_main/zoedepth/models/base_models/midas.py line 173
def __call__(self, x): width, height = self.get_size(*x.shape[-2:][::-1]) return nn.functional.interpolate(x, (int(height), int(width)), mode='bilinear', align_corners=True)
if using beit backbone
intel-isl_MiDaS_master/midas/backbones/beit.py line 47
new_sub_table = F.interpolate(old_sub_table, size=(int(new_height), int(new_width)), mode="bilinear")
these changes fixed the deployment for me
Hey @shersoni610 I had this exact same error. I fixed it by setting up the virtual environment like they describe in the readme.
cd ZoeDepth
conda env create -n zoe --file environment.yml
conda activate zoe
After that everything from the sample code worked fine.
Hello Hari, I got the following error:
File "/Users/.cache/torch/hub/intel-isl_MiDaS_master/midas/backbones/beit.py", line 47, in _get_rel_pos_bias new_sub_table = F.interpolate(old_sub_table, size=(int(new_height, new_width)), mode="bilinear") ^^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: int() base must be >= 2 and <= 36, or 0
Hello Hari,
Sorry, my mistake. Your solution worked.
@jagennath-hari hanks for help. An extra i changed in sanity.py at 37 as:
torch.hub.help("intel-isl/MiDaS", "DPT_BEiT_L_384", force_reload=False)
Otherwise, it downloads again and overwrites the changes I made in the beit.py code.
Hello,
I can not resolve this issue. Can someone help?
File "/media/M2Disk/Projects/CompVis/DepthEstimation/ZDepth/zoeenv/lib/python3.11/site-packages/torch/nn/functional.py", line 3924, in interpolate raise TypeError( TypeError: expected size to be one of int or Tuple[int] or Tuple[int, int] or Tuple[int, int, int], but got size with types [<class 'numpy.int64'>, <class 'numpy.int64'>]