{"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/topology-aware-uncertainty-for-image-1","title":"Topology-Aware Uncertainty for Image Segmentation","arxiv_id":"2306.05671","date":"2023-06-09","proceeding":"NeurIPS 2023 11","authors":["Saumya Gupta","Yikai Zhang","Xiaoling Hu","Prateek Prasanna","Chao Chen"],"abstract":"Segmentation of curvilinear structures such as vasculature and road networks is challenging due to relatively weak signals and complex geometry/topology. To facilitate and accelerate large scale annotation, one has to adopt semi-automatic approaches such as proofreading by experts. In this work, we focus on uncertainty estimation for such tasks, so that highly uncertain, and thus error-prone structures can be identified for human annotators to verify. Unlike most existing works, which provide pixel-wise uncertainty maps, we stipulate it is crucial to estimate uncertainty in the units of topological structures, e.g., small pieces of connections and branches. To achieve this, we leverage tools from topological data analysis, specifically discrete Morse theory (DMT), to first capture the structures, and then reason about their uncertainties. To model the uncertainty, we (1) propose a joint prediction model that estimates the uncertainty of a structure while taking the neighboring structures into consideration (inter-structural uncertainty); (2) propose a novel Probabilistic DMT to model the inherent uncertainty within each structure (intra-structural uncertainty) by sampling its representations via a perturb-and-walk scheme. On various 2D and 3D datasets, our method produces better structure-wise uncertainty maps compared to existing works. Code available at https://github.com/Saumya-Gupta-26/struct-uncertainty","url_abs":"https://arxiv.org/abs/2306.05671v3","url_pdf":"https://arxiv.org/pdf/2306.05671v3.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":"topology-aware-uncertainty-for-image-1","repo_url":"https://github.com/Saumya-Gupta-26/struct-uncertainty","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"image-segmentation","task_name":"Image Segmentation"},{"task_slug":"segmentation","task_name":"Segmentation"},{"task_slug":"semantic-segmentation","task_name":"Semantic Segmentation"},{"task_slug":"topological-data-analysis","task_name":"Topological Data Analysis"}],"methods":[{"method_slug":"focus","method_name":"Focus"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2306.05671","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2306.05671"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+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":"deterministic:regex_extraction","url":"https://github.com/Saumya-Gupta-26/struct-uncertainty","reach":null},{"provenance":"deterministic:regex_extraction","url":"https://github.com/johschmidt42/PyTorch-2D-3D-UNet-Tutorial","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/gigantenbein/UNet-Zoo","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/HuXiaoling/Structural_Uncertainty","reach":null},{"provenance":"deterministic:regex_extraction","url":"https://github.com/dhavalshah18/deepvesselnet","reach":{"status":"gone","observed_at":"2026-09-17","how":"tree_404+repo_404"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/iMED-Lab/CS-Net","reach":null}],"summary":{"ran":9,"ran_fixture":1,"ran_draft_wrong":3,"unverified":14},"by_repo_kind":{"official":{"samples":2,"ran":1,"repositories":1},"found_in_text":{"samples":25,"ran":12,"repositories":4}},"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":7,"samples":[{"code_sha256_prefix":"605dbaeb7a17d95a","entry":"AffinityAttention","repo":"iMED-Lab/CS-Net","repo_kind":"found_in_text","path":"model/csnet.py","file_url":"https://github.com/iMED-Lab/CS-Net/blob/HEAD/model/csnet.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"605dbaeb7a17d95a"}},{"code_sha256_prefix":"c163bba7de076605","entry":"AxisAlignedConvGaussian","repo":"HuXiaoling/Structural_Uncertainty","repo_kind":"found_in_text","path":"probabilistic_unet.py","file_url":"https://github.com/HuXiaoling/Structural_Uncertainty/blob/HEAD/probabilistic_unet.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c163bba7de076605"}},{"code_sha256_prefix":"efdf1f54291e5b38","entry":"CSNet","repo":"iMED-Lab/CS-Net","repo_kind":"found_in_text","path":"model/csnet.py","file_url":"https://github.com/iMED-Lab/CS-Net/blob/HEAD/model/csnet.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"efdf1f54291e5b38"}},{"code_sha256_prefix":"5b2a9f8699891fa8","entry":"ChannelAttentionBlock","repo":"iMED-Lab/CS-Net","repo_kind":"found_in_text","path":"model/csnet.py","file_url":"https://github.com/iMED-Lab/CS-Net/blob/HEAD/model/csnet.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"5b2a9f8699891fa8"}},{"code_sha256_prefix":"b5b8a23ced0e8669","entry":"Decoder","repo":"iMED-Lab/CS-Net","repo_kind":"found_in_text","path":"model/csnet.py","file_url":"https://github.com/iMED-Lab/CS-Net/blob/HEAD/model/csnet.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b5b8a23ced0e8669"}},{"code_sha256_prefix":"0326380a477a365f","entry":"Encoder","repo":"HuXiaoling/Structural_Uncertainty","repo_kind":"found_in_text","path":"probabilistic_unet.py","file_url":"https://github.com/HuXiaoling/Structural_Uncertainty/blob/HEAD/probabilistic_unet.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"0326380a477a365f"}},{"code_sha256_prefix":"ea12770312446fcc","entry":"ResEncoder","repo":"iMED-Lab/CS-Net","repo_kind":"found_in_text","path":"model/csnet.py","file_url":"https://github.com/iMED-Lab/CS-Net/blob/HEAD/model/csnet.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ea12770312446fcc"}},{"code_sha256_prefix":"c96bc45ac6dfcbdf","entry":"SpatialAttentionBlock","repo":"iMED-Lab/CS-Net","repo_kind":"found_in_text","path":"model/csnet.py","file_url":"https://github.com/iMED-Lab/CS-Net/blob/HEAD/model/csnet.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c96bc45ac6dfcbdf"}},{"code_sha256_prefix":"b128f04e610e22c8","entry":"autocrop","repo":"johschmidt42/PyTorch-2D-3D-UNet-Tutorial","repo_kind":"found_in_text","path":"unet.py","file_url":"https://github.com/johschmidt42/PyTorch-2D-3D-UNet-Tutorial/blob/HEAD/unet.py","link_basis":"plan_row","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b128f04e610e22c8"}},{"code_sha256_prefix":"b528298ef3ced2c0","entry":"deconv","repo":"iMED-Lab/CS-Net","repo_kind":"found_in_text","path":"model/csnet.py","file_url":"https://github.com/iMED-Lab/CS-Net/blob/HEAD/model/csnet.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b528298ef3ced2c0"}},{"code_sha256_prefix":"a7606e101556581b","entry":"downsample","repo":"iMED-Lab/CS-Net","repo_kind":"found_in_text","path":"model/csnet.py","file_url":"https://github.com/iMED-Lab/CS-Net/blob/HEAD/model/csnet.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a7606e101556581b"}},{"code_sha256_prefix":"53bab7232f605d02","entry":"get_conv_layer","repo":"johschmidt42/PyTorch-2D-3D-UNet-Tutorial","repo_kind":"found_in_text","path":"unet.py","file_url":"https://github.com/johschmidt42/PyTorch-2D-3D-UNet-Tutorial/blob/HEAD/unet.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"53bab7232f605d02"}},{"code_sha256_prefix":"d30fa705b8e23cb4","entry":"parse_func","repo":"saumya-gupta-26/struct-uncertainty","repo_kind":"official","path":"infer.py","file_url":"https://github.com/saumya-gupta-26/struct-uncertainty/blob/HEAD/infer.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d30fa705b8e23cb4"}},{"code_sha256_prefix":"e63919c931ba1e99","entry":"DMT","repo":"Saumya-Gupta-26/struct-uncertainty","repo_kind":"official","path":"dmt_2d.py","file_url":"https://github.com/Saumya-Gupta-26/struct-uncertainty/blob/HEAD/dmt_2d.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e63919c931ba1e99"}},{"code_sha256_prefix":"260ed13140183edd","entry":"ProbabilisticUnet","repo":"HuXiaoling/Structural_Uncertainty","repo_kind":"found_in_text","path":"probabilistic_unet.py","file_url":"https://github.com/HuXiaoling/Structural_Uncertainty/blob/HEAD/probabilistic_unet.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"260ed13140183edd"}},{"code_sha256_prefix":"477da3a4420e7316","entry":"UNet","repo":"HuXiaoling/Structural_Uncertainty","repo_kind":"found_in_text","path":"probabilistic_unet.py","file_url":"https://github.com/HuXiaoling/Structural_Uncertainty/blob/HEAD/probabilistic_unet.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"477da3a4420e7316"}},{"code_sha256_prefix":"c78cf3e9f814160b","entry":"conv_layer","repo":"johschmidt42/PyTorch-2D-3D-UNet-Tutorial","repo_kind":"found_in_text","path":"unet.py","file_url":"https://github.com/johschmidt42/PyTorch-2D-3D-UNet-Tutorial/blob/HEAD/unet.py","link_basis":"plan_row","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c78cf3e9f814160b"}},{"code_sha256_prefix":"7f1458886e91abd9","entry":"create_dense_target","repo":"johschmidt42/PyTorch-2D-3D-UNet-Tutorial","repo_kind":"found_in_text","path":"transformations.py","file_url":"https://github.com/johschmidt42/PyTorch-2D-3D-UNet-Tutorial/blob/HEAD/transformations.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7f1458886e91abd9"}},{"code_sha256_prefix":"291fdb8dff7cf15e","entry":"dice_loss","repo":"johschmidt42/PyTorch-2D-3D-UNet-Tutorial","repo_kind":"found_in_text","path":"losses.py","file_url":"https://github.com/johschmidt42/PyTorch-2D-3D-UNet-Tutorial/blob/HEAD/losses.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"291fdb8dff7cf15e"}},{"code_sha256_prefix":"497d8b92031530bc","entry":"increase_resolution","repo":"gigantenbein/UNet-Zoo","repo_kind":"found_in_text","path":"models/phiseg3D.py","file_url":"https://github.com/gigantenbein/UNet-Zoo/blob/HEAD/models/phiseg3D.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"497d8b92031530bc"}},{"code_sha256_prefix":"f0e750b2fb39dd62","entry":"init_weights","repo":"HuXiaoling/Structural_Uncertainty","repo_kind":"found_in_text","path":"probabilistic_unet.py","file_url":"https://github.com/HuXiaoling/Structural_Uncertainty/blob/HEAD/probabilistic_unet.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f0e750b2fb39dd62"}},{"code_sha256_prefix":"fe857ca50126df0e","entry":"initialize_weights","repo":"iMED-Lab/CS-Net","repo_kind":"found_in_text","path":"model/csnet.py","file_url":"https://github.com/iMED-Lab/CS-Net/blob/HEAD/model/csnet.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"fe857ca50126df0e"}},{"code_sha256_prefix":"4463af1a7a2f90d4","entry":"load_data_into_loader","repo":"gigantenbein/UNet-Zoo","repo_kind":"found_in_text","path":"load_LIDC_data.py","file_url":"https://github.com/gigantenbein/UNet-Zoo/blob/HEAD/load_LIDC_data.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"4463af1a7a2f90d4"}},{"code_sha256_prefix":"ab7d4eaddf5ca7e9","entry":"normalize","repo":"johschmidt42/PyTorch-2D-3D-UNet-Tutorial","repo_kind":"found_in_text","path":"transformations.py","file_url":"https://github.com/johschmidt42/PyTorch-2D-3D-UNet-Tutorial/blob/HEAD/transformations.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ab7d4eaddf5ca7e9"}},{"code_sha256_prefix":"a207a2db9756ef69","entry":"normalize_01","repo":"johschmidt42/PyTorch-2D-3D-UNet-Tutorial","repo_kind":"found_in_text","path":"transformations.py","file_url":"https://github.com/johschmidt42/PyTorch-2D-3D-UNet-Tutorial/blob/HEAD/transformations.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a207a2db9756ef69"}},{"code_sha256_prefix":"66aa286caeb3283b","entry":"plot_training","repo":"johschmidt42/PyTorch-2D-3D-UNet-Tutorial","repo_kind":"found_in_text","path":"visual.py","file_url":"https://github.com/johschmidt42/PyTorch-2D-3D-UNet-Tutorial/blob/HEAD/visual.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"66aa286caeb3283b"}},{"code_sha256_prefix":"02c8d4823f0bd036","entry":"predict","repo":"johschmidt42/PyTorch-2D-3D-UNet-Tutorial","repo_kind":"found_in_text","path":"inference.py","file_url":"https://github.com/johschmidt42/PyTorch-2D-3D-UNet-Tutorial/blob/HEAD/inference.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"02c8d4823f0bd036"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}