{
  "id": 528284,
  "title": "Bad Spacing Between Slices DICOM attribute in test data",
  "url": "/competitions/rsna-2024-lumbar-spine-degenerative-classification/discussion/528284",
  "author_name": "",
  "post_date": "2024-08-15T14:50:13.565257100Z",
  "votes": 7,
  "comment_count": 6,
  "views": 0,
  "content": "<p>I believe there are some missing or incorrect Spacing Between Slices DICOM attributes of Sagittal T1 images in the test data (no issue with the training data). Has anyone else encountered this issue?</p>",
  "messages": [
    {
      "id": "2960063",
      "postDate": "08/15/2024 14:50:13",
      "content": "<p>I believe there are some missing or incorrect Spacing Between Slices DICOM attributes of Sagittal T1 images in the test data (no issue with the training data). Has anyone else encountered this issue?</p>",
      "rawMarkdown": "I believe there are some missing or incorrect Spacing Between Slices DICOM attributes of Sagittal T1 images in the test data (no issue with the training data). Has anyone else encountered this issue?",
      "votes": null
    },
    {
      "id": "2960265",
      "postDate": "08/15/2024 18:02:03",
      "content": "<p>I might have experienced this. Currently, I still have not suceed any submission and all of those submissions are involving using tag from dicom file. I suspect part of my code that trying retrieve information from dicom files cause this. I ran the same code on the given training dataset and everything ran smoothly. If test dataset size is around training dataset size then the time that submission threw exception is about the time where I tried to pull tag from dicom.</p>\n<p>At first, I thought it was memory issue where kernel would dead when trieving dicom tags. However, I tried workaround tricks and make sure that that would be not be the case again by ran the same code on training dataset  twice (in case hidden dataset is twice as big).</p>\n<p>I have feeling that pydicom is not playing well with jupyter notebook. It would not release loaded dicom from memory and caused memory leak. You can try running for-loops with this code. Have you experienced the same thing?</p>\n<pre><code> pydicom\n path  Path().glob():\n    pydicom.dcmread(path)\n</code></pre>",
      "rawMarkdown": "I might have experienced this. Currently, I still have not suceed any submission and all of those submissions are involving using tag from dicom file. I suspect part of my code that trying retrieve information from dicom files cause this. I ran the same code on the given training dataset and everything ran smoothly. If test dataset size is around training dataset size then the time that submission threw exception is about the time where I tried to pull tag from dicom.\n\nAt first, I thought it was memory issue where kernel would dead when trieving dicom tags. However, I tried workaround tricks and make sure that that would be not be the case again by ran the same code on training dataset  twice (in case hidden dataset is twice as big).\n\nI have feeling that pydicom is not playing well with jupyter notebook. It would not release loaded dicom from memory and caused memory leak. You can try running for-loops with this code. Have you experienced the same thing?\n\n```python\nimport pydicom\nfor path in Path('/kaggle/input/rsna-2024-lumbar-spine-degenerative-classification/train_images').glob('**/**/*.dcm'):\n    pydicom.dcmread(path)\n```",
      "votes": null
    },
    {
      "id": "2962205",
      "postDate": "08/17/2024 09:56:37",
      "content": "<p>I haven't experience such issues with pydicom and I use other dicom tags without any problem. After putting the part where I access the SpacingBetweenSlices tag in a try/except block my submission run just fine.</p>",
      "rawMarkdown": "I haven't experience such issues with pydicom and I use other dicom tags without any problem. After putting the part where I access the SpacingBetweenSlices tag in a try/except block my submission run just fine.",
      "votes": null
    },
    {
      "id": "2962561",
      "postDate": "08/17/2024 18:20:28",
      "content": "<p>Add try except blocks for reading metadata fields, add some default values for missing fields.</p>",
      "rawMarkdown": "Add try except blocks for reading metadata fields, add some default values for missing fields.",
      "votes": null
    },
    {
      "id": "2975831",
      "postDate": "09/01/2024 09:09:38",
      "content": "<p>Working with MRI, I believe the spacing issue, or the gaps between slices were done to accelerate the imaging time and focus on specific areas, which are known to be problematic in patients. These are relatively* high-resolution images, which would've taken some 5-10 minutes to acquire, and if people are in pain, they wouldn't be able to hold still (which is vital to acquire good anat images), so you have to sacrifice certain slices to accelerate imaging. <br>\nI hope this give some insight :) </p>",
      "rawMarkdown": "Working with MRI, I believe the spacing issue, or the gaps between slices were done to accelerate the imaging time and focus on specific areas, which are known to be problematic in patients. These are relatively* high-resolution images, which would've taken some 5-10 minutes to acquire, and if people are in pain, they wouldn't be able to hold still (which is vital to acquire good anat images), so you have to sacrifice certain slices to accelerate imaging. \nI hope this give some insight :)",
      "votes": null
    },
    {
      "id": "2976761",
      "postDate": "09/02/2024 10:13:46",
      "content": "<p>This makes sense. But then, train data should also have had such instances right? </p>",
      "rawMarkdown": "This makes sense. But then, train data should also have had such instances right?",
      "votes": null
    },
    {
      "id": "3005286",
      "postDate": "10/02/2024 18:33:34",
      "content": "<p><a href=\"https://www.kaggle.com/adamnarai\" target=\"_blank\">@adamnarai</a> <br>\n\"use other dicom tags without any problem.\". can you confirm the following works well without \"try,except\":<br>\nImageOrientationPatient, SliceThickness,PixelSpacing,SliceLocation. Thanks!</p>\n<p>I m having issues with dicom tag (see <a href=\"https://www.kaggle.com/competitions/rsna-2024-lumbar-spine-degenerative-classification/discussion/537339\" target=\"_blank\">https://www.kaggle.com/competitions/rsna-2024-lumbar-spine-degenerative-classification/discussion/537339</a>)</p>",
      "rawMarkdown": "adamnarai \n\"use other dicom tags without any problem.\". can you confirm the following works well without \"try,except\":\nImageOrientationPatient, SliceThickness,PixelSpacing,SliceLocation. Thanks!\n\nI m having issues with dicom tag (see https://www.kaggle.com/competitions/rsna-2024-lumbar-spine-degenerative-classification/discussion/537339)",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 2960265,
      "author_name": "sunpnwt12",
      "author_url": "",
      "post_date": "08/15/2024 18:02:03",
      "content": "<p>I might have experienced this. Currently, I still have not suceed any submission and all of those submissions are involving using tag from dicom file. I suspect part of my code that trying retrieve information from dicom files cause this. I ran the same code on the given training dataset and everything ran smoothly. If test dataset size is around training dataset size then the time that submission threw exception is about the time where I tried to pull tag from dicom.</p>\n<p>At first, I thought it was memory issue where kernel would dead when trieving dicom tags. However, I tried workaround tricks and make sure that that would be not be the case again by ran the same code on training dataset  twice (in case hidden dataset is twice as big).</p>\n<p>I have feeling that pydicom is not playing well with jupyter notebook. It would not release loaded dicom from memory and caused memory leak. You can try running for-loops with this code. Have you experienced the same thing?</p>\n<pre><code> pydicom\n path  Path().glob():\n    pydicom.dcmread(path)\n</code></pre>",
      "votes": null,
      "replies": [
        {
          "id": 2962205,
          "author_name": "adamnarai",
          "author_url": "",
          "post_date": "08/17/2024 09:56:37",
          "content": "<p>I haven't experience such issues with pydicom and I use other dicom tags without any problem. After putting the part where I access the SpacingBetweenSlices tag in a try/except block my submission run just fine.</p>",
          "votes": null,
          "replies": [
            {
              "id": 3005286,
              "author_name": "hengck23",
              "author_url": "",
              "post_date": "10/02/2024 18:33:34",
              "content": "<p><a href=\"https://www.kaggle.com/adamnarai\" target=\"_blank\">@adamnarai</a> <br>\n\"use other dicom tags without any problem.\". can you confirm the following works well without \"try,except\":<br>\nImageOrientationPatient, SliceThickness,PixelSpacing,SliceLocation. Thanks!</p>\n<p>I m having issues with dicom tag (see <a href=\"https://www.kaggle.com/competitions/rsna-2024-lumbar-spine-degenerative-classification/discussion/537339\" target=\"_blank\">https://www.kaggle.com/competitions/rsna-2024-lumbar-spine-degenerative-classification/discussion/537339</a>)</p>",
              "votes": null,
              "replies": []
            }
          ]
        }
      ]
    },
    {
      "id": 2962561,
      "author_name": "rohitchaudhari25",
      "author_url": "",
      "post_date": "08/17/2024 18:20:28",
      "content": "<p>Add try except blocks for reading metadata fields, add some default values for missing fields.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 2975831,
      "author_name": "iworeushankaonce",
      "author_url": "",
      "post_date": "09/01/2024 09:09:38",
      "content": "<p>Working with MRI, I believe the spacing issue, or the gaps between slices were done to accelerate the imaging time and focus on specific areas, which are known to be problematic in patients. These are relatively* high-resolution images, which would've taken some 5-10 minutes to acquire, and if people are in pain, they wouldn't be able to hold still (which is vital to acquire good anat images), so you have to sacrifice certain slices to accelerate imaging. <br>\nI hope this give some insight :) </p>",
      "votes": null,
      "replies": [
        {
          "id": 2976761,
          "author_name": "arindamroy23",
          "author_url": "",
          "post_date": "09/02/2024 10:13:46",
          "content": "<p>This makes sense. But then, train data should also have had such instances right? </p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "2960063": "I believe there are some missing or incorrect Spacing Between Slices DICOM attributes of Sagittal T1 images in the test data (no issue with the training data). Has anyone else encountered this issue?",
    "2960265": "I might have experienced this. Currently, I still have not suceed any submission and all of those submissions are involving using tag from dicom file. I suspect part of my code that trying retrieve information from dicom files cause this. I ran the same code on the given training dataset and everything ran smoothly. If test dataset size is around training dataset size then the time that submission threw exception is about the time where I tried to pull tag from dicom.\n\nAt first, I thought it was memory issue where kernel would dead when trieving dicom tags. However, I tried workaround tricks and make sure that that would be not be the case again by ran the same code on training dataset  twice (in case hidden dataset is twice as big).\n\nI have feeling that pydicom is not playing well with jupyter notebook. It would not release loaded dicom from memory and caused memory leak. You can try running for-loops with this code. Have you experienced the same thing?\n\n```python\nimport pydicom\nfor path in Path('/kaggle/input/rsna-2024-lumbar-spine-degenerative-classification/train_images').glob('**/**/*.dcm'):\n    pydicom.dcmread(path)\n```",
    "2962205": "I haven't experience such issues with pydicom and I use other dicom tags without any problem. After putting the part where I access the SpacingBetweenSlices tag in a try/except block my submission run just fine.",
    "2962561": "Add try except blocks for reading metadata fields, add some default values for missing fields.",
    "2975831": "Working with MRI, I believe the spacing issue, or the gaps between slices were done to accelerate the imaging time and focus on specific areas, which are known to be problematic in patients. These are relatively* high-resolution images, which would've taken some 5-10 minutes to acquire, and if people are in pain, they wouldn't be able to hold still (which is vital to acquire good anat images), so you have to sacrifice certain slices to accelerate imaging. \nI hope this give some insight :)",
    "2976761": "This makes sense. But then, train data should also have had such instances right?",
    "3005286": "adamnarai \n\"use other dicom tags without any problem.\". can you confirm the following works well without \"try,except\":\nImageOrientationPatient, SliceThickness,PixelSpacing,SliceLocation. Thanks!\n\nI m having issues with dicom tag (see https://www.kaggle.com/competitions/rsna-2024-lumbar-spine-degenerative-classification/discussion/537339)"
  },
  "source": "meta"
}