workaround #15
Browse files
mast3r/cloud_opt/sparse_ga.py
CHANGED
|
@@ -823,7 +823,8 @@ def canonical_view(ptmaps11, confs11, subsample, mode='avg-angle'):
|
|
| 823 |
canon_depth = ptmaps11[..., 2].unsqueeze(1)
|
| 824 |
S = slice(subsample // 2, None, subsample)
|
| 825 |
center_depth = canon_depth[:, :, S, S]
|
| 826 |
-
|
|
|
|
| 827 |
stacked_depth = F.pixel_unshuffle(canon_depth, subsample)
|
| 828 |
stacked_confs = F.pixel_unshuffle(confs11[:, None, :, :, 0], subsample)
|
| 829 |
|
|
|
|
| 823 |
canon_depth = ptmaps11[..., 2].unsqueeze(1)
|
| 824 |
S = slice(subsample // 2, None, subsample)
|
| 825 |
center_depth = canon_depth[:, :, S, S]
|
| 826 |
+
center_depth = torch.clip(center_depth, min=torch.finfo(center_depth.dtype).eps)
|
| 827 |
+
|
| 828 |
stacked_depth = F.pixel_unshuffle(canon_depth, subsample)
|
| 829 |
stacked_confs = F.pixel_unshuffle(confs11[:, None, :, :, 0], subsample)
|
| 830 |
|