mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-08-02 20:02:49 +08:00
suppress errors in vision/fair/pytorch3d
Differential Revision: D23521117 fbshipit-source-id: 8e11e91aaa2a91b7ca1fa4c00a3db86ab8648f7f
This commit is contained in:
parent
316b77782e
commit
6eb158e548
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user