app.py
CHANGED
@@ -82,7 +82,7 @@ def generate_monocular_depth_maps(img_list, depth_prior_name):
|
|
82 |
depth_list = []
|
83 |
focallength_px_list = []
|
84 |
|
85 |
-
if depth_prior_name=='
|
86 |
model, transform = depth_pro.create_model_and_transforms(device='cuda')
|
87 |
model.eval()
|
88 |
|
@@ -97,7 +97,7 @@ def generate_monocular_depth_maps(img_list, depth_prior_name):
|
|
97 |
depth_list.append(depth)
|
98 |
focallength_px_list.append(focallength_px)
|
99 |
#np.savez_compressed(path_depthpro, depth=depth, focallength_px=prediction["focallength_px"].cpu())
|
100 |
-
elif depth_prior_name=='
|
101 |
pipe = pipeline(task="depth-estimation", model="depth-anything/Depth-Anything-V2-Large-hf",device='cuda')
|
102 |
for image_path in tqdm(img_list):
|
103 |
#path_depthanything = image_path.replace('.png','_pred_depth_depthanything.npz').replace('.jpg','_pred_depth_depthanything.npz')
|
|
|
82 |
depth_list = []
|
83 |
focallength_px_list = []
|
84 |
|
85 |
+
if depth_prior_name=='Depth Pro':
|
86 |
model, transform = depth_pro.create_model_and_transforms(device='cuda')
|
87 |
model.eval()
|
88 |
|
|
|
97 |
depth_list.append(depth)
|
98 |
focallength_px_list.append(focallength_px)
|
99 |
#np.savez_compressed(path_depthpro, depth=depth, focallength_px=prediction["focallength_px"].cpu())
|
100 |
+
elif depth_prior_name=='Depth Anything V2':
|
101 |
pipe = pipeline(task="depth-estimation", model="depth-anything/Depth-Anything-V2-Large-hf",device='cuda')
|
102 |
for image_path in tqdm(img_list):
|
103 |
#path_depthanything = image_path.replace('.png','_pred_depth_depthanything.npz').replace('.jpg','_pred_depth_depthanything.npz')
|