Commit 18ba385
Fix flaky fisheye P3P RANSAC test
Summary:
The randomized P3P RANSAC test intentionally uses ValidationPrecision with an 85% success threshold for float precision, but a single RANSAC::p3p() false return called OCEAN_SET_FAILED(). That permanently failed the validation and bypassed the statistical contract. Treat an unsuccessful solve as one inaccurate trial and continue without using its output, so repeated failures still fail through the unchanged aggregate threshold.
The test also projected every correspondence after deliberately corrupting 15 of them. A corrupted 3D outlier is an arbitrary world point and need not satisfy camera projection preconditions. A deterministic reproduction with initial seed 3097702702 reached the gravity-constrained, unrefined case at iteration 44251; known faulty index 90 had camera-space z=7.15255737e-07, violating FisheyeCameraT<float>::projectToImageIF()'s |z| > 1e-6 precondition. Letting outliers participate in validation could additionally allow a coincidentally precise outlier to compensate for a missed true inlier.
Exclude the ground-truth faulty indices from post-RANSAC accuracy validation. This avoids projecting intentionally invalid synthetic data and makes the accuracy check stricter: all valid correspondences must now pass, and outliers cannot hide missed inliers. No production RANSAC behavior, iteration count, or success/error threshold changes.
___
Differential Revision: D115804590
fbshipit-source-id: 6870367861e0f97e79a8b1065079f7cafbdebf041 parent a6362a0 commit 18ba385
1 file changed
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
530 | 530 | | |
531 | 531 | | |
532 | 532 | | |
533 | | - | |
| 533 | + | |
534 | 534 | | |
535 | 535 | | |
536 | 536 | | |
537 | 537 | | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
538 | 542 | | |
539 | 543 | | |
540 | 544 | | |
541 | | - | |
| 545 | + | |
542 | 546 | | |
543 | 547 | | |
544 | 548 | | |
| |||
0 commit comments