{
  "id": 667135,
  "title": "Diffeomorphic Suface Fitting",
  "url": "/competitions/vesuvius-challenge-surface-detection/discussion/667135",
  "author_name": "",
  "post_date": "2026-01-11T08:15:09.642731200Z",
  "votes": 10,
  "comment_count": 6,
  "views": 0,
  "content": "<p><a href=\"https://www.kaggle.com/tom99763\" target=\"_blank\">@tom99763</a> \nThis is close to tom idea.</p>\n<p>Currently, pytorch is used for warp optimization only. No neural net is used in fitting …\nThe trick is NOT to apply the paper method to ALL of input vloume (input image, encoder/decoder feature, or predicted probability). Instead, use dilation to MASK OUT the background signal.</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F209cfbbb5513825be809c3783e4caae1%2FSelection_2254.png?generation=1768119111019012&amp;alt=media\" alt=\"\"></p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Ff1b640696dc6c657545559d1bd78d01a%2FSelection_2255.png?generation=1768119153217320&amp;alt=media\" alt=\"\"></p>\n<p>Code coming soon!!!\nplaceholder code: <a href=\"https://www.kaggle.com/code/hengck23/placeholder-diffeomorphic-suface-fitting\" target=\"_blank\">https://www.kaggle.com/code/hengck23/placeholder-diffeomorphic-suface-fitting</a>\n(but it is faster if you ask gemini or chatgpt to code)</p>",
  "messages": [
    {
      "id": "3389465",
      "postDate": "01/11/2026 08:15:09",
      "content": "<p><a href=\"https://www.kaggle.com/tom99763\" target=\"_blank\">@tom99763</a> \nThis is close to tom idea.</p>\n<p>Currently, pytorch is used for warp optimization only. No neural net is used in fitting …\nThe trick is NOT to apply the paper method to ALL of input vloume (input image, encoder/decoder feature, or predicted probability). Instead, use dilation to MASK OUT the background signal.</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F209cfbbb5513825be809c3783e4caae1%2FSelection_2254.png?generation=1768119111019012&amp;alt=media\" alt=\"\"></p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Ff1b640696dc6c657545559d1bd78d01a%2FSelection_2255.png?generation=1768119153217320&amp;alt=media\" alt=\"\"></p>\n<p>Code coming soon!!!\nplaceholder code: <a href=\"https://www.kaggle.com/code/hengck23/placeholder-diffeomorphic-suface-fitting\" target=\"_blank\">https://www.kaggle.com/code/hengck23/placeholder-diffeomorphic-suface-fitting</a>\n(but it is faster if you ask gemini or chatgpt to code)</p>",
      "rawMarkdown": "tom99763 \nThis is close to tom idea.\n\nCurrently, pytorch is used for warp optimization only. No neural net is used in fitting ...\nThe trick is NOT to apply the paper method to ALL of input vloume (input image, encoder/decoder feature, or predicted probability). Instead, use dilation to MASK OUT the background signal.\n\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F209cfbbb5513825be809c3783e4caae1%2FSelection_2254.png?generation=1768119111019012&alt=media)\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Ff1b640696dc6c657545559d1bd78d01a%2FSelection_2255.png?generation=1768119153217320&alt=media)\n\nCode coming soon!!!\nplaceholder code: https://www.kaggle.com/code/hengck23/placeholder-diffeomorphic-suface-fitting\n(but it is faster if you ask gemini or chatgpt to code)",
      "votes": null
    },
    {
      "id": "3389504",
      "postDate": "01/11/2026 10:54:03",
      "content": "<p>Note:\n1) we start from unet fg/bg binary voxel classification\n2) then we have 3d connected component analysis to extract the surfaces. this ends up with about 50% single surfaces and others being stuck.\n3) we next process the stuck ones using masked input (to prevent background leakage). You have 3 choices:</p>\n<ul>\n<li>using heuristics like marching ants</li>\n<li>using surface fitting (this post)</li>\n<li>using instance segmentation or simply multiclass instance labeling </li>\n</ul>",
      "rawMarkdown": "Note:\n1) we start from unet fg/bg binary voxel classification\n2) then we have 3d connected component analysis to extract the surfaces. this ends up with about 50% single surfaces and others being stuck.\n3) we next process the stuck ones using masked input (to prevent background leakage). You have 3 choices:\n- using heuristics like marching ants\n- using surface fitting (this post)\n- using instance segmentation or simply multiclass instance labeling",
      "votes": null
    },
    {
      "id": "3389633",
      "postDate": "01/11/2026 15:58:21",
      "content": "<p>Two surfaces can also be seperated via watershed, I tried and it gave usable results.\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F26230365%2F547b031c60230a6fdcd2d2a04f264e94%2FScreenshot%202026-01-11%20212711.png?generation=1768147064294599&amp;alt=media\" alt=\"\"></p>",
      "rawMarkdown": "Two surfaces can also be seperated via watershed, I tried and it gave usable results.\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F26230365%2F547b031c60230a6fdcd2d2a04f264e94%2FScreenshot%202026-01-11%20212711.png?generation=1768147064294599&alt=media)",
      "votes": null
    },
    {
      "id": "3390069",
      "postDate": "01/12/2026 14:28:18",
      "content": "<p>Good approach <a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a>. To be honest, im currently trying to build a estimated template from probability map, then warping the template to get a perfect result without any missing paths. </p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4310004%2F40dc68c6cba27722f33bd0e6b5ea1543%2F.png?generation=1768228077009972&amp;alt=media\" alt=\"\"></p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4310004%2Fb7dfa28ed47ecd36f54e3ef6f703d500%2F__results___2_1.png?generation=1768228080105428&amp;alt=media\" alt=\"\"></p>",
      "rawMarkdown": "Good approach @hengck23. To be honest, im currently trying to build a estimated template from probability map, then warping the template to get a perfect result without any missing paths. \n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4310004%2F40dc68c6cba27722f33bd0e6b5ea1543%2F.png?generation=1768228077009972&alt=media)\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4310004%2Fb7dfa28ed47ecd36f54e3ef6f703d500%2F__results___2_1.png?generation=1768228080105428&alt=media)",
      "votes": null
    },
    {
      "id": "3390133",
      "postDate": "01/12/2026 16:21:21",
      "content": "<p>you can try something smiliar\n1) start with e.g. threshold =0.3 and do cc3d. detect single and multiple sheet cc3d.<br>\n2) for multiple cc3d, increase threshold to 0.31, detect single and multiple sheet cc3d.<br>\n3) reduce threshold and try again  </p>",
      "rawMarkdown": "you can try something smiliar\n1) start with e.g. threshold =0.3 and do cc3d. detect single and multiple sheet cc3d.  \n2) for multiple cc3d, increase threshold to 0.31, detect single and multiple sheet cc3d.  \n3) reduce threshold and try again",
      "votes": null
    },
    {
      "id": "3390138",
      "postDate": "01/12/2026 16:23:03",
      "content": "<p>thanks. in my experment, initilsation i is very important. An i cannot find  a fixed set of parameters to work for all cases. </p>\n<p>another way to initialise is to slowiy increased threshold and detect single sheet and use them as  starter.</p>\n<p>throughout the whole volume, there is always some of it (some subsect of slices)that is correct. these too can be used as template</p>",
      "rawMarkdown": "thanks. in my experment, initilsation i is very important. An i cannot find  a fixed set of parameters to work for all cases. \n\nanother way to initialise is to slowiy increased threshold and detect single sheet and use them as  starter.\n\nthroughout the whole volume, there is always some of it (some subsect of slices)that is correct. these too can be used as template",
      "votes": null
    },
    {
      "id": "3390532",
      "postDate": "01/13/2026 10:54:53",
      "content": "<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Fc6731f22390b65ff5d04e62bfbada515%2FSelection_2273.png?generation=1768301684642550&amp;alt=media\" alt=\"\"></p>",
      "rawMarkdown": "![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Fc6731f22390b65ff5d04e62bfbada515%2FSelection_2273.png?generation=1768301684642550&alt=media)",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 3389504,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "01/11/2026 10:54:03",
      "content": "<p>Note:\n1) we start from unet fg/bg binary voxel classification\n2) then we have 3d connected component analysis to extract the surfaces. this ends up with about 50% single surfaces and others being stuck.\n3) we next process the stuck ones using masked input (to prevent background leakage). You have 3 choices:</p>\n<ul>\n<li>using heuristics like marching ants</li>\n<li>using surface fitting (this post)</li>\n<li>using instance segmentation or simply multiclass instance labeling </li>\n</ul>",
      "votes": null,
      "replies": [
        {
          "id": 3389633,
          "author_name": "choudharymanas",
          "author_url": "",
          "post_date": "01/11/2026 15:58:21",
          "content": "<p>Two surfaces can also be seperated via watershed, I tried and it gave usable results.\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F26230365%2F547b031c60230a6fdcd2d2a04f264e94%2FScreenshot%202026-01-11%20212711.png?generation=1768147064294599&amp;alt=media\" alt=\"\"></p>",
          "votes": null,
          "replies": [
            {
              "id": 3390133,
              "author_name": "hengck23",
              "author_url": "",
              "post_date": "01/12/2026 16:21:21",
              "content": "<p>you can try something smiliar\n1) start with e.g. threshold =0.3 and do cc3d. detect single and multiple sheet cc3d.<br>\n2) for multiple cc3d, increase threshold to 0.31, detect single and multiple sheet cc3d.<br>\n3) reduce threshold and try again  </p>",
              "votes": null,
              "replies": []
            }
          ]
        }
      ]
    },
    {
      "id": 3390069,
      "author_name": "tom99763",
      "author_url": "",
      "post_date": "01/12/2026 14:28:18",
      "content": "<p>Good approach <a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a>. To be honest, im currently trying to build a estimated template from probability map, then warping the template to get a perfect result without any missing paths. </p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4310004%2F40dc68c6cba27722f33bd0e6b5ea1543%2F.png?generation=1768228077009972&amp;alt=media\" alt=\"\"></p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4310004%2Fb7dfa28ed47ecd36f54e3ef6f703d500%2F__results___2_1.png?generation=1768228080105428&amp;alt=media\" alt=\"\"></p>",
      "votes": null,
      "replies": [
        {
          "id": 3390138,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "01/12/2026 16:23:03",
          "content": "<p>thanks. in my experment, initilsation i is very important. An i cannot find  a fixed set of parameters to work for all cases. </p>\n<p>another way to initialise is to slowiy increased threshold and detect single sheet and use them as  starter.</p>\n<p>throughout the whole volume, there is always some of it (some subsect of slices)that is correct. these too can be used as template</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 3390532,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "01/13/2026 10:54:53",
      "content": "<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Fc6731f22390b65ff5d04e62bfbada515%2FSelection_2273.png?generation=1768301684642550&amp;alt=media\" alt=\"\"></p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "3389465": "tom99763 \nThis is close to tom idea.\n\nCurrently, pytorch is used for warp optimization only. No neural net is used in fitting ...\nThe trick is NOT to apply the paper method to ALL of input vloume (input image, encoder/decoder feature, or predicted probability). Instead, use dilation to MASK OUT the background signal.\n\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F209cfbbb5513825be809c3783e4caae1%2FSelection_2254.png?generation=1768119111019012&alt=media)\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Ff1b640696dc6c657545559d1bd78d01a%2FSelection_2255.png?generation=1768119153217320&alt=media)\n\nCode coming soon!!!\nplaceholder code: https://www.kaggle.com/code/hengck23/placeholder-diffeomorphic-suface-fitting\n(but it is faster if you ask gemini or chatgpt to code)",
    "3389504": "Note:\n1) we start from unet fg/bg binary voxel classification\n2) then we have 3d connected component analysis to extract the surfaces. this ends up with about 50% single surfaces and others being stuck.\n3) we next process the stuck ones using masked input (to prevent background leakage). You have 3 choices:\n- using heuristics like marching ants\n- using surface fitting (this post)\n- using instance segmentation or simply multiclass instance labeling",
    "3389633": "Two surfaces can also be seperated via watershed, I tried and it gave usable results.\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F26230365%2F547b031c60230a6fdcd2d2a04f264e94%2FScreenshot%202026-01-11%20212711.png?generation=1768147064294599&alt=media)",
    "3390069": "Good approach @hengck23. To be honest, im currently trying to build a estimated template from probability map, then warping the template to get a perfect result without any missing paths. \n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4310004%2F40dc68c6cba27722f33bd0e6b5ea1543%2F.png?generation=1768228077009972&alt=media)\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F4310004%2Fb7dfa28ed47ecd36f54e3ef6f703d500%2F__results___2_1.png?generation=1768228080105428&alt=media)",
    "3390133": "you can try something smiliar\n1) start with e.g. threshold =0.3 and do cc3d. detect single and multiple sheet cc3d.  \n2) for multiple cc3d, increase threshold to 0.31, detect single and multiple sheet cc3d.  \n3) reduce threshold and try again",
    "3390138": "thanks. in my experment, initilsation i is very important. An i cannot find  a fixed set of parameters to work for all cases. \n\nanother way to initialise is to slowiy increased threshold and detect single sheet and use them as  starter.\n\nthroughout the whole volume, there is always some of it (some subsect of slices)that is correct. these too can be used as template",
    "3390532": "![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Fc6731f22390b65ff5d04e62bfbada515%2FSelection_2273.png?generation=1768301684642550&alt=media)"
  },
  "source": "meta"
}