{
  "id": 459058,
  "title": "74th Place Solution",
  "url": "/competitions/rsna-2023-abdominal-trauma-detection/discussion/459058",
  "author_name": "naocanzouyihui",
  "post_date": "2023-12-03T09:36:10.893000",
  "votes": 0,
  "comment_count": 2,
  "views": 0,
  "content": "<p>Thanks to kaggle and the organizers.</p>\n<p>After experiencing a month of competition, I am thrilled to have achieved a bronze medal as a beginner. Now, I would like to share my code and model with other novice kagglers for learning purposes.</p>\n<p>Thank you very much for <a href=\"https://www.kaggle.com/competitions/rsna-2022-cervical-spine-fracture-detection/discussion/362787\" target=\"_blank\">the first-place solution</a> of <a href=\"https://www.kaggle.com/haqishen\" target=\"_blank\">Qishen Ha</a> in the 2022 RSNA competition. I have completely copied their baseline and made corresponding modifications based on the content of this competition.</p>\n<p>The submission time is around 180 min (mostly due to data loading) and is able to get such scores, the public score is 0.65, while the private score is 0.59, and a final ranking of 74th place.</p>\n<h1><strong>Code</strong></h1>\n<p>inference code : <a href=\"https://www.kaggle.com/code/naocanzouyihui/rsna-2023-74th-place-solution-inference\" target=\"_blank\">https://www.kaggle.com/code/naocanzouyihui/rsna-2023-74th-place-solution-inference</a><br>\ntraining code : <a href=\"https://github.com/naozouyihui/RSNA_abdominal_trauma_74th_solution/tree/main\" target=\"_blank\">https://github.com/naozouyihui/RSNA_abdominal_trauma_74th_solution/tree/main</a></p>\n<h1><strong>Summary</strong></h1>\n<p>Designed a 2-stage pipeline to deal with this problem.</p>\n<p>stage1: 3D semantic segmentation -&gt; stage2: 2.5D w/ LSTM classification.</p>\n<h1><strong>3D Semantic Segmentation</strong></h1>\n<p>I use 128x128x128 input, to train efficientnet v2s + unet model, for segmenting organs (5ch output,included bowel, left kidney, right kidney, spleen and liver).</p>\n<p>After the training was completed, I predicted 3d masks for each organ for all 10k samples in the training set.</p>\n<h1><strong>Prepare Data for Classification</strong></h1>\n<p>Next step is to prepare data for classification.</p>\n<p>First using the predicted 3D mask for each organ, we can crop out 5 parts from a single original 3d image. After combine the masks of the left and right kidney, we cropped 10k * 4 = 40k samples </p>\n<p>Then for each organ sample, I extracted 20 slices evenly by z-dimension, and for each slice, I further extracted +-2 adjacent slices to form an image with 5 channels. </p>\n<p>In addition, I added the predicted mask of corresponding organ as the 6th channel to each image.</p>\n<p>I chose the 2.5D approach to do this work. here 2.5D means that each 2D slice in a sample has the information of several adjacent slices, so it is written 2.5D. But the model is a normal 2D CNN with 5-channels input.</p>\n<p>The structure of this model is that, I first input 20 slices from a single sample into a 2D CNN, extracted out features of each slice, and then follow it with an LSTM model. So that the whole model can learn the features of the whole organ.</p>\n<h1><strong>Final Submission</strong></h1>\n<p>3D Seg</p>\n<ul>\n<li>5fold effv2s  unet (128x128x128)</li>\n</ul>\n<p>2.5D Cls</p>\n<ul>\n<li>5fold resnet 50d (224x224)</li>\n</ul>",
  "messages": [
    {
      "id": 2548332,
      "postDate": "2023-12-04T10:40:03.027Z",
      "content": "<p>Hii, thank you for sharing the solution. Can you tell us about your workstation specifications?<br>\nCheers!!</p>",
      "rawMarkdown": "Hii, thank you for sharing the solution. Can you tell us about your workstation specifications?\nCheers!!\n",
      "replies": [
        {
          "id": 2548445,
          "postDate": "2023-12-04T12:41:26.870Z",
          "content": "<p>I only have a 3090 graphics card, you can follow the github link of my project to learn more about the specific situation</p>",
          "rawMarkdown": "I only have a 3090 graphics card, you can follow the github link of my project to learn more about the specific situation"
        }
      ]
    },
    {
      "id": 2547207,
      "postDate": "2023-12-03T09:36:10.893Z",
      "content": "<p>Thanks to kaggle and the organizers.</p>\n<p>After experiencing a month of competition, I am thrilled to have achieved a bronze medal as a beginner. Now, I would like to share my code and model with other novice kagglers for learning purposes.</p>\n<p>Thank you very much for <a href=\"https://www.kaggle.com/competitions/rsna-2022-cervical-spine-fracture-detection/discussion/362787\" target=\"_blank\">the first-place solution</a> of <a href=\"https://www.kaggle.com/haqishen\" target=\"_blank\">Qishen Ha</a> in the 2022 RSNA competition. I have completely copied their baseline and made corresponding modifications based on the content of this competition.</p>\n<p>The submission time is around 180 min (mostly due to data loading) and is able to get such scores, the public score is 0.65, while the private score is 0.59, and a final ranking of 74th place.</p>\n<h1><strong>Code</strong></h1>\n<p>inference code : <a href=\"https://www.kaggle.com/code/naocanzouyihui/rsna-2023-74th-place-solution-inference\" target=\"_blank\">https://www.kaggle.com/code/naocanzouyihui/rsna-2023-74th-place-solution-inference</a><br>\ntraining code : <a href=\"https://github.com/naozouyihui/RSNA_abdominal_trauma_74th_solution/tree/main\" target=\"_blank\">https://github.com/naozouyihui/RSNA_abdominal_trauma_74th_solution/tree/main</a></p>\n<h1><strong>Summary</strong></h1>\n<p>Designed a 2-stage pipeline to deal with this problem.</p>\n<p>stage1: 3D semantic segmentation -&gt; stage2: 2.5D w/ LSTM classification.</p>\n<h1><strong>3D Semantic Segmentation</strong></h1>\n<p>I use 128x128x128 input, to train efficientnet v2s + unet model, for segmenting organs (5ch output,included bowel, left kidney, right kidney, spleen and liver).</p>\n<p>After the training was completed, I predicted 3d masks for each organ for all 10k samples in the training set.</p>\n<h1><strong>Prepare Data for Classification</strong></h1>\n<p>Next step is to prepare data for classification.</p>\n<p>First using the predicted 3D mask for each organ, we can crop out 5 parts from a single original 3d image. After combine the masks of the left and right kidney, we cropped 10k * 4 = 40k samples </p>\n<p>Then for each organ sample, I extracted 20 slices evenly by z-dimension, and for each slice, I further extracted +-2 adjacent slices to form an image with 5 channels. </p>\n<p>In addition, I added the predicted mask of corresponding organ as the 6th channel to each image.</p>\n<p>I chose the 2.5D approach to do this work. here 2.5D means that each 2D slice in a sample has the information of several adjacent slices, so it is written 2.5D. But the model is a normal 2D CNN with 5-channels input.</p>\n<p>The structure of this model is that, I first input 20 slices from a single sample into a 2D CNN, extracted out features of each slice, and then follow it with an LSTM model. So that the whole model can learn the features of the whole organ.</p>\n<h1><strong>Final Submission</strong></h1>\n<p>3D Seg</p>\n<ul>\n<li>5fold effv2s  unet (128x128x128)</li>\n</ul>\n<p>2.5D Cls</p>\n<ul>\n<li>5fold resnet 50d (224x224)</li>\n</ul>",
      "rawMarkdown": "Thanks to kaggle and the organizers.\n\nAfter experiencing a month of competition, I am thrilled to have achieved a bronze medal as a beginner. Now, I would like to share my code and model with other novice kagglers for learning purposes.\n\nThank you very much for [the first-place solution](https://www.kaggle.com/competitions/rsna-2022-cervical-spine-fracture-detection/discussion/362787) of [Qishen Ha](https://www.kaggle.com/haqishen) in the 2022 RSNA competition. I have completely copied their baseline and made corresponding modifications based on the content of this competition.\n\nThe submission time is around 180 min (mostly due to data loading) and is able to get such scores, the public score is 0.65, while the private score is 0.59, and a final ranking of 74th place.\n# **Code**\ninference code : https://www.kaggle.com/code/naocanzouyihui/rsna-2023-74th-place-solution-inference\ntraining code : https://github.com/naozouyihui/RSNA_abdominal_trauma_74th_solution/tree/main\n# **Summary**\nDesigned a 2-stage pipeline to deal with this problem.\n\nstage1: 3D semantic segmentation -> stage2: 2.5D w/ LSTM classification.\n\n# **3D Semantic Segmentation**\n\nI use 128x128x128 input, to train efficientnet v2s + unet model, for segmenting organs (5ch output,included bowel, left kidney, right kidney, spleen and liver).\n\nAfter the training was completed, I predicted 3d masks for each organ for all 10k samples in the training set.\n\n# **Prepare Data for Classification**\nNext step is to prepare data for classification.\n\nFirst using the predicted 3D mask for each organ, we can crop out 5 parts from a single original 3d image. After combine the masks of the left and right kidney, we cropped 10k * 4 = 40k samples \n\nThen for each organ sample, I extracted 20 slices evenly by z-dimension, and for each slice, I further extracted +-2 adjacent slices to form an image with 5 channels. \n\nIn addition, I added the predicted mask of corresponding organ as the 6th channel to each image.\n\nI chose the 2.5D approach to do this work. here 2.5D means that each 2D slice in a sample has the information of several adjacent slices, so it is written 2.5D. But the model is a normal 2D CNN with 5-channels input.\n\nThe structure of this model is that, I first input 20 slices from a single sample into a 2D CNN, extracted out features of each slice, and then follow it with an LSTM model. So that the whole model can learn the features of the whole organ.\n\n# **Final Submission**\n3D Seg\n\n- 5fold effv2s  unet (128x128x128)\n\n2.5D Cls\n\n- 5fold resnet 50d (224x224)"
    }
  ],
  "comments": [
    {
      "id": 2548332,
      "author_name": "Kunal1408",
      "author_url": "",
      "post_date": "2023-12-04T10:40:03.027000",
      "content": "<p>Hii, thank you for sharing the solution. Can you tell us about your workstation specifications?<br>\nCheers!!</p>",
      "votes": 0,
      "replies": [
        {
          "id": 2548445,
          "author_name": "naocanzouyihui",
          "author_url": "",
          "post_date": "2023-12-04T12:41:26.870000",
          "content": "<p>I only have a 3090 graphics card, you can follow the github link of my project to learn more about the specific situation</p>",
          "votes": 0,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "2548332": "Hii, thank you for sharing the solution. Can you tell us about your workstation specifications?\nCheers!!\n",
    "2547207": "Thanks to kaggle and the organizers.\n\nAfter experiencing a month of competition, I am thrilled to have achieved a bronze medal as a beginner. Now, I would like to share my code and model with other novice kagglers for learning purposes.\n\nThank you very much for [the first-place solution](https://www.kaggle.com/competitions/rsna-2022-cervical-spine-fracture-detection/discussion/362787) of [Qishen Ha](https://www.kaggle.com/haqishen) in the 2022 RSNA competition. I have completely copied their baseline and made corresponding modifications based on the content of this competition.\n\nThe submission time is around 180 min (mostly due to data loading) and is able to get such scores, the public score is 0.65, while the private score is 0.59, and a final ranking of 74th place.\n# **Code**\ninference code : https://www.kaggle.com/code/naocanzouyihui/rsna-2023-74th-place-solution-inference\ntraining code : https://github.com/naozouyihui/RSNA_abdominal_trauma_74th_solution/tree/main\n# **Summary**\nDesigned a 2-stage pipeline to deal with this problem.\n\nstage1: 3D semantic segmentation -> stage2: 2.5D w/ LSTM classification.\n\n# **3D Semantic Segmentation**\n\nI use 128x128x128 input, to train efficientnet v2s + unet model, for segmenting organs (5ch output,included bowel, left kidney, right kidney, spleen and liver).\n\nAfter the training was completed, I predicted 3d masks for each organ for all 10k samples in the training set.\n\n# **Prepare Data for Classification**\nNext step is to prepare data for classification.\n\nFirst using the predicted 3D mask for each organ, we can crop out 5 parts from a single original 3d image. After combine the masks of the left and right kidney, we cropped 10k * 4 = 40k samples \n\nThen for each organ sample, I extracted 20 slices evenly by z-dimension, and for each slice, I further extracted +-2 adjacent slices to form an image with 5 channels. \n\nIn addition, I added the predicted mask of corresponding organ as the 6th channel to each image.\n\nI chose the 2.5D approach to do this work. here 2.5D means that each 2D slice in a sample has the information of several adjacent slices, so it is written 2.5D. But the model is a normal 2D CNN with 5-channels input.\n\nThe structure of this model is that, I first input 20 slices from a single sample into a 2D CNN, extracted out features of each slice, and then follow it with an LSTM model. So that the whole model can learn the features of the whole organ.\n\n# **Final Submission**\n3D Seg\n\n- 5fold effv2s  unet (128x128x128)\n\n2.5D Cls\n\n- 5fold resnet 50d (224x224)"
  }
}