suppress errors in vision/fair/pytorch3d

Differential Revision: D23521117

fbshipit-source-id: 8e11e91aaa2a91b7ca1fa4c00a3db86ab8648f7f
This commit is contained in:
generatedunixname89002005307016 2020-09-03 18:16:28 -07:00 committed by Facebook GitHub Bot
parent 316b77782e
commit 6eb158e548

View File

@ -97,6 +97,7 @@ def corresponding_cameras_alignment(
cameras_src_aligned: `cameras_src` after applying the alignment transform. cameras_src_aligned: `cameras_src` after applying the alignment transform.
""" """
# pyre-fixme[16]: `CamerasBase` has no attribute `R`.
if cameras_src.R.shape[0] != cameras_tgt.R.shape[0]: if cameras_src.R.shape[0] != cameras_tgt.R.shape[0]:
raise ValueError( raise ValueError(
"cameras_src and cameras_tgt have to contain the same number of cameras!" "cameras_src and cameras_tgt have to contain the same number of cameras!"
@ -120,6 +121,7 @@ def corresponding_cameras_alignment(
torch.bmm( torch.bmm(
align_t_T[:, None].repeat(cameras_src.R.shape[0], 1, 1), cameras_src.R align_t_T[:, None].repeat(cameras_src.R.shape[0], 1, 1), cameras_src.R
)[:, 0] )[:, 0]
# pyre-fixme[16]: `CamerasBase` has no attribute `T`.
+ cameras_src.T * align_t_s + cameras_src.T * align_t_s
) )
@ -167,6 +169,7 @@ def _align_camera_extrinsics(
R_A = (U V^T)^T R_A = (U V^T)^T
``` ```
""" """
# pyre-fixme[16]: `CamerasBase` has no attribute `R`.
RRcov = torch.bmm(cameras_src.R, cameras_tgt.R.transpose(2, 1)).mean(0) RRcov = torch.bmm(cameras_src.R, cameras_tgt.R.transpose(2, 1)).mean(0)
U, _, V = torch.svd(RRcov) U, _, V = torch.svd(RRcov)
align_t_R = V @ U.t() align_t_R = V @ U.t()
@ -196,6 +199,7 @@ def _align_camera_extrinsics(
T_A = mean(B) - mean(A) * s_A T_A = mean(B) - mean(A) * s_A
``` ```
""" """
# pyre-fixme[16]: `CamerasBase` has no attribute `T`.
A = torch.bmm(cameras_src.R, cameras_src.T[:, :, None])[:, :, 0] A = torch.bmm(cameras_src.R, cameras_src.T[:, :, None])[:, :, 0]
B = torch.bmm(cameras_src.R, cameras_tgt.T[:, :, None])[:, :, 0] B = torch.bmm(cameras_src.R, cameras_tgt.T[:, :, None])[:, :, 0]
Amu = A.mean(0, keepdim=True) Amu = A.mean(0, keepdim=True)