MONAI icon indicating copy to clipboard operation
MONAI copied to clipboard

Added focal_loss_with_probs and full activation selection in Dice+FL.

Open j-morano opened this issue 7 months ago • 0 comments

Fixes #8242

Description

Added option to compute Focal Loss (FL) directly from class probabilities instead of logits. Added parameters to the different loss classes combining Dice and FL to allow choosing the activation function (if any) for FL. Added corresponding tests passing with pytest tests/losses/ -v.

Types of changes

  • [ ] Non-breaking change (fix or new feature that would not break existing functionality).
  • [x] Breaking change (fix or new feature that would cause existing functionality to change).
  • [x] New tests added to cover the changes.
  • [ ] Integration tests passed locally by running ./runtests.sh -f -u --net --coverage.
  • [ ] Quick tests passed locally by running ./runtests.sh --quick --unittests --disttests.
  • [x] In-line docstrings updated.
  • [ ] Documentation updated, tested make html command in the docs/ folder.

j-morano avatar Jun 20 '25 15:06 j-morano