app.py
CHANGED
@@ -103,7 +103,7 @@ def generate_monocular_depth_maps(img_list, depth_prior_name):
|
|
103 |
prediction = model.infer(image, f_px=f_px)
|
104 |
depth = prediction["depth"].cpu().numpy() # Depth in [m].
|
105 |
focallength_px=prediction["focallength_px"].cpu()
|
106 |
-
|
107 |
depth_list.append(depth)
|
108 |
focallength_px_list.append(focallength_px)
|
109 |
#np.savez_compressed(path_depthpro, depth=depth, focallength_px=prediction["focallength_px"].cpu())
|
@@ -115,7 +115,7 @@ def generate_monocular_depth_maps(img_list, depth_prior_name):
|
|
115 |
#print(image.size)
|
116 |
depth = pipe(image)["predicted_depth"].numpy()
|
117 |
print(depth.max(),depth.min())
|
118 |
-
|
119 |
focallength_px = 200
|
120 |
print(depth.max(),depth.min())
|
121 |
depth_list.append(depth)
|
|
|
103 |
prediction = model.infer(image, f_px=f_px)
|
104 |
depth = prediction["depth"].cpu().numpy() # Depth in [m].
|
105 |
focallength_px=prediction["focallength_px"].cpu()
|
106 |
+
cv2.resize(depth[0], image.size, interpolation=cv2.INTER_CUBIC)
|
107 |
depth_list.append(depth)
|
108 |
focallength_px_list.append(focallength_px)
|
109 |
#np.savez_compressed(path_depthpro, depth=depth, focallength_px=prediction["focallength_px"].cpu())
|
|
|
115 |
#print(image.size)
|
116 |
depth = pipe(image)["predicted_depth"].numpy()
|
117 |
print(depth.max(),depth.min())
|
118 |
+
cv2.resize(depth[0], image.size, interpolation=cv2.INTER_CUBIC)
|
119 |
focallength_px = 200
|
120 |
print(depth.max(),depth.min())
|
121 |
depth_list.append(depth)
|