Commit 6eb158e5 authored by generatedunixname89002005307016's avatar generatedunixname89002005307016 Committed by Facebook GitHub Bot
Browse files

suppress errors in `vision/fair/pytorch3d`

Differential Revision: D23521117

fbshipit-source-id: 8e11e91aaa2a91b7ca1fa4c00a3db86ab8648f7f
parent 316b7778
......@@ -97,6 +97,7 @@ def corresponding_cameras_alignment(
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]:
raise ValueError(
"cameras_src and cameras_tgt have to contain the same number of cameras!"
......@@ -120,6 +121,7 @@ def corresponding_cameras_alignment(
torch.bmm(
align_t_T[:, None].repeat(cameras_src.R.shape[0], 1, 1), cameras_src.R
)[:, 0]
# pyre-fixme[16]: `CamerasBase` has no attribute `T`.
+ cameras_src.T * align_t_s
)
......@@ -167,6 +169,7 @@ def _align_camera_extrinsics(
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)
U, _, V = torch.svd(RRcov)
align_t_R = V @ U.t()
......@@ -196,6 +199,7 @@ def _align_camera_extrinsics(
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]
B = torch.bmm(cameras_src.R, cameras_tgt.T[:, :, None])[:, :, 0]
Amu = A.mean(0, keepdim=True)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment