-
Notifications
You must be signed in to change notification settings - Fork 984
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
Add Hausdorff loss #6994
Merged
Merged
Add Hausdorff loss #6994
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Integrating an existing implementation publicly available on GitHub by Patryk Rygiel into the MONAI framework. Signed-off-by: Imad Toubal <imad.toubal@gmail.com>
wyli
reviewed
Sep 18, 2023
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.
thanks!
Signed-off-by: Imad Toubal <imad.toubal@gmail.com>
Add a `skipUnless` decorator to skip the monai.utils.module.OptionalImportError: `from scipy.ndimage.morphology import distance_transform_edt` Signed-off-by: Imad Toubal <imad.toubal@gmail.com>
Signed-off-by: Imad Toubal <imad.toubal@gmail.com>
Signed-off-by: Imad Toubal <imad.toubal@gmail.com>
Signed-off-by: Imad Toubal <imad.toubal@gmail.com>
Signed-off-by: Imad Toubal <imad.toubal@gmail.com>
KumoLiu
reviewed
Sep 19, 2023
Co-authored-by: YunLiu <55491388+KumoLiu@users.noreply.github.com> Signed-off-by: Wenqi Li <831580+wyli@users.noreply.github.com>
/build |
wyli
approved these changes
Sep 19, 2023
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.
Thanks, it looks good to me, merging if all tests work fine.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Integrating an existing implementation publicly available on GitHub by Patryk Rygiel into the MONAI framework.
Fixes #6993.
Fixes #3481
Fixes #1039
Description
Hausdorff distance is widely used in evaluating medical image segmentation methods. Adding an objective/loss function directly to optimize this distance can be instrumental in optimizing this score [1].
An existing implementation is publicly available on GitHub by Patryk Rygiel, although it might take some engineering work to integrate within the MONAI framework.
I was able to train a 3D segmentation model successfully using MONAI's SwinUNETR with this implementation and I would like to contribute the code for this loss so that it's more widely available and easier to integrate with MONAI-based repositories.
References:
[1] Karimi, D., & Salcudean, S. E. (2019). Reducing the Hausdorff distance in medical image segmentation with convolutional neural networks. IEEE Transactions on medical imaging, 39(2), 499-513.
Types of changes
./runtests.sh -f -u --net --coverage
../runtests.sh --quick --unittests --disttests
.make html
command in thedocs/
folder.