{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/cldice-a-topology-preserving-loss-function","title":"clDice -- A Novel Topology-Preserving Loss Function for Tubular Structure Segmentation","arxiv_id":"2003.07311","date":"2020-03-16","proceeding":null,"authors":["Suprosanna Shit","Johannes C. Paetzold","Anjany Sekuboyina","Ivan Ezhov","Alexander Unger","Andrey Zhylka","Josien P. W. Pluim","Ulrich Bauer","Bjoern H. Menze"],"abstract":"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.","url_abs":"https://arxiv.org/abs/2003.07311v7","url_pdf":"https://arxiv.org/pdf/2003.07311v7.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"cldice-a-topology-preserving-loss-function","repo_url":"https://github.com/jocpae/clDice","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"cldice-a-topology-preserving-loss-function","repo_url":"https://github.com/alexanderhberger/multiclass-bettimatching","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"jax","reach":null},{"paper_slug":"cldice-a-topology-preserving-loss-function","repo_url":"https://github.com/jacobkoenig/clDice-Loss","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok"}},{"paper_slug":"cldice-a-topology-preserving-loss-function","repo_url":"https://github.com/nstucki/betti-matching","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"graph-similarity","task_name":"Graph Similarity"},{"task_slug":"segmentation","task_name":"Segmentation"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2003.07311","atlas_url":"https://app.syntology.ai/?focus=2003.07311","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2003.07311"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/nstucki/betti-matching","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/jacobkoenig/clDice-Loss","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/alexanderhberger/multiclass-bettimatching","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/jocpae/clDice","reach":null}],"summary":{"ran_honours":2,"ran_draft_wrong":1,"ran_violates":1},"by_repo_kind":{"official":{"samples":1,"ran":1,"repositories":1},"listed":{"samples":2,"ran":2,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":1,"samples":[{"code_sha256_prefix":"79bbfecce449d692","entry":"Accuracy","repo":"nstucki/betti-matching","repo_kind":"listed","path":"evaluation.py","file_url":"https://github.com/nstucki/betti-matching/blob/HEAD/evaluation.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"79bbfecce449d692"}},{"code_sha256_prefix":"d812fbfe27c70d83","entry":"Dice","repo":"nstucki/betti-matching","repo_kind":"listed","path":"evaluation.py","file_url":"https://github.com/nstucki/betti-matching/blob/HEAD/evaluation.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d812fbfe27c70d83"}},{"code_sha256_prefix":"e0d29c40d7192e52","entry":"dict2obj","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"e0d29c40d7192e52"}},{"code_sha256_prefix":"2e3b8c0de5fb1fa2","entry":"soft_dice","repo":"jocpae/clDice","repo_kind":"official","path":"cldice_loss/pytorch/cldice.py","file_url":"https://github.com/jocpae/clDice/blob/HEAD/cldice_loss/pytorch/cldice.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2e3b8c0de5fb1fa2"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}