yocabon commited on
Commit
1253bce
1 Parent(s): 6d6d485

workaround #15

Browse files
Files changed (1) hide show
  1. mast3r/cloud_opt/sparse_ga.py +2 -1
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
- assert (center_depth > 0).all()
 
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