Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AssertionError in test_ransac_geometric #1668

Open
ashkurti opened this issue Aug 28, 2015 · 13 comments
Open

AssertionError in test_ransac_geometric #1668

ashkurti opened this issue Aug 28, 2015 · 13 comments
Labels
🔰 Good first issue 🔧 type: Maintenance Refactoring and maintenance of internals

Comments

@ashkurti
Copy link

Any idea on how to fix this:

======================================================================
FAIL: skimage.measure.tests.test_fit.test_ransac_geometric
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "skimage/measure/tests/test_fit.py", line 185, in test_ransac_geometric
    assert np.all(np.nonzero(inliers == False)[0] == outliers)
AssertionError

----------------------------------------------------------------------
@emmanuelle
Copy link
Member

I looked at it with @ashkurti and it seems that some additional outliers were detected, sounds like a real bug.

@emmanuelle
Copy link
Member

@ashkurti the test passes on my laptop. If you have the time, we should get together at some point and see what happens to the different points and what is the difference on your computer and on mine.

@ashkurti
Copy link
Author

Yes @emmanuelle lets check this together today, I will be around most of the day.

@ashkurti
Copy link
Author

@emmanuelle I just ran the tests again twice with the respective difference at test_ransac_geometric().

  1. The test failed - using model_est, inliers = ransac((src, dst), AffineTransform, 2, 20)
  2. The test passed - using model_est, inliers = ransac((src, dst), AffineTransform, 4, 20)

@ahojnnes
Copy link
Member

@ashkurti Thanks for tracking it down. This should be fixed in the test case, as an affine transform needs at least 3 samples. Nevertheless the RANSAC function shouldn't crash.

@emmanuelle
Copy link
Member

@ahojnnes the RANSAC function does not crash, it's just that the test fails. Then I guess the test should be modified to use 3 samples? I still don't understand why the test passes on my machine and not on the one of @ashkurti, but if the test does not make sense, let's change it.

@ahojnnes
Copy link
Member

Maybe due to a different PRNG? But it should be consistent across machines...

@emmanuelle
Copy link
Member

We took some time with @ashkurti to check that the same points were generated on her machine and on mine for src, and that the same indices are chosen in the for loop inside the RANSAC function, so I don't think we can blame the PRNG...

@ahojnnes
Copy link
Member

Different Numpy versions?

@emmanuelle
Copy link
Member

Maybe... what is your numpy version, @ashkurti ? I'm using 1.8.2 on Python 3.4

@ashkurti
Copy link
Author

@emmanuelle and @ahojnnes numpy 1.9.2 with python version 2.7.6.

@ahojnnes
Copy link
Member

There we go. Any chance for either of you to test the other one's Numpy version?

@soupault soupault added the 🔧 type: Maintenance Refactoring and maintenance of internals label Dec 12, 2015
@soupault soupault changed the title Failing test - AssertionError AssertionError in test_ransac_geometric Apr 24, 2016
@rfezzani
Copy link
Member

@ashkurti, can we close this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔰 Good first issue 🔧 type: Maintenance Refactoring and maintenance of internals
Projects
None yet
Development

No branches or pull requests

5 participants