feature request : please add cldice loss
Is your feature request related to a problem? Please describe. clDice - a Novel Topology-Preserving Loss Function for Tubular Structure Segmentation The abstract of this paper:⬇️
Accurate segmentation of tubular, network-like structures, such as vessels, neurons, or roads, is relevant to many fields of research. For such structures, the topology is their most important characteristic; particularly preserving connectedness: in the case of vascular networks, missing a connected vessel entirely alters the blood-flow dynamics. We introduce a novel similarity measure termed centerlineDice (short clDice), which is calculated on the intersection of the segmentation masks and their (morphological) skeleta. We theoretically prove that clDice guarantees topology preservation up to homotopy equivalence for binary 2D and 3D segmentation. Extending this, we propose a computationally efficient, differentiable loss function (soft-clDice) for training arbitrary neural segmentation networks. We benchmark the soft-clDice loss on five public datasets, including vessels, roads and neurons (2D and 3D). Training on soft-clDice leads to segmentation with more accurate connectivity information, higher graph similarity, and better volumetric scores.
Describe the solution you'd like Official code repo Please integrate the code in Monai project, that will help lots of researchers who working on vessels, neurons, tree or tabular structure. This official code repo has already implemented 2D and 3D version clDice loss, it will be easy to merge to current MONAI project. Thank you.
@wyli, can I work on implementing this?
sure, I'm assigning this to you, thanks!
Any update?
@wyli
no visible progress at the moment, unassigning this ticket...
I saw a PR https://github.com/Project-MONAI/MONAI/pull/6632 by @zilima but was closed now (would you still be interested in contributing? @zilima)
Hi, first author of clDice here. Thank you for bringing clDice to Monai. We checked the implementation and it is correct. What are the steps to make it part of the main release?
thanks for confirming @jocpae, the module is available in monai 1.3.0 -- pip install monai==1.3.0.
Great, thank you! I do not find it in the docs https://docs.monai.io/en/stable/losses.html yet. Should we prepare something?
Thanks for letting me know this great news.
We would also like to add clDice as a metric to Monai we would do a PR soon?
We would also like to add clDice as a metric to Monai we would do a PR soon?
Hi @jocpae, we have a LossMetric which is a wrapper to make loss_fn available as a cumulative metric. Would that be helpful?
https://github.com/Project-MONAI/MONAI/blob/e801540166655fb602df8f749089db2a4cabc0de/monai/metrics/loss_metric.py#L26