{
  "id": 539555,
  "title": "My solution for the RSNA 2024 Lumbar Spine Degenerative Classification, using only the competition data",
  "url": "/competitions/rsna-2024-lumbar-spine-degenerative-classification/discussion/539555",
  "author_name": "siavash shirzadeh M.D.",
  "post_date": "2024-10-09T14:05:49.782000",
  "votes": 21,
  "comment_count": 6,
  "views": 0,
  "content": "<p>I would like to extend my sincere thanks to RSNA and Kaggle for organizing such an amazing competition. This was my first time participating solo, and the journey has been an incredible learning experience. I’m excited to share my solution with the community and am looking forward to receiving valuable feedback to improve my skills for future competitions. Thank you again for this opportunity!</p>\n<p><strong>Step 1: YOLO Object Detection</strong></p>\n<p>I started by utilizing the YOLO object detection algorithm, trained on the competition dataset, to detect bounding boxes for each lumbar spine level across different modalities. This allowed me to pinpoint the exact regions of interest for further processing.</p>\n<p><strong>Step 2: Identifying Axial Slices and Directions</strong></p>\n<p>Using the coordinates of the spinal canal bounding boxes, I identified the three closest axial slices for each lumbar spine level. Additionally, these coordinates helped me determine the left and right directions in sagittal slices, which were crucial for ensuring accurate cropping of the relevant images.</p>\n<p><strong>Step 3: Image Cropping and Preprocessing</strong></p>\n<p>With the spinal canal bounding boxes and directional information, I used YOLO to extract cropped images for each condition, based on the direction and spinal level. I created three cropped slices of the spinal canal, six images for the neural foraminal area, and six images for the subarticular space. These images were essential for training the model.</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F6991307%2Faec57abf628eb7c4b69aa547212444dd%2FPreprocess.png?generation=1728482922309281&amp;alt=media\" alt=\"\"></p>\n<p><strong>Step 4: Pretraining the Model</strong></p>\n<p>I pretrained a model that processed the 3 cropped spinal canal slices, 6 neural foraminal images, and 6 subarticular space images. Each image group was passed through a dedicated backbone—in this case, EfficientNetB0. The extracted features from each group were then fed into a Dense Neural Network to classify them into five categories, each with three classes: Normal/Mild, Moderate, and Severe.</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F6991307%2F31f6dfcf889fc2904103ddc7497fb3e3%2FModel.png?generation=1728482934779531&amp;alt=media\" alt=\"\"></p>\n<p><strong>Step 5: Fine-Tuning for Each Lumbar Spine Level</strong></p>\n<p>After pretraining the model, I fine-tuned it for each specific lumbar spine level. This allowed me to generate a trained model for each level of the lumbar spine, ensuring precise classification for all levels.</p>",
  "messages": [
    {
      "id": 3012940,
      "postDate": "2024-10-09T14:05:49.783Z",
      "content": "<p>I would like to extend my sincere thanks to RSNA and Kaggle for organizing such an amazing competition. This was my first time participating solo, and the journey has been an incredible learning experience. I’m excited to share my solution with the community and am looking forward to receiving valuable feedback to improve my skills for future competitions. Thank you again for this opportunity!</p>\n<p><strong>Step 1: YOLO Object Detection</strong></p>\n<p>I started by utilizing the YOLO object detection algorithm, trained on the competition dataset, to detect bounding boxes for each lumbar spine level across different modalities. This allowed me to pinpoint the exact regions of interest for further processing.</p>\n<p><strong>Step 2: Identifying Axial Slices and Directions</strong></p>\n<p>Using the coordinates of the spinal canal bounding boxes, I identified the three closest axial slices for each lumbar spine level. Additionally, these coordinates helped me determine the left and right directions in sagittal slices, which were crucial for ensuring accurate cropping of the relevant images.</p>\n<p><strong>Step 3: Image Cropping and Preprocessing</strong></p>\n<p>With the spinal canal bounding boxes and directional information, I used YOLO to extract cropped images for each condition, based on the direction and spinal level. I created three cropped slices of the spinal canal, six images for the neural foraminal area, and six images for the subarticular space. These images were essential for training the model.</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F6991307%2Faec57abf628eb7c4b69aa547212444dd%2FPreprocess.png?generation=1728482922309281&amp;alt=media\" alt=\"\"></p>\n<p><strong>Step 4: Pretraining the Model</strong></p>\n<p>I pretrained a model that processed the 3 cropped spinal canal slices, 6 neural foraminal images, and 6 subarticular space images. Each image group was passed through a dedicated backbone—in this case, EfficientNetB0. The extracted features from each group were then fed into a Dense Neural Network to classify them into five categories, each with three classes: Normal/Mild, Moderate, and Severe.</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F6991307%2F31f6dfcf889fc2904103ddc7497fb3e3%2FModel.png?generation=1728482934779531&amp;alt=media\" alt=\"\"></p>\n<p><strong>Step 5: Fine-Tuning for Each Lumbar Spine Level</strong></p>\n<p>After pretraining the model, I fine-tuned it for each specific lumbar spine level. This allowed me to generate a trained model for each level of the lumbar spine, ensuring precise classification for all levels.</p>",
      "rawMarkdown": "I would like to extend my sincere thanks to RSNA and Kaggle for organizing such an amazing competition. This was my first time participating solo, and the journey has been an incredible learning experience. I’m excited to share my solution with the community and am looking forward to receiving valuable feedback to improve my skills for future competitions. Thank you again for this opportunity!\n\n\n**Step 1: YOLO Object Detection**\n\nI started by utilizing the YOLO object detection algorithm, trained on the competition dataset, to detect bounding boxes for each lumbar spine level across different modalities. This allowed me to pinpoint the exact regions of interest for further processing.\n\n**Step 2: Identifying Axial Slices and Directions**\n\nUsing the coordinates of the spinal canal bounding boxes, I identified the three closest axial slices for each lumbar spine level. Additionally, these coordinates helped me determine the left and right directions in sagittal slices, which were crucial for ensuring accurate cropping of the relevant images.\n\n**Step 3: Image Cropping and Preprocessing**\n\nWith the spinal canal bounding boxes and directional information, I used YOLO to extract cropped images for each condition, based on the direction and spinal level. I created three cropped slices of the spinal canal, six images for the neural foraminal area, and six images for the subarticular space. These images were essential for training the model.\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F6991307%2Faec57abf628eb7c4b69aa547212444dd%2FPreprocess.png?generation=1728482922309281&alt=media)\n\n**Step 4: Pretraining the Model**\n\nI pretrained a model that processed the 3 cropped spinal canal slices, 6 neural foraminal images, and 6 subarticular space images. Each image group was passed through a dedicated backbone—in this case, EfficientNetB0. The extracted features from each group were then fed into a Dense Neural Network to classify them into five categories, each with three classes: Normal/Mild, Moderate, and Severe.\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F6991307%2F31f6dfcf889fc2904103ddc7497fb3e3%2FModel.png?generation=1728482934779531&alt=media)\n\n**Step 5: Fine-Tuning for Each Lumbar Spine Level**\n\nAfter pretraining the model, I fine-tuned it for each specific lumbar spine level. This allowed me to generate a trained model for each level of the lumbar spine, ensuring precise classification for all levels.\n",
      "votes": 21
    },
    {
      "id": 3013071,
      "postDate": "2024-10-09T16:22:20.720Z",
      "content": "<p>Will you open source your code? I would appreciate it.</p>",
      "rawMarkdown": "Will you open source your code? I would appreciate it.",
      "votes": 1,
      "replies": [
        {
          "id": 3013341,
          "postDate": "2024-10-10T01:29:14.763Z",
          "content": "<p>Sure, I’ll make my notebooks public soon.</p>",
          "rawMarkdown": "Sure, I’ll make my notebooks public soon.",
          "votes": 2,
          "replies": [
            {
              "id": 3035410,
              "postDate": "2024-11-03T12:24:08.690Z",
              "content": "<p>Any updates on this <a href=\"https://www.kaggle.com/siavashshirzad\" target=\"_blank\">@siavashshirzad</a> ?</p>",
              "rawMarkdown": "Any updates on this @siavashshirzad ?"
            }
          ]
        }
      ]
    },
    {
      "id": 3016358,
      "postDate": "2024-10-13T16:58:17.560Z",
      "content": "<p><a href=\"https://www.kaggle.com/siavashshirzad\" target=\"_blank\">@siavashshirzad</a>  Congragulation :). It would be great if you could share your code </p>",
      "rawMarkdown": "@siavashshirzad  Congragulation :). It would be great if you could share your code "
    },
    {
      "id": 3013581,
      "postDate": "2024-10-10T09:41:53.310Z",
      "rawMarkdown": "",
      "isDeleted": true
    },
    {
      "id": 3013328,
      "postDate": "2024-10-10T00:24:55.690Z",
      "rawMarkdown": "",
      "isDeleted": true
    }
  ],
  "comments": [
    {
      "id": 3013071,
      "author_name": "Mingyue Zhao",
      "author_url": "",
      "post_date": "2024-10-09T16:22:20.720000",
      "content": "<p>Will you open source your code? I would appreciate it.</p>",
      "votes": 1,
      "replies": [
        {
          "id": 3013341,
          "author_name": "siavash shirzadeh M.D.",
          "author_url": "",
          "post_date": "2024-10-10T01:29:14.763000",
          "content": "<p>Sure, I’ll make my notebooks public soon.</p>",
          "votes": 2,
          "replies": [
            {
              "id": 3035410,
              "author_name": "Chirag Patil",
              "author_url": "",
              "post_date": "2024-11-03T12:24:08.690000",
              "content": "<p>Any updates on this <a href=\"https://www.kaggle.com/siavashshirzad\" target=\"_blank\">@siavashshirzad</a> ?</p>",
              "votes": 0,
              "replies": []
            }
          ]
        }
      ]
    },
    {
      "id": 3016358,
      "author_name": "Srikant Nayak",
      "author_url": "",
      "post_date": "2024-10-13T16:58:17.560000",
      "content": "<p><a href=\"https://www.kaggle.com/siavashshirzad\" target=\"_blank\">@siavashshirzad</a>  Congragulation :). It would be great if you could share your code </p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 3013581,
      "author_name": "",
      "author_url": "",
      "post_date": "2024-10-10T09:41:53.310000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 3013328,
      "author_name": "",
      "author_url": "",
      "post_date": "2024-10-10T00:24:55.690000",
      "content": "",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "3012940": "I would like to extend my sincere thanks to RSNA and Kaggle for organizing such an amazing competition. This was my first time participating solo, and the journey has been an incredible learning experience. I’m excited to share my solution with the community and am looking forward to receiving valuable feedback to improve my skills for future competitions. Thank you again for this opportunity!\n\n\n**Step 1: YOLO Object Detection**\n\nI started by utilizing the YOLO object detection algorithm, trained on the competition dataset, to detect bounding boxes for each lumbar spine level across different modalities. This allowed me to pinpoint the exact regions of interest for further processing.\n\n**Step 2: Identifying Axial Slices and Directions**\n\nUsing the coordinates of the spinal canal bounding boxes, I identified the three closest axial slices for each lumbar spine level. Additionally, these coordinates helped me determine the left and right directions in sagittal slices, which were crucial for ensuring accurate cropping of the relevant images.\n\n**Step 3: Image Cropping and Preprocessing**\n\nWith the spinal canal bounding boxes and directional information, I used YOLO to extract cropped images for each condition, based on the direction and spinal level. I created three cropped slices of the spinal canal, six images for the neural foraminal area, and six images for the subarticular space. These images were essential for training the model.\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F6991307%2Faec57abf628eb7c4b69aa547212444dd%2FPreprocess.png?generation=1728482922309281&alt=media)\n\n**Step 4: Pretraining the Model**\n\nI pretrained a model that processed the 3 cropped spinal canal slices, 6 neural foraminal images, and 6 subarticular space images. Each image group was passed through a dedicated backbone—in this case, EfficientNetB0. The extracted features from each group were then fed into a Dense Neural Network to classify them into five categories, each with three classes: Normal/Mild, Moderate, and Severe.\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F6991307%2F31f6dfcf889fc2904103ddc7497fb3e3%2FModel.png?generation=1728482934779531&alt=media)\n\n**Step 5: Fine-Tuning for Each Lumbar Spine Level**\n\nAfter pretraining the model, I fine-tuned it for each specific lumbar spine level. This allowed me to generate a trained model for each level of the lumbar spine, ensuring precise classification for all levels.\n",
    "3013071": "Will you open source your code? I would appreciate it.",
    "3016358": "@siavashshirzad  Congragulation :). It would be great if you could share your code ",
    "3013581": "",
    "3013328": ""
  }
}