MONAI icon indicating copy to clipboard operation
MONAI copied to clipboard

feature request : please add cldice loss

Open dirtycomputer opened this issue 2 years ago • 6 comments

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.

dirtycomputer avatar Feb 04 '23 07:02 dirtycomputer

@wyli, can I work on implementing this?

yashika-git avatar Feb 10 '23 12:02 yashika-git

sure, I'm assigning this to you, thanks!

wyli avatar Feb 10 '23 12:02 wyli

Any update?

dirtycomputer avatar Jun 15 '23 03:06 dirtycomputer

@wyli

dirtycomputer avatar Jun 22 '23 17:06 dirtycomputer

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)

wyli avatar Jun 23 '23 08:06 wyli

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?

jocpae avatar Nov 03 '23 13:11 jocpae

thanks for confirming @jocpae, the module is available in monai 1.3.0 -- pip install monai==1.3.0.

wyli avatar Nov 03 '23 13:11 wyli

Great, thank you! I do not find it in the docs https://docs.monai.io/en/stable/losses.html yet. Should we prepare something?

jocpae avatar Nov 03 '23 13:11 jocpae

Thanks for letting me know this great news.

zma-rapidai avatar Nov 04 '23 00:11 zma-rapidai

We would also like to add clDice as a metric to Monai we would do a PR soon?

jocpae avatar Jun 11 '24 14:06 jocpae

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

KumoLiu avatar Jun 25 '24 20:06 KumoLiu