Skip to content

Commit

Permalink
workaround naver#15
Browse files Browse the repository at this point in the history
  • Loading branch information
yocabon committed Jul 17, 2024
1 parent 6d6d485 commit 1253bce
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mast3r/cloud_opt/sparse_ga.py
Original file line number Diff line number Diff line change
Expand Up @@ -823,7 +823,8 @@ def canonical_view(ptmaps11, confs11, subsample, mode='avg-angle'):
canon_depth = ptmaps11[..., 2].unsqueeze(1)
S = slice(subsample // 2, None, subsample)
center_depth = canon_depth[:, :, S, S]
assert (center_depth > 0).all()
center_depth = torch.clip(center_depth, min=torch.finfo(center_depth.dtype).eps)

stacked_depth = F.pixel_unshuffle(canon_depth, subsample)
stacked_confs = F.pixel_unshuffle(confs11[:, None, :, :, 0], subsample)

Expand Down

0 comments on commit 1253bce

Please sign in to comment.