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

Registration is not deterministic #378

Open
rueberger opened this issue Jun 9, 2022 · 3 comments
Open

Registration is not deterministic #378

rueberger opened this issue Jun 9, 2022 · 3 comments

Comments

@rueberger
Copy link
Contributor

antspy 0.3.3, the latest as of time writing installed via PyPI

Screen Shot 2022-06-09 at 12 09 16 PM

cc #86

@gdevenyi
Copy link

gdevenyi commented Jun 9, 2022

@stnava
Copy link
Member

stnava commented Jun 9, 2022

there are other issues here - affine gradient step and other things impact this. anyway, the Mattes metric ( by definition probabilistic ) is the culprit. if you use mean squares or GC ( correlation ) then this goes away. also see the help(ants.registration) which shows *repro option which are the simplified reproducible interfaces that still maintain speed from multi-threading.

@rueberger
Copy link
Contributor Author

I see. I was able to achieve reproducibility by setting ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS=1.

I think that registration should throw a warning if random_seed is not None but ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS is not set to 1.

The only reason someone would ever set the random seed is because they want reproducible behavior

rueberger added a commit to ClandininLab/ANTsPy that referenced this issue Jun 29, 2022
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

3 participants