-
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
Initial commit -- Adding calibration loss specific to segmentation #7819
Conversation
for more information, see https://pre-commit.ci
Fix the order of loss function in import statement
Fixed the formatting and minor issues.
Reorder import statements
Reorder system imports.
isort inferred one
Updated class name according to standard
Fixed the inline comment
Add datatype in functions and classes
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 for the contribution! I had a few comments, and the CICD errors are easy fixes I think. The test fail is from accuracy it seems which can be fixed by changing the error.
Co-authored-by: Eric Kerfoot <[email protected]> Signed-off-by: Balamurali <[email protected]>
Co-authored-by: Eric Kerfoot <[email protected]> Signed-off-by: Balamurali <[email protected]>
for more information, see https://pre-commit.ci
Add model description.
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
Fixed the initialization issues with return types
for more information, see https://pre-commit.ci
Use Any instead of tensor
Import typing
Fix return type formatting
DCO Remediation Commit for bala93 <[email protected]> I, Balamurali <[email protected]>, hereby add my Signed-off-by to this commit: c4f8283 I, bala93 <[email protected]>, hereby add my Signed-off-by to this commit: 8fbec82 I, bala93 <[email protected]>, hereby add my Signed-off-by to this commit: 7c121a0 I, bala93 <[email protected]>, hereby add my Signed-off-by to this commit: dccde47 Signed-off-by: bala93 <[email protected]>
DCO Remediation Commit for bala93 <[email protected]> I, bala93 <[email protected]>, hereby add my Signed-off-by to this commit: 8fbec82 I, bala93 <[email protected]>, hereby add my Signed-off-by to this commit: 7c121a0 I, bala93 <[email protected]>, hereby add my Signed-off-by to this commit: dccde47 Signed-off-by: bala93 <[email protected]>
DCO Remediation Commit for Balamurali <[email protected]> I, Balamurali <[email protected]>, hereby add my Signed-off-by to this commit: bc6b995 Signed-off-by: Balamurali <[email protected]>
DCO Remediation Commit for Balamurali <[email protected]> I, Balamurali <[email protected]>, hereby add my Signed-off-by to this commit: bc6b995 Signed-off-by: Balamurali <[email protected]>
Signed-off-by: Balamurali <[email protected]>
I, bala93 <[email protected]>, hereby add my Signed-off-by to this commit: 3a00aec Signed-off-by: bala93 <[email protected]>
for more information, see https://pre-commit.ci
Hi @ericspod, Thanks for your feedback. I have addressed all the issues. I will work on using the monai functions (for the gaussian, and mean) in some time. Until then, is it possible to merge it with the dev branch and make the loss function available ? Thank you. |
Co-authored-by: YunLiu <[email protected]> Signed-off-by: Balamurali <[email protected]>
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 for the contribution! Overall looks good to me. Several minor inline comments.
* Modify the code with MeanFilter, and GaussianFilter of MONAI layers * Add Doc string explaining the mask preparation Signed-off-by: Balamurali <[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.
Thanks for the quick update, few further comments inline.
Co-authored-by: YunLiu <[email protected]> Signed-off-by: Balamurali <[email protected]>
Co-authored-by: YunLiu <[email protected]> Signed-off-by: Balamurali <[email protected]>
Looks good now to me with the last minor comments addressed. |
Signed-off-by: Balamurali <[email protected]>
Signed-off-by: Balamurali <[email protected]>
Signed-off-by: Balamurali <[email protected]>
…nto model-calibration
DCO Remediation Commit for Balamurali <[email protected]> I, Balamurali <[email protected]>, hereby add my Signed-off-by to this commit: 7deb2cc Signed-off-by: Balamurali <[email protected]>
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 for the quick update, looks good to me now. Will trigger more tests and try to merge this one.
/build |
Description
Model calibration has helped in developing reliable deep learning models. In this pull request, I have added a new loss function NACL (https://arxiv.org/abs/2303.06268, https://arxiv.org/abs/2401.14487) which has shown promising results for both discriminative and calibration in segmentation.
Future Plans: Currently, MONAI has some of the alternative loss functions (Label Smoothing, and Focal Loss), but it doesn't have the calibration specific loss functions (https://arxiv.org/abs/2111.15430, https://arxiv.org/abs/2209.09641). Besides, these methods are better evaluated with calibration metrics, Expected Calibration Error (https://lightning.ai/docs/torchmetrics/stable/classification/calibration_error.html).
Types of changes
./runtests.sh -f -u --net --coverage
../runtests.sh --quick --unittests --disttests
.make html
command in thedocs/
folder.