1 Commits

Author SHA1 Message Date
generatedunixname1417043136753450
d9839a95f2 fbcode/vision/fair/pytorch3d/pytorch3d/ops/cameras_alignment.py
Reviewed By: sgrigory

Differential Revision: D93710806

fbshipit-source-id: da6c1e1e5b7a1c5cdfbf5026993c42c7ec387415
2026-02-23 15:52:03 -08:00

View File

@@ -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