mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2026-02-25 23:56:00 +08:00
fbcode/vision/fair/pytorch3d/pytorch3d/ops/cameras_alignment.py
Reviewed By: sgrigory Differential Revision: D93710806 fbshipit-source-id: da6c1e1e5b7a1c5cdfbf5026993c42c7ec387415
This commit is contained in:
committed by
meta-codesync[bot]
parent
7b5c78460a
commit
d9839a95f2
@@ -223,8 +223,7 @@ def _align_camera_extrinsics(
|
||||
# of centered A and centered B
|
||||
Ac = A - Amu
|
||||
Bc = B - Bmu
|
||||
# pyre-fixme[58]: `**` is not supported for operand types `Tensor` and `int`.
|
||||
align_t_s = (Ac * Bc).mean() / (Ac**2).mean().clamp(eps)
|
||||
align_t_s = (Ac * Bc).mean() / torch.square(Ac).mean().clamp(eps)
|
||||
else:
|
||||
# set the scale to identity
|
||||
align_t_s = 1.0
|
||||
|
||||
Reference in New Issue
Block a user