-
-
Notifications
You must be signed in to change notification settings - Fork 381
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
antsSliceRegularizedRegistration: Larger OSX-Linux difference in recent build #976
Comments
What's the test-retest difference on each platform? It's possible that successive runs on the same platform are also more variable than they used to be. |
ah! Good catch. Indeed, successive testing yields different results. See below first row for Tx:
Which is not expected given that the samplingStrategy was set
|
Regular includes a random perturbation on the grid sampling |
Correct, but this has been the case for some time. More discussion here https://github.com/ANTsX/ANTs/wiki/antsRegistration-reproducibility-issues |
additional info: when setting |
I think the proper way to specify dense sampling is "None", rather than Regular,1.0 |
also, for reproducibility, one should set the ants seed and nthreads to 1. |
Thanks @stnava - I'm not sure if this program supports a fixed random seed, but if not it probably should. Single threading will also remove another source of precision loss, though in my experiments linked above, it was a much smaller delta than the random sampling variation. |
Yes, these env variables were already set properly.
That worked! Thanks a lot. I would suggest to add this option in the usage: |
I updated the usage (ea5a7f1). Wiki page for metric sampling strategies https://github.com/ANTsX/ANTs/wiki/antsRegistration-metric-sampling-strategies |
Closing for now, feel free to re-open if there's additional questions |
Upon upgrading our ANTS build we found that motion correction was no longer deterministic (#2642 (comment)). The ANTS maintainers suggested setting samplingStrategy=None (ANTsX/ANTs#976 (comment)) to get deterministic output, but they also warned that this will induce a variance-for-bias tradeoff: * https://github.com/ANTsX/ANTs/wiki/antsRegistration-reproducibility-issues * ANTsX/ANTsR#210 (comment) * Thévenaz, P., Bierlaire, M., & Unser, M. (2008). Halt on sampling for image registration based on mutual information. Sampling Theory in Signal and Image Processing, 7(2). <http://bigwww.epfl.ch/preprints/thevenaz0602p.pdf> Because we are hard-coding the sampling rate I removed it from ParamMoco entirely. If we want to support it properly we would have to pass .sampling_strategy and .sampling_percentage separately.
Upon upgrading our ANTS build we found that motion correction was no longer deterministic (#2642 (comment)). The ANTS maintainers suggested setting samplingStrategy=None (ANTsX/ANTs#976 (comment)) to get deterministic output, but they also warned that this will induce a variance-for-bias tradeoff: * https://github.com/ANTsX/ANTs/wiki/antsRegistration-reproducibility-issues * ANTsX/ANTsR#210 (comment) * Thévenaz, P., Bierlaire, M., & Unser, M. (2008). Halt on sampling for image registration based on mutual information. Sampling Theory in Signal and Image Processing, 7(2). <http://bigwww.epfl.ch/preprints/thevenaz0602p.pdf> Because we are hard-coding the sampling rate I removed it from ParamMoco entirely. If we want to support it properly we would have to pass .sampling_strategy and .sampling_percentage separately.
Upon upgrading our ANTS build we found that motion correction was no longer deterministic (#2642 (comment)). The ANTS maintainers suggested setting samplingStrategy=None (ANTsX/ANTs#976 (comment)) to get deterministic output, but they also warned that this will induce a variance-for-bias tradeoff: * https://github.com/ANTsX/ANTs/wiki/antsRegistration-reproducibility-issues * ANTsX/ANTsR#210 (comment) * Thévenaz, P., Bierlaire, M., & Unser, M. (2008). Halt on sampling for image registration based on mutual information. Sampling Theory in Signal and Image Processing, 7(2). <http://bigwww.epfl.ch/preprints/thevenaz0602p.pdf> Because we are hard-coding the sampling rate I removed it from ParamMoco entirely. If we want to support it properly we would have to pass .sampling_strategy and .sampling_percentage separately.
Upon upgrading our ANTS build we found that motion correction was no longer deterministic (#2642 (comment)). The ANTS maintainers suggested setting samplingStrategy=None (ANTsX/ANTs#976 (comment)) to get deterministic output, but they also warned that this will induce a variance-for-bias tradeoff: * https://github.com/ANTsX/ANTs/wiki/antsRegistration-reproducibility-issues * ANTsX/ANTsR#210 (comment) * Thévenaz, P., Bierlaire, M., & Unser, M. (2008). Halt on sampling for image registration based on mutual information. Sampling Theory in Signal and Image Processing, 7(2). <http://bigwww.epfl.ch/preprints/thevenaz0602p.pdf> Because we are hard-coding the sampling rate I removed it from ParamMoco entirely. If we want to support it properly we would have to pass .sampling_strategy and .sampling_percentage separately.
Upon upgrading our ANTS build we found that motion correction was no longer deterministic (#2642 (comment)). The ANTS maintainers suggested setting samplingStrategy=None (ANTsX/ANTs#976 (comment)) to get deterministic output, but they also warned that this will induce a variance-for-bias tradeoff: * https://github.com/ANTsX/ANTs/wiki/antsRegistration-reproducibility-issues * ANTsX/ANTsR#210 (comment) * Thévenaz, P., Bierlaire, M., & Unser, M. (2008). Halt on sampling for image registration based on mutual information. Sampling Theory in Signal and Image Processing, 7(2). <http://bigwww.epfl.ch/preprints/thevenaz0602p.pdf> Because we are hard-coding the sampling rate I removed it from ParamMoco entirely. If we want to support it properly we would have to pass .sampling_strategy and .sampling_percentage separately.
Upon upgrading our ANTS build we found that motion correction was no longer deterministic (#2642 (comment)). The ANTS maintainers suggested setting samplingStrategy=None (ANTsX/ANTs#976 (comment)) to get deterministic output, but they also warned that this will induce a variance-for-bias tradeoff: * https://github.com/ANTsX/ANTs/wiki/antsRegistration-reproducibility-issues * ANTsX/ANTsR#210 (comment) * Thévenaz, P., Bierlaire, M., & Unser, M. (2008). Halt on sampling for image registration based on mutual information. Sampling Theory in Signal and Image Processing, 7(2). <http://bigwww.epfl.ch/preprints/thevenaz0602p.pdf> Because we are hard-coding the sampling rate I removed it from ParamMoco entirely. If we want to support it properly we would have to pass .sampling_strategy and .sampling_percentage separately.
Upon upgrading our ANTS build we found that motion correction was no longer deterministic (#2642 (comment)). The ANTS maintainers suggested setting samplingStrategy=None (ANTsX/ANTs#976 (comment)) to get deterministic output, but they also warned that this will induce a variance-for-bias tradeoff: * https://github.com/ANTsX/ANTs/wiki/antsRegistration-reproducibility-issues * ANTsX/ANTsR#210 (comment) * Thévenaz, P., Bierlaire, M., & Unser, M. (2008). Halt on sampling for image registration based on mutual information. Sampling Theory in Signal and Image Processing, 7(2). <http://bigwww.epfl.ch/preprints/thevenaz0602p.pdf> Because we are hard-coding the sampling rate I removed it from ParamMoco entirely. If we want to support it properly we would have to pass .sampling_strategy and .sampling_percentage separately.
Upon upgrading our ANTS build we found that motion correction was no longer deterministic (#2642 (comment)). The ANTS maintainers suggested setting samplingStrategy=None (ANTsX/ANTs#976 (comment)) to get deterministic output, but they also warned that this will induce a variance-for-bias tradeoff: * https://github.com/ANTsX/ANTs/wiki/antsRegistration-reproducibility-issues * ANTsX/ANTsR#210 (comment) * Thévenaz, P., Bierlaire, M., & Unser, M. (2008). Halt on sampling for image registration based on mutual information. Sampling Theory in Signal and Image Processing, 7(2). <http://bigwww.epfl.ch/preprints/thevenaz0602p.pdf> I think ideally moco.py would thinly wrap antsRegistration, and expose both .sampling_strategy and .sampling_percentage directly, but until now we've always hardcoded 'samplingStrategy=Regular' so in the interest of not rocking the boat too much all I did was add a 'sampling=None' case, *and set it as the default* Updated version re feedback: #2642 (comment)
Upon upgrading our ANTS build we found that motion correction was no longer deterministic (#2642 (comment)). The ANTS maintainers suggested setting samplingStrategy=None (ANTsX/ANTs#976 (comment)) to get deterministic output, but they also warned that this will induce a variance-for-bias tradeoff: * https://github.com/ANTsX/ANTs/wiki/antsRegistration-reproducibility-issues * ANTsX/ANTsR#210 (comment) * Thévenaz, P., Bierlaire, M., & Unser, M. (2008). Halt on sampling for image registration based on mutual information. Sampling Theory in Signal and Image Processing, 7(2). <http://bigwww.epfl.ch/preprints/thevenaz0602p.pdf> Because we are hard-coding the sampling rate I removed it from ParamMoco entirely. If we want to support it properly we would have to pass .sampling_strategy and .sampling_percentage separately.
Upon upgrading our ANTS build we found that motion correction was no longer deterministic (#2642 (comment)). The ANTS maintainers suggested setting samplingStrategy=None (ANTsX/ANTs#976 (comment)) to get deterministic output, but they also warned that this will induce a variance-for-bias tradeoff: * https://github.com/ANTsX/ANTs/wiki/antsRegistration-reproducibility-issues * ANTsX/ANTsR#210 (comment) * Thévenaz, P., Bierlaire, M., & Unser, M. (2008). Halt on sampling for image registration based on mutual information. Sampling Theory in Signal and Image Processing, 7(2). <http://bigwww.epfl.ch/preprints/thevenaz0602p.pdf> I think ideally moco.py would thinly wrap antsRegistration, and expose both .sampling_strategy and .sampling_percentage directly, but until now we've always hardcoded 'samplingStrategy=Regular' so in the interest of not rocking the boat too much all I did was add a 'sampling=None' case, *and set it as the default* Updated version re feedback: #2642 (comment)
Hi, while investigating an issue related to slow processing time on some systems, I recently re-built ANTs binaries on Ubuntu 16.04 and OSX. Good news is: processing time is much faster with the recent built on Ubuntu 16.04:
ANTs Version: 2.3.1.dev145-g7ed2b
ANTs Version: 2.1.0.post359-g3df42
However, there is a much larger difference in results between OSX and Linux for the more recent version. Version
2.1.0.post359-g3df42
shows a difference at the 10^-14 decimal while version2.3.1.dev145-g7ed2b
shows a difference at the 10^-2 decimal. See example for the first three lines of the Tx params:ANTs Version: 2.3.1.dev145-g7ed2b
ANTs Version: 2.1.0.post359-g3df42
Data + Full Results here:
antsSliceRegularizedRegistration.zip
I was wondering if this is a known behaviour and if you have some clues about what could have introduced such larger discrepancies in the more recent build.
Thanks for your insights!
The text was updated successfully, but these errors were encountered: