arabago96 commited on
Commit
03dbb3f
·
verified ·
1 Parent(s): 0cf9bba

Update trellis/utils/postprocessing_utils.py

Browse files
trellis/utils/postprocessing_utils.py CHANGED
@@ -54,14 +54,7 @@ def _fill_holes(
54
  pitchs = torch.tensor(pitchs).cuda()
55
  radius = 2.0
56
  fov = torch.deg2rad(torch.tensor(40)).cuda()
57
- # Create perspective projection matrix manually to avoid API issues
58
- f = 1.0 / torch.tan(fov / 2.0)
59
- projection = torch.tensor([
60
- [f, 0, 0, 0],
61
- [0, f, 0, 0],
62
- [0, 0, -(3+1)/(3-1), -2*3*1/(3-1)],
63
- [0, 0, -1, 0]
64
- ], dtype=torch.float32, device='cuda')
65
  views = []
66
  for (yaw, pitch) in zip(yaws, pitchs):
67
  orig = torch.tensor([
 
54
  pitchs = torch.tensor(pitchs).cuda()
55
  radius = 2.0
56
  fov = torch.deg2rad(torch.tensor(40)).cuda()
57
+ projection = utils3d.torch.perspective_from_fov_xy(fov, fov, 1, 3)
 
 
 
 
 
 
 
58
  views = []
59
  for (yaw, pitch) in zip(yaws, pitchs):
60
  orig = torch.tensor([