app.py
CHANGED
@@ -114,6 +114,7 @@ def generate_monocular_depth_maps(img_list, depth_prior_name):
|
|
114 |
image = Image.open(image_path)
|
115 |
#print(image.size)
|
116 |
depth = pipe(image)["predicted_depth"].numpy()
|
|
|
117 |
depth = cv2.resize(depth[0], image.size, interpolation=cv2.INTER_LANCZOS4)
|
118 |
focallength_px = 200
|
119 |
print(depth.max(),depth.min())
|
@@ -139,7 +140,6 @@ def local_get_reconstructed_scene(filelist, min_conf_thr, as_pointcloud, mask_sk
|
|
139 |
model = AsymmetricCroCo3DStereo.from_pretrained(weights_path).to(device)
|
140 |
output = inference(pairs, model, device, batch_size=batch_size, verbose=not silent)
|
141 |
mode = GlobalAlignerMode.PointCloudOptimizer
|
142 |
-
print(output)
|
143 |
scene = global_aligner(output, device=device, mode=mode, verbose=not silent, shared_focal = True, temporal_smoothing_weight=0.01, translation_weight=1.0,
|
144 |
flow_loss_weight=0.01, flow_loss_start_epoch=0.1, flow_loss_thre=25, use_self_mask=True,
|
145 |
num_total_iter=300, empty_cache= len(filelist) > 72)
|
|
|
114 |
image = Image.open(image_path)
|
115 |
#print(image.size)
|
116 |
depth = pipe(image)["predicted_depth"].numpy()
|
117 |
+
print(depth.max(),depth.min())
|
118 |
depth = cv2.resize(depth[0], image.size, interpolation=cv2.INTER_LANCZOS4)
|
119 |
focallength_px = 200
|
120 |
print(depth.max(),depth.min())
|
|
|
140 |
model = AsymmetricCroCo3DStereo.from_pretrained(weights_path).to(device)
|
141 |
output = inference(pairs, model, device, batch_size=batch_size, verbose=not silent)
|
142 |
mode = GlobalAlignerMode.PointCloudOptimizer
|
|
|
143 |
scene = global_aligner(output, device=device, mode=mode, verbose=not silent, shared_focal = True, temporal_smoothing_weight=0.01, translation_weight=1.0,
|
144 |
flow_loss_weight=0.01, flow_loss_start_epoch=0.1, flow_loss_thre=25, use_self_mask=True,
|
145 |
num_total_iter=300, empty_cache= len(filelist) > 72)
|