{
  "id": 117210,
  "title": "1st Place Solution. Sequential model wins",
  "url": "/competitions/rsna-intracranial-hemorrhage-detection/discussion/117210",
  "author_name": "SeuTao",
  "post_date": "2019-11-14T00:04:37.181000",
  "votes": 235,
  "comment_count": 73,
  "views": 0,
  "content": "<p>The key module of our pipeline is a sequence model. It works well and there is no shakeup.\nCode : <a href=\"https://github.com/SeuTao/RSNA2019_1st_place_solution\">https://github.com/SeuTao/RSNA2019_1st_place_solution</a></p>\n\n<h1>Overview</h1>\n\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1025985%2F550d2dfb85771f93e0f2c8f1dbc2f62c%2Fsequence%20model%20with%20big%20bar%20align.png?generation=1574528142297990&amp;alt=media\" alt=\"\"></p>\n\n<h1>2D CNN Modeling</h1>\n\n<p><strong>Data pre-processing &amp; augmentation</strong>\nOur team has three 2d classifier pipelines. The three pipelines share different input settings (3 channels):\n<code>\n1. Single sclice with 3 windows.\n2. Spatially adjacent 3 slices with one window.\n3. Combination of 1 and 2: Spatially adjacent 3 slices with three windows.\n</code>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1025985%2Fd22fed8b4fba54c637627bacb41666ad%2F2019-11-24%203.51.01.png?generation=1574582336956604&amp;alt=media\" alt=\"\"></p>\n\n<p>The windows we use are:\n<code>\nBrain Window[40, 80],\nSubdural Window[80, 200],\nBone Window[600, 2800]\n</code>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1025985%2F93bbbae12be594c19554a35956fe85be%2F1.png?generation=1574581640882170&amp;alt=media\" alt=\"\"></p>\n\n<p>Augmentations:\n- Random ShiftScaleRotate\n- Random resize crop \n- Random HFlip</p>\n\n<p>Training strategy\n- Randomly sample images form different SeriesInstanceUID\n- Each epoch was trained on 4 times SeriesInstanceUIDs\n- Adam optimiser with cycle learning rate (5e-4~1e-5)</p>\n\n<h1>Sequence Model Development</h1>\n\n<p><strong>Sequence model 1:  MLP + LSTM</strong> \nInput: \n- Slice embeddings from multi models (num_models*feature dim) \n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1025985%2Fcdc6c8d3af12a81695dd50da3d930cb8%2Fsequence%20model%201.png?generation=1574645166546352&amp;alt=media\" alt=\"\"></p>\n\n<p><strong>Sequence model 2:  1d CNN + LSTM</strong>\nInput: \n- Logits from multi 2D CNN models (num_models*6 class output) \n- Logits from sequence model 1 (6 class output) \n- Meta info (Position)</p>\n\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1025985%2F4b20e615b4331031628e2b27f5a9ddf2%2F2.png?generation=1574582851737685&amp;alt=media\" alt=\"\"></p>",
  "messages": [
    {
      "id": 672486,
      "postDate": "2019-11-14T00:04:37.180Z",
      "content": "<p>The key module of our pipeline is a sequence model. It works well and there is no shakeup.\nCode : <a href=\"https://github.com/SeuTao/RSNA2019_1st_place_solution\">https://github.com/SeuTao/RSNA2019_1st_place_solution</a></p>\n\n<h1>Overview</h1>\n\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1025985%2F550d2dfb85771f93e0f2c8f1dbc2f62c%2Fsequence%20model%20with%20big%20bar%20align.png?generation=1574528142297990&amp;alt=media\" alt=\"\"></p>\n\n<h1>2D CNN Modeling</h1>\n\n<p><strong>Data pre-processing &amp; augmentation</strong>\nOur team has three 2d classifier pipelines. The three pipelines share different input settings (3 channels):\n<code>\n1. Single sclice with 3 windows.\n2. Spatially adjacent 3 slices with one window.\n3. Combination of 1 and 2: Spatially adjacent 3 slices with three windows.\n</code>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1025985%2Fd22fed8b4fba54c637627bacb41666ad%2F2019-11-24%203.51.01.png?generation=1574582336956604&amp;alt=media\" alt=\"\"></p>\n\n<p>The windows we use are:\n<code>\nBrain Window[40, 80],\nSubdural Window[80, 200],\nBone Window[600, 2800]\n</code>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1025985%2F93bbbae12be594c19554a35956fe85be%2F1.png?generation=1574581640882170&amp;alt=media\" alt=\"\"></p>\n\n<p>Augmentations:\n- Random ShiftScaleRotate\n- Random resize crop \n- Random HFlip</p>\n\n<p>Training strategy\n- Randomly sample images form different SeriesInstanceUID\n- Each epoch was trained on 4 times SeriesInstanceUIDs\n- Adam optimiser with cycle learning rate (5e-4~1e-5)</p>\n\n<h1>Sequence Model Development</h1>\n\n<p><strong>Sequence model 1:  MLP + LSTM</strong> \nInput: \n- Slice embeddings from multi models (num_models*feature dim) \n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1025985%2Fcdc6c8d3af12a81695dd50da3d930cb8%2Fsequence%20model%201.png?generation=1574645166546352&amp;alt=media\" alt=\"\"></p>\n\n<p><strong>Sequence model 2:  1d CNN + LSTM</strong>\nInput: \n- Logits from multi 2D CNN models (num_models*6 class output) \n- Logits from sequence model 1 (6 class output) \n- Meta info (Position)</p>\n\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1025985%2F4b20e615b4331031628e2b27f5a9ddf2%2F2.png?generation=1574582851737685&amp;alt=media\" alt=\"\"></p>",
      "rawMarkdown": "The key module of our pipeline is a sequence model. It works well and there is no shakeup.\nCode : https://github.com/SeuTao/RSNA2019_1st_place_solution\n\n# Overview\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1025985%2F550d2dfb85771f93e0f2c8f1dbc2f62c%2Fsequence%20model%20with%20big%20bar%20align.png?generation=1574528142297990&amp;alt=media)\n\n# 2D CNN Modeling\n\n**Data pre-processing &amp; augmentation**\nOur team has three 2d classifier pipelines. The three pipelines share different input settings (3 channels):\n```\n1. Single sclice with 3 windows.\n2. Spatially adjacent 3 slices with one window.\n3. Combination of 1 and 2: Spatially adjacent 3 slices with three windows.\n```\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1025985%2Fd22fed8b4fba54c637627bacb41666ad%2F2019-11-24%203.51.01.png?generation=1574582336956604&amp;alt=media)\n\nThe windows we use are:\n```\nBrain Window[40, 80],\nSubdural Window[80, 200],\nBone Window[600, 2800]\n```\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1025985%2F93bbbae12be594c19554a35956fe85be%2F1.png?generation=1574581640882170&amp;alt=media)\n\nAugmentations:\n- Random ShiftScaleRotate\n- Random resize crop \n- Random HFlip\n\nTraining strategy\n- Randomly sample images form different SeriesInstanceUID\n- Each epoch was trained on 4 times SeriesInstanceUIDs\n- Adam optimiser with cycle learning rate (5e-4~1e-5)\n\n# Sequence Model Development\n\n**Sequence model 1:  MLP + LSTM** \nInput: \n- Slice embeddings from multi models (num_models*feature dim) \n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1025985%2Fcdc6c8d3af12a81695dd50da3d930cb8%2Fsequence%20model%201.png?generation=1574645166546352&amp;alt=media)\n\n\n**Sequence model 2:  1d CNN + LSTM**\nInput: \n- Logits from multi 2D CNN models (num_models*6 class output) \n- Logits from sequence model 1 (6 class output) \n- Meta info (Position)\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1025985%2F4b20e615b4331031628e2b27f5a9ddf2%2F2.png?generation=1574582851737685&amp;alt=media)\n",
      "votes": 234
    },
    {
      "id": 1026613,
      "postDate": "2020-09-25T12:54:29.580Z",
      "content": "<p>The illustrations are beautiful👍. I want to know what software you used to generate them👀</p>",
      "rawMarkdown": "The illustrations are beautiful👍. I want to know what software you used to generate them👀",
      "votes": 9
    },
    {
      "id": 673591,
      "postDate": "2019-11-15T07:41:30.213Z",
      "content": "<p>Congratulations! This is so awesome that the 1st position solution is this. (Shameless self-plug) We wrote a paper couple of years ago for hemorrhage detection using the same idea! It was actually as good as radiologists (in a small study) as well. I wonder if you stumbled upon it/found it useful! <a href=\"https://arxiv.org/abs/1710.04934\">https://arxiv.org/abs/1710.04934</a></p>",
      "rawMarkdown": "Congratulations! This is so awesome that the 1st position solution is this. (Shameless self-plug) We wrote a paper couple of years ago for hemorrhage detection using the same idea! It was actually as good as radiologists (in a small study) as well. I wonder if you stumbled upon it/found it useful! https://arxiv.org/abs/1710.04934",
      "votes": 10,
      "replies": [
        {
          "id": 772435,
          "postDate": "2020-03-15T13:41:35.233Z",
          "content": "<p>Thanks for this. I am currently working on Brain Hemorrhage Classification for my undergraduate thesis. This paper is a great reference for my research.</p>",
          "rawMarkdown": "Thanks for this. I am currently working on Brain Hemorrhage Classification for my undergraduate thesis. This paper is a great reference for my research.",
          "votes": 1
        }
      ]
    },
    {
      "id": 805923,
      "postDate": "2020-04-13T08:33:26.407Z",
      "content": "<p>Is there any where i can find the model ready to do predictions or do i need to follow the steps and re train it ?</p>",
      "rawMarkdown": "Is there any where i can find the model ready to do predictions or do i need to follow the steps and re train it ?",
      "votes": 5
    },
    {
      "id": 672494,
      "postDate": "2019-11-14T00:12:30.383Z",
      "content": "<p>牛</p>",
      "rawMarkdown": "牛",
      "votes": 6
    },
    {
      "id": 691441,
      "postDate": "2019-12-10T06:19:07.363Z",
      "content": "<p>Congratulations and thanks for sharing your code! Trying to understand your pre-processing code (2DCNN/src/prepare_data.py) - can I check which function creates the three pipelines (1. Single slice with 3 windows. 2. Spatially adjacent 3 slices with one window. 3. Combination of 1 and 2: Spatially adjacent 3 slices with three windows), and whether the resulting .png files should contain three channels? Sorry if I'm asking silly questions. Thank you very much! </p>",
      "rawMarkdown": "Congratulations and thanks for sharing your code! Trying to understand your pre-processing code (2DCNN/src/prepare_data.py) - can I check which function creates the three pipelines (1. Single slice with 3 windows. 2. Spatially adjacent 3 slices with one window. 3. Combination of 1 and 2: Spatially adjacent 3 slices with three windows), and whether the resulting .png files should contain three channels? Sorry if I'm asking silly questions. Thank you very much! ",
      "votes": 3,
      "replies": [
        {
          "id": 691452,
          "postDate": "2019-12-10T06:41:59.267Z",
          "content": "<p>Thank you! We have three pipelines for single 2D CNN training. The uploaded code is one of the three which only applies the 2nd preprocessing method (Spatially adjacent 3 slices with one window). I'm now combining the three pipelines into one. The pretrained models using the code on github is uploaded.</p>",
          "rawMarkdown": "Thank you! We have three pipelines for single 2D CNN training. The uploaded code is one of the three which only applies the 2nd preprocessing method (Spatially adjacent 3 slices with one window). I'm now combining the three pipelines into one. The pretrained models using the code on github is uploaded."
        }
      ]
    },
    {
      "id": 672542,
      "postDate": "2019-11-14T01:28:51.187Z",
      "content": "<p>Congrats SeuTao ! Amazed by the suggested sequence model. It can possibly be a small revolution for future models using 3d slices in medical imaging. Conceptually, this is also tightly bound with the usual way to interpret these exams (by scrolling dynamically through the slices). Looking forward to know more about your solution.</p>",
      "rawMarkdown": "Congrats SeuTao ! Amazed by the suggested sequence model. It can possibly be a small revolution for future models using 3d slices in medical imaging. Conceptually, this is also tightly bound with the usual way to interpret these exams (by scrolling dynamically through the slices). Looking forward to know more about your solution.",
      "votes": 3
    },
    {
      "id": 672512,
      "postDate": "2019-11-14T00:41:19.633Z",
      "content": "<p>Congrat <a href=\"/shentao\">@shentao</a> !! Although our team may miss gold, one of our key is the sequence model too. Looking forward to learn from your solutiom!!</p>",
      "rawMarkdown": "Congrat @shentao !! Although our team may miss gold, one of our key is the sequence model too. Looking forward to learn from your solutiom!!",
      "votes": 3
    },
    {
      "id": 682330,
      "postDate": "2019-11-27T09:27:23.827Z",
      "content": "<p>Congratulations and thanks for sharing your approach and code. Best of luck for next competition.</p>",
      "rawMarkdown": "Congratulations and thanks for sharing your approach and code. Best of luck for next competition.",
      "votes": 1
    },
    {
      "id": 681362,
      "postDate": "2019-11-26T02:30:33.240Z",
      "content": "<p>Hi SeuTao, congratulations and they are very clear flowcharts, thanks for sharing!</p>\n\n<p>I am trying to analyse the difference between your approach and ours. Apart from the architecture design of sequence model (you used many GRU blocks, which we did not try; I presume they bring some improvement), one major difference is the introduction of Sequence Model 2, which is based on the outputs of the other two models. Actually, we thought about doing something similar but did not have enough time to implement. </p>\n\n<p>May I know how much improvement the Sequence Model 2 bring? In other words, what is the score if the output of Sequence Model 1 is used directly as the final predictions. </p>\n\n<p>Many thanks in advance,\nTC</p>",
      "rawMarkdown": "Hi SeuTao, congratulations and they are very clear flowcharts, thanks for sharing!\n\nI am trying to analyse the difference between your approach and ours. Apart from the architecture design of sequence model (you used many GRU blocks, which we did not try; I presume they bring some improvement), one major difference is the introduction of Sequence Model 2, which is based on the outputs of the other two models. Actually, we thought about doing something similar but did not have enough time to implement. \n\nMay I know how much improvement the Sequence Model 2 bring? In other words, what is the score if the output of Sequence Model 1 is used directly as the final predictions. \n\nMany thanks in advance,\nTC\n",
      "votes": 1,
      "replies": [
        {
          "id": 681375,
          "postDate": "2019-11-26T02:56:14.963Z",
          "content": "<p>Thank you! I just follow the flowcharts from your team's post :) In my implementation，the sequence model 2  did two things: 1）multi model output stacking; 2）sequence modeling with meta info;\nWhen we finished 4 CNN model ensemble (0.060 in stage1 with naive postprocessing),  I use 1d cnn to do stacking (baseline seq model 2). It boosts the score from 0.060 to 0.057. Adding GRU with Position2 get us 0.056 on leaderboard. After this, I start to add the seq model 1 module into the pipeline. Adding some tricks we can get the final score of 0.054 in stage1. Actually, I did not even submit the result of seq model 1. It is a part of my seq model :)</p>",
          "rawMarkdown": "Thank you! I just follow the flowcharts from your team's post :) In my implementation，the sequence model 2  did two things: 1）multi model output stacking; 2）sequence modeling with meta info;\nWhen we finished 4 CNN model ensemble (0.060 in stage1 with naive postprocessing),  I use 1d cnn to do stacking (baseline seq model 2). It boosts the score from 0.060 to 0.057. Adding GRU with Position2 get us 0.056 on leaderboard. After this, I start to add the seq model 1 module into the pipeline. Adding some tricks we can get the final score of 0.054 in stage1. Actually, I did not even submit the result of seq model 1. It is a part of my seq model :)"
        },
        {
          "id": 681378,
          "postDate": "2019-11-26T03:00:20.183Z",
          "content": "<p>The code of seq models:\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1025985%2F599e346fa8572a0a77cf1e64aa03584b%2F2019-11-26%2010.58.45.png?generation=1574737169081451&amp;alt=media\" alt=\"\"></p>",
          "rawMarkdown": "The code of seq models:\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1025985%2F599e346fa8572a0a77cf1e64aa03584b%2F2019-11-26%2010.58.45.png?generation=1574737169081451&amp;alt=media)\n"
        },
        {
          "id": 681589,
          "postDate": "2019-11-26T09:40:34.720Z",
          "content": "<p>Thanks for sharing the code screenshot! From the flowchart, I thought Sequence Model 1 and Sequence Model 2 were trained separately. Now I understand they were trained end-to-end. Very creative sequential model design 👍 </p>",
          "rawMarkdown": "Thanks for sharing the code screenshot! From the flowchart, I thought Sequence Model 1 and Sequence Model 2 were trained separately. Now I understand they were trained end-to-end. Very creative sequential model design 👍 ",
          "votes": 1
        }
      ]
    },
    {
      "id": 674908,
      "postDate": "2019-11-17T09:12:44.187Z",
      "content": "<p>Laotie NB 666👍 </p>",
      "rawMarkdown": "Laotie NB 666👍 ",
      "votes": 1,
      "replies": [
        {
          "id": 680918,
          "postDate": "2019-11-25T11:57:58.147Z",
          "content": "<p>Haaa, Yi Shi Meng Bi</p>",
          "rawMarkdown": "Haaa, Yi Shi Meng Bi"
        }
      ]
    },
    {
      "id": 673765,
      "postDate": "2019-11-15T13:17:09.607Z",
      "content": "<p>Congratulations!\nDid you perform any type of normalization/scaling when you input the sequence position (z-position)? If so, was the normalization/scaling within each signle scan or across the whole dataset? I tried scaling sequence positions of each scan into [0,1], and appended the position of each slice as a new dimension of feature when I was training my RNN model, but my model did not get any benefit from the sequence positions.</p>",
      "rawMarkdown": "Congratulations!\nDid you perform any type of normalization/scaling when you input the sequence position (z-position)? If so, was the normalization/scaling within each signle scan or across the whole dataset? I tried scaling sequence positions of each scan into [0,1], and appended the position of each slice as a new dimension of feature when I was training my RNN model, but my model did not get any benefit from the sequence positions.",
      "votes": 1,
      "replies": [
        {
          "id": 673802,
          "postDate": "2019-11-15T14:02:47.477Z",
          "content": "<p>Thank you! I just feed the first order difference of the position2 into the NN which actually represents slice thickness. This thickness information gave me ~0.0005 boost. I also did some random sampling in the sequence during training.</p>",
          "rawMarkdown": "Thank you! I just feed the first order difference of the position2 into the NN which actually represents slice thickness. This thickness information gave me ~0.0005 boost. I also did some random sampling in the sequence during training.",
          "votes": 3
        },
        {
          "id": 673811,
          "postDate": "2019-11-15T14:14:07.520Z",
          "content": "<p>There is a little bit of domain knowledge behind such operation. Slices with different thicknesses have different image quality (noise level) due to the reconstruction settings.</p>",
          "rawMarkdown": "There is a little bit of domain knowledge behind such operation. Slices with different thicknesses have different image quality (noise level) due to the reconstruction settings.",
          "votes": 3
        },
        {
          "id": 674124,
          "postDate": "2019-11-15T23:00:36.687Z",
          "content": "<p>Very interesting, thanks!</p>",
          "rawMarkdown": "Very interesting, thanks!"
        }
      ]
    },
    {
      "id": 672553,
      "postDate": "2019-11-14T01:41:28.247Z",
      "content": "<p>Congratulations!\nI'm looking forward to see your solution as well - I didn't even think of using sequence models. \nAnd from what I've seen in discussions after the competition end at least 3 top solution will have them.\nThis competition was really great for learning new methods, techniques and ideas...</p>",
      "rawMarkdown": "Congratulations!\nI'm looking forward to see your solution as well - I didn't even think of using sequence models. \nAnd from what I've seen in discussions after the competition end at least 3 top solution will have them.\nThis competition was really great for learning new methods, techniques and ideas...",
      "votes": 1
    },
    {
      "id": 672525,
      "postDate": "2019-11-14T00:52:02.033Z",
      "content": "<p>congrats <a href=\"/shentao\">@shentao</a>  Beautiful! Can you give us more details. Which sequence model you used, how about windows?</p>",
      "rawMarkdown": "congrats @shentao  Beautiful! Can you give us more details. Which sequence model you used, how about windows?",
      "votes": 1
    },
    {
      "id": 672500,
      "postDate": "2019-11-14T00:19:55.807Z",
      "content": "<p>Wonderful</p>",
      "rawMarkdown": "Wonderful",
      "votes": 1
    },
    {
      "id": 672491,
      "postDate": "2019-11-14T00:07:01.017Z",
      "content": "<p>Congrats! Looking forward to write up!</p>",
      "rawMarkdown": "Congrats! Looking forward to write up!",
      "votes": 1
    },
    {
      "id": 672490,
      "postDate": "2019-11-14T00:06:39.387Z",
      "content": "<p>Congratulations! I too wanted to do a sequence model (based on Transformers) but ran out of time!</p>",
      "rawMarkdown": "Congratulations! I too wanted to do a sequence model (based on Transformers) but ran out of time!",
      "votes": 1
    },
    {
      "id": 672488,
      "postDate": "2019-11-14T00:06:30.620Z",
      "content": "<p>Congrats the champions, \nYour solution is always impressive. I cant wait to see it. </p>",
      "rawMarkdown": "Congrats the champions, \nYour solution is always impressive. I cant wait to see it. ",
      "votes": 1
    },
    {
      "id": 682640,
      "postDate": "2019-11-27T17:51:01.807Z",
      "content": "<p>Excellent work and thanks for sharing the solution. Gives me lots to look up and learn 😊</p>",
      "rawMarkdown": "Excellent work and thanks for sharing the solution. Gives me lots to look up and learn 😊",
      "votes": 2
    },
    {
      "id": 672526,
      "postDate": "2019-11-14T00:52:20.787Z",
      "content": "<p>congrats!</p>",
      "rawMarkdown": "congrats!",
      "votes": 2
    },
    {
      "id": 1053852,
      "postDate": "2020-10-19T12:27:41.017Z",
      "content": "<p><a href=\"https://www.kaggle.com/shentao\" target=\"_blank\">@shentao</a>  would u like to team up rsna embolism .. i messaged  you for team up.<br>\nNo worries if you like to work solo.<br>\nI thought approaches can be ensembled towards the end..</p>",
      "rawMarkdown": "@shentao  would u like to team up rsna embolism .. i messaged  you for team up.\nNo worries if you like to work solo.\nI thought approaches can be ensembled towards the end..",
      "votes": -5
    },
    {
      "id": 1595104,
      "postDate": "2021-11-25T12:17:29.017Z",
      "content": "<p>Great solution!</p>",
      "rawMarkdown": "Great solution!"
    },
    {
      "id": 1517779,
      "postDate": "2021-09-20T04:40:59.163Z",
      "content": "<p>congrats👍</p>",
      "rawMarkdown": "congrats👍"
    },
    {
      "id": 1394029,
      "postDate": "2021-07-20T05:54:55.500Z",
      "content": "<p>is this any pretrained model being used in this?</p>",
      "rawMarkdown": "is this any pretrained model being used in this?"
    },
    {
      "id": 1317172,
      "postDate": "2021-05-21T07:39:00.733Z",
      "content": "<p>Hello, Thank you for your great work. I am trying to rebuild it, but you mentioned in your description that the output of the CNN Model is saved in ./SingleModelOutput. But such folder is not generated. So even if I could find the npy file in the prediction folder of the single models- but I wonder how exactly the fine_test_stage2_sample.npy files are generated, as this is not mentioned in the code. Can I simply append the single npy files and use the mean of the folds or how to deal with it? I know that I can also use your output in the st_se101_256_Fine folder for example but I want to rebuild everything. <br>\nThank you in advance!</p>",
      "rawMarkdown": "Hello, Thank you for your great work. I am trying to rebuild it, but you mentioned in your description that the output of the CNN Model is saved in ./SingleModelOutput. But such folder is not generated. So even if I could find the npy file in the prediction folder of the single models- but I wonder how exactly the fine_test_stage2_sample.npy files are generated, as this is not mentioned in the code. Can I simply append the single npy files and use the mean of the folds or how to deal with it? I know that I can also use your output in the st_se101_256_Fine folder for example but I want to rebuild everything. \nThank you in advance!",
      "replies": [
        {
          "id": 1594853,
          "postDate": "2021-11-25T07:02:54.473Z",
          "content": "<p>Hello, what kind of preprocessing method do you use when generating np files? Is it the third method?</p>",
          "rawMarkdown": "Hello, what kind of preprocessing method do you use when generating np files? Is it the third method?"
        },
        {
          "id": 1721144,
          "postDate": "2022-03-13T13:02:25.427Z",
          "content": "<p>I have the same question as well, have you managed to find out the exact way to generating .npy feature files (i.e., what is the order of features in this .npy file as the .npy does not have any information on filename it self). I am using the mean of the folds as well.<br>\nIn the end I got a much worse result than just using the prediction from CNN model. If you have any idea please let me know! Thank you!</p>",
          "rawMarkdown": "I have the same question as well, have you managed to find out the exact way to generating .npy feature files (i.e., what is the order of features in this .npy file as the .npy does not have any information on filename it self). I am using the mean of the folds as well.\nIn the end I got a much worse result than just using the prediction from CNN model. If you have any idea please let me know! Thank you!"
        }
      ]
    },
    {
      "id": 1029668,
      "postDate": "2020-09-28T02:59:06.220Z",
      "content": "<p>Congratulations! &lt;3 </p>",
      "rawMarkdown": "Congratulations! <3 "
    },
    {
      "id": 1027945,
      "postDate": "2020-09-26T13:41:43.700Z",
      "content": "<p>Good job, continue like this ! BRAVO </p>",
      "rawMarkdown": "Good job, continue like this ! BRAVO "
    },
    {
      "id": 1027905,
      "postDate": "2020-09-26T13:10:30.940Z",
      "content": "<p>Good work ! keep it up </p>",
      "rawMarkdown": "Good work ! keep it up "
    },
    {
      "id": 1025122,
      "postDate": "2020-09-24T10:45:12.363Z",
      "content": "<p>Congrats , and Thanks for sharing <a href=\"/shentao\">@shentao</a> </p>",
      "rawMarkdown": "Congrats , and Thanks for sharing @shentao "
    },
    {
      "id": 1019118,
      "postDate": "2020-09-20T07:53:03.470Z",
      "content": "<p>Nice work!!</p>",
      "rawMarkdown": "Nice work!!"
    },
    {
      "id": 984468,
      "postDate": "2020-08-25T05:32:36.680Z",
      "content": "<p>Impressive thought!</p>",
      "rawMarkdown": "Impressive thought!"
    },
    {
      "id": 876963,
      "postDate": "2020-06-07T07:51:11.847Z",
      "content": "<p>Congratulations on your win! <a href=\"/shentao\">@shentao</a> </p>\n\n<p>I had a few questions \n1. Did you train the CNN and Sequence models as a joint model or you trained a CNN network first and then extracted the embedding from the GAP layer and then trained a separate Bi-LSTM model?</p>\n\n<ol>\n<li>What information is the sequence model trying to capture from the image embeddings?</li>\n</ol>\n\n<p>Thanks</p>",
      "rawMarkdown": "Congratulations on your win! @shentao \n\nI had a few questions \n1. Did you train the CNN and Sequence models as a joint model or you trained a CNN network first and then extracted the embedding from the GAP layer and then trained a separate Bi-LSTM model?\n\n2. What information is the sequence model trying to capture from the image embeddings?\n\nThanks"
    },
    {
      "id": 680439,
      "postDate": "2019-11-24T16:49:48.203Z",
      "content": "<p>Congrats! Very nice workflow and code.\nWhat computational resources (GPU, RAM, CPU, etc.) were used to train your models?\nHow long it takes to train your model? \nThanks!</p>",
      "rawMarkdown": "Congrats! Very nice workflow and code.\nWhat computational resources (GPU, RAM, CPU, etc.) were used to train your models?\nHow long it takes to train your model? \nThanks!",
      "replies": [
        {
          "id": 681379,
          "postDate": "2019-11-26T03:12:09.730Z",
          "content": "<p>Thank you! We have 4*V100 for the 2D CNN training. It may take 3-4 days to finish the 2D CNN models training. For the seq models, It takes a few hours on one GPU.</p>",
          "rawMarkdown": "Thank you! We have 4*V100 for the 2D CNN training. It may take 3-4 days to finish the 2D CNN models training. For the seq models, It takes a few hours on one GPU.",
          "votes": 1
        },
        {
          "id": 685578,
          "postDate": "2019-12-02T00:08:00.633Z",
          "content": "<p>Nice model! :) just for curious, what was the inference time for one image?</p>",
          "rawMarkdown": "Nice model! :) just for curious, what was the inference time for one image?"
        },
        {
          "id": 685626,
          "postDate": "2019-12-02T02:38:45.477Z",
          "content": "<p>For the backbone seresnext101 model,  one image inference time is ~40ms on 1 1080ti without TTA.</p>",
          "rawMarkdown": "For the backbone seresnext101 model,  one image inference time is ~40ms on 1 1080ti without TTA."
        }
      ]
    },
    {
      "id": 674761,
      "postDate": "2019-11-17T03:05:41.520Z",
      "content": "<p>恭喜恭喜</p>",
      "rawMarkdown": "恭喜恭喜"
    },
    {
      "id": 674510,
      "postDate": "2019-11-16T15:54:59.067Z",
      "content": "<p>Very interesting! Congrats!</p>",
      "rawMarkdown": "Very interesting! Congrats!"
    },
    {
      "id": 673720,
      "postDate": "2019-11-15T11:52:17.693Z",
      "content": "<p>congratz</p>",
      "rawMarkdown": "congratz"
    },
    {
      "id": 673427,
      "postDate": "2019-11-15T00:37:21.520Z",
      "content": "<p>Congrats! It was interesting for me that sequence model is used for image classification.</p>",
      "rawMarkdown": "Congrats! It was interesting for me that sequence model is used for image classification."
    },
    {
      "id": 673203,
      "postDate": "2019-11-14T16:59:27.263Z",
      "content": "<p>Congrats!</p>",
      "rawMarkdown": "Congrats!"
    },
    {
      "id": 673200,
      "postDate": "2019-11-14T16:53:18.240Z",
      "content": "<p>Congratulations!🎉 😄 </p>",
      "rawMarkdown": "Congratulations!🎉 😄 "
    },
    {
      "id": 673180,
      "postDate": "2019-11-14T16:07:24.350Z",
      "content": "<p>congrats </p>",
      "rawMarkdown": "congrats \n"
    },
    {
      "id": 673103,
      "postDate": "2019-11-14T14:17:09.943Z",
      "content": "<p>Congrats!!!</p>",
      "rawMarkdown": "Congrats!!!"
    },
    {
      "id": 672974,
      "postDate": "2019-11-14T10:54:47.917Z",
      "content": "<p>Congrats, looking forward to learn from your sequence model</p>",
      "rawMarkdown": "Congrats, looking forward to learn from your sequence model"
    },
    {
      "id": 672931,
      "postDate": "2019-11-14T09:53:53.673Z",
      "content": "<p>👋 👋 👋 </p>",
      "rawMarkdown": "👋 👋 👋 "
    },
    {
      "id": 672888,
      "postDate": "2019-11-14T08:52:23.257Z",
      "content": "<p><strong>Congratulations !</strong></p>",
      "rawMarkdown": "**Congratulations !**"
    },
    {
      "id": 672887,
      "postDate": "2019-11-14T08:52:09.740Z",
      "content": "<p>👍 </p>",
      "rawMarkdown": "👍 "
    },
    {
      "id": 672781,
      "postDate": "2019-11-14T06:36:11.590Z",
      "content": "<p>Congratulations <a href=\"/shentao\">@shentao</a> for a well deserved win.</p>",
      "rawMarkdown": "Congratulations @shentao for a well deserved win."
    },
    {
      "id": 672755,
      "postDate": "2019-11-14T05:59:06.893Z",
      "content": "<p>Congratulations for your first 1st place. You and your team truly deserves it. Looking forward to learn a lot from your(and your team) approach. </p>",
      "rawMarkdown": "Congratulations for your first 1st place. You and your team truly deserves it. Looking forward to learn a lot from your(and your team) approach. "
    },
    {
      "id": 672753,
      "postDate": "2019-11-14T05:52:57.910Z",
      "content": "<p>👋 👋 👋 </p>",
      "rawMarkdown": "👋 👋 👋 "
    },
    {
      "id": 672652,
      "postDate": "2019-11-14T03:39:55.267Z",
      "content": "<p>Congrats!!!\n终于不是千年老二了😄 </p>",
      "rawMarkdown": "Congrats!!!\n终于不是千年老二了😄 "
    },
    {
      "id": 672637,
      "postDate": "2019-11-14T03:15:28.007Z",
      "content": "<p>niubility</p>",
      "rawMarkdown": "niubility"
    },
    {
      "id": 672597,
      "postDate": "2019-11-14T02:25:43.090Z",
      "content": "<p>Congrats! No [placeholder] this time?</p>",
      "rawMarkdown": "Congrats! No [placeholder] this time?",
      "replies": [
        {
          "id": 672603,
          "postDate": "2019-11-14T02:30:52.813Z",
          "content": "<p>I will update the writeup and code soon😂.</p>",
          "rawMarkdown": "I will update the writeup and code soon😂.",
          "votes": 5
        }
      ]
    },
    {
      "id": 672590,
      "postDate": "2019-11-14T02:19:01.460Z",
      "content": "<p>Congrats! Shen Tao!</p>",
      "rawMarkdown": "Congrats! Shen Tao!"
    },
    {
      "id": 672584,
      "postDate": "2019-11-14T02:10:23.453Z",
      "content": "<p>Congratulations! Well-deserved! :-)</p>",
      "rawMarkdown": "Congratulations! Well-deserved! :-)"
    },
    {
      "id": 672560,
      "postDate": "2019-11-14T01:53:02.180Z",
      "content": "<p>congrats <a href=\"/shentao\">@shentao</a> even i was fed up by your 2nd ranks 😂  </p>",
      "rawMarkdown": "congrats @shentao even i was fed up by your 2nd ranks 😂  "
    },
    {
      "id": 672558,
      "postDate": "2019-11-14T01:50:37.890Z",
      "content": "<p>Congratulations, and looking forward to the details !</p>",
      "rawMarkdown": "Congratulations, and looking forward to the details !"
    },
    {
      "id": 672541,
      "postDate": "2019-11-14T01:26:30.820Z",
      "content": "<p>congratulations ... looking forward for the winning solution writeup .</p>",
      "rawMarkdown": "congratulations ... looking forward for the winning solution writeup ."
    },
    {
      "id": 1011991,
      "postDate": "2020-09-15T20:25:53.867Z",
      "rawMarkdown": "",
      "isDeleted": true
    },
    {
      "id": 672722,
      "postDate": "2019-11-14T04:55:38.650Z",
      "rawMarkdown": "",
      "isDeleted": true
    },
    {
      "id": 676962,
      "postDate": "2019-11-19T16:52:36.500Z",
      "content": "<p>Wow ! Thanks for sharing! Congrats !</p>",
      "rawMarkdown": "Wow ! Thanks for sharing! Congrats !\n"
    }
  ],
  "comments": [
    {
      "id": 1026613,
      "author_name": "liyutg",
      "author_url": "",
      "post_date": "2020-09-25T12:54:29.580000",
      "content": "<p>The illustrations are beautiful👍. I want to know what software you used to generate them👀</p>",
      "votes": 9,
      "replies": []
    },
    {
      "id": 673591,
      "author_name": "hirviö",
      "author_url": "",
      "post_date": "2019-11-15T07:41:30.213000",
      "content": "<p>Congratulations! This is so awesome that the 1st position solution is this. (Shameless self-plug) We wrote a paper couple of years ago for hemorrhage detection using the same idea! It was actually as good as radiologists (in a small study) as well. I wonder if you stumbled upon it/found it useful! <a href=\"https://arxiv.org/abs/1710.04934\">https://arxiv.org/abs/1710.04934</a></p>",
      "votes": 10,
      "replies": [
        {
          "id": 772435,
          "author_name": "Abu Noman Md. Sakib",
          "author_url": "",
          "post_date": "2020-03-15T13:41:35.233000",
          "content": "<p>Thanks for this. I am currently working on Brain Hemorrhage Classification for my undergraduate thesis. This paper is a great reference for my research.</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 805923,
      "author_name": "Storm",
      "author_url": "",
      "post_date": "2020-04-13T08:33:26.407000",
      "content": "<p>Is there any where i can find the model ready to do predictions or do i need to follow the steps and re train it ?</p>",
      "votes": 5,
      "replies": []
    },
    {
      "id": 672494,
      "author_name": "Yee Ng",
      "author_url": "",
      "post_date": "2019-11-14T00:12:30.383000",
      "content": "<p>牛</p>",
      "votes": 6,
      "replies": []
    },
    {
      "id": 691441,
      "author_name": "jfoo",
      "author_url": "",
      "post_date": "2019-12-10T06:19:07.363000",
      "content": "<p>Congratulations and thanks for sharing your code! Trying to understand your pre-processing code (2DCNN/src/prepare_data.py) - can I check which function creates the three pipelines (1. Single slice with 3 windows. 2. Spatially adjacent 3 slices with one window. 3. Combination of 1 and 2: Spatially adjacent 3 slices with three windows), and whether the resulting .png files should contain three channels? Sorry if I'm asking silly questions. Thank you very much! </p>",
      "votes": 3,
      "replies": [
        {
          "id": 691452,
          "author_name": "SeuTao",
          "author_url": "",
          "post_date": "2019-12-10T06:41:59.267000",
          "content": "<p>Thank you! We have three pipelines for single 2D CNN training. The uploaded code is one of the three which only applies the 2nd preprocessing method (Spatially adjacent 3 slices with one window). I'm now combining the three pipelines into one. The pretrained models using the code on github is uploaded.</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 672542,
      "author_name": "Alexandre Cadrin-Chênevert",
      "author_url": "",
      "post_date": "2019-11-14T01:28:51.187000",
      "content": "<p>Congrats SeuTao ! Amazed by the suggested sequence model. It can possibly be a small revolution for future models using 3d slices in medical imaging. Conceptually, this is also tightly bound with the usual way to interpret these exams (by scrolling dynamically through the slices). Looking forward to know more about your solution.</p>",
      "votes": 3,
      "replies": []
    },
    {
      "id": 672512,
      "author_name": "Neuron Engineer",
      "author_url": "",
      "post_date": "2019-11-14T00:41:19.633000",
      "content": "<p>Congrat <a href=\"/shentao\">@shentao</a> !! Although our team may miss gold, one of our key is the sequence model too. Looking forward to learn from your solutiom!!</p>",
      "votes": 3,
      "replies": []
    },
    {
      "id": 682330,
      "author_name": "Deep Chatterjee",
      "author_url": "",
      "post_date": "2019-11-27T09:27:23.827000",
      "content": "<p>Congratulations and thanks for sharing your approach and code. Best of luck for next competition.</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 681362,
      "author_name": "TC Liu",
      "author_url": "",
      "post_date": "2019-11-26T02:30:33.240000",
      "content": "<p>Hi SeuTao, congratulations and they are very clear flowcharts, thanks for sharing!</p>\n\n<p>I am trying to analyse the difference between your approach and ours. Apart from the architecture design of sequence model (you used many GRU blocks, which we did not try; I presume they bring some improvement), one major difference is the introduction of Sequence Model 2, which is based on the outputs of the other two models. Actually, we thought about doing something similar but did not have enough time to implement. </p>\n\n<p>May I know how much improvement the Sequence Model 2 bring? In other words, what is the score if the output of Sequence Model 1 is used directly as the final predictions. </p>\n\n<p>Many thanks in advance,\nTC</p>",
      "votes": 1,
      "replies": [
        {
          "id": 681375,
          "author_name": "SeuTao",
          "author_url": "",
          "post_date": "2019-11-26T02:56:14.963000",
          "content": "<p>Thank you! I just follow the flowcharts from your team's post :) In my implementation，the sequence model 2  did two things: 1）multi model output stacking; 2）sequence modeling with meta info;\nWhen we finished 4 CNN model ensemble (0.060 in stage1 with naive postprocessing),  I use 1d cnn to do stacking (baseline seq model 2). It boosts the score from 0.060 to 0.057. Adding GRU with Position2 get us 0.056 on leaderboard. After this, I start to add the seq model 1 module into the pipeline. Adding some tricks we can get the final score of 0.054 in stage1. Actually, I did not even submit the result of seq model 1. It is a part of my seq model :)</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 681378,
          "author_name": "SeuTao",
          "author_url": "",
          "post_date": "2019-11-26T03:00:20.183000",
          "content": "<p>The code of seq models:\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1025985%2F599e346fa8572a0a77cf1e64aa03584b%2F2019-11-26%2010.58.45.png?generation=1574737169081451&amp;alt=media\" alt=\"\"></p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 681589,
          "author_name": "TC Liu",
          "author_url": "",
          "post_date": "2019-11-26T09:40:34.720000",
          "content": "<p>Thanks for sharing the code screenshot! From the flowchart, I thought Sequence Model 1 and Sequence Model 2 were trained separately. Now I understand they were trained end-to-end. Very creative sequential model design 👍 </p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 674908,
      "author_name": "cxkcxk",
      "author_url": "",
      "post_date": "2019-11-17T09:12:44.187000",
      "content": "<p>Laotie NB 666👍 </p>",
      "votes": 1,
      "replies": [
        {
          "id": 680918,
          "author_name": "tik_boa",
          "author_url": "",
          "post_date": "2019-11-25T11:57:58.147000",
          "content": "<p>Haaa, Yi Shi Meng Bi</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 673765,
      "author_name": "Guanshuo Xu",
      "author_url": "",
      "post_date": "2019-11-15T13:17:09.607000",
      "content": "<p>Congratulations!\nDid you perform any type of normalization/scaling when you input the sequence position (z-position)? If so, was the normalization/scaling within each signle scan or across the whole dataset? I tried scaling sequence positions of each scan into [0,1], and appended the position of each slice as a new dimension of feature when I was training my RNN model, but my model did not get any benefit from the sequence positions.</p>",
      "votes": 1,
      "replies": [
        {
          "id": 673802,
          "author_name": "SeuTao",
          "author_url": "",
          "post_date": "2019-11-15T14:02:47.477000",
          "content": "<p>Thank you! I just feed the first order difference of the position2 into the NN which actually represents slice thickness. This thickness information gave me ~0.0005 boost. I also did some random sampling in the sequence during training.</p>",
          "votes": 3,
          "replies": []
        },
        {
          "id": 673811,
          "author_name": "SeuTao",
          "author_url": "",
          "post_date": "2019-11-15T14:14:07.520000",
          "content": "<p>There is a little bit of domain knowledge behind such operation. Slices with different thicknesses have different image quality (noise level) due to the reconstruction settings.</p>",
          "votes": 3,
          "replies": []
        },
        {
          "id": 674124,
          "author_name": "Guanshuo Xu",
          "author_url": "",
          "post_date": "2019-11-15T23:00:36.687000",
          "content": "<p>Very interesting, thanks!</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 672553,
      "author_name": "Alexey Kotlik",
      "author_url": "",
      "post_date": "2019-11-14T01:41:28.247000",
      "content": "<p>Congratulations!\nI'm looking forward to see your solution as well - I didn't even think of using sequence models. \nAnd from what I've seen in discussions after the competition end at least 3 top solution will have them.\nThis competition was really great for learning new methods, techniques and ideas...</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 672525,
      "author_name": "Hilal Shaath",
      "author_url": "",
      "post_date": "2019-11-14T00:52:02.033000",
      "content": "<p>congrats <a href=\"/shentao\">@shentao</a>  Beautiful! Can you give us more details. Which sequence model you used, how about windows?</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 672500,
      "author_name": "spongebob",
      "author_url": "",
      "post_date": "2019-11-14T00:19:55.807000",
      "content": "<p>Wonderful</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 672491,
      "author_name": "Tim Yee",
      "author_url": "",
      "post_date": "2019-11-14T00:07:01.017000",
      "content": "<p>Congrats! Looking forward to write up!</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 672490,
      "author_name": "Andrés Miguel Torrubia Sáez",
      "author_url": "",
      "post_date": "2019-11-14T00:06:39.387000",
      "content": "<p>Congratulations! I too wanted to do a sequence model (based on Transformers) but ran out of time!</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 672488,
      "author_name": "cab",
      "author_url": "",
      "post_date": "2019-11-14T00:06:30.620000",
      "content": "<p>Congrats the champions, \nYour solution is always impressive. I cant wait to see it. </p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 682640,
      "author_name": "Peter Turner",
      "author_url": "",
      "post_date": "2019-11-27T17:51:01.807000",
      "content": "<p>Excellent work and thanks for sharing the solution. Gives me lots to look up and learn 😊</p>",
      "votes": 2,
      "replies": []
    },
    {
      "id": 672526,
      "author_name": "takuoko",
      "author_url": "",
      "post_date": "2019-11-14T00:52:20.787000",
      "content": "<p>congrats!</p>",
      "votes": 2,
      "replies": []
    },
    {
      "id": 1053852,
      "author_name": "Jaideep",
      "author_url": "",
      "post_date": "2020-10-19T12:27:41.017000",
      "content": "<p><a href=\"https://www.kaggle.com/shentao\" target=\"_blank\">@shentao</a>  would u like to team up rsna embolism .. i messaged  you for team up.<br>\nNo worries if you like to work solo.<br>\nI thought approaches can be ensembled towards the end..</p>",
      "votes": -5,
      "replies": []
    },
    {
      "id": 1595104,
      "author_name": "Namig",
      "author_url": "",
      "post_date": "2021-11-25T12:17:29.017000",
      "content": "<p>Great solution!</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1517779,
      "author_name": "AshwinVP",
      "author_url": "",
      "post_date": "2021-09-20T04:40:59.163000",
      "content": "<p>congrats👍</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1394029,
      "author_name": "Dinesh Kumar",
      "author_url": "",
      "post_date": "2021-07-20T05:54:55.500000",
      "content": "<p>is this any pretrained model being used in this?</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1317172,
      "author_name": "RebekkaGörge",
      "author_url": "",
      "post_date": "2021-05-21T07:39:00.733000",
      "content": "<p>Hello, Thank you for your great work. I am trying to rebuild it, but you mentioned in your description that the output of the CNN Model is saved in ./SingleModelOutput. But such folder is not generated. So even if I could find the npy file in the prediction folder of the single models- but I wonder how exactly the fine_test_stage2_sample.npy files are generated, as this is not mentioned in the code. Can I simply append the single npy files and use the mean of the folds or how to deal with it? I know that I can also use your output in the st_se101_256_Fine folder for example but I want to rebuild everything. <br>\nThank you in advance!</p>",
      "votes": 0,
      "replies": [
        {
          "id": 1594853,
          "author_name": "limernece",
          "author_url": "",
          "post_date": "2021-11-25T07:02:54.473000",
          "content": "<p>Hello, what kind of preprocessing method do you use when generating np files? Is it the third method?</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1721144,
          "author_name": "Guo Rui",
          "author_url": "",
          "post_date": "2022-03-13T13:02:25.427000",
          "content": "<p>I have the same question as well, have you managed to find out the exact way to generating .npy feature files (i.e., what is the order of features in this .npy file as the .npy does not have any information on filename it self). I am using the mean of the folds as well.<br>\nIn the end I got a much worse result than just using the prediction from CNN model. If you have any idea please let me know! Thank you!</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1029668,
      "author_name": "SenTran",
      "author_url": "",
      "post_date": "2020-09-28T02:59:06.220000",
      "content": "<p>Congratulations! &lt;3 </p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1027945,
      "author_name": "Naim Mhedhbi",
      "author_url": "",
      "post_date": "2020-09-26T13:41:43.700000",
      "content": "<p>Good job, continue like this ! BRAVO </p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1027905,
      "author_name": "Naim Mhedhbi",
      "author_url": "",
      "post_date": "2020-09-26T13:10:30.940000",
      "content": "<p>Good work ! keep it up </p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1025122,
      "author_name": "Pinaki MIshra",
      "author_url": "",
      "post_date": "2020-09-24T10:45:12.363000",
      "content": "<p>Congrats , and Thanks for sharing <a href=\"/shentao\">@shentao</a> </p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1019118,
      "author_name": "Shivam Bhardwaj",
      "author_url": "",
      "post_date": "2020-09-20T07:53:03.470000",
      "content": "<p>Nice work!!</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 984468,
      "author_name": "",
      "author_url": "",
      "post_date": "2020-08-25T05:32:36.680000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 876963,
      "author_name": "",
      "author_url": "",
      "post_date": "2020-06-07T07:51:11.847000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 680439,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-11-24T16:49:48.203000",
      "content": "",
      "votes": 0,
      "replies": [
        {
          "id": 681379,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-11-26T03:12:09.730000",
          "content": "",
          "votes": 1,
          "replies": []
        },
        {
          "id": 685578,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-12-02T00:08:00.633000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 685626,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-12-02T02:38:45.477000",
          "content": "",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 674761,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-11-17T03:05:41.520000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 674510,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-11-16T15:54:59.067000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 673720,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-11-15T11:52:17.693000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 673427,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-11-15T00:37:21.520000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 673203,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-11-14T16:59:27.263000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 673200,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-11-14T16:53:18.240000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 673180,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-11-14T16:07:24.350000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 673103,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-11-14T14:17:09.943000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 672974,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-11-14T10:54:47.917000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 672931,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-11-14T09:53:53.673000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 672888,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-11-14T08:52:23.257000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 672887,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-11-14T08:52:09.740000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 672781,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-11-14T06:36:11.590000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 672755,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-11-14T05:59:06.893000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 672753,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-11-14T05:52:57.910000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 672652,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-11-14T03:39:55.267000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 672637,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-11-14T03:15:28.007000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 672597,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-11-14T02:25:43.090000",
      "content": "",
      "votes": 0,
      "replies": [
        {
          "id": 672603,
          "author_name": "",
          "author_url": "",
          "post_date": "2019-11-14T02:30:52.813000",
          "content": "",
          "votes": 5,
          "replies": []
        }
      ]
    },
    {
      "id": 672590,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-11-14T02:19:01.460000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 672584,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-11-14T02:10:23.453000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 672560,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-11-14T01:53:02.180000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 672558,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-11-14T01:50:37.890000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 672541,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-11-14T01:26:30.820000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1011991,
      "author_name": "",
      "author_url": "",
      "post_date": "2020-09-15T20:25:53.867000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 672722,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-11-14T04:55:38.650000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 676962,
      "author_name": "",
      "author_url": "",
      "post_date": "2019-11-19T16:52:36.500000",
      "content": "",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "672486": "The key module of our pipeline is a sequence model. It works well and there is no shakeup.\nCode : https://github.com/SeuTao/RSNA2019_1st_place_solution\n\n# Overview\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1025985%2F550d2dfb85771f93e0f2c8f1dbc2f62c%2Fsequence%20model%20with%20big%20bar%20align.png?generation=1574528142297990&amp;alt=media)\n\n# 2D CNN Modeling\n\n**Data pre-processing &amp; augmentation**\nOur team has three 2d classifier pipelines. The three pipelines share different input settings (3 channels):\n```\n1. Single sclice with 3 windows.\n2. Spatially adjacent 3 slices with one window.\n3. Combination of 1 and 2: Spatially adjacent 3 slices with three windows.\n```\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1025985%2Fd22fed8b4fba54c637627bacb41666ad%2F2019-11-24%203.51.01.png?generation=1574582336956604&amp;alt=media)\n\nThe windows we use are:\n```\nBrain Window[40, 80],\nSubdural Window[80, 200],\nBone Window[600, 2800]\n```\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1025985%2F93bbbae12be594c19554a35956fe85be%2F1.png?generation=1574581640882170&amp;alt=media)\n\nAugmentations:\n- Random ShiftScaleRotate\n- Random resize crop \n- Random HFlip\n\nTraining strategy\n- Randomly sample images form different SeriesInstanceUID\n- Each epoch was trained on 4 times SeriesInstanceUIDs\n- Adam optimiser with cycle learning rate (5e-4~1e-5)\n\n# Sequence Model Development\n\n**Sequence model 1:  MLP + LSTM** \nInput: \n- Slice embeddings from multi models (num_models*feature dim) \n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1025985%2Fcdc6c8d3af12a81695dd50da3d930cb8%2Fsequence%20model%201.png?generation=1574645166546352&amp;alt=media)\n\n\n**Sequence model 2:  1d CNN + LSTM**\nInput: \n- Logits from multi 2D CNN models (num_models*6 class output) \n- Logits from sequence model 1 (6 class output) \n- Meta info (Position)\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1025985%2F4b20e615b4331031628e2b27f5a9ddf2%2F2.png?generation=1574582851737685&amp;alt=media)\n",
    "1026613": "The illustrations are beautiful👍. I want to know what software you used to generate them👀",
    "673591": "Congratulations! This is so awesome that the 1st position solution is this. (Shameless self-plug) We wrote a paper couple of years ago for hemorrhage detection using the same idea! It was actually as good as radiologists (in a small study) as well. I wonder if you stumbled upon it/found it useful! https://arxiv.org/abs/1710.04934",
    "805923": "Is there any where i can find the model ready to do predictions or do i need to follow the steps and re train it ?",
    "672494": "牛",
    "691441": "Congratulations and thanks for sharing your code! Trying to understand your pre-processing code (2DCNN/src/prepare_data.py) - can I check which function creates the three pipelines (1. Single slice with 3 windows. 2. Spatially adjacent 3 slices with one window. 3. Combination of 1 and 2: Spatially adjacent 3 slices with three windows), and whether the resulting .png files should contain three channels? Sorry if I'm asking silly questions. Thank you very much! ",
    "672542": "Congrats SeuTao ! Amazed by the suggested sequence model. It can possibly be a small revolution for future models using 3d slices in medical imaging. Conceptually, this is also tightly bound with the usual way to interpret these exams (by scrolling dynamically through the slices). Looking forward to know more about your solution.",
    "672512": "Congrat @shentao !! Although our team may miss gold, one of our key is the sequence model too. Looking forward to learn from your solutiom!!",
    "682330": "Congratulations and thanks for sharing your approach and code. Best of luck for next competition.",
    "681362": "Hi SeuTao, congratulations and they are very clear flowcharts, thanks for sharing!\n\nI am trying to analyse the difference between your approach and ours. Apart from the architecture design of sequence model (you used many GRU blocks, which we did not try; I presume they bring some improvement), one major difference is the introduction of Sequence Model 2, which is based on the outputs of the other two models. Actually, we thought about doing something similar but did not have enough time to implement. \n\nMay I know how much improvement the Sequence Model 2 bring? In other words, what is the score if the output of Sequence Model 1 is used directly as the final predictions. \n\nMany thanks in advance,\nTC\n",
    "674908": "Laotie NB 666👍 ",
    "673765": "Congratulations!\nDid you perform any type of normalization/scaling when you input the sequence position (z-position)? If so, was the normalization/scaling within each signle scan or across the whole dataset? I tried scaling sequence positions of each scan into [0,1], and appended the position of each slice as a new dimension of feature when I was training my RNN model, but my model did not get any benefit from the sequence positions.",
    "672553": "Congratulations!\nI'm looking forward to see your solution as well - I didn't even think of using sequence models. \nAnd from what I've seen in discussions after the competition end at least 3 top solution will have them.\nThis competition was really great for learning new methods, techniques and ideas...",
    "672525": "congrats @shentao  Beautiful! Can you give us more details. Which sequence model you used, how about windows?",
    "672500": "Wonderful",
    "672491": "Congrats! Looking forward to write up!",
    "672490": "Congratulations! I too wanted to do a sequence model (based on Transformers) but ran out of time!",
    "672488": "Congrats the champions, \nYour solution is always impressive. I cant wait to see it. ",
    "682640": "Excellent work and thanks for sharing the solution. Gives me lots to look up and learn 😊",
    "672526": "congrats!",
    "1053852": "@shentao  would u like to team up rsna embolism .. i messaged  you for team up.\nNo worries if you like to work solo.\nI thought approaches can be ensembled towards the end..",
    "1595104": "Great solution!",
    "1517779": "congrats👍",
    "1394029": "is this any pretrained model being used in this?",
    "1317172": "Hello, Thank you for your great work. I am trying to rebuild it, but you mentioned in your description that the output of the CNN Model is saved in ./SingleModelOutput. But such folder is not generated. So even if I could find the npy file in the prediction folder of the single models- but I wonder how exactly the fine_test_stage2_sample.npy files are generated, as this is not mentioned in the code. Can I simply append the single npy files and use the mean of the folds or how to deal with it? I know that I can also use your output in the st_se101_256_Fine folder for example but I want to rebuild everything. \nThank you in advance!",
    "1029668": "Congratulations! <3 ",
    "1027945": "Good job, continue like this ! BRAVO ",
    "1027905": "Good work ! keep it up ",
    "1025122": "Congrats , and Thanks for sharing @shentao ",
    "1019118": "Nice work!!",
    "984468": "Impressive thought!",
    "876963": "Congratulations on your win! @shentao \n\nI had a few questions \n1. Did you train the CNN and Sequence models as a joint model or you trained a CNN network first and then extracted the embedding from the GAP layer and then trained a separate Bi-LSTM model?\n\n2. What information is the sequence model trying to capture from the image embeddings?\n\nThanks",
    "680439": "Congrats! Very nice workflow and code.\nWhat computational resources (GPU, RAM, CPU, etc.) were used to train your models?\nHow long it takes to train your model? \nThanks!",
    "674761": "恭喜恭喜",
    "674510": "Very interesting! Congrats!",
    "673720": "congratz",
    "673427": "Congrats! It was interesting for me that sequence model is used for image classification.",
    "673203": "Congrats!",
    "673200": "Congratulations!🎉 😄 ",
    "673180": "congrats \n",
    "673103": "Congrats!!!",
    "672974": "Congrats, looking forward to learn from your sequence model",
    "672931": "👋 👋 👋 ",
    "672888": "**Congratulations !**",
    "672887": "👍 ",
    "672781": "Congratulations @shentao for a well deserved win.",
    "672755": "Congratulations for your first 1st place. You and your team truly deserves it. Looking forward to learn a lot from your(and your team) approach. ",
    "672753": "👋 👋 👋 ",
    "672652": "Congrats!!!\n终于不是千年老二了😄 ",
    "672637": "niubility",
    "672597": "Congrats! No [placeholder] this time?",
    "672590": "Congrats! Shen Tao!",
    "672584": "Congratulations! Well-deserved! :-)",
    "672560": "congrats @shentao even i was fed up by your 2nd ranks 😂  ",
    "672558": "Congratulations, and looking forward to the details !",
    "672541": "congratulations ... looking forward for the winning solution writeup .",
    "1011991": "",
    "672722": "",
    "676962": "Wow ! Thanks for sharing! Congrats !\n"
  }
}