{
  "id": 447453,
  "title": "2nd Place Solution",
  "url": "/competitions/rsna-2023-abdominal-trauma-detection/discussion/447453",
  "author_name": "Theo Viel",
  "post_date": "2023-10-16T00:23:09.742000",
  "votes": 105,
  "comment_count": 28,
  "views": 0,
  "content": "<p>My solution combines knowledge acquired in participating in the previous RSNA challenges, and involves much more than the month I spent working intensively in the competition. I've always enjoyed joining RSNA challenges, and have a special affection for medical imaging because of my relatives' medical profession. </p>\n<p>Although 2nd is a great finish, the conditions in which it happened (i.e. unjustified deadline extension) make it really painful. The Kaggle team still does not understand how much modifying rules last minute hurts participants, or they simply don't care. I was already burnt out by competing full time for a month, adding 2 days on top plus missing first place by nothing is too much for me.</p>\n<p><strong>Updates:</strong> </p>\n<ul>\n<li>More details added, fixed num_classes mistake.</li>\n<li>Inference code : <a href=\"https://www.kaggle.com/code/theoviel/rsna-abdominal-inf\" target=\"_blank\">https://www.kaggle.com/code/theoviel/rsna-abdominal-inf</a></li>\n<li><strong>Training code on Github :</strong> <a href=\"https://github.com/TheoViel/kaggle_rsna_abdominal_trauma\" target=\"_blank\">https://github.com/TheoViel/kaggle_rsna_abdominal_trauma</a></li>\n</ul>\n<h2>Data</h2>\n<p>I use <a href=\"https://www.kaggle.com/theoviel/datasets?sort=votes\" target=\"_blank\">my datasets</a>! Give them a quick upvote so I can reach 4x GM. <br>\nIn addition, I resize the longest edge to 512 &amp; center crop to 384. I also use 1 frame out of 2 to speed up 2D models inference, and limit stack size to 600. For models requiring a specific input size, images were simply resized afterwards. <br>\nImages are loaded with <code>dicomsdl</code> and processed on GPU.   It's fast. The pipeline without ensembling runs in less than 4h. </p>\n<h2>Models</h2>\n<h3>Overview</h3>\n<p>Pipeline is below. It has two components: </p>\n<ul>\n<li>2D models + RNN, where the frame-level labels are inferred using organ visibility classification when needed. </li>\n<li>Crop models for kidney / liver / spleen. Results are fed to the RNN after pooling.</li>\n</ul>\n<p>It re-uses winning ideas from the RSNA fracture competition (main references: <a href=\"https://www.kaggle.com/competitions/rsna-2022-cervical-spine-fracture-detection/discussion/363232\" target=\"_blank\">[1]</a>, <a href=\"https://www.kaggle.com/competitions/rsna-2022-cervical-spine-fracture-detection/discussion/362640\" target=\"_blank\">[2]</a>, <a href=\"https://www.kaggle.com/competitions/rsna-2022-cervical-spine-fracture-detection/discussion/363232\" target=\"_blank\">[3]</a>).</p>\n<p><a href=\"https://ibb.co/MBBh8wP\"><img src=\"https://i.ibb.co/fDDS86r/RSNA-Abd-drawio.png\" alt=\"RSNA-Abd-drawio\"></a></p>\n<h3>2D models</h3>\n<p>The key to achieve good performance with 2D models is cleverly sampling frames to feed meaningful information and reduce label noise.<br>\nTo do so, I use a simple but fast <code>efficientnetv2_rw_t</code> to infer which organs are present on every frame. During training, frames are sampled the following way:</p>\n<ul>\n<li>kidney / liver / spleen / negative bowel : Pick a random frame inside the organ.</li>\n<li>positive bowel / positive extravasation : Use the frame-level labels.</li>\n<li>Negative extravasation : Sample anywhere</li>\n</ul>\n<p>This model extracts probabilities for every 1/2 frame in the stack, and a RNN is trained on top to aggregate results. </p>\n<p><strong>Details :</strong></p>\n<ul>\n<li>Heavy augmentations (HFlip, ShiftScaleRotate, Color augs, Blur augs, ElasticTransform) + cutmix (<code>p=0.5</code>)</li>\n<li><code>maxvit_tiny_tf_512</code> was best. <code>convnextv2_tiny</code> and <code>maxvit_tiny_tf_384</code> were also great. </li>\n<li>Ranger optimizer, <code>bs=32</code>, 40 epochs, <code>lr=4e-5</code></li>\n<li>Only 3D info is the 3 adjacent frames used as channels.</li>\n<li>11 classes : <code>[bowel/extravasation]_injury</code>(BCE optimized). And <code>[kidney/liver/spleen]_[healthy/low/high]</code>  optimized with the cross entropy.</li>\n</ul>\n<h3>Crop models</h3>\n<p>Strategy is similar : key is to feed to the model crops where the information is located. In that case, I used a 3D <code>resnet18</code> to crop the organs, and feed the crop to a 2D CNN + RNN model. It improves performances on kidney, liver and spleen by a good margin. </p>\n<p><strong>Details :</strong></p>\n<ul>\n<li>Same augmentations with more cutmix (<code>p=1.</code>)</li>\n<li>Ranger optimizer, <code>bs=8</code>, 20 epochs, <code>lr=2e-5</code></li>\n<li>Best model uses 11 frames sampled uniformly in the organ. I used different number of frames for ensembling.</li>\n<li><code>coatnet_1_rw_224</code> + RNN was best. I used different heads (RNN + attention, transformers) and other models CoatNet variants for ensembling.</li>\n<li>3 class cross-entropy loss.</li>\n</ul>\n<h3>RNN model</h3>\n<p>It is trained separately. Its role is to aggregate information from previous models, and optimize the competition metric directly.</p>\n<p><strong>Details :</strong></p>\n<ul>\n<li>Restrict stack size to 600 (for faster loading), use 1/2 frame (for faster 2D inference). Sequences are then resized to 200 for batching. </li>\n<li>Heavily tweaked LSTM architecture :<ul>\n<li>1x Dense + Bidi-LSTM for the 2D models probabilities. Input is the concatenation of the segmentation proba (<code>size=5</code>), the classification probas (<code>size=11 x n_models</code>), and the classification probas multiplied by the associated segmentation (<code>size=11 x n_models</code>)</li>\n<li>Pool using probabilities predicted by the segmentation model to get organ-conditioned features.</li>\n<li>Use the mean and max pooling of the <code>22 x n_models</code> 2D classification features</li>\n<li>Independent per organ logits, which have access to the corresponding pooled features. For instance the kidney logits sees only the crop features for the kidney (<code>3x n_crop_models</code> fts) , the RNN features pooled using the kidney segmentation, and the <code>3 x n_models</code> pooled 2D features for the kidney class.</li></ul></li>\n<li>AdamW optimizer, <code>bs=64</code>, 10 epochs, <code>lr=4e-5</code></li>\n</ul>\n<h3>Things that did not work</h3>\n<ul>\n<li>YoloX + Ian Pan extravasation boxes. Tried using the data to get crops, and adding the confidence to the RNN model. It did not really help and was painful to implement.</li>\n<li>Adding a sequential head to the first stage worked early on, but as my crop models got stronger I figured out 2D was enough. This allowed for a significant speed up of my inference pipeline which is nice.</li>\n<li>Ensembling did not really help on private ultimately and my best sub is my strongest single model.</li>\n<li>Stuff I tried during the 2 days extended deadline. I was happy with how I managed my time and knew the extension only meant more time for other teams to catch up. Thanks again Kaggle 😭</li>\n</ul>\n<h2>Scores :</h2>\n<ul>\n<li>2D Classification + RNN :<ul>\n<li>Using ConvNext-v2: <strong>Public 0.41</strong> - <strong>Private 0.39</strong></li></ul></li>\n<li>Add the crop model:<ul>\n<li>MaxVit (instead of ConvNext) +  CoatNet-RNN : <strong>Public 0.37</strong> - <strong>Private 0.35</strong> (best private)</li></ul></li>\n<li>Ensemble:<ul>\n<li>3x2D models, 8x 2.5D models : <strong>Public 0.35</strong> - <strong>Private 0.35</strong></li></ul></li>\n</ul>\n<p><em>Thanks for reading !</em></p>",
  "messages": [
    {
      "id": 2483739,
      "postDate": "2023-10-16T00:23:09.743Z",
      "content": "<p>My solution combines knowledge acquired in participating in the previous RSNA challenges, and involves much more than the month I spent working intensively in the competition. I've always enjoyed joining RSNA challenges, and have a special affection for medical imaging because of my relatives' medical profession. </p>\n<p>Although 2nd is a great finish, the conditions in which it happened (i.e. unjustified deadline extension) make it really painful. The Kaggle team still does not understand how much modifying rules last minute hurts participants, or they simply don't care. I was already burnt out by competing full time for a month, adding 2 days on top plus missing first place by nothing is too much for me.</p>\n<p><strong>Updates:</strong> </p>\n<ul>\n<li>More details added, fixed num_classes mistake.</li>\n<li>Inference code : <a href=\"https://www.kaggle.com/code/theoviel/rsna-abdominal-inf\" target=\"_blank\">https://www.kaggle.com/code/theoviel/rsna-abdominal-inf</a></li>\n<li><strong>Training code on Github :</strong> <a href=\"https://github.com/TheoViel/kaggle_rsna_abdominal_trauma\" target=\"_blank\">https://github.com/TheoViel/kaggle_rsna_abdominal_trauma</a></li>\n</ul>\n<h2>Data</h2>\n<p>I use <a href=\"https://www.kaggle.com/theoviel/datasets?sort=votes\" target=\"_blank\">my datasets</a>! Give them a quick upvote so I can reach 4x GM. <br>\nIn addition, I resize the longest edge to 512 &amp; center crop to 384. I also use 1 frame out of 2 to speed up 2D models inference, and limit stack size to 600. For models requiring a specific input size, images were simply resized afterwards. <br>\nImages are loaded with <code>dicomsdl</code> and processed on GPU.   It's fast. The pipeline without ensembling runs in less than 4h. </p>\n<h2>Models</h2>\n<h3>Overview</h3>\n<p>Pipeline is below. It has two components: </p>\n<ul>\n<li>2D models + RNN, where the frame-level labels are inferred using organ visibility classification when needed. </li>\n<li>Crop models for kidney / liver / spleen. Results are fed to the RNN after pooling.</li>\n</ul>\n<p>It re-uses winning ideas from the RSNA fracture competition (main references: <a href=\"https://www.kaggle.com/competitions/rsna-2022-cervical-spine-fracture-detection/discussion/363232\" target=\"_blank\">[1]</a>, <a href=\"https://www.kaggle.com/competitions/rsna-2022-cervical-spine-fracture-detection/discussion/362640\" target=\"_blank\">[2]</a>, <a href=\"https://www.kaggle.com/competitions/rsna-2022-cervical-spine-fracture-detection/discussion/363232\" target=\"_blank\">[3]</a>).</p>\n<p><a href=\"https://ibb.co/MBBh8wP\"><img src=\"https://i.ibb.co/fDDS86r/RSNA-Abd-drawio.png\" alt=\"RSNA-Abd-drawio\"></a></p>\n<h3>2D models</h3>\n<p>The key to achieve good performance with 2D models is cleverly sampling frames to feed meaningful information and reduce label noise.<br>\nTo do so, I use a simple but fast <code>efficientnetv2_rw_t</code> to infer which organs are present on every frame. During training, frames are sampled the following way:</p>\n<ul>\n<li>kidney / liver / spleen / negative bowel : Pick a random frame inside the organ.</li>\n<li>positive bowel / positive extravasation : Use the frame-level labels.</li>\n<li>Negative extravasation : Sample anywhere</li>\n</ul>\n<p>This model extracts probabilities for every 1/2 frame in the stack, and a RNN is trained on top to aggregate results. </p>\n<p><strong>Details :</strong></p>\n<ul>\n<li>Heavy augmentations (HFlip, ShiftScaleRotate, Color augs, Blur augs, ElasticTransform) + cutmix (<code>p=0.5</code>)</li>\n<li><code>maxvit_tiny_tf_512</code> was best. <code>convnextv2_tiny</code> and <code>maxvit_tiny_tf_384</code> were also great. </li>\n<li>Ranger optimizer, <code>bs=32</code>, 40 epochs, <code>lr=4e-5</code></li>\n<li>Only 3D info is the 3 adjacent frames used as channels.</li>\n<li>11 classes : <code>[bowel/extravasation]_injury</code>(BCE optimized). And <code>[kidney/liver/spleen]_[healthy/low/high]</code>  optimized with the cross entropy.</li>\n</ul>\n<h3>Crop models</h3>\n<p>Strategy is similar : key is to feed to the model crops where the information is located. In that case, I used a 3D <code>resnet18</code> to crop the organs, and feed the crop to a 2D CNN + RNN model. It improves performances on kidney, liver and spleen by a good margin. </p>\n<p><strong>Details :</strong></p>\n<ul>\n<li>Same augmentations with more cutmix (<code>p=1.</code>)</li>\n<li>Ranger optimizer, <code>bs=8</code>, 20 epochs, <code>lr=2e-5</code></li>\n<li>Best model uses 11 frames sampled uniformly in the organ. I used different number of frames for ensembling.</li>\n<li><code>coatnet_1_rw_224</code> + RNN was best. I used different heads (RNN + attention, transformers) and other models CoatNet variants for ensembling.</li>\n<li>3 class cross-entropy loss.</li>\n</ul>\n<h3>RNN model</h3>\n<p>It is trained separately. Its role is to aggregate information from previous models, and optimize the competition metric directly.</p>\n<p><strong>Details :</strong></p>\n<ul>\n<li>Restrict stack size to 600 (for faster loading), use 1/2 frame (for faster 2D inference). Sequences are then resized to 200 for batching. </li>\n<li>Heavily tweaked LSTM architecture :<ul>\n<li>1x Dense + Bidi-LSTM for the 2D models probabilities. Input is the concatenation of the segmentation proba (<code>size=5</code>), the classification probas (<code>size=11 x n_models</code>), and the classification probas multiplied by the associated segmentation (<code>size=11 x n_models</code>)</li>\n<li>Pool using probabilities predicted by the segmentation model to get organ-conditioned features.</li>\n<li>Use the mean and max pooling of the <code>22 x n_models</code> 2D classification features</li>\n<li>Independent per organ logits, which have access to the corresponding pooled features. For instance the kidney logits sees only the crop features for the kidney (<code>3x n_crop_models</code> fts) , the RNN features pooled using the kidney segmentation, and the <code>3 x n_models</code> pooled 2D features for the kidney class.</li></ul></li>\n<li>AdamW optimizer, <code>bs=64</code>, 10 epochs, <code>lr=4e-5</code></li>\n</ul>\n<h3>Things that did not work</h3>\n<ul>\n<li>YoloX + Ian Pan extravasation boxes. Tried using the data to get crops, and adding the confidence to the RNN model. It did not really help and was painful to implement.</li>\n<li>Adding a sequential head to the first stage worked early on, but as my crop models got stronger I figured out 2D was enough. This allowed for a significant speed up of my inference pipeline which is nice.</li>\n<li>Ensembling did not really help on private ultimately and my best sub is my strongest single model.</li>\n<li>Stuff I tried during the 2 days extended deadline. I was happy with how I managed my time and knew the extension only meant more time for other teams to catch up. Thanks again Kaggle 😭</li>\n</ul>\n<h2>Scores :</h2>\n<ul>\n<li>2D Classification + RNN :<ul>\n<li>Using ConvNext-v2: <strong>Public 0.41</strong> - <strong>Private 0.39</strong></li></ul></li>\n<li>Add the crop model:<ul>\n<li>MaxVit (instead of ConvNext) +  CoatNet-RNN : <strong>Public 0.37</strong> - <strong>Private 0.35</strong> (best private)</li></ul></li>\n<li>Ensemble:<ul>\n<li>3x2D models, 8x 2.5D models : <strong>Public 0.35</strong> - <strong>Private 0.35</strong></li></ul></li>\n</ul>\n<p><em>Thanks for reading !</em></p>",
      "rawMarkdown": "My solution combines knowledge acquired in participating in the previous RSNA challenges, and involves much more than the month I spent working intensively in the competition. I've always enjoyed joining RSNA challenges, and have a special affection for medical imaging because of my relatives' medical profession. \n\nAlthough 2nd is a great finish, the conditions in which it happened (i.e. unjustified deadline extension) make it really painful. The Kaggle team still does not understand how much modifying rules last minute hurts participants, or they simply don't care. I was already burnt out by competing full time for a month, adding 2 days on top plus missing first place by nothing is too much for me.\n\n**Updates:** \n- More details added, fixed num_classes mistake.\n- Inference code : https://www.kaggle.com/code/theoviel/rsna-abdominal-inf\n- **Training code on Github :** https://github.com/TheoViel/kaggle_rsna_abdominal_trauma\n\n## Data \nI use [my datasets] (https://www.kaggle.com/theoviel/datasets?sort=votes)! Give them a quick upvote so I can reach 4x GM. \nIn addition, I resize the longest edge to 512 & center crop to 384. I also use 1 frame out of 2 to speed up 2D models inference, and limit stack size to 600. For models requiring a specific input size, images were simply resized afterwards. \nImages are loaded with `dicomsdl` and processed on GPU.   It's fast. The pipeline without ensembling runs in less than 4h. \n\n## Models\n\n### Overview\n\nPipeline is below. It has two components: \n-\t2D models + RNN, where the frame-level labels are inferred using organ visibility classification when needed. \n-\tCrop models for kidney / liver / spleen. Results are fed to the RNN after pooling.\n\nIt re-uses winning ideas from the RSNA fracture competition (main references: [[1]](https://www.kaggle.com/competitions/rsna-2022-cervical-spine-fracture-detection/discussion/363232), [[2]](https://www.kaggle.com/competitions/rsna-2022-cervical-spine-fracture-detection/discussion/362640), [[3]](https://www.kaggle.com/competitions/rsna-2022-cervical-spine-fracture-detection/discussion/363232)).\n\n<a href=\"https://ibb.co/MBBh8wP\"><img src=\"https://i.ibb.co/fDDS86r/RSNA-Abd-drawio.png\" alt=\"RSNA-Abd-drawio\" border=\"0\"></a>\n\n### 2D models \n\nThe key to achieve good performance with 2D models is cleverly sampling frames to feed meaningful information and reduce label noise.\nTo do so, I use a simple but fast `efficientnetv2_rw_t` to infer which organs are present on every frame. During training, frames are sampled the following way:\n- kidney / liver / spleen / negative bowel : Pick a random frame inside the organ.\n- positive bowel / positive extravasation : Use the frame-level labels.\n- Negative extravasation : Sample anywhere\n\nThis model extracts probabilities for every 1/2 frame in the stack, and a RNN is trained on top to aggregate results. \n\n**Details :**\n- Heavy augmentations (HFlip, ShiftScaleRotate, Color augs, Blur augs, ElasticTransform) + cutmix (`p=0.5`)\n- `maxvit_tiny_tf_512` was best. `convnextv2_tiny` and `maxvit_tiny_tf_384` were also great. \n- Ranger optimizer, `bs=32`, 40 epochs, `lr=4e-5`\n- Only 3D info is the 3 adjacent frames used as channels.\n- 11 classes : `[bowel/extravasation]_injury`(BCE optimized). And `[kidney/liver/spleen]_[healthy/low/high]`  optimized with the cross entropy.\n\n### Crop models\n\nStrategy is similar : key is to feed to the model crops where the information is located. In that case, I used a 3D `resnet18` to crop the organs, and feed the crop to a 2D CNN + RNN model. It improves performances on kidney, liver and spleen by a good margin. \n\n**Details :**\n- Same augmentations with more cutmix (`p=1.`)\n- Ranger optimizer, `bs=8`, 20 epochs, `lr=2e-5`\n- Best model uses 11 frames sampled uniformly in the organ. I used different number of frames for ensembling.\n- `coatnet_1_rw_224` + RNN was best. I used different heads (RNN + attention, transformers) and other models CoatNet variants for ensembling.\n- 3 class cross-entropy loss.\n\n### RNN model\n\nIt is trained separately. Its role is to aggregate information from previous models, and optimize the competition metric directly.\n\n**Details :**\n- Restrict stack size to 600 (for faster loading), use 1/2 frame (for faster 2D inference). Sequences are then resized to 200 for batching. \n- Heavily tweaked LSTM architecture :\n  - 1x Dense + Bidi-LSTM for the 2D models probabilities. Input is the concatenation of the segmentation proba (`size=5`), the classification probas (`size=11 x n_models`), and the classification probas multiplied by the associated segmentation (`size=11 x n_models`)\n  - Pool using probabilities predicted by the segmentation model to get organ-conditioned features.\n  - Use the mean and max pooling of the `22 x n_models` 2D classification features\n  - Independent per organ logits, which have access to the corresponding pooled features. For instance the kidney logits sees only the crop features for the kidney (`3x n_crop_models` fts) , the RNN features pooled using the kidney segmentation, and the `3 x n_models` pooled 2D features for the kidney class.\n- AdamW optimizer, `bs=64`, 10 epochs, `lr=4e-5`\n\n### Things that did not work\n\n- YoloX + Ian Pan extravasation boxes. Tried using the data to get crops, and adding the confidence to the RNN model. It did not really help and was painful to implement.\n- Adding a sequential head to the first stage worked early on, but as my crop models got stronger I figured out 2D was enough. This allowed for a significant speed up of my inference pipeline which is nice.\n- Ensembling did not really help on private ultimately and my best sub is my strongest single model.\n- Stuff I tried during the 2 days extended deadline. I was happy with how I managed my time and knew the extension only meant more time for other teams to catch up. Thanks again Kaggle 😭\n\n## Scores : \n- 2D Classification + RNN :\n - Using ConvNext-v2: **Public 0.41** - **Private 0.39**\n- Add the crop model:\n - MaxVit (instead of ConvNext) +  CoatNet-RNN : **Public 0.37** - **Private 0.35** (best private)\n- Ensemble:\n - 3x2D models, 8x 2.5D models : **Public 0.35** - **Private 0.35**\n\n\n*Thanks for reading !*",
      "votes": 105
    },
    {
      "id": 2483871,
      "postDate": "2023-10-16T04:02:04Z",
      "content": "<p>thanks for the write up!<br>\ncongratulations for the good work!</p>\n<p>would it be possible to release your code, i would like to do a experiment repeat this week.<br>\nThanks!</p>\n<p>(dirty code is ok)</p>",
      "rawMarkdown": "thanks for the write up!\ncongratulations for the good work!\n\nwould it be possible to release your code, i would like to do a experiment repeat this week.\nThanks!\n\n(dirty code is ok)",
      "votes": 3,
      "replies": [
        {
          "id": 2484105,
          "postDate": "2023-10-16T08:20:42.923Z",
          "content": "<p>Thanks ! I will release clean code during the week </p>",
          "rawMarkdown": "Thanks ! I will release clean code during the week ",
          "votes": 4
        }
      ]
    },
    {
      "id": 2483767,
      "postDate": "2023-10-16T01:19:14.327Z",
      "content": "<p>Hello, I used your PNG Dataset during the competition. thank you !!</p>\n<p>I have two questions.</p>\n<ol>\n<li><p>“Only the RNN loss is weighted, other parts of the model aim to maximize AUC.”<br>\nDoes this mean that you freeze the CNN model, extracted only the features, and then training only the LSTM?</p></li>\n<li><p>Organs have a depth of at least 100 sheets and up to 600sheets. How many sheets did you use in 2D + RNN?</p></li>\n</ol>",
      "rawMarkdown": "Hello, I used your PNG Dataset during the competition. thank you !!\n\nI have two questions.\n\n1. “Only the RNN loss is weighted, other parts of the model aim to maximize AUC.”\nDoes this mean that you freeze the CNN model, extracted only the features, and then training only the LSTM?\n\n2. Organs have a depth of at least 100 sheets and up to 600sheets. How many sheets did you use in 2D + RNN?",
      "votes": 3,
      "replies": [
        {
          "id": 2484101,
          "postDate": "2023-10-16T08:17:45.283Z",
          "content": "<p>You're welcome !</p>\n<ol>\n<li>RNN only sees probabilities precomputed by the CNN, so training is done in 2 stages.</li>\n<li>Crop to ~600 sheets, then resize to 200 with linear interpolation.</li>\n</ol>",
          "rawMarkdown": "You're welcome !\n\n1. RNN only sees probabilities precomputed by the CNN, so training is done in 2 stages.\n2. Crop to ~600 sheets, then resize to 200 with linear interpolation.",
          "votes": 2
        }
      ]
    },
    {
      "id": 2484396,
      "postDate": "2023-10-16T13:09:29.710Z",
      "content": "<p>Thanks for your sharing! Great work you have finished！ <br>\nI notice that you used 2 different optimizer for training Crpped model and 2D model, are there any specific reasons for doing so ?<br>\nAnd could please share some tips on how to choose the suitable optimizer, learing rate and the learning sheduler. These parameters really annoyed me a lot 😮‍💨.</p>",
      "rawMarkdown": "Thanks for your sharing! Great work you have finished！ \nI notice that you used 2 different optimizer for training Crpped model and 2D model, are there any specific reasons for doing so ?\nAnd could please share some tips on how to choose the suitable optimizer, learing rate and the learning sheduler. These parameters really annoyed me a lot 😮‍💨.",
      "votes": 1,
      "replies": [
        {
          "id": 2484430,
          "postDate": "2023-10-16T13:36:02.307Z",
          "content": "<p>I use Ranger for both crop and 2D models. AdamW is used for the RNN though.</p>\n<p>For the scheduler I always use linear scheduling, sometimes with some warmup. I tweak the lr to maximise performance, and usually try both Ranger and AdamW. Ranger has been working well with CNNs for me lately.</p>",
          "rawMarkdown": "I use Ranger for both crop and 2D models. AdamW is used for the RNN though.\n\nFor the scheduler I always use linear scheduling, sometimes with some warmup. I tweak the lr to maximise performance, and usually try both Ranger and AdamW. Ranger has been working well with CNNs for me lately.",
          "votes": 2
        }
      ]
    },
    {
      "id": 2484052,
      "postDate": "2023-10-16T07:30:40.887Z",
      "content": "<p>Congrats for the gold!! and thx for providing the PNG conversion dataset and the notebook. I have a question about the loss.  Imbalance exists in the given dataset and want to know how did you handle it. </p>",
      "rawMarkdown": "Congrats for the gold!! and thx for providing the PNG conversion dataset and the notebook. I have a question about the loss.  Imbalance exists in the given dataset and want to know how did you handle it. ",
      "votes": 1,
      "replies": [
        {
          "id": 2484104,
          "postDate": "2023-10-16T08:20:24.017Z",
          "content": "<p>Nothing was done to fight imbalance. Strong models could handle it :)</p>",
          "rawMarkdown": "Nothing was done to fight imbalance. Strong models could handle it :)",
          "votes": 1
        }
      ]
    },
    {
      "id": 2484265,
      "postDate": "2023-10-16T10:57:05.723Z",
      "content": "<p>Congratulations on winning the competition with 2nd place. Thanks for sharing the solution. </p>",
      "rawMarkdown": "Congratulations on winning the competition with 2nd place. Thanks for sharing the solution. ",
      "votes": 2
    },
    {
      "id": 2552128,
      "postDate": "2023-12-07T08:05:30.567Z",
      "content": "<p>Question about Segmentation. Why you use resnet18 as encoder, instead of using unet directly.<br>\nThanks</p>",
      "rawMarkdown": "Question about Segmentation. Why you use resnet18 as encoder, instead of using unet directly.\nThanks"
    },
    {
      "id": 2514053,
      "postDate": "2023-11-06T01:58:55.407Z",
      "content": "<p>Great work. I can't find where you got some of the csv files in the preparation.py file, \"df_train.csv\", \"df_images_train.csv\", and \"df_images_train_with_seg.csv\". I am going through the whole code to understand the process. Thank you</p>",
      "rawMarkdown": "Great work. I can't find where you got some of the csv files in the preparation.py file, \"df_train.csv\", \"df_images_train.csv\", and \"df_images_train_with_seg.csv\". I am going through the whole code to understand the process. Thank you",
      "replies": [
        {
          "id": 2514425,
          "postDate": "2023-11-06T09:38:59.273Z",
          "content": "<p>If you look in the master branch of the repo the code is in one of the notebooks. It's not interesting though, which is why I shared the files here : <br>\n<a href=\"https://www.kaggle.com/datasets/theoviel/rsna-abdominal-prepro-data\" target=\"_blank\">https://www.kaggle.com/datasets/theoviel/rsna-abdominal-prepro-data</a></p>",
          "rawMarkdown": "If you look in the master branch of the repo the code is in one of the notebooks. It's not interesting though, which is why I shared the files here : \nhttps://www.kaggle.com/datasets/theoviel/rsna-abdominal-prepro-data\n",
          "replies": [
            {
              "id": 2514989,
              "postDate": "2023-11-06T16:44:54.557Z",
              "content": "<p>great, thanks</p>",
              "rawMarkdown": "great, thanks"
            }
          ]
        }
      ]
    },
    {
      "id": 2485814,
      "postDate": "2023-10-17T13:23:04.420Z",
      "content": "<p>Congratulations on winning the competition with 2nd place. Thanks for sharing the solution.</p>",
      "rawMarkdown": "Congratulations on winning the competition with 2nd place. Thanks for sharing the solution."
    },
    {
      "id": 2485778,
      "postDate": "2023-10-17T13:02:10.587Z",
      "content": "<p>Congratulations, thanks for sharing a lot of work.</p>",
      "rawMarkdown": "Congratulations, thanks for sharing a lot of work."
    },
    {
      "id": 2485018,
      "postDate": "2023-10-16T21:07:00.327Z",
      "content": "<p>Congratulations on the great result and thank you for the write up!</p>\n<p>How much memory did each part if the pipeline require and what workstation setup did you use? I’m curious if the Kaggle machines could run your training and inference pipelines? I couldn’t find a way to use much more than a batch size of 8 samples of dimension 150x150x100 floats onto the GPU memory for training.</p>\n<p>I also found that ensembling models did not result in an improvement over the single best model presumably due to the high correlation between the models.</p>",
      "rawMarkdown": "Congratulations on the great result and thank you for the write up!\n\nHow much memory did each part if the pipeline require and what workstation setup did you use? I’m curious if the Kaggle machines could run your training and inference pipelines? I couldn’t find a way to use much more than a batch size of 8 samples of dimension 150x150x100 floats onto the GPU memory for training.\n\nI also found that ensembling models did not result in an improvement over the single best model presumably due to the high correlation between the models.",
      "replies": [
        {
          "id": 2485020,
          "postDate": "2023-10-16T21:10:26.577Z",
          "content": "<p>Thanks ! I train models on 8x 32GB V100, RAM is not the bottleneck for most models. I use at most 11 frames per input though, biggest batches I am handling are of size 8x11x3x 224x224 and the GPU is not full.</p>",
          "rawMarkdown": "Thanks ! I train models on 8x 32GB V100, RAM is not the bottleneck for most models. I use at most 11 frames per input though, biggest batches I am handling are of size 8x11x3x 224x224 and the GPU is not full."
        }
      ]
    },
    {
      "id": 2484903,
      "postDate": "2023-10-16T18:39:41.763Z",
      "content": "<p>Thanks for the great write up (and also the datasets)!</p>\n<p>For the 2D organ classifier that you trained, am I correct in reading that this was trained separately? If so, what training data did you use? </p>\n<blockquote>\n  <p>kidney / liver / spleen / negative bowel : Pick a random frame inside the organ.<br>\n  Did you use the provided 'segmentations' alone for this?</p>\n</blockquote>",
      "rawMarkdown": "Thanks for the great write up (and also the datasets)!\n\nFor the 2D organ classifier that you trained, am I correct in reading that this was trained separately? If so, what training data did you use? \n>kidney / liver / spleen / negative bowel : Pick a random frame inside the organ.\nDid you use the provided 'segmentations' alone for this?",
      "replies": [
        {
          "id": 2484919,
          "postDate": "2023-10-16T18:58:55.930Z",
          "content": "<p>You're welcome !</p>\n<p>Yep, it's trained on the provided segmentations.</p>",
          "rawMarkdown": "You're welcome !\n\nYep, it's trained on the provided segmentations.",
          "votes": 1
        }
      ]
    },
    {
      "id": 2484873,
      "postDate": "2023-10-16T18:19:48.217Z",
      "content": "<p>Simple and elegant. Nice work <a href=\"https://www.kaggle.com/theoviel\" target=\"_blank\">@theoviel</a>, Thanks for sharing the datasets too. </p>",
      "rawMarkdown": "Simple and elegant. Nice work @theoviel, Thanks for sharing the datasets too. "
    },
    {
      "id": 2484507,
      "postDate": "2023-10-16T14:32:24.123Z",
      "content": "<p>congratulations and thanks for sharing the good work!</p>",
      "rawMarkdown": " congratulations and thanks for sharing the good work!"
    },
    {
      "id": 2483844,
      "postDate": "2023-10-16T03:28:32.047Z",
      "content": "<p>Great work! I feel for you regarding the last minute extension. Truly upsetting…</p>",
      "rawMarkdown": "Great work! I feel for you regarding the last minute extension. Truly upsetting..."
    },
    {
      "id": 2483782,
      "postDate": "2023-10-16T01:47:38.170Z",
      "content": "<p>thx for sharing. great work.</p>",
      "rawMarkdown": "thx for sharing. great work."
    },
    {
      "id": 2937394,
      "postDate": "2024-07-27T03:51:52.520Z",
      "rawMarkdown": "",
      "isDeleted": true,
      "replies": [
        {
          "id": 2937399,
          "postDate": "2024-07-27T04:04:01.100Z",
          "rawMarkdown": "",
          "isDeleted": true
        }
      ]
    },
    {
      "id": 2506963,
      "postDate": "2023-10-31T16:58:02.567Z",
      "rawMarkdown": "",
      "isDeleted": true
    },
    {
      "id": 2484044,
      "postDate": "2023-10-16T07:22:58.777Z",
      "content": "<p>Felicitations !! Merci pour le partage, toujours très instructif. Au boulot !</p>",
      "rawMarkdown": "Felicitations !! Merci pour le partage, toujours très instructif. Au boulot !",
      "isDeleted": true
    },
    {
      "id": 2485390,
      "postDate": "2023-10-17T06:47:15.650Z",
      "content": "<p>Thanks for sharing  great work!!</p>",
      "rawMarkdown": "Thanks for sharing  great work!!"
    }
  ],
  "comments": [
    {
      "id": 2483871,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "2023-10-16T04:02:04",
      "content": "<p>thanks for the write up!<br>\ncongratulations for the good work!</p>\n<p>would it be possible to release your code, i would like to do a experiment repeat this week.<br>\nThanks!</p>\n<p>(dirty code is ok)</p>",
      "votes": 3,
      "replies": [
        {
          "id": 2484105,
          "author_name": "Theo Viel",
          "author_url": "",
          "post_date": "2023-10-16T08:20:42.923000",
          "content": "<p>Thanks ! I will release clean code during the week </p>",
          "votes": 4,
          "replies": []
        }
      ]
    },
    {
      "id": 2483767,
      "author_name": "devchopin",
      "author_url": "",
      "post_date": "2023-10-16T01:19:14.327000",
      "content": "<p>Hello, I used your PNG Dataset during the competition. thank you !!</p>\n<p>I have two questions.</p>\n<ol>\n<li><p>“Only the RNN loss is weighted, other parts of the model aim to maximize AUC.”<br>\nDoes this mean that you freeze the CNN model, extracted only the features, and then training only the LSTM?</p></li>\n<li><p>Organs have a depth of at least 100 sheets and up to 600sheets. How many sheets did you use in 2D + RNN?</p></li>\n</ol>",
      "votes": 3,
      "replies": [
        {
          "id": 2484101,
          "author_name": "Theo Viel",
          "author_url": "",
          "post_date": "2023-10-16T08:17:45.283000",
          "content": "<p>You're welcome !</p>\n<ol>\n<li>RNN only sees probabilities precomputed by the CNN, so training is done in 2 stages.</li>\n<li>Crop to ~600 sheets, then resize to 200 with linear interpolation.</li>\n</ol>",
          "votes": 2,
          "replies": []
        }
      ]
    },
    {
      "id": 2484396,
      "author_name": "Gooring",
      "author_url": "",
      "post_date": "2023-10-16T13:09:29.710000",
      "content": "<p>Thanks for your sharing! Great work you have finished！ <br>\nI notice that you used 2 different optimizer for training Crpped model and 2D model, are there any specific reasons for doing so ?<br>\nAnd could please share some tips on how to choose the suitable optimizer, learing rate and the learning sheduler. These parameters really annoyed me a lot 😮‍💨.</p>",
      "votes": 1,
      "replies": [
        {
          "id": 2484430,
          "author_name": "Theo Viel",
          "author_url": "",
          "post_date": "2023-10-16T13:36:02.307000",
          "content": "<p>I use Ranger for both crop and 2D models. AdamW is used for the RNN though.</p>\n<p>For the scheduler I always use linear scheduling, sometimes with some warmup. I tweak the lr to maximise performance, and usually try both Ranger and AdamW. Ranger has been working well with CNNs for me lately.</p>",
          "votes": 2,
          "replies": []
        }
      ]
    },
    {
      "id": 2484052,
      "author_name": "Markrvtx",
      "author_url": "",
      "post_date": "2023-10-16T07:30:40.887000",
      "content": "<p>Congrats for the gold!! and thx for providing the PNG conversion dataset and the notebook. I have a question about the loss.  Imbalance exists in the given dataset and want to know how did you handle it. </p>",
      "votes": 1,
      "replies": [
        {
          "id": 2484104,
          "author_name": "Theo Viel",
          "author_url": "",
          "post_date": "2023-10-16T08:20:24.017000",
          "content": "<p>Nothing was done to fight imbalance. Strong models could handle it :)</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 2484265,
      "author_name": "C R Suthikshn Kumar",
      "author_url": "",
      "post_date": "2023-10-16T10:57:05.723000",
      "content": "<p>Congratulations on winning the competition with 2nd place. Thanks for sharing the solution. </p>",
      "votes": 2,
      "replies": []
    },
    {
      "id": 2552128,
      "author_name": "john",
      "author_url": "",
      "post_date": "2023-12-07T08:05:30.567000",
      "content": "<p>Question about Segmentation. Why you use resnet18 as encoder, instead of using unet directly.<br>\nThanks</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 2514053,
      "author_name": "dfdavii2",
      "author_url": "",
      "post_date": "2023-11-06T01:58:55.407000",
      "content": "<p>Great work. I can't find where you got some of the csv files in the preparation.py file, \"df_train.csv\", \"df_images_train.csv\", and \"df_images_train_with_seg.csv\". I am going through the whole code to understand the process. Thank you</p>",
      "votes": 0,
      "replies": [
        {
          "id": 2514425,
          "author_name": "Theo Viel",
          "author_url": "",
          "post_date": "2023-11-06T09:38:59.273000",
          "content": "<p>If you look in the master branch of the repo the code is in one of the notebooks. It's not interesting though, which is why I shared the files here : <br>\n<a href=\"https://www.kaggle.com/datasets/theoviel/rsna-abdominal-prepro-data\" target=\"_blank\">https://www.kaggle.com/datasets/theoviel/rsna-abdominal-prepro-data</a></p>",
          "votes": 0,
          "replies": [
            {
              "id": 2514989,
              "author_name": "dfdavii2",
              "author_url": "",
              "post_date": "2023-11-06T16:44:54.557000",
              "content": "<p>great, thanks</p>",
              "votes": 0,
              "replies": []
            }
          ]
        }
      ]
    },
    {
      "id": 2485814,
      "author_name": "naocanzouyihui",
      "author_url": "",
      "post_date": "2023-10-17T13:23:04.420000",
      "content": "<p>Congratulations on winning the competition with 2nd place. Thanks for sharing the solution.</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 2485778,
      "author_name": "ynhuhu",
      "author_url": "",
      "post_date": "2023-10-17T13:02:10.587000",
      "content": "<p>Congratulations, thanks for sharing a lot of work.</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 2485018,
      "author_name": "JSGandora",
      "author_url": "",
      "post_date": "2023-10-16T21:07:00.327000",
      "content": "<p>Congratulations on the great result and thank you for the write up!</p>\n<p>How much memory did each part if the pipeline require and what workstation setup did you use? I’m curious if the Kaggle machines could run your training and inference pipelines? I couldn’t find a way to use much more than a batch size of 8 samples of dimension 150x150x100 floats onto the GPU memory for training.</p>\n<p>I also found that ensembling models did not result in an improvement over the single best model presumably due to the high correlation between the models.</p>",
      "votes": 0,
      "replies": [
        {
          "id": 2485020,
          "author_name": "Theo Viel",
          "author_url": "",
          "post_date": "2023-10-16T21:10:26.577000",
          "content": "<p>Thanks ! I train models on 8x 32GB V100, RAM is not the bottleneck for most models. I use at most 11 frames per input though, biggest batches I am handling are of size 8x11x3x 224x224 and the GPU is not full.</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 2484903,
      "author_name": "Mark",
      "author_url": "",
      "post_date": "2023-10-16T18:39:41.763000",
      "content": "<p>Thanks for the great write up (and also the datasets)!</p>\n<p>For the 2D organ classifier that you trained, am I correct in reading that this was trained separately? If so, what training data did you use? </p>\n<blockquote>\n  <p>kidney / liver / spleen / negative bowel : Pick a random frame inside the organ.<br>\n  Did you use the provided 'segmentations' alone for this?</p>\n</blockquote>",
      "votes": 0,
      "replies": [
        {
          "id": 2484919,
          "author_name": "Theo Viel",
          "author_url": "",
          "post_date": "2023-10-16T18:58:55.930000",
          "content": "<p>You're welcome !</p>\n<p>Yep, it's trained on the provided segmentations.</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 2484873,
      "author_name": "David Roberts",
      "author_url": "",
      "post_date": "2023-10-16T18:19:48.217000",
      "content": "<p>Simple and elegant. Nice work <a href=\"https://www.kaggle.com/theoviel\" target=\"_blank\">@theoviel</a>, Thanks for sharing the datasets too. </p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 2484507,
      "author_name": "ls",
      "author_url": "",
      "post_date": "2023-10-16T14:32:24.123000",
      "content": "<p>congratulations and thanks for sharing the good work!</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 2483844,
      "author_name": "Gyula Maloveczky4",
      "author_url": "",
      "post_date": "2023-10-16T03:28:32.047000",
      "content": "<p>Great work! I feel for you regarding the last minute extension. Truly upsetting…</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 2483782,
      "author_name": "dragon zhang",
      "author_url": "",
      "post_date": "2023-10-16T01:47:38.170000",
      "content": "<p>thx for sharing. great work.</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 2937394,
      "author_name": "",
      "author_url": "",
      "post_date": "2024-07-27T03:51:52.520000",
      "content": "",
      "votes": 0,
      "replies": [
        {
          "id": 2937399,
          "author_name": "",
          "author_url": "",
          "post_date": "2024-07-27T04:04:01.100000",
          "content": "",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 2506963,
      "author_name": "",
      "author_url": "",
      "post_date": "2023-10-31T16:58:02.567000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 2484044,
      "author_name": "",
      "author_url": "",
      "post_date": "2023-10-16T07:22:58.777000",
      "content": "<p>Felicitations !! Merci pour le partage, toujours très instructif. Au boulot !</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 2485390,
      "author_name": "Fubuki",
      "author_url": "",
      "post_date": "2023-10-17T06:47:15.650000",
      "content": "<p>Thanks for sharing  great work!!</p>",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "2483739": "My solution combines knowledge acquired in participating in the previous RSNA challenges, and involves much more than the month I spent working intensively in the competition. I've always enjoyed joining RSNA challenges, and have a special affection for medical imaging because of my relatives' medical profession. \n\nAlthough 2nd is a great finish, the conditions in which it happened (i.e. unjustified deadline extension) make it really painful. The Kaggle team still does not understand how much modifying rules last minute hurts participants, or they simply don't care. I was already burnt out by competing full time for a month, adding 2 days on top plus missing first place by nothing is too much for me.\n\n**Updates:** \n- More details added, fixed num_classes mistake.\n- Inference code : https://www.kaggle.com/code/theoviel/rsna-abdominal-inf\n- **Training code on Github :** https://github.com/TheoViel/kaggle_rsna_abdominal_trauma\n\n## Data \nI use [my datasets] (https://www.kaggle.com/theoviel/datasets?sort=votes)! Give them a quick upvote so I can reach 4x GM. \nIn addition, I resize the longest edge to 512 & center crop to 384. I also use 1 frame out of 2 to speed up 2D models inference, and limit stack size to 600. For models requiring a specific input size, images were simply resized afterwards. \nImages are loaded with `dicomsdl` and processed on GPU.   It's fast. The pipeline without ensembling runs in less than 4h. \n\n## Models\n\n### Overview\n\nPipeline is below. It has two components: \n-\t2D models + RNN, where the frame-level labels are inferred using organ visibility classification when needed. \n-\tCrop models for kidney / liver / spleen. Results are fed to the RNN after pooling.\n\nIt re-uses winning ideas from the RSNA fracture competition (main references: [[1]](https://www.kaggle.com/competitions/rsna-2022-cervical-spine-fracture-detection/discussion/363232), [[2]](https://www.kaggle.com/competitions/rsna-2022-cervical-spine-fracture-detection/discussion/362640), [[3]](https://www.kaggle.com/competitions/rsna-2022-cervical-spine-fracture-detection/discussion/363232)).\n\n<a href=\"https://ibb.co/MBBh8wP\"><img src=\"https://i.ibb.co/fDDS86r/RSNA-Abd-drawio.png\" alt=\"RSNA-Abd-drawio\" border=\"0\"></a>\n\n### 2D models \n\nThe key to achieve good performance with 2D models is cleverly sampling frames to feed meaningful information and reduce label noise.\nTo do so, I use a simple but fast `efficientnetv2_rw_t` to infer which organs are present on every frame. During training, frames are sampled the following way:\n- kidney / liver / spleen / negative bowel : Pick a random frame inside the organ.\n- positive bowel / positive extravasation : Use the frame-level labels.\n- Negative extravasation : Sample anywhere\n\nThis model extracts probabilities for every 1/2 frame in the stack, and a RNN is trained on top to aggregate results. \n\n**Details :**\n- Heavy augmentations (HFlip, ShiftScaleRotate, Color augs, Blur augs, ElasticTransform) + cutmix (`p=0.5`)\n- `maxvit_tiny_tf_512` was best. `convnextv2_tiny` and `maxvit_tiny_tf_384` were also great. \n- Ranger optimizer, `bs=32`, 40 epochs, `lr=4e-5`\n- Only 3D info is the 3 adjacent frames used as channels.\n- 11 classes : `[bowel/extravasation]_injury`(BCE optimized). And `[kidney/liver/spleen]_[healthy/low/high]`  optimized with the cross entropy.\n\n### Crop models\n\nStrategy is similar : key is to feed to the model crops where the information is located. In that case, I used a 3D `resnet18` to crop the organs, and feed the crop to a 2D CNN + RNN model. It improves performances on kidney, liver and spleen by a good margin. \n\n**Details :**\n- Same augmentations with more cutmix (`p=1.`)\n- Ranger optimizer, `bs=8`, 20 epochs, `lr=2e-5`\n- Best model uses 11 frames sampled uniformly in the organ. I used different number of frames for ensembling.\n- `coatnet_1_rw_224` + RNN was best. I used different heads (RNN + attention, transformers) and other models CoatNet variants for ensembling.\n- 3 class cross-entropy loss.\n\n### RNN model\n\nIt is trained separately. Its role is to aggregate information from previous models, and optimize the competition metric directly.\n\n**Details :**\n- Restrict stack size to 600 (for faster loading), use 1/2 frame (for faster 2D inference). Sequences are then resized to 200 for batching. \n- Heavily tweaked LSTM architecture :\n  - 1x Dense + Bidi-LSTM for the 2D models probabilities. Input is the concatenation of the segmentation proba (`size=5`), the classification probas (`size=11 x n_models`), and the classification probas multiplied by the associated segmentation (`size=11 x n_models`)\n  - Pool using probabilities predicted by the segmentation model to get organ-conditioned features.\n  - Use the mean and max pooling of the `22 x n_models` 2D classification features\n  - Independent per organ logits, which have access to the corresponding pooled features. For instance the kidney logits sees only the crop features for the kidney (`3x n_crop_models` fts) , the RNN features pooled using the kidney segmentation, and the `3 x n_models` pooled 2D features for the kidney class.\n- AdamW optimizer, `bs=64`, 10 epochs, `lr=4e-5`\n\n### Things that did not work\n\n- YoloX + Ian Pan extravasation boxes. Tried using the data to get crops, and adding the confidence to the RNN model. It did not really help and was painful to implement.\n- Adding a sequential head to the first stage worked early on, but as my crop models got stronger I figured out 2D was enough. This allowed for a significant speed up of my inference pipeline which is nice.\n- Ensembling did not really help on private ultimately and my best sub is my strongest single model.\n- Stuff I tried during the 2 days extended deadline. I was happy with how I managed my time and knew the extension only meant more time for other teams to catch up. Thanks again Kaggle 😭\n\n## Scores : \n- 2D Classification + RNN :\n - Using ConvNext-v2: **Public 0.41** - **Private 0.39**\n- Add the crop model:\n - MaxVit (instead of ConvNext) +  CoatNet-RNN : **Public 0.37** - **Private 0.35** (best private)\n- Ensemble:\n - 3x2D models, 8x 2.5D models : **Public 0.35** - **Private 0.35**\n\n\n*Thanks for reading !*",
    "2483871": "thanks for the write up!\ncongratulations for the good work!\n\nwould it be possible to release your code, i would like to do a experiment repeat this week.\nThanks!\n\n(dirty code is ok)",
    "2483767": "Hello, I used your PNG Dataset during the competition. thank you !!\n\nI have two questions.\n\n1. “Only the RNN loss is weighted, other parts of the model aim to maximize AUC.”\nDoes this mean that you freeze the CNN model, extracted only the features, and then training only the LSTM?\n\n2. Organs have a depth of at least 100 sheets and up to 600sheets. How many sheets did you use in 2D + RNN?",
    "2484396": "Thanks for your sharing! Great work you have finished！ \nI notice that you used 2 different optimizer for training Crpped model and 2D model, are there any specific reasons for doing so ?\nAnd could please share some tips on how to choose the suitable optimizer, learing rate and the learning sheduler. These parameters really annoyed me a lot 😮‍💨.",
    "2484052": "Congrats for the gold!! and thx for providing the PNG conversion dataset and the notebook. I have a question about the loss.  Imbalance exists in the given dataset and want to know how did you handle it. ",
    "2484265": "Congratulations on winning the competition with 2nd place. Thanks for sharing the solution. ",
    "2552128": "Question about Segmentation. Why you use resnet18 as encoder, instead of using unet directly.\nThanks",
    "2514053": "Great work. I can't find where you got some of the csv files in the preparation.py file, \"df_train.csv\", \"df_images_train.csv\", and \"df_images_train_with_seg.csv\". I am going through the whole code to understand the process. Thank you",
    "2485814": "Congratulations on winning the competition with 2nd place. Thanks for sharing the solution.",
    "2485778": "Congratulations, thanks for sharing a lot of work.",
    "2485018": "Congratulations on the great result and thank you for the write up!\n\nHow much memory did each part if the pipeline require and what workstation setup did you use? I’m curious if the Kaggle machines could run your training and inference pipelines? I couldn’t find a way to use much more than a batch size of 8 samples of dimension 150x150x100 floats onto the GPU memory for training.\n\nI also found that ensembling models did not result in an improvement over the single best model presumably due to the high correlation between the models.",
    "2484903": "Thanks for the great write up (and also the datasets)!\n\nFor the 2D organ classifier that you trained, am I correct in reading that this was trained separately? If so, what training data did you use? \n>kidney / liver / spleen / negative bowel : Pick a random frame inside the organ.\nDid you use the provided 'segmentations' alone for this?",
    "2484873": "Simple and elegant. Nice work @theoviel, Thanks for sharing the datasets too. ",
    "2484507": " congratulations and thanks for sharing the good work!",
    "2483844": "Great work! I feel for you regarding the last minute extension. Truly upsetting...",
    "2483782": "thx for sharing. great work.",
    "2937394": "",
    "2506963": "",
    "2484044": "Felicitations !! Merci pour le partage, toujours très instructif. Au boulot !",
    "2485390": "Thanks for sharing  great work!!"
  }
}