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

unstable results while running serveral times #4

Open
fuzzypants123 opened this issue Nov 6, 2020 · 2 comments
Open

unstable results while running serveral times #4

fuzzypants123 opened this issue Nov 6, 2020 · 2 comments

Comments

@fuzzypants123
Copy link

Hi , I used pydensac and get prefer results instead of cv2.ransac most of times, thanks for the excellent work!
But I got a trouble and found that give the same input, it would produce unstable results, and some of them even worse than cv2.ransac. Besides, It will keep the same results for about ten times, but when I try dozens of times, the results will be inconsistent. I understand that the algorithm is somewhat random, but is there any way to reduce this randomness as much as possible?

@ducha-aiki
Copy link
Owner

Hi,

You can solve that by fixing the random seed in all places here:
https://github.com/ducha-aiki/pydegensac/search?q=seed

E.g. seed = rand(); -> seed = rand(0);

Unfortunately, that requires recompilation of the C part of the library. I don't have time now to recompile and check all the python wheelsm but might do it later (created #5 for not forgetting).
However, don't expect it to be done this month.

Best, Dmytro

@fuzzypants123
Copy link
Author

hi thanks for the reply! I tried but got an error like this
image
seems rand() doesn't accpet any arguments.
I guess seed = rand() should generates a different value every time? so I tried seed=time(NULL). Seem it gets worse results, and didn't solve my problem:(.
Am I doing right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants