mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-12-20 06:10:34 +08:00
Numerical stability of ePnP.
Summary: lg-zhang found the problem with the quadratic part of ePnP implementation: n262385 . It was caused by a coefficient returned from the linear equation solver being equal to exactly 0.0, which caused `sign()` to return 0, something I had not anticipated. I also made sure we avoid division by zero by clamping all relevant denominators. Reviewed By: nikhilaravi, lg-zhang Differential Revision: D21531200 fbshipit-source-id: 9eb2fa9d4f4f8f5f411d4cf1cffcc44b365b7e51
This commit is contained in:
committed by
Facebook GitHub Bot
parent
a0e14cae1e
commit
a8377f1f06
@@ -51,7 +51,7 @@ class TestPerspectiveNPoints(TestCaseMixin, unittest.TestCase):
|
||||
return t.norm(dim=-1)
|
||||
|
||||
self.assertNormsClose(
|
||||
T, sol.T[:, None, :], rtol=1e-2, norm_fn=norm_fn, msg=assert_msg
|
||||
T, sol.T[:, None, :], rtol=3e-3, norm_fn=norm_fn, msg=assert_msg
|
||||
)
|
||||
self.assertNormsClose(
|
||||
R_quat, R_est_quat, rtol=3e-4, norm_fn=norm_fn, msg=assert_msg
|
||||
|
||||
Reference in New Issue
Block a user