Spaces:
Running
on
Zero
Running
on
Zero
- dkt/pipelines/pipeline.py +11 -0
dkt/pipelines/pipeline.py
CHANGED
|
@@ -990,7 +990,18 @@ class DKTPipeline:
|
|
| 990 |
moge_mask = output['mask'].cpu().numpy()
|
| 991 |
moge_depth = output['depth'].cpu().numpy()
|
| 992 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 993 |
metric_depth, scale, shift = transfer_pred_disp2depth(predicted_depth, moge_depth, moge_mask, return_scale_shift=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 994 |
|
| 995 |
moge_intrinsics[0, 0] *= resize_W
|
| 996 |
moge_intrinsics[1, 1] *= resize_H
|
|
|
|
| 990 |
moge_mask = output['mask'].cpu().numpy()
|
| 991 |
moge_depth = output['depth'].cpu().numpy()
|
| 992 |
|
| 993 |
+
# Debug: check moge_mask
|
| 994 |
+
logger.info(f'moge_mask dtype: {moge_mask.dtype}, shape: {moge_mask.shape}, valid_count: {moge_mask.sum()}, total: {moge_mask.size}')
|
| 995 |
+
print(f'moge_mask dtype: {moge_mask.dtype}, shape: {moge_mask.shape}, valid_count: {moge_mask.sum()}, total: {moge_mask.size}')
|
| 996 |
+
|
| 997 |
+
# Ensure moge_mask is boolean type
|
| 998 |
+
moge_mask = moge_mask.astype(bool)
|
| 999 |
+
|
| 1000 |
metric_depth, scale, shift = transfer_pred_disp2depth(predicted_depth, moge_depth, moge_mask, return_scale_shift=True)
|
| 1001 |
+
|
| 1002 |
+
# Debug: check metric_depth
|
| 1003 |
+
logger.info(f'metric_depth shape: {metric_depth.shape}, min: {metric_depth.min():.4f}, max: {metric_depth.max():.4f}')
|
| 1004 |
+
print(f'metric_depth shape: {metric_depth.shape}, min: {metric_depth.min():.4f}, max: {metric_depth.max():.4f}')
|
| 1005 |
|
| 1006 |
moge_intrinsics[0, 0] *= resize_W
|
| 1007 |
moge_intrinsics[1, 1] *= resize_H
|