Pytorch3d: Camera's BUG: when I set elev=90 or 270

Created on 20 Oct 2020  ·  4Comments  ·  Source: facebookresearch/pytorch3d

when I set elev = 90 or 270, the result is a line.

self.elev=90
self.azim=0
R, T = look_at_view_transform(self.dist, self.elev, self.azim, device=self.device,at=at) 
self.cameras = FoVPerspectiveCameras(device=self.device, R=R, T=T)
std_image = self.renderer(std_mesh, cameras=self.cameras)

90

question

Most helpful comment

Which version of PyTorch3D are you using? Are you installing from conda or Github? This issue should have been fixed by https://github.com/facebookresearch/pytorch3d/commit/eb517dd70b20c8431a1cfc46e47b4c5c78529c5b. One possibility is that you need to increase the tolerance on this line: https://github.com/facebookresearch/pytorch3d/blob/30e4e891dbbccb6b9ca416182e70187eaced71a0/pytorch3d/renderer/cameras.py#L1232

All 4 comments

Do you have this warning?

 /usr/local/lib/python3.6/dist-packages/pytorch3d/transforms/transform3d.py:707: UserWarning: R is not a valid rotation matrix
  warnings.warn(msg)

as workaround I used 89.9999

Which version of PyTorch3D are you using? Are you installing from conda or Github? This issue should have been fixed by https://github.com/facebookresearch/pytorch3d/commit/eb517dd70b20c8431a1cfc46e47b4c5c78529c5b. One possibility is that you need to increase the tolerance on this line: https://github.com/facebookresearch/pytorch3d/blob/30e4e891dbbccb6b9ca416182e70187eaced71a0/pytorch3d/renderer/cameras.py#L1232

Do you have this warning?

 /usr/local/lib/python3.6/dist-packages/pytorch3d/transforms/transform3d.py:707: UserWarning: R is not a valid rotation matrix
  warnings.warn(msg)

as workaround I used 89.9999

Yes

Which version of PyTorch3D are you using? Are you installing from conda or Github? This issue should have been fixed by eb517dd. One possibility is that you need to increase the tolerance on this line:

https://github.com/facebookresearch/pytorch3d/blob/30e4e891dbbccb6b9ca416182e70187eaced71a0/pytorch3d/renderer/cameras.py#L1232

I'm using PyTorch3D 2.5. And I installed it from conda. Thank you for your reply. I have fixed this problem.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

udemegane picture udemegane  ·  3Comments

shersoni610 picture shersoni610  ·  3Comments

ruslanvasylev picture ruslanvasylev  ·  3Comments

OOF-dura picture OOF-dura  ·  3Comments

MarkTension picture MarkTension  ·  3Comments