🐍 Geometric Computer Vision Library for Spatial AI
Python artificial-intelligencecomputer-visiondeep-learninghacktoberfestimage-processingmachine-learningneural-networkpythonpytorchroboticsspatial-ai
test(epipolar): drop the bare xfail on test_epipolar_constraint_7point (#5921)
Aditya Sinha49dc0abe7f04
diff --git a/README.md b/README.mdindex fab32fe0a..2e27772e8 100644--- a/README.md+++ b/README.md@@ -100,7 +100,7 @@ covers CUDA or MPS half precision.| `kornia.geometry.transform` | ⚠️ | ⚠️ | 31 / 32 | Accuracy misses in rotation matrices, affine/perspective warps and the homography warper || `kornia.geometry.camera` | ⚠️ | ⚠️ | 13 / 23 | Pinhole `cam2pixel`/`pixel2cam` consistency, distortion round trips, `StereoCamera` reprojection; 12 bfloat16 entries are a test-side dtype assertion || `kornia.geometry.calibration` | ⚠️ | ⚠️ | 13 / 12 | `solve_pnp_dlt` rejects half inputs (float32/float64 only); `undistort_points` misses its OpenCV reference values |-| `kornia.geometry.epipolar` | ⚠️ | ⚠️ | 58 / 56 | `find_fundamental`, `find_essential`, `decompose_essential_matrix`, `motion_from_essential*` and `KRt_from_projection` raise `NotImplementedError`: CPU `lu`, `eigh` and QR have no half kernels |+| `kornia.geometry.epipolar` | ⚠️ | ⚠️ | 41 / 41 | `decompose_essential_matrix`, `motion_from_essential*`, `KRt_from_projection` and the eight-point `find_fundamental` (weighted, or on more than 8 points) raise `NotImplementedError`: CPU `lu`, `eigh` and QR have no half kernels. `find_essential` and the seven-point `find_fundamental` run, with accuracy limited by the half-precision inputs || `kornia.geometry.homography` | ⚠️ | ⚠️ | 10 / 16 | The DLT solvers run (SVD is cast to float32) but miss the clean-point accuracy checks || `kornia.geometry.liegroup` | ⚠️ | ⚠️ | 4 / 130 | `So2`/`Se2` store complex tensors; float16 inverses are computed in complex64. PyTorch has no complex bfloat16 dtype, so most bfloat16 `So2`/`Se2` tests raise (119 entries); `So3`/`Se3` miss a few composition, point-transform and orthogonality accuracy checks || `kornia.geometry.solvers` | ⚠️ | ⚠️ | 1 / 1 | `solve_quartic` accuracy on random quartics |diff --git a/docs/source/get-started/precision.rst b/docs/source/get-started/precision.rstindex eedcbe43b..66248e291 100644--- a/docs/source/get-started/precision.rst+++ b/docs/source/get-started/precision.rst@@ -74,12 +74,13 @@ precision, so the table says nothing about those backends.* - ``kornia.geometry.epipolar``- ⚠️ Partial- ⚠️ Partial- - 42 / 40- - ``decompose_essential_matrix``, ``motion_from_essential*``, ``KRt_from_projection`` and the weighted- eight-point ``find_fundamental`` raise ``NotImplementedError``: they call ``lu``, ``eigh`` or QR, which have- no CPU half-precision kernels. ``find_essential`` solves in float64, and the unweighted eight-point and the- seven-point ``find_fundamental`` factorize in float32 or float64; they return half-precision results, whose- accuracy the half-precision inputs limit.+ - 41 / 41+ - ``decompose_essential_matrix``, ``motion_from_essential*``, ``KRt_from_projection`` and the eight-point+ ``find_fundamental`` when weighted or given more than 8 points raise ``NotImplementedError``: they call ``lu``,+ ``eigh`` or QR, which have no CPU half-precision kernels. ``find_essential`` solves in float64, and the+ unweighted eight-point ``find_fundamental`` on exactly 8 points and the seven-point ``find_fundamental``+ factorize in float32 or float64; they return half-precision results, whose accuracy the half-precision inputs+ limit.* - ``kornia.geometry.homography``- ⚠️ Partial- ⚠️ Partialdiff --git a/testing/half_precision_xfails/cpu_bfloat16.txt b/testing/half_precision_xfails/cpu_bfloat16.txtindex b19055c67..d1ec3837b 100644--- a/testing/half_precision_xfails/cpu_bfloat16.txt+++ b/testing/half_precision_xfails/cpu_bfloat16.txt@@ -138,6 +138,7 @@ call builtins.NotImplementedError tests/geometry/epipolar/test_essential.py::Tescall builtins.NotImplementedError tests/geometry/epipolar/test_essential.py::TestMotionFromEssentialChooseSolution::test_unbatched[cpu-bfloat16-20]call builtins.AssertionError tests/geometry/epipolar/test_fundamental.py::TestComputeCorrespondEpilines::test_opencv[cpu-bfloat16]call builtins.AssertionError tests/geometry/epipolar/test_fundamental.py::TestFindFundamental::test_7point_opencv[cpu-bfloat16]+call builtins.AssertionError tests/geometry/epipolar/test_fundamental.py::TestFindFundamental::test_epipolar_constraint_7point[cpu-bfloat16]call builtins.NotImplementedError tests/geometry/epipolar/test_fundamental.py::TestFindFundamental::test_opencv_svd[cpu-bfloat16]call builtins.NotImplementedError tests/geometry/epipolar/test_fundamental.py::TestFindFundamental::test_shape[cpu-bfloat16-1-8]call builtins.NotImplementedError tests/geometry/epipolar/test_fundamental.py::TestFindFundamental::test_shape[cpu-bfloat16-2-9]diff --git a/testing/half_precision_xfails/cpu_float16.txt b/testing/half_precision_xfails/cpu_float16.txtindex d299e2a78..fc1dac7d4 100644--- a/testing/half_precision_xfails/cpu_float16.txt+++ b/testing/half_precision_xfails/cpu_float16.txt@@ -126,6 +126,7 @@ call builtins.NotImplementedError tests/geometry/epipolar/test_essential.py::Tescall builtins.NotImplementedError tests/geometry/epipolar/test_essential.py::TestMotionFromEssentialChooseSolution::test_unbatched[cpu-float16-20]call builtins.AssertionError tests/geometry/epipolar/test_fundamental.py::TestComputeCorrespondEpilines::test_opencv[cpu-float16]call builtins.AssertionError tests/geometry/epipolar/test_fundamental.py::TestFindFundamental::test_7point_opencv[cpu-float16]+call builtins.AssertionError tests/geometry/epipolar/test_fundamental.py::TestFindFundamental::test_epipolar_constraint_7point[cpu-float16]call builtins.NotImplementedError tests/geometry/epipolar/test_fundamental.py::TestFindFundamental::test_opencv_svd[cpu-float16]call builtins.NotImplementedError tests/geometry/epipolar/test_fundamental.py::TestFindFundamental::test_shape[cpu-float16-1-8]call builtins.NotImplementedError tests/geometry/epipolar/test_fundamental.py::TestFindFundamental::test_shape[cpu-float16-2-9]diff --git a/tests/geometry/epipolar/test_fundamental.py b/tests/geometry/epipolar/test_fundamental.pyindex 8de9337c3..14a8f6568 100644--- a/tests/geometry/epipolar/test_fundamental.py+++ b/tests/geometry/epipolar/test_fundamental.py@@ -312,7 +312,6 @@ class TestFindFundamental(BaseTester):error = epi.sampson_epipolar_distance(x1, x2, F)self.assert_close(error, torch.zeros((F.shape[0], 7), device=device, dtype=dtype), atol=1e-4, rtol=1e-4)- @pytest.mark.xfaildef test_epipolar_constraint_7point(self, device, dtype):scene: Dict[str, torch.Tensor] = generate_two_view_random_scene(device, dtype)x1 = scene["x1"][:, :7, :]