Zhyever commited on
Commit
f24cd8e
1 Parent(s): 23a0842

debug push

Browse files
zoedepth/models/base_models/depth_anything.py CHANGED
@@ -344,17 +344,17 @@ class DepthAnythingCore(nn.Module):
344
 
345
  if midas_model_type == 'vits':
346
  depth_anything = DPT_DINOv2(encoder=midas_model_type, features=64, out_channels=[48, 96, 192, 384], use_clstoken=False)
347
- state_dict = torch.load('/ibex/ai/home/liz0l/codes/ZoeDepth/depth_anything_vits14.pth', map_location='cpu')
348
  elif midas_model_type == 'vitb':
349
  depth_anything = DPT_DINOv2(encoder=midas_model_type, features=128, out_channels=[96, 192, 384, 768], use_clstoken=False)
350
- state_dict = torch.load('/ibex/ai/home/liz0l/codes/ZoeDepth/depth_anything_vitb14.pth', map_location='cpu')
351
  elif midas_model_type == 'vitl':
352
  depth_anything = DPT_DINOv2(encoder=midas_model_type, features=256, out_channels=[256, 512, 1024, 1024], use_clstoken=False)
353
- state_dict = torch.load('/ibex/ai/home/liz0l/codes/ZoeDepth/depth_anything_vitl14.pth', map_location='cpu')
354
  else:
355
  raise NotImplementedError
356
 
357
- depth_anything.load_state_dict(state_dict)
358
 
359
  kwargs.update({'keep_aspect_ratio': force_keep_ar})
360
 
 
344
 
345
  if midas_model_type == 'vits':
346
  depth_anything = DPT_DINOv2(encoder=midas_model_type, features=64, out_channels=[48, 96, 192, 384], use_clstoken=False)
347
+ # state_dict = torch.load('/ibex/ai/home/liz0l/codes/ZoeDepth/depth_anything_vits14.pth', map_location='cpu')
348
  elif midas_model_type == 'vitb':
349
  depth_anything = DPT_DINOv2(encoder=midas_model_type, features=128, out_channels=[96, 192, 384, 768], use_clstoken=False)
350
+ # state_dict = torch.load('/ibex/ai/home/liz0l/codes/ZoeDepth/depth_anything_vitb14.pth', map_location='cpu')
351
  elif midas_model_type == 'vitl':
352
  depth_anything = DPT_DINOv2(encoder=midas_model_type, features=256, out_channels=[256, 512, 1024, 1024], use_clstoken=False)
353
+ # state_dict = torch.load('/ibex/ai/home/liz0l/codes/ZoeDepth/depth_anything_vitl14.pth', map_location='cpu')
354
  else:
355
  raise NotImplementedError
356
 
357
+ # depth_anything.load_state_dict(state_dict)
358
 
359
  kwargs.update({'keep_aspect_ratio': force_keep_ar})
360