-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
fix implementation mistakes and add conjugate gradients solver #7876
Conversation
7b6f37f
to
6cc85f5
Compare
now these two fixes are made, when the algorithm is run using a deterministic matrix solver, it is exactly equal to the official implementation Signed-off-by: MrGranddy <[email protected]>
This reverts commit 9b68188. Signed-off-by: MrGranddy <[email protected]>
now these two fixes are made, when the algorithm is run using a deterministic matrix solver, it is exactly equal to the official implementation Signed-off-by: MrGranddy <[email protected]>
Signed-off-by: MrGranddy <[email protected]>
Signed-off-by: MrGranddy <[email protected]>
Signed-off-by: MrGranddy <[email protected]>
Signed-off-by: MrGranddy <[email protected]>
Signed-off-by: MrGranddy <[email protected]>
for more information, see https://pre-commit.ci
Signed-off-by: MrGranddy <[email protected]>
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please also take a look at the CI error: https://github.com/Project-MONAI/MONAI/actions/runs/9655433015/job/26631317948?pr=7876#step:13:19809? |
Co-authored-by: Eric Kerfoot <[email protected]> Signed-off-by: Vahit Buğra YEŞİLKAYNAK <[email protected]>
Co-authored-by: YunLiu <[email protected]> Signed-off-by: Vahit Buğra YEŞİLKAYNAK <[email protected]>
Co-authored-by: YunLiu <[email protected]> Signed-off-by: Vahit Buğra YEŞİLKAYNAK <[email protected]>
Signed-off-by: MrGranddy <[email protected]>
mention 'cg_tol' and 'cg_maxiter' will only be used when 'use_cg' is set to 'True' Signed-off-by: MrGranddy <[email protected]>
using 'tol' is deprecated and in the future this will need to be changed to rtol again, yet for now 'rtol' is not supported bny some scipy versions Signed-off-by: MrGranddy <[email protected]>
Signed-off-by: MrGranddy <[email protected]>
The current twine issue appears related to a new version of a dependent package: pypa/twine#977 (comment) We could add a value in one of our config files to include the missing key or fix the version of |
twine==5.1.0 has been yanked: https://pypi.org/project/twine/#history. |
Hi @ericspod, do you have any more comments on this one? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good now.
/build |
Fixes #6767
Description
Fixed two minor implementation differences between the official MATLAB code and the MONAI implementation, to confirm also added a new test case where two images and their confidence maps calculated by the official code is added to tests and the MONAI implementation results are checked against there results created by the official code.
Also fixing the issue: added the conjugate gradients solver option. Now the users can utilize it to run the algorithm faster with a trade-off of accuracy of the end result, a range of speed-ups can be achieved with little to no quality loss by tweaking the parameters, the optimal parameters between quality and speed in my experience is set as the default parameters, namely 'cg_tol' and 'cg_maxiter'.
For the CG solver installing PyAMG (https://github.com/pyamg/pyamg) is a requirement, this is because we use it to generate a preconditioner, without it CG does not provide any speed-ups, even slows down the algorithm. This part can be changed if the requirement is not ideal, yet this was the best solution as far as my knowledge goes.
Types of changes
./runtests.sh -f -u --net --coverage
../runtests.sh --quick --unittests --disttests
.make html
command in thedocs/
folder.