house-only fitting
Browse files
hoho2025/example_solutions.py
CHANGED
|
@@ -684,8 +684,8 @@ def get_fitted_dense_depth(depth, colmap_rec, img_id, ade20k_seg, verbose=False)
|
|
| 684 |
k, depth_fitted = fit_scale_robust_median(depth_np, depth_sparse, validity_mask=house_mask)
|
| 685 |
if verbose:
|
| 686 |
print(f"Fitted depth scale k={k:.4f} for image {img_id}")
|
| 687 |
-
|
| 688 |
-
depth_sparse = depth_sparse
|
| 689 |
return depth_fitted, depth_sparse, True, col_img
|
| 690 |
|
| 691 |
|
|
|
|
| 684 |
k, depth_fitted = fit_scale_robust_median(depth_np, depth_sparse, validity_mask=house_mask)
|
| 685 |
if verbose:
|
| 686 |
print(f"Fitted depth scale k={k:.4f} for image {img_id}")
|
| 687 |
+
depth_fitted = depth_np * house_mask.astype(np.float32)
|
| 688 |
+
depth_sparse = depth_sparse * house_mask.astype(np.float32)
|
| 689 |
return depth_fitted, depth_sparse, True, col_img
|
| 690 |
|
| 691 |
|