{
  "id": 510515,
  "title": "Segmentation",
  "url": "/competitions/rsna-2024-lumbar-spine-degenerative-classification/discussion/510515",
  "author_name": "",
  "post_date": "2024-06-06T13:48:19.680091500Z",
  "votes": 23,
  "comment_count": 5,
  "views": 0,
  "content": "<p>Created a <a href=\"https://www.kaggle.com/code/anoukstein/nnunet-spine\" target=\"_blank\">notebook</a> and <a href=\"https://www.kaggle.com/datasets/anoukstein/spine-segmentation-spider-uunet-ready\" target=\"_blank\">dataset</a> to segment the SPIDER <a href=\"https://doi.org/10.5281/zenodo.10159290\" target=\"_blank\">dataset</a> using nnUNet. Unfortunately, it times out after 12 hours. <br>\nTo make it work at all, these were the steps:</p>\n<ul>\n<li>rename images and masks and change labels to be sequential</li>\n<li>use only one series (T2) since not all series available for all patients (all images are sagittal)</li>\n<li>preprocess with nnUNet</li>\n<li>copy preprocessed files to /kaggle/working, only 2d copied for space constraints</li>\n<li>use nnUNet v2.3.1 to avoid Triton errors</li>\n</ul>\n<p>If you can make this create a segmentation model, please let me know.</p>",
  "messages": [
    {
      "id": "2858441",
      "postDate": "06/06/2024 13:48:19",
      "content": "<p>Created a <a href=\"https://www.kaggle.com/code/anoukstein/nnunet-spine\" target=\"_blank\">notebook</a> and <a href=\"https://www.kaggle.com/datasets/anoukstein/spine-segmentation-spider-uunet-ready\" target=\"_blank\">dataset</a> to segment the SPIDER <a href=\"https://doi.org/10.5281/zenodo.10159290\" target=\"_blank\">dataset</a> using nnUNet. Unfortunately, it times out after 12 hours. <br>\nTo make it work at all, these were the steps:</p>\n<ul>\n<li>rename images and masks and change labels to be sequential</li>\n<li>use only one series (T2) since not all series available for all patients (all images are sagittal)</li>\n<li>preprocess with nnUNet</li>\n<li>copy preprocessed files to /kaggle/working, only 2d copied for space constraints</li>\n<li>use nnUNet v2.3.1 to avoid Triton errors</li>\n</ul>\n<p>If you can make this create a segmentation model, please let me know.</p>",
      "rawMarkdown": "Created a [notebook](https://www.kaggle.com/code/anoukstein/nnunet-spine) and [dataset](https://www.kaggle.com/datasets/anoukstein/spine-segmentation-spider-uunet-ready) to segment the SPIDER [dataset](https://doi.org/10.5281/zenodo.10159290) using nnUNet. Unfortunately, it times out after 12 hours. \nTo make it work at all, these were the steps:\n- rename images and masks and change labels to be sequential\n- use only one series (T2) since not all series available for all patients (all images are sagittal)\n- preprocess with nnUNet\n- copy preprocessed files to /kaggle/working, only 2d copied for space constraints\n- use nnUNet v2.3.1 to avoid Triton errors\n\nIf you can make this create a segmentation model, please let me know.",
      "votes": null
    },
    {
      "id": "2858544",
      "postDate": "06/06/2024 14:49:54",
      "content": "<p><a href=\"https://www.kaggle.com/anoukstein\" target=\"_blank\">@anoukstein</a> thank you for posting this. I've been researching on the segmentation part for a while already. One problem which I encountered with zenodo dataset you mentioned - the resolution.  How good are the masks after running the nnUNet?</p>\n<p>Let's take first example from zenodo dataset:<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F6259210%2Fe2168f895c3895a94223a91b5d675ea4%2Fzenodo%20resolution.png?generation=1717685319909108&amp;alt=media\"></p>",
      "rawMarkdown": "anoukstein thank you for posting this. I've been researching on the segmentation part for a while already. One problem which I encountered with zenodo dataset you mentioned - the resolution.  How good are the masks after running the nnUNet?\n\nLet's take first example from zenodo dataset:\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F6259210%2Fe2168f895c3895a94223a91b5d675ea4%2Fzenodo%20resolution.png?generation=1717685319909108&alt=media)",
      "votes": null
    },
    {
      "id": "2858564",
      "postDate": "06/06/2024 15:02:47",
      "content": "<p>I agree <a href=\"https://www.kaggle.com/sergiosaharovskiy\" target=\"_blank\">@sergiosaharovskiy</a> , as a sagittal dataset, the resolution is suboptimal in the axial plane. To make it work for axial, I would probably reconstruct the axials in the sagittal plane, run the model, and then interpolate back. The resolution in the sagittal plane seems fine.</p>",
      "rawMarkdown": "I agree @sergiosaharovskiy , as a sagittal dataset, the resolution is suboptimal in the axial plane. To make it work for axial, I would probably reconstruct the axials in the sagittal plane, run the model, and then interpolate back. The resolution in the sagittal plane seems fine.",
      "votes": null
    },
    {
      "id": "2858673",
      "postDate": "06/06/2024 15:45:32",
      "content": "<p>yes, also what I've noticed the masks are really jagged leaving us to wish for a better quality. <br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F6259210%2F92908876929f697d5661c967c3f8849b%2Fjagged.png?generation=1717688562831168&amp;alt=media\"></p>\n<p>The dataset you pointed out is for lower spine intervertebral disks, though there is one (<a href=\"https://zenodo.org/records/22304\" target=\"_blank\">https://zenodo.org/records/22304</a>) of the better quality but for 7 vertebral bodies (VBs) of the lower spine (T11 – L5). It looks nicer in terms of the quality and comes as <code>.nii</code> extension which a lot of folks here are familiar how to work with:<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F6259210%2F3b04fbced94d8e8cbe889341186574d0%2Fnicer.png?generation=1717688691289196&amp;alt=media\"></p>",
      "rawMarkdown": "yes, also what I've noticed the masks are really jagged leaving us to wish for a better quality. \n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F6259210%2F92908876929f697d5661c967c3f8849b%2Fjagged.png?generation=1717688562831168&alt=media)\n\nThe dataset you pointed out is for lower spine intervertebral disks, though there is one (https://zenodo.org/records/22304) of the better quality but for 7 vertebral bodies (VBs) of the lower spine (T11 – L5). It looks nicer in terms of the quality and comes as `.nii` extension which a lot of folks here are familiar how to work with:\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F6259210%2F3b04fbced94d8e8cbe889341186574d0%2Fnicer.png?generation=1717688691289196&alt=media)",
      "votes": null
    },
    {
      "id": "2858709",
      "postDate": "06/06/2024 15:54:34",
      "content": "<p>Awesome! Thanks for sharing this dataset link! The SPIDER dataset segments the bottom 9(lower thoracic and entire lumbar) discs and vertebral bodies as well as the spinal canal, but you're right that it's in the .mha format which has to be converted to .nii</p>",
      "rawMarkdown": "Awesome! Thanks for sharing this dataset link! The SPIDER dataset segments the bottom 9(lower thoracic and entire lumbar) discs and vertebral bodies as well as the spinal canal, but you're right that it's in the .mha format which has to be converted to .nii",
      "votes": null
    },
    {
      "id": "2858848",
      "postDate": "06/06/2024 17:05:47",
      "content": "<p>Try using TPU-VM</p>",
      "rawMarkdown": "Try using TPU-VM",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 2858544,
      "author_name": "sergiosaharovskiy",
      "author_url": "",
      "post_date": "06/06/2024 14:49:54",
      "content": "<p><a href=\"https://www.kaggle.com/anoukstein\" target=\"_blank\">@anoukstein</a> thank you for posting this. I've been researching on the segmentation part for a while already. One problem which I encountered with zenodo dataset you mentioned - the resolution.  How good are the masks after running the nnUNet?</p>\n<p>Let's take first example from zenodo dataset:<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F6259210%2Fe2168f895c3895a94223a91b5d675ea4%2Fzenodo%20resolution.png?generation=1717685319909108&amp;alt=media\"></p>",
      "votes": null,
      "replies": [
        {
          "id": 2858564,
          "author_name": "anoukstein",
          "author_url": "",
          "post_date": "06/06/2024 15:02:47",
          "content": "<p>I agree <a href=\"https://www.kaggle.com/sergiosaharovskiy\" target=\"_blank\">@sergiosaharovskiy</a> , as a sagittal dataset, the resolution is suboptimal in the axial plane. To make it work for axial, I would probably reconstruct the axials in the sagittal plane, run the model, and then interpolate back. The resolution in the sagittal plane seems fine.</p>",
          "votes": null,
          "replies": [
            {
              "id": 2858673,
              "author_name": "sergiosaharovskiy",
              "author_url": "",
              "post_date": "06/06/2024 15:45:32",
              "content": "<p>yes, also what I've noticed the masks are really jagged leaving us to wish for a better quality. <br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F6259210%2F92908876929f697d5661c967c3f8849b%2Fjagged.png?generation=1717688562831168&amp;alt=media\"></p>\n<p>The dataset you pointed out is for lower spine intervertebral disks, though there is one (<a href=\"https://zenodo.org/records/22304\" target=\"_blank\">https://zenodo.org/records/22304</a>) of the better quality but for 7 vertebral bodies (VBs) of the lower spine (T11 – L5). It looks nicer in terms of the quality and comes as <code>.nii</code> extension which a lot of folks here are familiar how to work with:<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F6259210%2F3b04fbced94d8e8cbe889341186574d0%2Fnicer.png?generation=1717688691289196&amp;alt=media\"></p>",
              "votes": null,
              "replies": [
                {
                  "id": 2858709,
                  "author_name": "anoukstein",
                  "author_url": "",
                  "post_date": "06/06/2024 15:54:34",
                  "content": "<p>Awesome! Thanks for sharing this dataset link! The SPIDER dataset segments the bottom 9(lower thoracic and entire lumbar) discs and vertebral bodies as well as the spinal canal, but you're right that it's in the .mha format which has to be converted to .nii</p>",
                  "votes": null,
                  "replies": []
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "id": 2858848,
      "author_name": "manaidu",
      "author_url": "",
      "post_date": "06/06/2024 17:05:47",
      "content": "<p>Try using TPU-VM</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "2858441": "Created a [notebook](https://www.kaggle.com/code/anoukstein/nnunet-spine) and [dataset](https://www.kaggle.com/datasets/anoukstein/spine-segmentation-spider-uunet-ready) to segment the SPIDER [dataset](https://doi.org/10.5281/zenodo.10159290) using nnUNet. Unfortunately, it times out after 12 hours. \nTo make it work at all, these were the steps:\n- rename images and masks and change labels to be sequential\n- use only one series (T2) since not all series available for all patients (all images are sagittal)\n- preprocess with nnUNet\n- copy preprocessed files to /kaggle/working, only 2d copied for space constraints\n- use nnUNet v2.3.1 to avoid Triton errors\n\nIf you can make this create a segmentation model, please let me know.",
    "2858544": "anoukstein thank you for posting this. I've been researching on the segmentation part for a while already. One problem which I encountered with zenodo dataset you mentioned - the resolution.  How good are the masks after running the nnUNet?\n\nLet's take first example from zenodo dataset:\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F6259210%2Fe2168f895c3895a94223a91b5d675ea4%2Fzenodo%20resolution.png?generation=1717685319909108&alt=media)",
    "2858564": "I agree @sergiosaharovskiy , as a sagittal dataset, the resolution is suboptimal in the axial plane. To make it work for axial, I would probably reconstruct the axials in the sagittal plane, run the model, and then interpolate back. The resolution in the sagittal plane seems fine.",
    "2858673": "yes, also what I've noticed the masks are really jagged leaving us to wish for a better quality. \n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F6259210%2F92908876929f697d5661c967c3f8849b%2Fjagged.png?generation=1717688562831168&alt=media)\n\nThe dataset you pointed out is for lower spine intervertebral disks, though there is one (https://zenodo.org/records/22304) of the better quality but for 7 vertebral bodies (VBs) of the lower spine (T11 – L5). It looks nicer in terms of the quality and comes as `.nii` extension which a lot of folks here are familiar how to work with:\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F6259210%2F3b04fbced94d8e8cbe889341186574d0%2Fnicer.png?generation=1717688691289196&alt=media)",
    "2858709": "Awesome! Thanks for sharing this dataset link! The SPIDER dataset segments the bottom 9(lower thoracic and entire lumbar) discs and vertebral bodies as well as the spinal canal, but you're right that it's in the .mha format which has to be converted to .nii",
    "2858848": "Try using TPU-VM"
  },
  "source": "meta"
}