{
  "id": 435053,
  "title": "[lb0.55 my experiment results] prompt based prediction",
  "url": "/competitions/rsna-2023-abdominal-trauma-detection/discussion/435053",
  "author_name": "hengck23",
  "post_date": "2023-08-27T20:14:42.129000",
  "votes": 85,
  "comment_count": 96,
  "views": 0,
  "content": "<p>i will update as my experiments proceeds. Here is my framework:</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F2bc6d75ed99755293a726c49cde3ba2f%2FSelection_999(2979).png?generation=1693167264300790&amp;alt=media\" alt=\"\"></p>\n<p>reference code:<br>\n<a href=\"https://www.kaggle.com/code/hengck23/lb0-55-2-5d-1d-sample-model\" target=\"_blank\">https://www.kaggle.com/code/hengck23/lb0-55-2-5d-1d-sample-model</a></p>",
  "messages": [
    {
      "id": 2411713,
      "postDate": "2023-08-27T20:14:42.130Z",
      "content": "<p>i will update as my experiments proceeds. Here is my framework:</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F2bc6d75ed99755293a726c49cde3ba2f%2FSelection_999(2979).png?generation=1693167264300790&amp;alt=media\" alt=\"\"></p>\n<p>reference code:<br>\n<a href=\"https://www.kaggle.com/code/hengck23/lb0-55-2-5d-1d-sample-model\" target=\"_blank\">https://www.kaggle.com/code/hengck23/lb0-55-2-5d-1d-sample-model</a></p>",
      "rawMarkdown": "i will update as my experiments proceeds. Here is my framework:\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F2bc6d75ed99755293a726c49cde3ba2f%2FSelection_999(2979).png?generation=1693167264300790&alt=media)\n\nreference code:\nhttps://www.kaggle.com/code/hengck23/lb0-55-2-5d-1d-sample-model\n",
      "votes": 82
    },
    {
      "id": 2425570,
      "postDate": "2023-09-06T03:43:46.363Z",
      "content": "<p>if you are still stuck, try this<br>\n(this is the reference model at <a href=\"https://www.kaggle.com/code/hengck23/lb0-55-2-5d-1d-sample-model\" target=\"_blank\">https://www.kaggle.com/code/hengck23/lb0-55-2-5d-1d-sample-model</a>)</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Feba80d29281eb17cbb10ba2bad8cb33a%2FSelection_999(3092).png?generation=1693971810878201&amp;alt=media\" alt=\"\"></p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F314bb0c8da4b58f6e7f024def9f9e18c%2FSelection_999(3093).png?generation=1693971823716306&amp;alt=media\" alt=\"\"></p>",
      "rawMarkdown": "if you are still stuck, try this\n(this is the reference model at https://www.kaggle.com/code/hengck23/lb0-55-2-5d-1d-sample-model)\n\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Feba80d29281eb17cbb10ba2bad8cb33a%2FSelection_999(3092).png?generation=1693971810878201&alt=media)\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F314bb0c8da4b58f6e7f024def9f9e18c%2FSelection_999(3093).png?generation=1693971823716306&alt=media)",
      "votes": 12,
      "replies": [
        {
          "id": 2426770,
          "postDate": "2023-09-06T19:50:52.180Z",
          "content": "<p>list of encoder that works (and give similar results for input volue 96x256x256)</p>\n<ul>\n<li>resnet50d, se-resnext26d, convnext-tiny, efficientnetv2-small</li>\n</ul>\n<p>we try different architectures with</p>\n<ul>\n<li>different receptive fields</li>\n<li>different attention methods</li>\n<li>different pretrain imagenet input size (224,256,384 …)</li>\n</ul>\n<p>this is to debug the pipeline.<br>\nnow if all models give the same results, you know that to  next improvement comes from better data augmentation, etc</p>",
          "rawMarkdown": "list of encoder that works (and give similar results for input volue 96x256x256)\n- resnet50d, se-resnext26d, convnext-tiny, efficientnetv2-small\n\nwe try different architectures with\n- different receptive fields\n- different attention methods\n- different pretrain imagenet input size (224,256,384 ...)\n\n\n\nthis is to debug the pipeline.\nnow if all models give the same results, you know that to  next improvement comes from better data augmentation, etc",
          "votes": 5,
          "replies": [
            {
              "id": 2428459,
              "postDate": "2023-09-07T22:22:05.003Z",
              "content": "<p>Do you mean that we can use usual 2d CNN models (resnet50d, se-resnext26d, convnext-tiny, efficientnetv2-small) for (96x256x256) input here? </p>",
              "rawMarkdown": "Do you mean that we can use usual 2d CNN models (resnet50d, se-resnext26d, convnext-tiny, efficientnetv2-small) for (96x256x256) input here? ",
              "votes": 1
            }
          ]
        },
        {
          "id": 2442380,
          "postDate": "2023-09-17T01:24:43.377Z",
          "content": "<p>hi, does you use the segmantation data to predicat which slice to take ? if you do , how you deal with this is the infernce stage?<br>\nsecond, in the begining i was thinking to take the relvant slices and convert it to 1 3d chanals(by cnn) , so i will have dim of ( batch ,3,highet,width ) and than put it into resnet and be abale in 1 run look on mini batch of scanas. <br>\nin your example i see that one iteration you only process 1 scan (seems to me like sgd so it will be more noisy ) , i try to undersnant if put any 3 images into resnet is realy relavant. </p>",
          "rawMarkdown": "hi, does you use the segmantation data to predicat which slice to take ? if you do , how you deal with this is the infernce stage?\nsecond, in the begining i was thinking to take the relvant slices and convert it to 1 3d chanals(by cnn) , so i will have dim of ( batch ,3,highet,width ) and than put it into resnet and be abale in 1 run look on mini batch of scanas. \nin your example i see that one iteration you only process 1 scan (seems to me like sgd so it will be more noisy ) , i try to undersnant if put any 3 images into resnet is realy relavant. "
        },
        {
          "id": 2443255,
          "postDate": "2023-09-17T16:00:46.870Z",
          "content": "<p>Thank you for sharing your method!<br>\nSorry for naive question, but could you answer if it's possible to train implementation of this model solely on machines that kaggle offers to us?<br>\nThank you in advance!</p>",
          "rawMarkdown": "Thank you for sharing your method!\nSorry for naive question, but could you answer if it's possible to train implementation of this model solely on machines that kaggle offers to us?\nThank you in advance!\n"
        }
      ]
    },
    {
      "id": 2428710,
      "postDate": "2023-09-08T05:29:27.917Z",
      "content": "<p>in the evalusation scriptt, any injury is auto generated</p>\n<pre><code>    # Derive a new any_injury label by taking the max of 1 - p(healthy)  each label    healthy_cols = [x +   x  all_target_categories]\n    any_injury_labels = (1 - solution[healthy_cols]).max(=1)\n    any_injury_predictions = (1 - submission[healthy_cols]).max(=1)\n    any_injury_loss = sklearn.metrics.log_loss(\n        =any_injury_labels.values,\n        =any_injury_predictions.values,\n        =solution[].values\n    )\n</code></pre>\n<p>remember to consider in this at your loss function in backprop!</p>\n<p>you don't want ending up good loss for your trained parts, and poor loss for server generated  any injury</p>\n<pre><code> = F.cross_entropy(liver_logit, ...)\n = F.cross_entropy(speen_logit, ...)\n\n = customised_loss (-softmax(liver_prob_healthy, ...) ..., )\n</code></pre>",
      "rawMarkdown": "in the evalusation scriptt, any injury is auto generated\n\n```\n\t# Derive a new any_injury label by taking the max of 1 - p(healthy) for each label group\n\thealthy_cols = [x + '_healthy' for x in all_target_categories]\n\tany_injury_labels = (1 - solution[healthy_cols]).max(axis=1)\n\tany_injury_predictions = (1 - submission[healthy_cols]).max(axis=1)\n\tany_injury_loss = sklearn.metrics.log_loss(\n\t\ty_true=any_injury_labels.values,\n\t\ty_pred=any_injury_predictions.values,\n\t\tsample_weight=solution['any_injury_weight'].values\n\t)\n\n\n```\n\nremember to consider in this at your loss function in backprop!\n\nyou don't want ending up good loss for your trained parts, and poor loss for server generated  any injury\n\n```\nliver_loss = F.cross_entropy(liver_logit, ...)\nspeen_loss = F.cross_entropy(speen_logit, ...)\n\nany_loss = customised_loss (1-softmax(liver_prob_healthy, ...) ..., )\n\n```",
      "votes": 5,
      "replies": [
        {
          "id": 2431872,
          "postDate": "2023-09-10T13:26:01.533Z",
          "content": "<p>Wait a second, that is, here you propose to add one more variable to the model, for example here<br>\nout = [out_bowel, out_extra, out_liver, out_kidney, out_spleen]</p>\n<pre><code> # Create model\n model = tf.keras.  be\n</code></pre>\n<p>out = [out_bowel, out_extra, out_liver, out_kidney, out_spleen, out_any_injury]?</p>",
          "rawMarkdown": "Wait a second, that is, here you propose to add one more variable to the model, for example here\nout = [out_bowel, out_extra, out_liver, out_kidney, out_spleen]\n\n     # Create model\n     model = tf.keras.Model(inputs=inp, outputs=out) to be\nout = [out_bowel, out_extra, out_liver, out_kidney, out_spleen, out_any_injury]?",
          "replies": [
            {
              "id": 2432088,
              "postDate": "2023-09-10T15:22:07.360Z",
              "content": "<p>no.  <br>\nany injury  is <strong>not</strong> predict from the dense layer.<br>\ninstead, you can compute any injury from the rest of the organ (see kaggle evalution script)</p>",
              "rawMarkdown": "no.  \nany injury  is **not** predict from the dense layer.\ninstead, you can compute any injury from the rest of the organ (see kaggle evalution script)",
              "votes": 2
            }
          ]
        }
      ]
    },
    {
      "id": 2430598,
      "postDate": "2023-09-09T11:58:01.860Z",
      "content": "<p>intermediate results<br>\n9-sep</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Fee65ad5f2ec291f049fa760219cd3657%2FSelection_999(3158).png?generation=1694260671495384&amp;alt=media\" alt=\"\"></p>",
      "rawMarkdown": "intermediate results\n9-sep\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Fee65ad5f2ec291f049fa760219cd3657%2FSelection_999(3158).png?generation=1694260671495384&alt=media)",
      "votes": 6,
      "replies": [
        {
          "id": 2431585,
          "postDate": "2023-09-10T08:13:37.700Z",
          "content": "<p>Is it 2.5d approach results? </p>",
          "rawMarkdown": "Is it 2.5d approach results? ",
          "replies": [
            {
              "id": 2433035,
              "postDate": "2023-09-11T09:47:48.403Z",
              "content": "<p>yes, it is</p>\n<hr>\n<p>i just check my results agasint other kagglers <a href=\"https://www.kaggle.com/fengqilong\" target=\"_blank\">@fengqilong</a> :<br>\n<a href=\"https://www.kaggle.com/competitions/rsna-2023-abdominal-trauma-detection/discussion/432029#2412154\" target=\"_blank\">https://www.kaggle.com/competitions/rsna-2023-abdominal-trauma-detection/discussion/432029#2412154</a></p>\n<p>it is the same. now i lack post processing<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F1c4486dd3fc06c85faf5bb8c3ca6edb4%2FSelection_999(3198).png?generation=1694425629097884&amp;alt=media\" alt=\"\"></p>\n<p>it is amazing different methods done by different kagglers came to the same conclusion.<br>\nthe limit is the data</p>",
              "rawMarkdown": "yes, it is\n\n---\ni just check my results agasint other kagglers @fengqilong :\nhttps://www.kaggle.com/competitions/rsna-2023-abdominal-trauma-detection/discussion/432029#2412154\n\nit is the same. now i lack post processing\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F1c4486dd3fc06c85faf5bb8c3ca6edb4%2FSelection_999(3198).png?generation=1694425629097884&alt=media)\n\nit is amazing different methods done by different kagglers came to the same conclusion.\nthe limit is the data\n"
            },
            {
              "id": 2433136,
              "postDate": "2023-09-11T11:15:29.783Z",
              "content": "<p>Your cv only consists of liver, spleen and kidney? What about the injuries?</p>",
              "rawMarkdown": "Your cv only consists of liver, spleen and kidney? What about the injuries?"
            },
            {
              "id": 2433175,
              "postDate": "2023-09-11T11:38:56.277Z",
              "content": "<p>i haven't train them yet and LB is reported using mean values<br>\nfor bowels, i tried once buy trained prediction is worse than mean prediction. (lb0.56 verus 0.55)<br>\nthen i check the local cv for trained it is about 0.29, for mean it is about 0.30 (diiferent from lb)<br>\nhence it think cv/lb is not stable for bowels </p>",
              "rawMarkdown": "i haven't train them yet and LB is reported using mean values\nfor bowels, i tried once buy trained prediction is worse than mean prediction. (lb0.56 verus 0.55)\nthen i check the local cv for trained it is about 0.29, for mean it is about 0.30 (diiferent from lb)\nhence it think cv/lb is not stable for bowels "
            },
            {
              "id": 2433182,
              "postDate": "2023-09-11T11:45:08.373Z",
              "content": "<p>hmm 0.29 is a little too high for bowel, i'm getting 0.12-0.15, extravasation is so hard to deal with.</p>",
              "rawMarkdown": "hmm 0.29 is a little too high for bowel, i'm getting 0.12-0.15, extravasation is so hard to deal with.",
              "votes": 3
            },
            {
              "id": 2433193,
              "postDate": "2023-09-11T11:52:58.160Z",
              "content": "<p>thnaks.</p>\n<p>i think we need to check previous medical/biological related compeitions where data is noisy and postive cases are scare. These competitions maybe not be realted to CT scan, but they have large shakeup.</p>\n<p>i think some injury cannot be determined confidently but we still need to think of a way to stablised results.</p>\n<hr>\n<p>another possibility is self supervsied learning and see if it helps sample train sample size.</p>\n<hr>\n<p>\" extravasation is so hard to deal with.\", maybe need to think of how to use multiple scan and arotic hu</p>",
              "rawMarkdown": "thnaks.\n\ni think we need to check previous medical/biological related compeitions where data is noisy and postive cases are scare. These competitions maybe not be realted to CT scan, but they have large shakeup.\n\ni think some injury cannot be determined confidently but we still need to think of a way to stablised results.\n\n---\nanother possibility is self supervsied learning and see if it helps sample train sample size.\n\n---\n\" extravasation is so hard to deal with.\", maybe need to think of how to use multiple scan and arotic hu"
            },
            {
              "id": 2433197,
              "postDate": "2023-09-11T11:58:18.923Z",
              "content": "<p>Same here. My bowel score is between 0.14-0.16 and extravasation score is between 0.58-0.60. I think that happens when you don't include any injury head and backprop the sum of 5 losses.</p>",
              "rawMarkdown": "Same here. My bowel score is between 0.14-0.16 and extravasation score is between 0.58-0.60. I think that happens when you don't include any injury head and backprop the sum of 5 losses."
            }
          ]
        },
        {
          "id": 2433039,
          "postDate": "2023-09-11T09:50:42.777Z",
          "content": "<p>i think i meanged to get about the same score using resnet18d <br>\n(just very slightly worse though)</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F2df7be2a30f74543046150973bea43c7%2FSelection_999(3200).png?generation=1694427117158085&amp;alt=media\" alt=\"\"> …</p>",
          "rawMarkdown": "i think i meanged to get about the same score using resnet18d \n(just very slightly worse though)\n\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F2df7be2a30f74543046150973bea43c7%2FSelection_999(3200).png?generation=1694427117158085&alt=media) ...\n\n",
          "votes": 5,
          "replies": [
            {
              "id": 2433073,
              "postDate": "2023-09-11T10:17:24.757Z",
              "content": "<p>would be better if we add coordinates information in 2dcnn (poor man's pos encoding)</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F111031843e45de87a8279075deb50c0f%2FSelection_999(3203).png?generation=1694427370530394&amp;alt=media\" alt=\"\"></p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F9be9be795e2ecad81ee051bda405c41a%2FSelection_999(3202).png?generation=1694427395958972&amp;alt=media\" alt=\"\"></p>\n<p>would even be better if the z coordinate is from our slice detector, e.g. z=0 means top of liver ….. z=100 means end of bowels , etc …</p>",
              "rawMarkdown": "would be better if we add coordinates information in 2dcnn (poor man's pos encoding)\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F111031843e45de87a8279075deb50c0f%2FSelection_999(3203).png?generation=1694427370530394&alt=media)\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F9be9be795e2ecad81ee051bda405c41a%2FSelection_999(3202).png?generation=1694427395958972&alt=media)\n\nwould even be better if the z coordinate is from our slice detector, e.g. z=0 means top of liver ..... z=100 means end of bowels , etc ...",
              "votes": 2
            }
          ]
        },
        {
          "id": 2433480,
          "postDate": "2023-09-11T15:52:42.220Z",
          "content": "<p>another resnet18d results. so it doesn't matter if you are using resnet18 or 50</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F30abfda1128013ed50c56ec61a202d27%2FSelection_999(3213).png?generation=1694466900792790&amp;alt=media\" alt=\"\"></p>",
          "rawMarkdown": "another resnet18d results. so it doesn't matter if you are using resnet18 or 50\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F30abfda1128013ed50c56ec61a202d27%2FSelection_999(3213).png?generation=1694466900792790&alt=media)"
        }
      ]
    },
    {
      "id": 2427514,
      "postDate": "2023-09-07T09:34:57.810Z",
      "content": "<p>what we can learm from kinectics-400 action recognition : ensmble tricks at inference?<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F94aa67eb9e63fb7e5f05c73911493811%2FSelection_999(3118).png?generation=1694079294721151&amp;alt=media\" alt=\"\"></p>\n<p>more on video transformer later ….</p>",
      "rawMarkdown": "what we can learm from kinectics-400 action recognition : ensmble tricks at inference?\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F94aa67eb9e63fb7e5f05c73911493811%2FSelection_999(3118).png?generation=1694079294721151&alt=media)\n\nmore on video transformer later ....",
      "votes": 3,
      "replies": [
        {
          "id": 2427539,
          "postDate": "2023-09-07T09:55:09.373Z",
          "content": "<p>one possible extension that might work<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F35f9c16bcb02a974be38b28ade6aa969%2FSelection_999(3122).png?generation=1694080504450296&amp;alt=media\" alt=\"\"></p>",
          "rawMarkdown": "one possible extension that might work\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F35f9c16bcb02a974be38b28ade6aa969%2FSelection_999(3122).png?generation=1694080504450296&alt=media)",
          "votes": 1,
          "replies": [
            {
              "id": 2427577,
              "postDate": "2023-09-07T10:18:51.827Z",
              "content": "<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Ffd2e6e7ae0d650aea8f62039717a942d%2FSelection_999(3129).png?generation=1694081867859569&amp;alt=media\" alt=\"\"></p>\n<p>learning to label ct-scan  slice. … but i wonder if freezing a good idea?</p>",
              "rawMarkdown": "![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Ffd2e6e7ae0d650aea8f62039717a942d%2FSelection_999(3129).png?generation=1694081867859569&alt=media)\n\nlearning to label ct-scan  slice. ... but i wonder if freezing a good idea?"
            },
            {
              "id": 2427580,
              "postDate": "2023-09-07T10:21:41.337Z",
              "content": "<p>decouple space and time attnetion is  a pretty smart move<br>\npaper: Space-time Mixing Attention for Video Transformer</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F0c1ec8b092830e15e610ba772655b898%2FSelection_999(3131).png?generation=1694082066492720&amp;alt=media\" alt=\"\"></p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F5364b1e63fd2d42d5b3d8e537c788651%2FSelection_999(3130).png?generation=1694082081876226&amp;alt=media\" alt=\"\"></p>",
              "rawMarkdown": "decouple space and time attnetion is  a pretty smart move\npaper: Space-time Mixing Attention for Video Transformer\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F0c1ec8b092830e15e610ba772655b898%2FSelection_999(3131).png?generation=1694082066492720&alt=media)\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F5364b1e63fd2d42d5b3d8e537c788651%2FSelection_999(3130).png?generation=1694082081876226&alt=media)",
              "votes": 1
            },
            {
              "id": 2427586,
              "postDate": "2023-09-07T10:27:01.203Z",
              "content": "<p>another idea<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Fb79b9fcdf3739997882b944c0e1683ba%2FSelection_999(3134).png?generation=1694082417730080&amp;alt=media\" alt=\"\"></p>\n<p>for this, i wonder if it make senses for MAE self-supervised learning ???<br>\n<strong>we try to mask 2d CNN embedding and ask the model to predict it</strong></p>",
              "rawMarkdown": "another idea\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Fb79b9fcdf3739997882b944c0e1683ba%2FSelection_999(3134).png?generation=1694082417730080&alt=media)\n\nfor this, i wonder if it make senses for MAE self-supervised learning ???\n**we try to mask 2d CNN embedding and ask the model to predict it**",
              "votes": 1
            }
          ]
        }
      ]
    },
    {
      "id": 2425520,
      "postDate": "2023-09-06T01:59:04.657Z",
      "content": "<p>surprise!!!!<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Fb447feef9caea5a738a905b742bdaa3e%2FSelection_999(3077).png?generation=1693965542365371&amp;alt=media\" alt=\"\"></p>",
      "rawMarkdown": "surprise!!!!\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Fb447feef9caea5a738a905b742bdaa3e%2FSelection_999(3077).png?generation=1693965542365371&alt=media)",
      "votes": 3,
      "replies": [
        {
          "id": 2443663,
          "postDate": "2023-09-17T20:44:32.523Z",
          "content": "<p>i am even more surprised that extravasation injury follows the same rule!</p>\n<p>i.e. you only need to sheck some specific organs. it is easier to divide extravasation into different subset and detects. and there is correlation between other labels</p>",
          "rawMarkdown": "i am even more surprised that extravasation injury follows the same rule!\n\ni.e. you only need to sheck some specific organs. it is easier to divide extravasation into different subset and detects. and there is correlation between other labels"
        }
      ]
    },
    {
      "id": 2449116,
      "postDate": "2023-09-21T02:53:52.037Z",
      "content": "<p>i make a silly mistake.<br>\nsometimes it is easier to look at z-x plance.<br>\nbelow shows: image[:, y0:y1,:]</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F715764b271e9909b076c107f58fc993e%2FSelection_999(3322).png?generation=1695264828772404&amp;alt=media\" alt=\"\"></p>",
      "rawMarkdown": "i make a silly mistake.\nsometimes it is easier to look at z-x plance.\nbelow shows: image[:, y0:y1,:]\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F715764b271e9909b076c107f58fc993e%2FSelection_999(3322).png?generation=1695264828772404&alt=media)",
      "votes": 4,
      "replies": [
        {
          "id": 2450074,
          "postDate": "2023-09-21T15:39:29.913Z",
          "rawMarkdown": "",
          "isDeleted": true
        }
      ]
    },
    {
      "id": 2425329,
      "postDate": "2023-09-05T19:53:34.177Z",
      "content": "<p>find a weird distribution that makes me wonder if the hidden test also exihbits this:</p>\n<pre><code>df = train_df \ngb = df()() \ngb()\n    \n    \nName: series_id, dtype: int64\n</code></pre>",
      "rawMarkdown": "find a weird distribution that makes me wonder if the hidden test also exihbits this:\n\n```\n\ndf = train_df[train_df.extravasation_injury==1] \ngb = df.groupby(['patient_id']).count() \ngb['series_id'].value_counts()\n1    100\n2    100\nName: series_id, dtype: int64\n```",
      "votes": 3
    },
    {
      "id": 2412950,
      "postDate": "2023-08-28T15:45:28.420Z",
      "content": "<p>related paper:</p>\n<p>[1] CLIP-Driven Universal Model for Organ Segmentation and Tumor Detection<br>\n<a href=\"https://arxiv.org/abs/2301.00785\" target=\"_blank\">https://arxiv.org/abs/2301.00785</a></p>\n<p><a href=\"https://github.com/ljwztc/CLIP-Driven-Universal-Model/blob/main/model/Universal_model.py\" target=\"_blank\">https://github.com/ljwztc/CLIP-Driven-Universal-Model/blob/main/model/Universal_model.py</a><br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F699f0a042cd3cad5645df83e80a1073c%2FSelection_999(2990).png?generation=1693237526462504&amp;alt=media\" alt=\"\"></p>",
      "rawMarkdown": "related paper:\n\n[1] CLIP-Driven Universal Model for Organ Segmentation and Tumor Detection\nhttps://arxiv.org/abs/2301.00785\n\nhttps://github.com/ljwztc/CLIP-Driven-Universal-Model/blob/main/model/Universal_model.py\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F699f0a042cd3cad5645df83e80a1073c%2FSelection_999(2990).png?generation=1693237526462504&alt=media)\n",
      "votes": 3,
      "replies": [
        {
          "id": 2430287,
          "postDate": "2023-09-09T07:24:02.087Z",
          "content": "<p>Does anyone able to replicate results from this paper? I've spent 3 days on this and it doesn't look good.</p>",
          "rawMarkdown": "Does anyone able to replicate results from this paper? I've spent 3 days on this and it doesn't look good."
        }
      ]
    },
    {
      "id": 2426761,
      "postDate": "2023-09-06T19:41:05.730Z",
      "content": "<p>after working for two week, my observation:</p>\n<ul>\n<li>unlike other competition, you need to decide the volume size (and voxel spacing) of you input. then you have to resample and cache the data. so it is like 1hr of caching data + 1.5 hr of training.</li>\n<li>this eats up your diskspace.</li>\n<li>once you decided to try new data processing and new volume size, you have to re-cache your data (i.e. eats up more diskspace) </li>\n<li>in other competition, you need more compute and you may spend money on cloud gpu compute. Here, in addition, you need more diskpace. you may need to store your differet version of processed data in paid google drive.</li>\n</ul>",
      "rawMarkdown": "after working for two week, my observation:\n- unlike other competition, you need to decide the volume size (and voxel spacing) of you input. then you have to resample and cache the data. so it is like 1hr of caching data + 1.5 hr of training.\n- this eats up your diskspace.\n- once you decided to try new data processing and new volume size, you have to re-cache your data (i.e. eats up more diskspace) \n- in other competition, you need more compute and you may spend money on cloud gpu compute. Here, in addition, you need more diskpace. you may need to store your differet version of processed data in paid google drive.",
      "votes": 4,
      "replies": [
        {
          "id": 2427235,
          "postDate": "2023-09-07T06:01:39.640Z",
          "content": "<p><a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a> why do you need to re-cache the data? </p>",
          "rawMarkdown": "@hengck23 why do you need to re-cache the data? ",
          "replies": [
            {
              "id": 2427286,
              "postDate": "2023-09-07T06:29:47.800Z",
              "content": "<p>when i train with 256 input i cached the 256 scan (instead of the original size) for speed in training.</p>",
              "rawMarkdown": "when i train with 256 input i cached the 256 scan (instead of the original size) for speed in training.",
              "votes": 1
            }
          ]
        },
        {
          "id": 2427331,
          "postDate": "2023-09-07T06:58:46.493Z",
          "content": "<p>Wait didn't you need to cache data in previous competitions? That HP workstation is on another level.</p>",
          "rawMarkdown": "Wait didn't you need to cache data in previous competitions? That HP workstation is on another level.",
          "replies": [
            {
              "id": 2427513,
              "postDate": "2023-09-07T09:33:21.917Z",
              "content": "<p>HP work station has 72 cpu threads and 384GB ram. So i didn't cache in previous competition, except those on 3d CT SCAN (like the RSNA spine) 😀</p>",
              "rawMarkdown": "HP work station has 72 cpu threads and 384GB ram. So i didn't cache in previous competition, except those on 3d CT SCAN (like the RSNA spine) 😀"
            }
          ]
        }
      ]
    },
    {
      "id": 2411726,
      "postDate": "2023-08-27T20:29:02.843Z",
      "content": "<p>a list of 5000+ CT scan, maybe good for self-supervised pretraining of my encoder.<br>\n<a href=\"https://github.com/ljwztc/CLIP-Driven-Universal-Model\" target=\"_blank\">https://github.com/ljwztc/CLIP-Driven-Universal-Model</a></p>",
      "rawMarkdown": "a list of 5000+ CT scan, maybe good for self-supervised pretraining of my encoder.\nhttps://github.com/ljwztc/CLIP-Driven-Universal-Model",
      "votes": 2
    },
    {
      "id": 2428551,
      "postDate": "2023-09-08T02:14:21.837Z",
      "content": "<p>Thank you for sharing good ideas.</p>\n<p>Can i ask how did you make 'slice_predict' network?</p>\n<p>What is the label of slice prediction?</p>",
      "rawMarkdown": "Thank you for sharing good ideas.\n\nCan i ask how did you make 'slice_predict' network?\n\nWhat is the label of slice prediction?",
      "votes": 1,
      "replies": [
        {
          "id": 2442381,
          "postDate": "2023-09-17T01:26:55.353Z",
          "content": "<p>i would like to know too </p>",
          "rawMarkdown": "i would like to know too "
        }
      ]
    },
    {
      "id": 2426903,
      "postDate": "2023-09-06T23:02:31.487Z",
      "content": "<p>understanding  aortic_hu:</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Ff1c416c7a767b6c9a064ad4a072963c5%2FSelection_999(3104).png?generation=1694041310474157&amp;alt=media\" alt=\"\"></p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F05d2d8d25a030b04f0c5055c8b1e8470%2FSelection_999(3103).png?generation=1694041322611085&amp;alt=media\" alt=\"\"></p>\n<p>read about contrast enhanced CT here:</p>\n<p><a href=\"https://radiologyassistant.nl/more/ct-protocols/ct-contrast-injection-and-protocols\" target=\"_blank\">https://radiologyassistant.nl/more/ct-protocols/ct-contrast-injection-and-protocols</a></p>",
      "rawMarkdown": "understanding  aortic_hu:\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Ff1c416c7a767b6c9a064ad4a072963c5%2FSelection_999(3104).png?generation=1694041310474157&alt=media)\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F05d2d8d25a030b04f0c5055c8b1e8470%2FSelection_999(3103).png?generation=1694041322611085&alt=media)\n\nread about contrast enhanced CT here:\n\nhttps://radiologyassistant.nl/more/ct-protocols/ct-contrast-injection-and-protocols",
      "votes": 1
    },
    {
      "id": 2426246,
      "postDate": "2023-09-06T13:51:34.917Z",
      "content": "<p>I have a really similar pipeline, the only difference is I use a segmentation model to get bbox for each organ (liver, spleen, kidneys) and then 3 models to predict injury.</p>\n<p>I've got 0.57 CV for the liver and kidneys and ~0.7 CV for the spleen, and it gives me 0.62 on LB. My current segmentation model is not perfect at the moment so I think with better organ localization I'll get better results.</p>\n<p>Your sub volume predictor looks interesting, I was wondering if you could provide a bit more highlights of this model?</p>",
      "rawMarkdown": "I have a really similar pipeline, the only difference is I use a segmentation model to get bbox for each organ (liver, spleen, kidneys) and then 3 models to predict injury.\n\nI've got 0.57 CV for the liver and kidneys and ~0.7 CV for the spleen, and it gives me 0.62 on LB. My current segmentation model is not perfect at the moment so I think with better organ localization I'll get better results.\n\nYour sub volume predictor looks interesting, I was wondering if you could provide a bit more highlights of this model?",
      "votes": 1,
      "replies": [
        {
          "id": 2426278,
          "postDate": "2023-09-06T14:23:11.770Z",
          "content": "<pre><code></code></pre>",
          "rawMarkdown": "```\n \nclass Net(nn.Module):\n\tdef __init__(self, cfg):\n\t\tsuper().__init__()\n\t\tself.output_type = ['infer', 'loss']\n\t\tself.cfg = cfg\n\t\tself.encoder_in_dim = 3\n\n\t\tself.encoder = resnet18d(pretrained=False, in_chans=self.encoder_in_dim)\n\t \n\n\t\t#----------------------------------------------------\n\t\tself.norm = nn.LayerNorm(512)\n\t\tself.pos_embed = nn.Parameter(\n\t\t\tpositional_encoding(32, 512)\n\t\t)\n\t\tself.decoder = nn.Sequential(\n\t\t\tTransformerBlock(512,8),\n\t\t\tTransformerBlock(512,8),\n\t\t\tTransformerBlock(512,8),\n\t\t)\n\n\t\t#----------------------------------------------------\n\t\tself.slice_logit = nn.Linear(512, 1) \n\n\n\tdef infer(self, image):\n\t\tbatch_size, D, H, W = image.shape\n\t\tx = image.reshape(batch_size*D//self.encoder_in_dim, self.encoder_in_dim, H, W )\n\n\t\tf = self.encoder.forward_features(x)\n\t\t_,d,h,w = f.shape\n\t\tpool = F.adaptive_avg_pool2d(f, 1)\n\t\tpool = pool.flatten(1)\n\t\tp = pool.reshape(batch_size,-1,d)\n\n\t\t#------\n\t\tembed = self.norm(p) + self.pos_embed\n\t\td = self.decoder(embed)\n\n\t\tslice_logit = self.slice_logit(d).squeeze(-1)\n\t\tslice_prob = F.sigmoid(slice_logit)\n\t\tslice_prob = F.interpolate(slice_prob.unsqueeze(1), size=(D,), mode='linear', align_corners=False).squeeze(1)\n\n\t\treturn slice_prob\n\n\n```",
          "votes": 5,
          "replies": [
            {
              "id": 2426360,
              "postDate": "2023-09-06T15:07:43.877Z",
              "content": "<p>I've got 0.57 CV for the liver and kidneys and ~0.7 CV for the spleen, …</p>\n<p>your values seems a bit too high. To debug the algorithm:</p>\n<ol>\n<li><p>check your train loss. if it is also about 0.57,0.57.0.7, then the problem could be a weak model or too complex data.</p></li>\n<li><p>if your train loss is much lower, it is generalisation and augmentation could be a way to improve results (or use a less complex model)</p></li>\n</ol>\n<p>if we use the current leadboard rank first score as a proxy to bayes error, it means that 0.44 is where your validation and training loss should cross</p>",
              "rawMarkdown": "I've got 0.57 CV for the liver and kidneys and ~0.7 CV for the spleen, ...\n\nyour values seems a bit too high. To debug the algorithm:\n\n1. check your train loss. if it is also about 0.57,0.57.0.7, then the problem could be a weak model or too complex data.\n\n2. if your train loss is much lower, it is generalisation and augmentation could be a way to improve results (or use a less complex model)\n\nif we use the current leadboard rank first score as a proxy to bayes error, it means that 0.44 is where your validation and training loss should cross\n\n",
              "votes": 1
            },
            {
              "id": 2426785,
              "postDate": "2023-09-06T20:14:48.783Z",
              "content": "<p>Thanks! Yes, it is too high I agree, but at that point model starts overfitting even with augmentation. I think a problem with the preprocessing pipeline.</p>",
              "rawMarkdown": "Thanks! Yes, it is too high I agree, but at that point model starts overfitting even with augmentation. I think a problem with the preprocessing pipeline."
            },
            {
              "id": 2442353,
              "postDate": "2023-09-16T23:57:35.370Z",
              "content": "<p>Did you manage to fix this? No matter what I try my train loss can get really low, but all that learning is not transferred to validation (both in terms of log loss, and classsification metrics) </p>",
              "rawMarkdown": "Did you manage to fix this? No matter what I try my train loss can get really low, but all that learning is not transferred to validation (both in terms of log loss, and classsification metrics) "
            },
            {
              "id": 2442393,
              "postDate": "2023-09-17T02:09:17.757Z",
              "content": "<p><a href=\"https://www.kaggle.com/ivanpan\" target=\"_blank\">@ivanpan</a> </p>\n<p>you should think the problem smiliar as:<br>\n\"you are given one hundred 3000x3000 train images of smiliar background (e.g. forest of trees). we are asked to label if the test image contains bird or not. The size of bird is about 64x64. each test bird can be very different appearance, compared to the training set\"  </p>\n<ul>\n<li>basically if you try to use all information (whole 3000x3000 image), you end up detecting noise, i.e. overfitting.</li>\n<li>also if you try to learn to detect all bird in the train, it may end up in overfitting as well.</li>\n<li>without more data, the best solution is to learn to detect the subset of most probable targets using the least \"relevant subset\" of input.</li>\n</ul>\n<p>Different organ targets have different difficulty. hence i suggest you to start off with one or two \"most stable\" organ first. start with those you can localised the organ (once you can localised the organ, you need not use the whole scan to predict the injury)</p>",
              "rawMarkdown": "@ivanpan \n\nyou should think the problem smiliar as:\n\"you are given one hundred 3000x3000 train images of smiliar background (e.g. forest of trees). we are asked to label if the test image contains bird or not. The size of bird is about 64x64. each test bird can be very different appearance, compared to the training set\"  \n\n- basically if you try to use all information (whole 3000x3000 image), you end up detecting noise, i.e. overfitting.\n- also if you try to learn to detect all bird in the train, it may end up in overfitting as well.\n- without more data, the best solution is to learn to detect the subset of most probable targets using the least \"relevant subset\" of input.\n\nDifferent organ targets have different difficulty. hence i suggest you to start off with one or two \"most stable\" organ first. start with those you can localised the organ (once you can localised the organ, you need not use the whole scan to predict the injury)\n",
              "votes": 1
            },
            {
              "id": 2442885,
              "postDate": "2023-09-17T11:27:04.257Z",
              "content": "<p>That's exactly what I do :) Segment several organs - use only such crops for classification. </p>",
              "rawMarkdown": "That's exactly what I do :) Segment several organs - use only such crops for classification. "
            },
            {
              "id": 2442995,
              "postDate": "2023-09-17T12:51:01.400Z",
              "content": "<p>Thing is that during test stage is will take along to segmant each image so it will probably exceed the times,so how its applicable to test?<br>\nMoreOver im not sure how to treat in the model ,have you done multi-head classification(seems a little probalmitic for me as the model try predict some head even there is no object for example), Or  have u use  diffrent model?</p>",
              "rawMarkdown": "Thing is that during test stage is will take along to segmant each image so it will probably exceed the times,so how its applicable to test?\nMoreOver im not sure how to treat in the model ,have you done multi-head classification(seems a little probalmitic for me as the model try predict some head even there is no object for example), Or  have u use  diffrent model?\n\n "
            },
            {
              "id": 2443665,
              "postDate": "2023-09-17T20:47:27.240Z",
              "content": "<p>\"That's exactly what I do :) Segment several organs - use only such crops for classification.\"</p>\n<p>try not to use shared features at first. build individual detector. you should see good results \"easily\", even for resnet18d. just use lr 0.0001 and 3 to 4 epoch</p>",
              "rawMarkdown": "\"That's exactly what I do :) Segment several organs - use only such crops for classification.\"\n\ntry not to use shared features at first. build individual detector. you should see good results \"easily\", even for resnet18d. just use lr 0.0001 and 3 to 4 epoch"
            },
            {
              "id": 2443678,
              "postDate": "2023-09-17T21:12:17.640Z",
              "content": "<p>Not sure what you mean, but I guess that's what I do. 1 - train segmentation to find region of 3 organs. 2 - crop just to 3 orgs. 3 - train classification on such crops </p>\n<p>And all the models I try (2+1D or CSN) fail to have any generalization no matter the augs or the way I work with temporal dimension </p>",
              "rawMarkdown": "Not sure what you mean, but I guess that's what I do. 1 - train segmentation to find region of 3 organs. 2 - crop just to 3 orgs. 3 - train classification on such crops \n\nAnd all the models I try (2+1D or CSN) fail to have any generalization no matter the augs or the way I work with temporal dimension "
            }
          ]
        }
      ]
    },
    {
      "id": 2419375,
      "postDate": "2023-09-02T01:34:04.717Z",
      "content": "<p>this is is good stuffs</p>\n<p>MICCAI FLARE 2023: Fast, Low-resource, and Accurate oRgan and Pan-cancer sEgmentation in Abdomen CT<br>\n<a href=\"https://github.com/JunMa11/FLARE\" target=\"_blank\">https://github.com/JunMa11/FLARE</a></p>\n<ul>\n<li>4000 CT scans from 30+ medical centers</li>\n<li>Partial-label setting</li>\n<li>14 segmentation targets: liver, spleen, pancreas, right kidney, left kidney, stomach, gallbladder, esophagus, aorta, inferior vena cava, right adrenal gland, left adrenal gland, duodenum, and tumo</li>\n</ul>",
      "rawMarkdown": "this is is good stuffs\n\nMICCAI FLARE 2023: Fast, Low-resource, and Accurate oRgan and Pan-cancer sEgmentation in Abdomen CT\nhttps://github.com/JunMa11/FLARE\n\n- 4000 CT scans from 30+ medical centers\n- Partial-label setting\n- 14 segmentation targets: liver, spleen, pancreas, right kidney, left kidney, stomach, gallbladder, esophagus, aorta, inferior vena cava, right adrenal gland, left adrenal gland, duodenum, and tumo",
      "votes": 1
    },
    {
      "id": 2427278,
      "postDate": "2023-09-07T06:25:32.833Z",
      "content": "<p>how to use two ct scan and use auortic HU<br>\nhere  auortic HU is treated as a \"time embedding\" </p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Fc54839f48871ea0094184648013e0f42%2FSelection_999(3115).png?generation=1694067930839463&amp;alt=media\" alt=\"\"></p>",
      "rawMarkdown": "how to use two ct scan and use auortic HU\nhere  auortic HU is treated as a \"time embedding\" \n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Fc54839f48871ea0094184648013e0f42%2FSelection_999(3115).png?generation=1694067930839463&alt=media)",
      "votes": 2
    },
    {
      "id": 2425252,
      "postDate": "2023-09-05T18:14:25.243Z",
      "content": "<p>inspiration from other competition !</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Fa0700e0b510f05e3b369aefb2f4fe298%2FSelection_999(3059).png?generation=1693937651266838&amp;alt=media\" alt=\"\"></p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Fd1c32f7cbf0380811c594eacd8decef7%2FSelection_999(3058).png?generation=1693937662009406&amp;alt=media\" alt=\"\"></p>",
      "rawMarkdown": "inspiration from other competition !\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Fa0700e0b510f05e3b369aefb2f4fe298%2FSelection_999(3059).png?generation=1693937651266838&alt=media)\n\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Fd1c32f7cbf0380811c594eacd8decef7%2FSelection_999(3058).png?generation=1693937662009406&alt=media)",
      "votes": 2,
      "replies": [
        {
          "id": 2426993,
          "postDate": "2023-09-07T03:13:01.073Z",
          "content": "<p>how to train for very large 3d input !!!!</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Fdd262f6d48168a739f4f913129682b7d%2FSelection_999(3109).png?generation=1694056351957511&amp;alt=media\" alt=\"\"></p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Ffaf127c46ebf54e96875fd6aac399118%2FSelection_999(3110).png?generation=1694056365578899&amp;alt=media\" alt=\"\"></p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F7933682dcb50f653e13825b3c93c16c1%2FSelection_999(3111).png?generation=1694056378382520&amp;alt=media\" alt=\"\"></p>",
          "rawMarkdown": "how to train for very large 3d input !!!!\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Fdd262f6d48168a739f4f913129682b7d%2FSelection_999(3109).png?generation=1694056351957511&alt=media)\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Ffaf127c46ebf54e96875fd6aac399118%2FSelection_999(3110).png?generation=1694056365578899&alt=media)\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F7933682dcb50f653e13825b3c93c16c1%2FSelection_999(3111).png?generation=1694056378382520&alt=media)",
          "votes": 1,
          "replies": [
            {
              "id": 2431826,
              "postDate": "2023-09-10T12:44:13.060Z",
              "content": "<p>Is not it the concept of data patching?</p>",
              "rawMarkdown": "Is not it the concept of data patching?"
            }
          ]
        }
      ]
    },
    {
      "id": 2418538,
      "postDate": "2023-09-01T11:05:35.540Z",
      "content": "<p>example of mask-guided attention<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F097a50d066c8529ed46c7d4d6df273a7%2FSelection_999(3019).png?generation=1693566315138691&amp;alt=media\" alt=\"\"><br>\n<a href=\"https://mdpi-res.com/d_attachment/entropy/entropy-23-00653/article_deploy/entropy-23-00653-v2.pdf?version=1621927496\" target=\"_blank\">https://mdpi-res.com/d_attachment/entropy/entropy-23-00653/article_deploy/entropy-23-00653-v2.pdf?version=1621927496</a></p>",
      "rawMarkdown": "example of mask-guided attention\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F097a50d066c8529ed46c7d4d6df273a7%2FSelection_999(3019).png?generation=1693566315138691&alt=media)\nhttps://mdpi-res.com/d_attachment/entropy/entropy-23-00653/article_deploy/entropy-23-00653-v2.pdf?version=1621927496",
      "votes": 2
    },
    {
      "id": 2418482,
      "postDate": "2023-09-01T09:49:08.967Z",
      "content": "<p>grad cam activation results<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F9dfb576a6fa4c7dfa63f9e53c32f7f56%2FSelection_999(3018).png?generation=1693561745537268&amp;alt=media\" alt=\"\"></p>",
      "rawMarkdown": "grad cam activation results\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F9dfb576a6fa4c7dfa63f9e53c32f7f56%2FSelection_999(3018).png?generation=1693561745537268&alt=media)",
      "votes": 2,
      "replies": [
        {
          "id": 2418841,
          "postDate": "2023-09-01T14:49:02.190Z",
          "content": "<p>to confirm if the model is correct, i will study some youtube video like:</p>\n<p>[1]Abdominal Trauma: Liver and Spleen <br>\n<a href=\"https://www.youtube.com/watch?v=7s3RMGciXGQ\" target=\"_blank\">https://www.youtube.com/watch?v=7s3RMGciXGQ</a></p>\n<p>[2] Blunt Abdominal Trauma Part 3 Splenic Injury short<br>\n<a href=\"https://www.youtube.com/watch?v=TKBIbp2d8NA\" target=\"_blank\">https://www.youtube.com/watch?v=TKBIbp2d8NA</a></p>",
          "rawMarkdown": "to confirm if the model is correct, i will study some youtube video like:\n\n[1]Abdominal Trauma: Liver and Spleen \nhttps://www.youtube.com/watch?v=7s3RMGciXGQ\n\n[2] Blunt Abdominal Trauma Part 3 Splenic Injury short\nhttps://www.youtube.com/watch?v=TKBIbp2d8NA",
          "votes": 2
        }
      ]
    },
    {
      "id": 2413995,
      "postDate": "2023-08-29T09:41:38.583Z",
      "content": "<p>some really good discussion of the available network architecture:<br>\n<a href=\"https://glassboxmedicine.com/2020/08/04/chest-ct-scan-machine-learning-in-5-minutes/\" target=\"_blank\">https://glassboxmedicine.com/2020/08/04/chest-ct-scan-machine-learning-in-5-minutes/</a></p>\n<p>what we need here is high resolution and efficient solution:<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F5f9a384c05b11a5d40b51d71afd10262%2FSelection_999(2992).png?generation=1693302076424091&amp;alt=media\" alt=\"\"><br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F0eec8214001d5fc2232e737e8c2a666e%2FSelection_999(2991).png?generation=1693302096517671&amp;alt=media\" alt=\"\"></p>\n<p>google for \"CT scan 2d CNN, 3d CNN, 2.5 CNN\"</p>\n<p>transformer for global attention at the upper layers can be used once the CNN reduced the feature dim.</p>",
      "rawMarkdown": "some really good discussion of the available network architecture:\nhttps://glassboxmedicine.com/2020/08/04/chest-ct-scan-machine-learning-in-5-minutes/\n\nwhat we need here is high resolution and efficient solution:\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F5f9a384c05b11a5d40b51d71afd10262%2FSelection_999(2992).png?generation=1693302076424091&alt=media)\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F0eec8214001d5fc2232e737e8c2a666e%2FSelection_999(2991).png?generation=1693302096517671&alt=media)\n\ngoogle for \"CT scan 2d CNN, 3d CNN, 2.5 CNN\"\n\ntransformer for global attention at the upper layers can be used once the CNN reduced the feature dim.",
      "votes": 2,
      "replies": [
        {
          "id": 2414004,
          "postDate": "2023-08-29T09:51:47.433Z",
          "content": "<p>How do you select slices for 2.5D data for figure 1? (i.e. when constructing 1 slice, which slice of axial/coronal/sagittal should i choose?)</p>",
          "rawMarkdown": "How do you select slices for 2.5D data for figure 1? (i.e. when constructing 1 slice, which slice of axial/coronal/sagittal should i choose?)"
        },
        {
          "id": 2414032,
          "postDate": "2023-08-29T10:26:38.583Z",
          "content": "<p>Figure 2 looks weird. Why would you use 3 slice at a time and use them as channels? The only benefit I can think of is using pretrained weights.</p>",
          "rawMarkdown": "Figure 2 looks weird. Why would you use 3 slice at a time and use them as channels? The only benefit I can think of is using pretrained weights.",
          "replies": [
            {
              "id": 2414033,
              "postDate": "2023-08-29T10:36:01.140Z",
              "content": "<p>perhaps the purpose is to extract features across different orientations? (axial/coronal/sagittal) The problem is that there is no good way (I can't think of any) to concatenate slices of different orientations :(.</p>",
              "rawMarkdown": "perhaps the purpose is to extract features across different orientations? (axial/coronal/sagittal) The problem is that there is no good way (I can't think of any) to concatenate slices of different orientations :(."
            },
            {
              "id": 2414112,
              "postDate": "2023-08-29T11:59:36.223Z",
              "content": "<p>It doesn't achieve that though. It extracts features from one plane with sliding window which is more similar multi instance learning. In order to extract features from multiple planes, 3d input has to be transposed and rotated.</p>",
              "rawMarkdown": "It doesn't achieve that though. It extracts features from one plane with sliding window which is more similar multi instance learning. In order to extract features from multiple planes, 3d input has to be transposed and rotated."
            },
            {
              "id": 2414236,
              "postDate": "2023-08-29T13:44:36.347Z",
              "content": "<p>I'm not even sure how you could stack different planes into a single image .. they're grossly different sizes and only the axial views are square.</p>",
              "rawMarkdown": "I'm not even sure how you could stack different planes into a single image .. they're grossly different sizes and only the axial views are square."
            },
            {
              "id": 2414257,
              "postDate": "2023-08-29T14:00:10.547Z",
              "content": "<p>The only way I can think of is using 3d model, where you just stack volumes of different orientations, this to a certain extent ensures that the model will look at the different orientations at a slightly higher resolution than just looking at a volume in one orientation if compute isn't enough. If compute is enough, you can just use inputs with a shape like (256,256,256) to train the model🤣</p>",
              "rawMarkdown": "The only way I can think of is using 3d model, where you just stack volumes of different orientations, this to a certain extent ensures that the model will look at the different orientations at a slightly higher resolution than just looking at a volume in one orientation if compute isn't enough. If compute is enough, you can just use inputs with a shape like (256,256,256) to train the model🤣"
            },
            {
              "id": 2414261,
              "postDate": "2023-08-29T14:04:01.907Z",
              "content": "<p>Coronal and Sagittal images will be terribly distorted if they're made square though.</p>",
              "rawMarkdown": "Coronal and Sagittal images will be terribly distorted if they're made square though."
            },
            {
              "id": 2414263,
              "postDate": "2023-08-29T14:07:07.447Z",
              "content": "<p>You are right. Maybe this is why 2.5D models are generally better and way easier to train in my experiments.</p>",
              "rawMarkdown": "You are right. Maybe this is why 2.5D models are generally better and way easier to train in my experiments.",
              "votes": 1
            },
            {
              "id": 2414276,
              "postDate": "2023-08-29T14:18:41.987Z",
              "content": "<p>The 2.5D stacking methods I have seen posted so far don't make sense to me. Stacking slices together using various intervals results in each channel sometimes containing similar anatomy, sometimes not. </p>\n<p>One series might have 2 channels with liver, kidneys and spleen visible and one channel of just noise because the selected slice is \"below\" the bowel level. The next series might be one channel of heart/lungs (with no other organs visible), then a couple slices of bowel.</p>",
              "rawMarkdown": "The 2.5D stacking methods I have seen posted so far don't make sense to me. Stacking slices together using various intervals results in each channel sometimes containing similar anatomy, sometimes not. \n\nOne series might have 2 channels with liver, kidneys and spleen visible and one channel of just noise because the selected slice is \"below\" the bowel level. The next series might be one channel of heart/lungs (with no other organs visible), then a couple slices of bowel.",
              "votes": 3
            }
          ]
        },
        {
          "id": 2414280,
          "postDate": "2023-08-29T14:19:57.033Z",
          "content": "<p>there is more information in the xy plane.</p>\n<ul>\n<li>e.g. we can check if there is injury just by looking  at one slice in some cases. </li>\n<li>xy plane has more resolution in the construction of CT scan.</li>\n</ul>\n<p>hence even if you are doing 3d convolution, you want to use a non uniform 3d kernel = (larger w, larger h, smaller d)</p>\n<p>since there is less information in the z-axis, we might as well make the 3d convolution stride = kernel size d in that direction (i.e. non-overlapping)</p>\n<p>if they are non overlapping, you might process them individually (first), which ends up with stack of 2.5d convolution.</p>\n<p>(lastly) we can \"link up\" all xy features in the z direction by using 3d convolution, LSTM in z direction or transformer.</p>\n<p>to some extend, it does look  like multiple instance learning because we are interested in scan level prediction and not localized (x,y,z) prediction.</p>",
          "rawMarkdown": "there is more information in the xy plane.\n- e.g. we can check if there is injury just by looking  at one slice in some cases. \n- xy plane has more resolution in the construction of CT scan.\n\nhence even if you are doing 3d convolution, you want to use a non uniform 3d kernel = (larger w, larger h, smaller d)\n\nsince there is less information in the z-axis, we might as well make the 3d convolution stride = kernel size d in that direction (i.e. non-overlapping)\n\nif they are non overlapping, you might process them individually (first), which ends up with stack of 2.5d convolution.\n\n(lastly) we can \"link up\" all xy features in the z direction by using 3d convolution, LSTM in z direction or transformer.\n\nto some extend, it does look  like multiple instance learning because we are interested in scan level prediction and not localized (x,y,z) prediction.",
          "votes": 3,
          "replies": [
            {
              "id": 2414288,
              "postDate": "2023-08-29T14:28:15.977Z",
              "content": "<p>possible implementation</p>\n<pre><code></code></pre>",
              "rawMarkdown": "possible implementation\n\n```\n\n\nclass Net(nn.Module):\n\tdef __init__(self, cfg):\n\t\tsuper().__init__()\n\t\tself.output_type = ['infer', 'loss']\n\t\tself.cfg = cfg\n\n\t\tself.cnn = resnet18d(pretrained=True, in_chans=4) #use 4 input channels\n\t\tcnn_dim = [64, 64, 128, 256, 512]\n\n\t\tself.cnn3d = nn.Sequential( #fusion in z\n\t\t\tnn.Conv3d(512, 256, kernel_size=(3,3,3),stride=(2,1,1), padding=(1,1,1)),\n\t\t\tnn.BatchNorm3d(256),\n\t\t\tnn.GELU(),\n\t\t\tnn.Conv3d(256, 128, kernel_size=(3,3,3),stride=(2,1,1), padding=(1,1,1)),\n\t\t\tnn.BatchNorm3d(128),\n\t\t\tnn.GELU(),\n\t\t\tnn.Conv3d(128, 64, kernel_size=(3,3,3),stride=(2,1,1), padding=(1,1,1)),\n\t\t\tnn.BatchNorm3d(64),\n\t\t\tnn.GELU(),\n\t\t) \n\n\t\tself.logit=nn.ModuleList([\n\t\t\tnn.Linear(64,2),#none (place holder)\n\t\t\tnn.Linear(64,3),#liver\n\t\t\tnn.Linear(64,3),#spleen\n\t\t\tnn.Linear(64,3),#kidney\n\t\t\tnn.Linear(64,2),#bowel\n\t\t\tnn.Linear(64,2),#extravasation\n\t\t\tnn.Linear(64,2),#any_injury\n\t\t])\n\t\tassert(len(self.logit)==num_logit)\n \n\n\tdef forward(self, batch):\n\t\tcfg = self.cfg\n\t\timage = batch['image']  #list of[scan1, scan2, ... varied size]\n\t\tbatch_size = len(image)\n\n\t\t#----------------------\n\t\tencode = []\n\t\tfor b in range(batch_size):\n\t\t\tx = image[b]\n\t\t\t_1_, c, h, w = x.shape\n\t\t\tx = x.reshape(c//4, 4, h, w) #torch.Size([60, 4, 320, 320])\n\t\t\tf = self.cnn.forward_features(x) #torch.Size([60, 512, 10, 10])\n\n\n\t\t\tf1 = f.permute((1,0,2,3)).contiguous().unsqueeze(0) #torch.Size([1, 512, 60, 10, 10])\n\t\t\tf2 = self.cnn3d(f1) #torch.Size([1, 64, 8, 10, 10])\n\t\t\tf3 = F.adaptive_avg_pool3d(f2,1)\n\t\t\tpool = f3.reshape(-1)  #torch.Size([64])\n\n\t\t\tencode.append(pool)\n\t\t\t#----------------------\n\t\tencode = torch.stack(encode)\n\t\tdecode = encode #self.decoder(encode)\n\n\t\tlogit = []\n\t\tfor i in range(num_logit):\n\t\t\tl = self.logit[i](decode)\n\t\t\tlogit.append(l)\n \n\t\t#---\n\t\toutput = {}\n\t\tif 'infer' in self.output_type:\n\t\t\tfor i in range(num_logit):\n\t\t\t\toutput[f'probability{i}'] = F.softmax(logit[i],-1)\n\n\t\tif 'loss' in self.output_type:\n\t\t\tfor i in range(num_logit):\n\t\t\t\toutput[f'label_loss{i}'] = F.cross_entropy(logit[i], batch['label'][i])\n\t\treturn output\n\n```",
              "votes": 3
            },
            {
              "id": 2414434,
              "postDate": "2023-08-29T16:14:48.950Z",
              "content": "<p>Yea im using a similar approach, what I was wondering is how did they stack images of different orientation together in fig1</p>",
              "rawMarkdown": "Yea im using a similar approach, what I was wondering is how did they stack images of different orientation together in fig1",
              "votes": 1
            },
            {
              "id": 2414498,
              "postDate": "2023-08-29T17:18:23.597Z",
              "content": "<p>Slices are in axial plane by default. In order to convert to another plane you have to reorder axes and rotate accordingly.</p>",
              "rawMarkdown": "Slices are in axial plane by default. In order to convert to another plane you have to reorder axes and rotate accordingly."
            },
            {
              "id": 2451922,
              "postDate": "2023-09-22T22:47:47.083Z",
              "content": "<blockquote>\n  <p>possible implementation</p>\n<pre><code> (nn.Module):\n     ():\n        ().__init__()\n        .output_type = [, ]\n        .cfg = cfg\n</code></pre>\n</blockquote>\n<p>Not sure if you included this intentionally but it looks like <code>cfg</code> is not used for anything. What is this parameter supposed to mean?</p>",
              "rawMarkdown": "> possible implementation\n> \n> ```\n> \n> \n> class Net(nn.Module):\n> \tdef __init__(self, cfg):\n> \t\tsuper().__init__()\n> \t\tself.output_type = ['infer', 'loss']\n> \t\tself.cfg = cfg\n>```\n\nNot sure if you included this intentionally but it looks like `cfg` is not used for anything. What is this parameter supposed to mean?"
            }
          ]
        },
        {
          "id": 2418839,
          "postDate": "2023-09-01T14:48:26.297Z",
          "content": "<p>Hello everyone)) First of all, thank you very much for the interesting material. I have the following question: in the test data, I see only one slice per CT scan, does it make sense to apply 3D and 2.5D if the input data is 2D? Excuse me if my question looks stupid, I’m still not fully familiar with KAGGLE and this is my first dive into neural networks. Thank you.</p>",
          "rawMarkdown": "Hello everyone)) First of all, thank you very much for the interesting material. I have the following question: in the test data, I see only one slice per CT scan, does it make sense to apply 3D and 2.5D if the input data is 2D? Excuse me if my question looks stupid, I’m still not fully familiar with KAGGLE and this is my first dive into neural networks. Thank you.\n",
          "replies": [
            {
              "id": 2420678,
              "postDate": "2023-09-02T19:38:42.723Z",
              "content": "<p>The test data is 3D. </p>\n<p>The test data that you are seeing is just a placeholder. The actual test set contains multiple slices per CT scan. You cannot see them, but when you submit your solution, your notebook will have access to view them. This is done so that participants cannot hand-label the data by themselves.</p>",
              "rawMarkdown": "The test data is 3D. \n\nThe test data that you are seeing is just a placeholder. The actual test set contains multiple slices per CT scan. You cannot see them, but when you submit your solution, your notebook will have access to view them. This is done so that participants cannot hand-label the data by themselves.",
              "votes": 1
            },
            {
              "id": 2427695,
              "postDate": "2023-09-07T12:10:28.053Z",
              "content": "<p>thank s a lot </p>",
              "rawMarkdown": "thank s a lot "
            }
          ]
        }
      ]
    },
    {
      "id": 2425264,
      "postDate": "2023-09-05T18:28:35.417Z",
      "content": "<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F5e43d4fb8c52d46ad964858cf274bff8%2FSelection_999(3062).png?generation=1693938435367075&amp;alt=media\" alt=\"\"><br>\n<a href=\"https://www.kaggle.com/nischaydnk\" target=\"_blank\">@nischaydnk</a> 's post on SAM-Med2D is close to what i have in mind<br>\n<a href=\"https://www.kaggle.com/competitions/rsna-2023-abdominal-trauma-detection/discussion/437036\" target=\"_blank\">https://www.kaggle.com/competitions/rsna-2023-abdominal-trauma-detection/discussion/437036</a></p>",
      "rawMarkdown": "![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F5e43d4fb8c52d46ad964858cf274bff8%2FSelection_999(3062).png?generation=1693938435367075&alt=media)\n@nischaydnk 's post on SAM-Med2D is close to what i have in mind\nhttps://www.kaggle.com/competitions/rsna-2023-abdominal-trauma-detection/discussion/437036",
      "votes": 1
    },
    {
      "id": 2425701,
      "postDate": "2023-09-06T05:48:27.790Z",
      "content": "<p>very nice, maybe you can upload the weight file</p>",
      "rawMarkdown": "very nice, maybe you can upload the weight file",
      "votes": -11
    },
    {
      "id": 2468460,
      "postDate": "2023-10-05T14:08:54.090Z",
      "content": "<p><strong>can you explain how you have generated folds in this model(2.5d/3d)</strong></p>",
      "rawMarkdown": "**can you explain how you have generated folds in this model(2.5d/3d)**"
    },
    {
      "id": 2454534,
      "postDate": "2023-09-24T22:31:22.200Z",
      "content": "<p>finally a 2d to 3d SAM </p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F4a8e63ee156fa320087583669b9d1e8c%2FSelection_999(3368).png?generation=1695594666992627&amp;alt=media\" alt=\"\"></p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F3f4543525a9b8dca486850f95322ae20%2FSelection_999(3369).png?generation=1695594772220979&amp;alt=media\" alt=\"\"><br>\nmore here:<br>\n<a href=\"https://github.com/YichiZhang98/SAM4MIS\" target=\"_blank\">https://github.com/YichiZhang98/SAM4MIS</a></p>",
      "rawMarkdown": "finally a 2d to 3d SAM \n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F4a8e63ee156fa320087583669b9d1e8c%2FSelection_999(3368).png?generation=1695594666992627&alt=media)\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F3f4543525a9b8dca486850f95322ae20%2FSelection_999(3369).png?generation=1695594772220979&alt=media)\nmore here:\nhttps://github.com/YichiZhang98/SAM4MIS"
    },
    {
      "id": 2446642,
      "postDate": "2023-09-19T14:17:39.053Z",
      "content": "<p>did you probe the hidden test data?</p>\n<pre><code>just consider liver case.\n A =  of   == healthly \n B =  of   == low (injury) \n C =  of   == high (injury) \n means weighted percentage\n\n\nwe submit  pobability prediction  all test samples:\np = [ , , ]\n\n lb score :\nS1 = -A*()-B*()-C*()\n ()=,  we have one equation:\nB+C = -S1/()\ni.e. A = +S1/()\n</code></pre>",
      "rawMarkdown": "did you probe the hidden test data?\n\n```\njust consider liver case.\nlet A = % of true labels == healthly \nlet B = % of true labels == low (injury) \nlet C = % of true labels == high (injury) \n% means weighted percentage\n\n\nwe submit constant pobability prediction for all test samples:\np = [ 0.99999, 0.000005, 0.000005]\n\nthen lb score :\nS1 = -A*log(0.99999)-B*log(0.000005)-C*log(0.000005)\nassume log(0.99999)=0, then we have one equation:\nB+C = -S1/log(0.99999)\ni.e. A = 1+S1/log(0.99999)\n\n\n\n```"
    },
    {
      "id": 2446475,
      "postDate": "2023-09-19T13:03:37.027Z",
      "content": "<p>will using that  giving no module kaggle_helper <br>\ni try to insert the data related but it is not available can you say where you found</p>",
      "rawMarkdown": "will using that  giving no module kaggle_helper \ni try to insert the data related but it is not available can you say where you found"
    },
    {
      "id": 2434108,
      "postDate": "2023-09-12T05:40:53.100Z",
      "content": "<p>yes, you need slice detector to do the alignment for multi-phrase CT!!!</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F7347bb2e52a2256550df0049b6164dee%2FSelection_999(3230).png?generation=1694497217087058&amp;alt=media\" alt=\"\"></p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F93bfb1b312653eb2907fc1dc84288aed%2FSelection_999(3223).png?generation=1694497235927858&amp;alt=media\" alt=\"\"></p>",
      "rawMarkdown": "yes, you need slice detector to do the alignment for multi-phrase CT!!!\n\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F7347bb2e52a2256550df0049b6164dee%2FSelection_999(3230).png?generation=1694497217087058&alt=media)\n\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F93bfb1b312653eb2907fc1dc84288aed%2FSelection_999(3223).png?generation=1694497235927858&alt=media)\n",
      "replies": [
        {
          "id": 2434135,
          "postDate": "2023-09-12T05:56:04.467Z",
          "rawMarkdown": "",
          "isDeleted": true,
          "replies": [
            {
              "id": 2434139,
              "postDate": "2023-09-12T06:01:01.070Z",
              "content": "<p>in theory i can probably create sythentic pair of samples.<br>\nthis is smiliar to cvpr 2023 paper</p>\n<p><a href=\"https://github.com/MrGiovanni/SyntheticTumors\" target=\"_blank\">https://github.com/MrGiovanni/SyntheticTumors</a><br>\nSynthetic Tumors Make AI Segment Tumors Better</p>",
              "rawMarkdown": "in theory i can probably create sythentic pair of samples.\nthis is smiliar to cvpr 2023 paper\n\nhttps://github.com/MrGiovanni/SyntheticTumors\nSynthetic Tumors Make AI Segment Tumors Better\n"
            },
            {
              "id": 2434253,
              "postDate": "2023-09-12T07:14:12.640Z",
              "content": "<p>i wonder if there any experts to identify where is the injury?<br>\nextravasation_injury?<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F67dd4cc0e8c130fbb040c333892de3b6%2FSelection_999(3233).png?generation=1694502844941722&amp;alt=media\" alt=\"\"></p>",
              "rawMarkdown": "i wonder if there any experts to identify where is the injury?\nextravasation_injury?\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F67dd4cc0e8c130fbb040c333892de3b6%2FSelection_999(3233).png?generation=1694502844941722&alt=media)"
            }
          ]
        }
      ]
    },
    {
      "id": 2432421,
      "postDate": "2023-09-10T20:24:42.287Z",
      "content": "<p>easy elegant code for single/multi scan model:</p>\n<pre><code></code></pre>",
      "rawMarkdown": "easy elegant code for single/multi scan model:\n```\nclass Net(nn.Module):\n\tdef __init__(self, cfg=None):\n\t\tsuper().__init__()\n\n\n\tdef forward(self, batch):\n\n\t\timage = batch['image']\n\t\tbatch_size, D, H, W = image.shape  #(B, 96, 256, 256)\n\n\t\t... \n\t\tf = self.encoder.forward_features(x)\n\t\t....\n\t\t....\n\t\tf = self.decoder(f)\n\t\tflatten = f.mean(dim=[2,3,4]) # pool\n\t\tsplit = torch.split_with_sizes(flatten, batch['num_series'])\n\t\tpool  = torch.stack([\n\t\t\tp.max(0)[0] + p.mean(0)\n\t\t\tfor p in split])\n \n\t\tliver_logit  = self.liver_logit(pool)\n\t\tspleen_logit = self.spleen_logit(pool)\n\t\tkidney_logit = self.kidney_logit(pool)\n\t\t...\n\ndef run_check_net():\n\tnum_series = [1,1,2,1,2] #either one two scan per patient\n\tnum_patient = len(num_series)\n\tbatch_size = sum(num_series)\n\tscan_size = [96, 256, 256]  \n\tD,H,W = scan_size\n\n\timage        =  np.random.uniform(0, 1, (batch_size, D,H,W))\n\taortic_hu    =  np.random.uniform(0, 1, (batch_size ))\n\tliver_label  =  np.random.randint(0, 2, (num_patient,))\n\tspleen_label =  np.random.randint(0, 2, (num_patient,))\n\t...\n\n\t# ---\n\tbatch = dict(\n\t\tnum_series = num_series,\n\t\tnum_patient = num_patient,\n\t\timage = torch.from_numpy(image).float().cuda(),\n\t\taortic_hu  = torch.from_numpy(aortic_hu).float().cuda(),\n\n\t\tliver_label  = torch.from_numpy(liver_label).long().cuda(),\n\t\tspleen_label = torch.from_numpy(spleen_label).long().cuda(),\n\t\t....\n\t)\n \n\tnet = Net(cfg).cuda()\n\n```"
    },
    {
      "id": 2432114,
      "postDate": "2023-09-10T15:32:28.830Z",
      "content": "<p>i wonder if this would work</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F6f1df7506718fa315e46b9dba334482b%2FSelection_999(3183).png?generation=1694359910537670&amp;alt=media\" alt=\"\"></p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Fc6253d718653055f93db1187f8cb34e7%2FSelection_999(3181).png?generation=1694359922840424&amp;alt=media\" alt=\"\"><br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Fdf4313d4f2d8f59926dbbc7c90858ebf%2FSelection_999(3180).png?generation=1694359935802453&amp;alt=media\" alt=\"\"><br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Ffc4b526962564416fbf12161bf7ff1cc%2FSelection_999(3179).png?generation=1694359947416152&amp;alt=media\" alt=\"\"></p>",
      "rawMarkdown": "i wonder if this would work\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F6f1df7506718fa315e46b9dba334482b%2FSelection_999(3183).png?generation=1694359910537670&alt=media)\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Fc6253d718653055f93db1187f8cb34e7%2FSelection_999(3181).png?generation=1694359922840424&alt=media)\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Fdf4313d4f2d8f59926dbbc7c90858ebf%2FSelection_999(3180).png?generation=1694359935802453&alt=media)\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Ffc4b526962564416fbf12161bf7ff1cc%2FSelection_999(3179).png?generation=1694359947416152&alt=media)"
    },
    {
      "id": 2432110,
      "postDate": "2023-09-10T15:30:47.987Z",
      "content": "<p>there are some \"dangerous trick\" one can set try for log loss</p>\n<ul>\n<li>set pthreshold=1</li>\n<li>you can partition the p values and use constant prediction in each partition</li>\n<li>rank all scores. if you know the num of +ve case (e.g. via probing+train data) you can chnage the top and bottom values</li>\n<li>the injury are highly correlated</li>\n</ul>",
      "rawMarkdown": "there are some \"dangerous trick\" one can set try for log loss\n- set p<threshold=0,  p>threshold=1\n- you can partition the p values and use constant prediction in each partition\n- rank all scores. if you know the num of +ve case (e.g. via probing+train data) you can chnage the top and bottom values\n- the injury are highly correlated"
    },
    {
      "id": 2431343,
      "postDate": "2023-09-10T03:52:51.670Z",
      "content": "<p>how to make beautiful cross sections …<br>\n(if you see better, the model also see better)</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F029bca29f9d0b4640ac5b85986c77abb%2FSelection_999(3167).png?generation=1694317890289980&amp;alt=media\" alt=\"\"></p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F431973c1bb7db4ba5c8c9f1b90f640d8%2FSelection_999(3165).png?generation=1694317908362596&amp;alt=media\" alt=\"\"></p>\n<pre><code>          z_min= (d1,d1,d1,d1.kidney_right_z_min)\n        z_max= (d1,d1,d1,d1.kidney_right_z_max)\n\n        y_min= (d1,d1,d1,d1.kidney_right_y_min)\n        y_max= (d1,d1,d1,d1.kidney_right_y_max)\n\n        x_min= (d1,d1,d1,d1.kidney_right_x_min)\n        x_max= (d1,d1,d1,d1.kidney_right_x_max)\n        (x_min,x_max)\n\n        z0 = (z_min/d1.ndata_D*l)  since my image and nii bounding box are of different scale\n        z1 = (z_max/d1.ndata_D*l) \n        y0 = (y_min/d1.ndata_H*s)\n        y1 = (y_max/d1.ndata_H*s)\n        x0 = (x_min/d1.ndata_W*s)\n        x1 = (x_max/d1.ndata_W*s)\n\n        v = image\n        v0_mean = (v())\n        v1_mean = (v())\n        v2_mean = (v())\n\n        (, v0_mean, =)\n        (, v1_mean, =)\n        (, v2_mean, =)\n        cv2()\n</code></pre>",
      "rawMarkdown": "how to make beautiful cross sections ...\n(if you see better, the model also see better)\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F029bca29f9d0b4640ac5b85986c77abb%2FSelection_999(3167).png?generation=1694317890289980&alt=media)\n\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F431973c1bb7db4ba5c8c9f1b90f640d8%2FSelection_999(3165).png?generation=1694317908362596&alt=media)\n\n```\n\t      z_min= max(d1.liver_z_min,d1.spleen_z_min,d1.kidney_left_z_min,d1.kidney_right_z_min)\n\t\tz_max= min(d1.liver_z_max,d1.spleen_z_max,d1.kidney_left_z_max,d1.kidney_right_z_max)\n\n\t\ty_min= max(d1.liver_y_min,d1.spleen_y_min,d1.kidney_left_y_min,d1.kidney_right_y_min)\n\t\ty_max= min(d1.liver_y_max,d1.spleen_y_max,d1.kidney_left_y_max,d1.kidney_right_y_max)\n\n\t\tx_min= min(d1.liver_x_min,d1.spleen_x_min,d1.kidney_left_x_min,d1.kidney_right_x_min)\n\t\tx_max= max(d1.liver_x_max,d1.spleen_x_max,d1.kidney_left_x_max,d1.kidney_right_x_max)\n\t\tprint(x_min,x_max)\n\n\t\tz0 = int(z_min/d1.ndata_D*l) #scle since my image and nii bounding box are of different scale\n\t\tz1 = int(z_max/d1.ndata_D*l) \n\t\ty0 = int(y_min/d1.ndata_H*s)\n\t\ty1 = int(y_max/d1.ndata_H*s)\n\t\tx0 = int(x_min/d1.ndata_W*s)\n\t\tx1 = int(x_max/d1.ndata_W*s)\n\n\t\tv = image\n\t\tv0_mean = np_min_max_norm(v[z0:z1].mean(0))\n\t\tv1_mean = np_min_max_norm(v[:,y0:y1].mean(1))\n\t\tv2_mean = np_min_max_norm(v[:,:,x0:x1].mean(2))\n\n\t\timage_show_norm('v0_mean', v0_mean, resize=2)\n\t\timage_show_norm('v1_mean', v1_mean, resize=2)\n\t\timage_show_norm('v2_mean', v2_mean, resize=2)\n\t\tcv2.waitKey(0)\n\n```"
    },
    {
      "id": 2431253,
      "postDate": "2023-09-10T00:38:26.523Z",
      "content": "<p>i am surprised that Liver Tumor can be synthetically generated for training</p>\n<p><a href=\"https://openaccess.thecvf.com/content/CVPR2023/papers/Hu_Label-Free_Liver_Tumor_Segmentation_CVPR_2023_paper.pdf\" target=\"_blank\">https://openaccess.thecvf.com/content/CVPR2023/papers/Hu_Label-Free_Liver_Tumor_Segmentation_CVPR_2023_paper.pdf</a><br>\nLabel-Free Liver Tumor Segmentation</p>",
      "rawMarkdown": "i am surprised that Liver Tumor can be synthetically generated for training\n\nhttps://openaccess.thecvf.com/content/CVPR2023/papers/Hu_Label-Free_Liver_Tumor_Segmentation_CVPR_2023_paper.pdf\nLabel-Free Liver Tumor Segmentation"
    },
    {
      "id": 2428408,
      "postDate": "2023-09-07T20:59:47.773Z",
      "content": "<p><a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a> <br>\nI'm new to this data.<br>\nCan you tell me the difference between 3D vs 2.5D approaches?<br>\nIn 3D approach, do you stack all images of 1 patient into one 3D tensor then use 3D CNN?</p>",
      "rawMarkdown": "@hengck23 \nI'm new to this data.\nCan you tell me the difference between 3D vs 2.5D approaches?\nIn 3D approach, do you stack all images of 1 patient into one 3D tensor then use 3D CNN?"
    },
    {
      "id": 2426743,
      "postDate": "2023-09-06T19:23:37.010Z",
      "content": "<p>find something interesting …<br>\nalthough my model performs poorly for image level bowel injury, it does better at series level.</p>\n<p>blue: ground truth ( image level bowel injury)<br>\norange: predicted probability<br>\ngreen: threshold version of organe<br>\nx-axis : slice number</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Fb9217525f6201d2234cb51b6ebbb4466%2FSelection_999(3097).png?generation=1694028070377042&amp;alt=media\" alt=\"\"><br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Ffa1651e58a43d30ab600c27a60e24da7%2FSelection_999(3098).png?generation=1694028090825942&amp;alt=media\" alt=\"\"><br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F6567dbc1f21eac0e3fda719d36850dd5%2FSelection_999(3100).png?generation=1694028104655954&amp;alt=media\" alt=\"\"></p>",
      "rawMarkdown": "find something interesting ...\nalthough my model performs poorly for image level bowel injury, it does better at series level.\n\nblue: ground truth ( image level bowel injury)\norange: predicted probability\ngreen: threshold version of organe\nx-axis : slice number\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Fb9217525f6201d2234cb51b6ebbb4466%2FSelection_999(3097).png?generation=1694028070377042&alt=media)\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Ffa1651e58a43d30ab600c27a60e24da7%2FSelection_999(3098).png?generation=1694028090825942&alt=media)\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F6567dbc1f21eac0e3fda719d36850dd5%2FSelection_999(3100).png?generation=1694028104655954&alt=media)",
      "replies": [
        {
          "id": 2426751,
          "postDate": "2023-09-06T19:33:56.857Z",
          "content": "<p>at series level:</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Fae04a490bc3a2f1770618edd876199d6%2FSelection_999(3101).png?generation=1694028795509597&amp;alt=media\" alt=\"\"></p>\n<p>development trick: this is how i visualise results fast from the pycharm debug window :)</p>",
          "rawMarkdown": "at series level:\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Fae04a490bc3a2f1770618edd876199d6%2FSelection_999(3101).png?generation=1694028795509597&alt=media)\n\ndevelopment trick: this is how i visualise results fast from the pycharm debug window :)"
        }
      ]
    },
    {
      "id": 2414529,
      "postDate": "2023-08-29T17:49:16.897Z",
      "content": "<p>Great work sir to start with!</p>",
      "rawMarkdown": "Great work sir to start with!"
    },
    {
      "id": 2434041,
      "postDate": "2023-09-12T04:39:23.983Z",
      "content": "<p>thanks for your share.</p>",
      "rawMarkdown": "thanks for your share."
    }
  ],
  "comments": [
    {
      "id": 2425570,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "2023-09-06T03:43:46.363000",
      "content": "<p>if you are still stuck, try this<br>\n(this is the reference model at <a href=\"https://www.kaggle.com/code/hengck23/lb0-55-2-5d-1d-sample-model\" target=\"_blank\">https://www.kaggle.com/code/hengck23/lb0-55-2-5d-1d-sample-model</a>)</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Feba80d29281eb17cbb10ba2bad8cb33a%2FSelection_999(3092).png?generation=1693971810878201&amp;alt=media\" alt=\"\"></p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F314bb0c8da4b58f6e7f024def9f9e18c%2FSelection_999(3093).png?generation=1693971823716306&amp;alt=media\" alt=\"\"></p>",
      "votes": 12,
      "replies": [
        {
          "id": 2426770,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2023-09-06T19:50:52.180000",
          "content": "<p>list of encoder that works (and give similar results for input volue 96x256x256)</p>\n<ul>\n<li>resnet50d, se-resnext26d, convnext-tiny, efficientnetv2-small</li>\n</ul>\n<p>we try different architectures with</p>\n<ul>\n<li>different receptive fields</li>\n<li>different attention methods</li>\n<li>different pretrain imagenet input size (224,256,384 …)</li>\n</ul>\n<p>this is to debug the pipeline.<br>\nnow if all models give the same results, you know that to  next improvement comes from better data augmentation, etc</p>",
          "votes": 5,
          "replies": [
            {
              "id": 2428459,
              "author_name": "Man of the year",
              "author_url": "",
              "post_date": "2023-09-07T22:22:05.003000",
              "content": "<p>Do you mean that we can use usual 2d CNN models (resnet50d, se-resnext26d, convnext-tiny, efficientnetv2-small) for (96x256x256) input here? </p>",
              "votes": 1,
              "replies": []
            }
          ]
        },
        {
          "id": 2442380,
          "author_name": "SneakyWave12",
          "author_url": "",
          "post_date": "2023-09-17T01:24:43.377000",
          "content": "<p>hi, does you use the segmantation data to predicat which slice to take ? if you do , how you deal with this is the infernce stage?<br>\nsecond, in the begining i was thinking to take the relvant slices and convert it to 1 3d chanals(by cnn) , so i will have dim of ( batch ,3,highet,width ) and than put it into resnet and be abale in 1 run look on mini batch of scanas. <br>\nin your example i see that one iteration you only process 1 scan (seems to me like sgd so it will be more noisy ) , i try to undersnant if put any 3 images into resnet is realy relavant. </p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 2443255,
          "author_name": "glycineAddict",
          "author_url": "",
          "post_date": "2023-09-17T16:00:46.870000",
          "content": "<p>Thank you for sharing your method!<br>\nSorry for naive question, but could you answer if it's possible to train implementation of this model solely on machines that kaggle offers to us?<br>\nThank you in advance!</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 2428710,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "2023-09-08T05:29:27.917000",
      "content": "<p>in the evalusation scriptt, any injury is auto generated</p>\n<pre><code>    # Derive a new any_injury label by taking the max of 1 - p(healthy)  each label    healthy_cols = [x +   x  all_target_categories]\n    any_injury_labels = (1 - solution[healthy_cols]).max(=1)\n    any_injury_predictions = (1 - submission[healthy_cols]).max(=1)\n    any_injury_loss = sklearn.metrics.log_loss(\n        =any_injury_labels.values,\n        =any_injury_predictions.values,\n        =solution[].values\n    )\n</code></pre>\n<p>remember to consider in this at your loss function in backprop!</p>\n<p>you don't want ending up good loss for your trained parts, and poor loss for server generated  any injury</p>\n<pre><code> = F.cross_entropy(liver_logit, ...)\n = F.cross_entropy(speen_logit, ...)\n\n = customised_loss (-softmax(liver_prob_healthy, ...) ..., )\n</code></pre>",
      "votes": 5,
      "replies": [
        {
          "id": 2431872,
          "author_name": "Andrij",
          "author_url": "",
          "post_date": "2023-09-10T13:26:01.533000",
          "content": "<p>Wait a second, that is, here you propose to add one more variable to the model, for example here<br>\nout = [out_bowel, out_extra, out_liver, out_kidney, out_spleen]</p>\n<pre><code> # Create model\n model = tf.keras.  be\n</code></pre>\n<p>out = [out_bowel, out_extra, out_liver, out_kidney, out_spleen, out_any_injury]?</p>",
          "votes": 0,
          "replies": [
            {
              "id": 2432088,
              "author_name": "hengck23",
              "author_url": "",
              "post_date": "2023-09-10T15:22:07.360000",
              "content": "<p>no.  <br>\nany injury  is <strong>not</strong> predict from the dense layer.<br>\ninstead, you can compute any injury from the rest of the organ (see kaggle evalution script)</p>",
              "votes": 2,
              "replies": []
            }
          ]
        }
      ]
    },
    {
      "id": 2430598,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "2023-09-09T11:58:01.860000",
      "content": "<p>intermediate results<br>\n9-sep</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Fee65ad5f2ec291f049fa760219cd3657%2FSelection_999(3158).png?generation=1694260671495384&amp;alt=media\" alt=\"\"></p>",
      "votes": 6,
      "replies": [
        {
          "id": 2431585,
          "author_name": "Man of the year",
          "author_url": "",
          "post_date": "2023-09-10T08:13:37.700000",
          "content": "<p>Is it 2.5d approach results? </p>",
          "votes": 0,
          "replies": [
            {
              "id": 2433035,
              "author_name": "hengck23",
              "author_url": "",
              "post_date": "2023-09-11T09:47:48.403000",
              "content": "<p>yes, it is</p>\n<hr>\n<p>i just check my results agasint other kagglers <a href=\"https://www.kaggle.com/fengqilong\" target=\"_blank\">@fengqilong</a> :<br>\n<a href=\"https://www.kaggle.com/competitions/rsna-2023-abdominal-trauma-detection/discussion/432029#2412154\" target=\"_blank\">https://www.kaggle.com/competitions/rsna-2023-abdominal-trauma-detection/discussion/432029#2412154</a></p>\n<p>it is the same. now i lack post processing<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F1c4486dd3fc06c85faf5bb8c3ca6edb4%2FSelection_999(3198).png?generation=1694425629097884&amp;alt=media\" alt=\"\"></p>\n<p>it is amazing different methods done by different kagglers came to the same conclusion.<br>\nthe limit is the data</p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 2433136,
              "author_name": "Feng Qilong",
              "author_url": "",
              "post_date": "2023-09-11T11:15:29.783000",
              "content": "<p>Your cv only consists of liver, spleen and kidney? What about the injuries?</p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 2433175,
              "author_name": "hengck23",
              "author_url": "",
              "post_date": "2023-09-11T11:38:56.277000",
              "content": "<p>i haven't train them yet and LB is reported using mean values<br>\nfor bowels, i tried once buy trained prediction is worse than mean prediction. (lb0.56 verus 0.55)<br>\nthen i check the local cv for trained it is about 0.29, for mean it is about 0.30 (diiferent from lb)<br>\nhence it think cv/lb is not stable for bowels </p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 2433182,
              "author_name": "Feng Qilong",
              "author_url": "",
              "post_date": "2023-09-11T11:45:08.373000",
              "content": "<p>hmm 0.29 is a little too high for bowel, i'm getting 0.12-0.15, extravasation is so hard to deal with.</p>",
              "votes": 3,
              "replies": []
            },
            {
              "id": 2433193,
              "author_name": "hengck23",
              "author_url": "",
              "post_date": "2023-09-11T11:52:58.160000",
              "content": "<p>thnaks.</p>\n<p>i think we need to check previous medical/biological related compeitions where data is noisy and postive cases are scare. These competitions maybe not be realted to CT scan, but they have large shakeup.</p>\n<p>i think some injury cannot be determined confidently but we still need to think of a way to stablised results.</p>\n<hr>\n<p>another possibility is self supervsied learning and see if it helps sample train sample size.</p>\n<hr>\n<p>\" extravasation is so hard to deal with.\", maybe need to think of how to use multiple scan and arotic hu</p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 2433197,
              "author_name": "Gunes Evitan",
              "author_url": "",
              "post_date": "2023-09-11T11:58:18.923000",
              "content": "<p>Same here. My bowel score is between 0.14-0.16 and extravasation score is between 0.58-0.60. I think that happens when you don't include any injury head and backprop the sum of 5 losses.</p>",
              "votes": 0,
              "replies": []
            }
          ]
        },
        {
          "id": 2433039,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2023-09-11T09:50:42.777000",
          "content": "<p>i think i meanged to get about the same score using resnet18d <br>\n(just very slightly worse though)</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F2df7be2a30f74543046150973bea43c7%2FSelection_999(3200).png?generation=1694427117158085&amp;alt=media\" alt=\"\"> …</p>",
          "votes": 5,
          "replies": [
            {
              "id": 2433073,
              "author_name": "hengck23",
              "author_url": "",
              "post_date": "2023-09-11T10:17:24.757000",
              "content": "<p>would be better if we add coordinates information in 2dcnn (poor man's pos encoding)</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F111031843e45de87a8279075deb50c0f%2FSelection_999(3203).png?generation=1694427370530394&amp;alt=media\" alt=\"\"></p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F9be9be795e2ecad81ee051bda405c41a%2FSelection_999(3202).png?generation=1694427395958972&amp;alt=media\" alt=\"\"></p>\n<p>would even be better if the z coordinate is from our slice detector, e.g. z=0 means top of liver ….. z=100 means end of bowels , etc …</p>",
              "votes": 2,
              "replies": []
            }
          ]
        },
        {
          "id": 2433480,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2023-09-11T15:52:42.220000",
          "content": "<p>another resnet18d results. so it doesn't matter if you are using resnet18 or 50</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F30abfda1128013ed50c56ec61a202d27%2FSelection_999(3213).png?generation=1694466900792790&amp;alt=media\" alt=\"\"></p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 2427514,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "2023-09-07T09:34:57.810000",
      "content": "<p>what we can learm from kinectics-400 action recognition : ensmble tricks at inference?<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F94aa67eb9e63fb7e5f05c73911493811%2FSelection_999(3118).png?generation=1694079294721151&amp;alt=media\" alt=\"\"></p>\n<p>more on video transformer later ….</p>",
      "votes": 3,
      "replies": [
        {
          "id": 2427539,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2023-09-07T09:55:09.373000",
          "content": "<p>one possible extension that might work<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F35f9c16bcb02a974be38b28ade6aa969%2FSelection_999(3122).png?generation=1694080504450296&amp;alt=media\" alt=\"\"></p>",
          "votes": 1,
          "replies": [
            {
              "id": 2427577,
              "author_name": "hengck23",
              "author_url": "",
              "post_date": "2023-09-07T10:18:51.827000",
              "content": "<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Ffd2e6e7ae0d650aea8f62039717a942d%2FSelection_999(3129).png?generation=1694081867859569&amp;alt=media\" alt=\"\"></p>\n<p>learning to label ct-scan  slice. … but i wonder if freezing a good idea?</p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 2427580,
              "author_name": "hengck23",
              "author_url": "",
              "post_date": "2023-09-07T10:21:41.337000",
              "content": "<p>decouple space and time attnetion is  a pretty smart move<br>\npaper: Space-time Mixing Attention for Video Transformer</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F0c1ec8b092830e15e610ba772655b898%2FSelection_999(3131).png?generation=1694082066492720&amp;alt=media\" alt=\"\"></p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F5364b1e63fd2d42d5b3d8e537c788651%2FSelection_999(3130).png?generation=1694082081876226&amp;alt=media\" alt=\"\"></p>",
              "votes": 1,
              "replies": []
            },
            {
              "id": 2427586,
              "author_name": "hengck23",
              "author_url": "",
              "post_date": "2023-09-07T10:27:01.203000",
              "content": "<p>another idea<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Fb79b9fcdf3739997882b944c0e1683ba%2FSelection_999(3134).png?generation=1694082417730080&amp;alt=media\" alt=\"\"></p>\n<p>for this, i wonder if it make senses for MAE self-supervised learning ???<br>\n<strong>we try to mask 2d CNN embedding and ask the model to predict it</strong></p>",
              "votes": 1,
              "replies": []
            }
          ]
        }
      ]
    },
    {
      "id": 2425520,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "2023-09-06T01:59:04.657000",
      "content": "<p>surprise!!!!<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Fb447feef9caea5a738a905b742bdaa3e%2FSelection_999(3077).png?generation=1693965542365371&amp;alt=media\" alt=\"\"></p>",
      "votes": 3,
      "replies": [
        {
          "id": 2443663,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2023-09-17T20:44:32.523000",
          "content": "<p>i am even more surprised that extravasation injury follows the same rule!</p>\n<p>i.e. you only need to sheck some specific organs. it is easier to divide extravasation into different subset and detects. and there is correlation between other labels</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 2449116,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "2023-09-21T02:53:52.037000",
      "content": "<p>i make a silly mistake.<br>\nsometimes it is easier to look at z-x plance.<br>\nbelow shows: image[:, y0:y1,:]</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F715764b271e9909b076c107f58fc993e%2FSelection_999(3322).png?generation=1695264828772404&amp;alt=media\" alt=\"\"></p>",
      "votes": 4,
      "replies": [
        {
          "id": 2450074,
          "author_name": "",
          "author_url": "",
          "post_date": "2023-09-21T15:39:29.913000",
          "content": "",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 2425329,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "2023-09-05T19:53:34.177000",
      "content": "<p>find a weird distribution that makes me wonder if the hidden test also exihbits this:</p>\n<pre><code>df = train_df \ngb = df()() \ngb()\n    \n    \nName: series_id, dtype: int64\n</code></pre>",
      "votes": 3,
      "replies": []
    },
    {
      "id": 2412950,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "2023-08-28T15:45:28.420000",
      "content": "<p>related paper:</p>\n<p>[1] CLIP-Driven Universal Model for Organ Segmentation and Tumor Detection<br>\n<a href=\"https://arxiv.org/abs/2301.00785\" target=\"_blank\">https://arxiv.org/abs/2301.00785</a></p>\n<p><a href=\"https://github.com/ljwztc/CLIP-Driven-Universal-Model/blob/main/model/Universal_model.py\" target=\"_blank\">https://github.com/ljwztc/CLIP-Driven-Universal-Model/blob/main/model/Universal_model.py</a><br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F699f0a042cd3cad5645df83e80a1073c%2FSelection_999(2990).png?generation=1693237526462504&amp;alt=media\" alt=\"\"></p>",
      "votes": 3,
      "replies": [
        {
          "id": 2430287,
          "author_name": "Gunes Evitan",
          "author_url": "",
          "post_date": "2023-09-09T07:24:02.087000",
          "content": "<p>Does anyone able to replicate results from this paper? I've spent 3 days on this and it doesn't look good.</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 2426761,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "2023-09-06T19:41:05.730000",
      "content": "<p>after working for two week, my observation:</p>\n<ul>\n<li>unlike other competition, you need to decide the volume size (and voxel spacing) of you input. then you have to resample and cache the data. so it is like 1hr of caching data + 1.5 hr of training.</li>\n<li>this eats up your diskspace.</li>\n<li>once you decided to try new data processing and new volume size, you have to re-cache your data (i.e. eats up more diskspace) </li>\n<li>in other competition, you need more compute and you may spend money on cloud gpu compute. Here, in addition, you need more diskpace. you may need to store your differet version of processed data in paid google drive.</li>\n</ul>",
      "votes": 4,
      "replies": [
        {
          "id": 2427235,
          "author_name": "Man of the year",
          "author_url": "",
          "post_date": "2023-09-07T06:01:39.640000",
          "content": "<p><a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a> why do you need to re-cache the data? </p>",
          "votes": 0,
          "replies": [
            {
              "id": 2427286,
              "author_name": "hengck23",
              "author_url": "",
              "post_date": "2023-09-07T06:29:47.800000",
              "content": "<p>when i train with 256 input i cached the 256 scan (instead of the original size) for speed in training.</p>",
              "votes": 1,
              "replies": []
            }
          ]
        },
        {
          "id": 2427331,
          "author_name": "Gunes Evitan",
          "author_url": "",
          "post_date": "2023-09-07T06:58:46.493000",
          "content": "<p>Wait didn't you need to cache data in previous competitions? That HP workstation is on another level.</p>",
          "votes": 0,
          "replies": [
            {
              "id": 2427513,
              "author_name": "hengck23",
              "author_url": "",
              "post_date": "2023-09-07T09:33:21.917000",
              "content": "<p>HP work station has 72 cpu threads and 384GB ram. So i didn't cache in previous competition, except those on 3d CT SCAN (like the RSNA spine) 😀</p>",
              "votes": 0,
              "replies": []
            }
          ]
        }
      ]
    },
    {
      "id": 2411726,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "2023-08-27T20:29:02.843000",
      "content": "<p>a list of 5000+ CT scan, maybe good for self-supervised pretraining of my encoder.<br>\n<a href=\"https://github.com/ljwztc/CLIP-Driven-Universal-Model\" target=\"_blank\">https://github.com/ljwztc/CLIP-Driven-Universal-Model</a></p>",
      "votes": 2,
      "replies": []
    },
    {
      "id": 2428551,
      "author_name": "Novice",
      "author_url": "",
      "post_date": "2023-09-08T02:14:21.837000",
      "content": "<p>Thank you for sharing good ideas.</p>\n<p>Can i ask how did you make 'slice_predict' network?</p>\n<p>What is the label of slice prediction?</p>",
      "votes": 1,
      "replies": [
        {
          "id": 2442381,
          "author_name": "SneakyWave12",
          "author_url": "",
          "post_date": "2023-09-17T01:26:55.353000",
          "content": "<p>i would like to know too </p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 2426903,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "2023-09-06T23:02:31.487000",
      "content": "<p>understanding  aortic_hu:</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Ff1c416c7a767b6c9a064ad4a072963c5%2FSelection_999(3104).png?generation=1694041310474157&amp;alt=media\" alt=\"\"></p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F05d2d8d25a030b04f0c5055c8b1e8470%2FSelection_999(3103).png?generation=1694041322611085&amp;alt=media\" alt=\"\"></p>\n<p>read about contrast enhanced CT here:</p>\n<p><a href=\"https://radiologyassistant.nl/more/ct-protocols/ct-contrast-injection-and-protocols\" target=\"_blank\">https://radiologyassistant.nl/more/ct-protocols/ct-contrast-injection-and-protocols</a></p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 2426246,
      "author_name": "AnatoliK",
      "author_url": "",
      "post_date": "2023-09-06T13:51:34.917000",
      "content": "<p>I have a really similar pipeline, the only difference is I use a segmentation model to get bbox for each organ (liver, spleen, kidneys) and then 3 models to predict injury.</p>\n<p>I've got 0.57 CV for the liver and kidneys and ~0.7 CV for the spleen, and it gives me 0.62 on LB. My current segmentation model is not perfect at the moment so I think with better organ localization I'll get better results.</p>\n<p>Your sub volume predictor looks interesting, I was wondering if you could provide a bit more highlights of this model?</p>",
      "votes": 1,
      "replies": [
        {
          "id": 2426278,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2023-09-06T14:23:11.770000",
          "content": "<pre><code></code></pre>",
          "votes": 5,
          "replies": [
            {
              "id": 2426360,
              "author_name": "hengck23",
              "author_url": "",
              "post_date": "2023-09-06T15:07:43.877000",
              "content": "<p>I've got 0.57 CV for the liver and kidneys and ~0.7 CV for the spleen, …</p>\n<p>your values seems a bit too high. To debug the algorithm:</p>\n<ol>\n<li><p>check your train loss. if it is also about 0.57,0.57.0.7, then the problem could be a weak model or too complex data.</p></li>\n<li><p>if your train loss is much lower, it is generalisation and augmentation could be a way to improve results (or use a less complex model)</p></li>\n</ol>\n<p>if we use the current leadboard rank first score as a proxy to bayes error, it means that 0.44 is where your validation and training loss should cross</p>",
              "votes": 1,
              "replies": []
            },
            {
              "id": 2426785,
              "author_name": "AnatoliK",
              "author_url": "",
              "post_date": "2023-09-06T20:14:48.783000",
              "content": "<p>Thanks! Yes, it is too high I agree, but at that point model starts overfitting even with augmentation. I think a problem with the preprocessing pipeline.</p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 2442353,
              "author_name": "Ivan Panshin",
              "author_url": "",
              "post_date": "2023-09-16T23:57:35.370000",
              "content": "<p>Did you manage to fix this? No matter what I try my train loss can get really low, but all that learning is not transferred to validation (both in terms of log loss, and classsification metrics) </p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 2442393,
              "author_name": "hengck23",
              "author_url": "",
              "post_date": "2023-09-17T02:09:17.757000",
              "content": "<p><a href=\"https://www.kaggle.com/ivanpan\" target=\"_blank\">@ivanpan</a> </p>\n<p>you should think the problem smiliar as:<br>\n\"you are given one hundred 3000x3000 train images of smiliar background (e.g. forest of trees). we are asked to label if the test image contains bird or not. The size of bird is about 64x64. each test bird can be very different appearance, compared to the training set\"  </p>\n<ul>\n<li>basically if you try to use all information (whole 3000x3000 image), you end up detecting noise, i.e. overfitting.</li>\n<li>also if you try to learn to detect all bird in the train, it may end up in overfitting as well.</li>\n<li>without more data, the best solution is to learn to detect the subset of most probable targets using the least \"relevant subset\" of input.</li>\n</ul>\n<p>Different organ targets have different difficulty. hence i suggest you to start off with one or two \"most stable\" organ first. start with those you can localised the organ (once you can localised the organ, you need not use the whole scan to predict the injury)</p>",
              "votes": 1,
              "replies": []
            },
            {
              "id": 2442885,
              "author_name": "Ivan Panshin",
              "author_url": "",
              "post_date": "2023-09-17T11:27:04.257000",
              "content": "<p>That's exactly what I do :) Segment several organs - use only such crops for classification. </p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 2442995,
              "author_name": "SneakyWave12",
              "author_url": "",
              "post_date": "2023-09-17T12:51:01.400000",
              "content": "<p>Thing is that during test stage is will take along to segmant each image so it will probably exceed the times,so how its applicable to test?<br>\nMoreOver im not sure how to treat in the model ,have you done multi-head classification(seems a little probalmitic for me as the model try predict some head even there is no object for example), Or  have u use  diffrent model?</p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 2443665,
              "author_name": "hengck23",
              "author_url": "",
              "post_date": "2023-09-17T20:47:27.240000",
              "content": "<p>\"That's exactly what I do :) Segment several organs - use only such crops for classification.\"</p>\n<p>try not to use shared features at first. build individual detector. you should see good results \"easily\", even for resnet18d. just use lr 0.0001 and 3 to 4 epoch</p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 2443678,
              "author_name": "Ivan Panshin",
              "author_url": "",
              "post_date": "2023-09-17T21:12:17.640000",
              "content": "<p>Not sure what you mean, but I guess that's what I do. 1 - train segmentation to find region of 3 organs. 2 - crop just to 3 orgs. 3 - train classification on such crops </p>\n<p>And all the models I try (2+1D or CSN) fail to have any generalization no matter the augs or the way I work with temporal dimension </p>",
              "votes": 0,
              "replies": []
            }
          ]
        }
      ]
    },
    {
      "id": 2419375,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "2023-09-02T01:34:04.717000",
      "content": "<p>this is is good stuffs</p>\n<p>MICCAI FLARE 2023: Fast, Low-resource, and Accurate oRgan and Pan-cancer sEgmentation in Abdomen CT<br>\n<a href=\"https://github.com/JunMa11/FLARE\" target=\"_blank\">https://github.com/JunMa11/FLARE</a></p>\n<ul>\n<li>4000 CT scans from 30+ medical centers</li>\n<li>Partial-label setting</li>\n<li>14 segmentation targets: liver, spleen, pancreas, right kidney, left kidney, stomach, gallbladder, esophagus, aorta, inferior vena cava, right adrenal gland, left adrenal gland, duodenum, and tumo</li>\n</ul>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 2427278,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "2023-09-07T06:25:32.833000",
      "content": "<p>how to use two ct scan and use auortic HU<br>\nhere  auortic HU is treated as a \"time embedding\" </p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Fc54839f48871ea0094184648013e0f42%2FSelection_999(3115).png?generation=1694067930839463&amp;alt=media\" alt=\"\"></p>",
      "votes": 2,
      "replies": []
    },
    {
      "id": 2425252,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "2023-09-05T18:14:25.243000",
      "content": "<p>inspiration from other competition !</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Fa0700e0b510f05e3b369aefb2f4fe298%2FSelection_999(3059).png?generation=1693937651266838&amp;alt=media\" alt=\"\"></p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Fd1c32f7cbf0380811c594eacd8decef7%2FSelection_999(3058).png?generation=1693937662009406&amp;alt=media\" alt=\"\"></p>",
      "votes": 2,
      "replies": [
        {
          "id": 2426993,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2023-09-07T03:13:01.073000",
          "content": "<p>how to train for very large 3d input !!!!</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Fdd262f6d48168a739f4f913129682b7d%2FSelection_999(3109).png?generation=1694056351957511&amp;alt=media\" alt=\"\"></p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Ffaf127c46ebf54e96875fd6aac399118%2FSelection_999(3110).png?generation=1694056365578899&amp;alt=media\" alt=\"\"></p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F7933682dcb50f653e13825b3c93c16c1%2FSelection_999(3111).png?generation=1694056378382520&amp;alt=media\" alt=\"\"></p>",
          "votes": 1,
          "replies": [
            {
              "id": 2431826,
              "author_name": "Behnam Molaee",
              "author_url": "",
              "post_date": "2023-09-10T12:44:13.060000",
              "content": "<p>Is not it the concept of data patching?</p>",
              "votes": 0,
              "replies": []
            }
          ]
        }
      ]
    },
    {
      "id": 2418538,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "2023-09-01T11:05:35.540000",
      "content": "<p>example of mask-guided attention<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F097a50d066c8529ed46c7d4d6df273a7%2FSelection_999(3019).png?generation=1693566315138691&amp;alt=media\" alt=\"\"><br>\n<a href=\"https://mdpi-res.com/d_attachment/entropy/entropy-23-00653/article_deploy/entropy-23-00653-v2.pdf?version=1621927496\" target=\"_blank\">https://mdpi-res.com/d_attachment/entropy/entropy-23-00653/article_deploy/entropy-23-00653-v2.pdf?version=1621927496</a></p>",
      "votes": 2,
      "replies": []
    },
    {
      "id": 2418482,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "2023-09-01T09:49:08.967000",
      "content": "<p>grad cam activation results<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F9dfb576a6fa4c7dfa63f9e53c32f7f56%2FSelection_999(3018).png?generation=1693561745537268&amp;alt=media\" alt=\"\"></p>",
      "votes": 2,
      "replies": [
        {
          "id": 2418841,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2023-09-01T14:49:02.190000",
          "content": "<p>to confirm if the model is correct, i will study some youtube video like:</p>\n<p>[1]Abdominal Trauma: Liver and Spleen <br>\n<a href=\"https://www.youtube.com/watch?v=7s3RMGciXGQ\" target=\"_blank\">https://www.youtube.com/watch?v=7s3RMGciXGQ</a></p>\n<p>[2] Blunt Abdominal Trauma Part 3 Splenic Injury short<br>\n<a href=\"https://www.youtube.com/watch?v=TKBIbp2d8NA\" target=\"_blank\">https://www.youtube.com/watch?v=TKBIbp2d8NA</a></p>",
          "votes": 2,
          "replies": []
        }
      ]
    },
    {
      "id": 2413995,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "2023-08-29T09:41:38.583000",
      "content": "<p>some really good discussion of the available network architecture:<br>\n<a href=\"https://glassboxmedicine.com/2020/08/04/chest-ct-scan-machine-learning-in-5-minutes/\" target=\"_blank\">https://glassboxmedicine.com/2020/08/04/chest-ct-scan-machine-learning-in-5-minutes/</a></p>\n<p>what we need here is high resolution and efficient solution:<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F5f9a384c05b11a5d40b51d71afd10262%2FSelection_999(2992).png?generation=1693302076424091&amp;alt=media\" alt=\"\"><br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F0eec8214001d5fc2232e737e8c2a666e%2FSelection_999(2991).png?generation=1693302096517671&amp;alt=media\" alt=\"\"></p>\n<p>google for \"CT scan 2d CNN, 3d CNN, 2.5 CNN\"</p>\n<p>transformer for global attention at the upper layers can be used once the CNN reduced the feature dim.</p>",
      "votes": 2,
      "replies": [
        {
          "id": 2414004,
          "author_name": "Feng Qilong",
          "author_url": "",
          "post_date": "2023-08-29T09:51:47.433000",
          "content": "<p>How do you select slices for 2.5D data for figure 1? (i.e. when constructing 1 slice, which slice of axial/coronal/sagittal should i choose?)</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 2414032,
          "author_name": "Gunes Evitan",
          "author_url": "",
          "post_date": "2023-08-29T10:26:38.583000",
          "content": "<p>Figure 2 looks weird. Why would you use 3 slice at a time and use them as channels? The only benefit I can think of is using pretrained weights.</p>",
          "votes": 0,
          "replies": [
            {
              "id": 2414033,
              "author_name": "Feng Qilong",
              "author_url": "",
              "post_date": "2023-08-29T10:36:01.140000",
              "content": "<p>perhaps the purpose is to extract features across different orientations? (axial/coronal/sagittal) The problem is that there is no good way (I can't think of any) to concatenate slices of different orientations :(.</p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 2414112,
              "author_name": "Gunes Evitan",
              "author_url": "",
              "post_date": "2023-08-29T11:59:36.223000",
              "content": "<p>It doesn't achieve that though. It extracts features from one plane with sliding window which is more similar multi instance learning. In order to extract features from multiple planes, 3d input has to be transposed and rotated.</p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 2414236,
              "author_name": "David Roberts",
              "author_url": "",
              "post_date": "2023-08-29T13:44:36.347000",
              "content": "<p>I'm not even sure how you could stack different planes into a single image .. they're grossly different sizes and only the axial views are square.</p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 2414257,
              "author_name": "Feng Qilong",
              "author_url": "",
              "post_date": "2023-08-29T14:00:10.547000",
              "content": "<p>The only way I can think of is using 3d model, where you just stack volumes of different orientations, this to a certain extent ensures that the model will look at the different orientations at a slightly higher resolution than just looking at a volume in one orientation if compute isn't enough. If compute is enough, you can just use inputs with a shape like (256,256,256) to train the model🤣</p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 2414261,
              "author_name": "David Roberts",
              "author_url": "",
              "post_date": "2023-08-29T14:04:01.907000",
              "content": "<p>Coronal and Sagittal images will be terribly distorted if they're made square though.</p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 2414263,
              "author_name": "Feng Qilong",
              "author_url": "",
              "post_date": "2023-08-29T14:07:07.447000",
              "content": "<p>You are right. Maybe this is why 2.5D models are generally better and way easier to train in my experiments.</p>",
              "votes": 1,
              "replies": []
            },
            {
              "id": 2414276,
              "author_name": "David Roberts",
              "author_url": "",
              "post_date": "2023-08-29T14:18:41.987000",
              "content": "<p>The 2.5D stacking methods I have seen posted so far don't make sense to me. Stacking slices together using various intervals results in each channel sometimes containing similar anatomy, sometimes not. </p>\n<p>One series might have 2 channels with liver, kidneys and spleen visible and one channel of just noise because the selected slice is \"below\" the bowel level. The next series might be one channel of heart/lungs (with no other organs visible), then a couple slices of bowel.</p>",
              "votes": 3,
              "replies": []
            }
          ]
        },
        {
          "id": 2414280,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2023-08-29T14:19:57.033000",
          "content": "<p>there is more information in the xy plane.</p>\n<ul>\n<li>e.g. we can check if there is injury just by looking  at one slice in some cases. </li>\n<li>xy plane has more resolution in the construction of CT scan.</li>\n</ul>\n<p>hence even if you are doing 3d convolution, you want to use a non uniform 3d kernel = (larger w, larger h, smaller d)</p>\n<p>since there is less information in the z-axis, we might as well make the 3d convolution stride = kernel size d in that direction (i.e. non-overlapping)</p>\n<p>if they are non overlapping, you might process them individually (first), which ends up with stack of 2.5d convolution.</p>\n<p>(lastly) we can \"link up\" all xy features in the z direction by using 3d convolution, LSTM in z direction or transformer.</p>\n<p>to some extend, it does look  like multiple instance learning because we are interested in scan level prediction and not localized (x,y,z) prediction.</p>",
          "votes": 3,
          "replies": [
            {
              "id": 2414288,
              "author_name": "hengck23",
              "author_url": "",
              "post_date": "2023-08-29T14:28:15.977000",
              "content": "<p>possible implementation</p>\n<pre><code></code></pre>",
              "votes": 3,
              "replies": []
            },
            {
              "id": 2414434,
              "author_name": "Feng Qilong",
              "author_url": "",
              "post_date": "2023-08-29T16:14:48.950000",
              "content": "<p>Yea im using a similar approach, what I was wondering is how did they stack images of different orientation together in fig1</p>",
              "votes": 1,
              "replies": []
            },
            {
              "id": 2414498,
              "author_name": "Gunes Evitan",
              "author_url": "",
              "post_date": "2023-08-29T17:18:23.597000",
              "content": "<p>Slices are in axial plane by default. In order to convert to another plane you have to reorder axes and rotate accordingly.</p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 2451922,
              "author_name": "JSGandora",
              "author_url": "",
              "post_date": "2023-09-22T22:47:47.083000",
              "content": "<blockquote>\n  <p>possible implementation</p>\n<pre><code> (nn.Module):\n     ():\n        ().__init__()\n        .output_type = [, ]\n        .cfg = cfg\n</code></pre>\n</blockquote>\n<p>Not sure if you included this intentionally but it looks like <code>cfg</code> is not used for anything. What is this parameter supposed to mean?</p>",
              "votes": 0,
              "replies": []
            }
          ]
        },
        {
          "id": 2418839,
          "author_name": "Max Semakov",
          "author_url": "",
          "post_date": "2023-09-01T14:48:26.297000",
          "content": "<p>Hello everyone)) First of all, thank you very much for the interesting material. I have the following question: in the test data, I see only one slice per CT scan, does it make sense to apply 3D and 2.5D if the input data is 2D? Excuse me if my question looks stupid, I’m still not fully familiar with KAGGLE and this is my first dive into neural networks. Thank you.</p>",
          "votes": 0,
          "replies": [
            {
              "id": 2420678,
              "author_name": "MD Mushfirat Mohaimin",
              "author_url": "",
              "post_date": "2023-09-02T19:38:42.723000",
              "content": "<p>The test data is 3D. </p>\n<p>The test data that you are seeing is just a placeholder. The actual test set contains multiple slices per CT scan. You cannot see them, but when you submit your solution, your notebook will have access to view them. This is done so that participants cannot hand-label the data by themselves.</p>",
              "votes": 1,
              "replies": []
            },
            {
              "id": 2427695,
              "author_name": "Max Semakov",
              "author_url": "",
              "post_date": "2023-09-07T12:10:28.053000",
              "content": "<p>thank s a lot </p>",
              "votes": 0,
              "replies": []
            }
          ]
        }
      ]
    },
    {
      "id": 2425264,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "2023-09-05T18:28:35.417000",
      "content": "<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F5e43d4fb8c52d46ad964858cf274bff8%2FSelection_999(3062).png?generation=1693938435367075&amp;alt=media\" alt=\"\"><br>\n<a href=\"https://www.kaggle.com/nischaydnk\" target=\"_blank\">@nischaydnk</a> 's post on SAM-Med2D is close to what i have in mind<br>\n<a href=\"https://www.kaggle.com/competitions/rsna-2023-abdominal-trauma-detection/discussion/437036\" target=\"_blank\">https://www.kaggle.com/competitions/rsna-2023-abdominal-trauma-detection/discussion/437036</a></p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 2425701,
      "author_name": "",
      "author_url": "",
      "post_date": "2023-09-06T05:48:27.790000",
      "content": "<p>very nice, maybe you can upload the weight file</p>",
      "votes": -11,
      "replies": []
    },
    {
      "id": 2468460,
      "author_name": "Satheesh Bhukya",
      "author_url": "",
      "post_date": "2023-10-05T14:08:54.090000",
      "content": "<p><strong>can you explain how you have generated folds in this model(2.5d/3d)</strong></p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 2454534,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "2023-09-24T22:31:22.200000",
      "content": "<p>finally a 2d to 3d SAM </p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F4a8e63ee156fa320087583669b9d1e8c%2FSelection_999(3368).png?generation=1695594666992627&amp;alt=media\" alt=\"\"></p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F3f4543525a9b8dca486850f95322ae20%2FSelection_999(3369).png?generation=1695594772220979&amp;alt=media\" alt=\"\"><br>\nmore here:<br>\n<a href=\"https://github.com/YichiZhang98/SAM4MIS\" target=\"_blank\">https://github.com/YichiZhang98/SAM4MIS</a></p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 2446642,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "2023-09-19T14:17:39.053000",
      "content": "<p>did you probe the hidden test data?</p>\n<pre><code>just consider liver case.\n A =  of   == healthly \n B =  of   == low (injury) \n C =  of   == high (injury) \n means weighted percentage\n\n\nwe submit  pobability prediction  all test samples:\np = [ , , ]\n\n lb score :\nS1 = -A*()-B*()-C*()\n ()=,  we have one equation:\nB+C = -S1/()\ni.e. A = +S1/()\n</code></pre>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 2446475,
      "author_name": "Satheesh Bhukya",
      "author_url": "",
      "post_date": "2023-09-19T13:03:37.027000",
      "content": "<p>will using that  giving no module kaggle_helper <br>\ni try to insert the data related but it is not available can you say where you found</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 2434108,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "2023-09-12T05:40:53.100000",
      "content": "<p>yes, you need slice detector to do the alignment for multi-phrase CT!!!</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F7347bb2e52a2256550df0049b6164dee%2FSelection_999(3230).png?generation=1694497217087058&amp;alt=media\" alt=\"\"></p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F93bfb1b312653eb2907fc1dc84288aed%2FSelection_999(3223).png?generation=1694497235927858&amp;alt=media\" alt=\"\"></p>",
      "votes": 0,
      "replies": [
        {
          "id": 2434135,
          "author_name": "",
          "author_url": "",
          "post_date": "2023-09-12T05:56:04.467000",
          "content": "",
          "votes": 0,
          "replies": [
            {
              "id": 2434139,
              "author_name": "hengck23",
              "author_url": "",
              "post_date": "2023-09-12T06:01:01.070000",
              "content": "<p>in theory i can probably create sythentic pair of samples.<br>\nthis is smiliar to cvpr 2023 paper</p>\n<p><a href=\"https://github.com/MrGiovanni/SyntheticTumors\" target=\"_blank\">https://github.com/MrGiovanni/SyntheticTumors</a><br>\nSynthetic Tumors Make AI Segment Tumors Better</p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 2434253,
              "author_name": "hengck23",
              "author_url": "",
              "post_date": "2023-09-12T07:14:12.640000",
              "content": "<p>i wonder if there any experts to identify where is the injury?<br>\nextravasation_injury?<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F67dd4cc0e8c130fbb040c333892de3b6%2FSelection_999(3233).png?generation=1694502844941722&amp;alt=media\" alt=\"\"></p>",
              "votes": 0,
              "replies": []
            }
          ]
        }
      ]
    },
    {
      "id": 2432421,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "2023-09-10T20:24:42.287000",
      "content": "<p>easy elegant code for single/multi scan model:</p>\n<pre><code></code></pre>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 2432114,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "2023-09-10T15:32:28.830000",
      "content": "<p>i wonder if this would work</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F6f1df7506718fa315e46b9dba334482b%2FSelection_999(3183).png?generation=1694359910537670&amp;alt=media\" alt=\"\"></p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Fc6253d718653055f93db1187f8cb34e7%2FSelection_999(3181).png?generation=1694359922840424&amp;alt=media\" alt=\"\"><br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Fdf4313d4f2d8f59926dbbc7c90858ebf%2FSelection_999(3180).png?generation=1694359935802453&amp;alt=media\" alt=\"\"><br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Ffc4b526962564416fbf12161bf7ff1cc%2FSelection_999(3179).png?generation=1694359947416152&amp;alt=media\" alt=\"\"></p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 2432110,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "2023-09-10T15:30:47.987000",
      "content": "<p>there are some \"dangerous trick\" one can set try for log loss</p>\n<ul>\n<li>set pthreshold=1</li>\n<li>you can partition the p values and use constant prediction in each partition</li>\n<li>rank all scores. if you know the num of +ve case (e.g. via probing+train data) you can chnage the top and bottom values</li>\n<li>the injury are highly correlated</li>\n</ul>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 2431343,
      "author_name": "",
      "author_url": "",
      "post_date": "2023-09-10T03:52:51.670000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 2431253,
      "author_name": "",
      "author_url": "",
      "post_date": "2023-09-10T00:38:26.523000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 2428408,
      "author_name": "",
      "author_url": "",
      "post_date": "2023-09-07T20:59:47.773000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 2426743,
      "author_name": "",
      "author_url": "",
      "post_date": "2023-09-06T19:23:37.010000",
      "content": "",
      "votes": 0,
      "replies": [
        {
          "id": 2426751,
          "author_name": "",
          "author_url": "",
          "post_date": "2023-09-06T19:33:56.857000",
          "content": "",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 2414529,
      "author_name": "",
      "author_url": "",
      "post_date": "2023-08-29T17:49:16.897000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 2434041,
      "author_name": "",
      "author_url": "",
      "post_date": "2023-09-12T04:39:23.983000",
      "content": "",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "2411713": "i will update as my experiments proceeds. Here is my framework:\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F2bc6d75ed99755293a726c49cde3ba2f%2FSelection_999(2979).png?generation=1693167264300790&alt=media)\n\nreference code:\nhttps://www.kaggle.com/code/hengck23/lb0-55-2-5d-1d-sample-model\n",
    "2425570": "if you are still stuck, try this\n(this is the reference model at https://www.kaggle.com/code/hengck23/lb0-55-2-5d-1d-sample-model)\n\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Feba80d29281eb17cbb10ba2bad8cb33a%2FSelection_999(3092).png?generation=1693971810878201&alt=media)\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F314bb0c8da4b58f6e7f024def9f9e18c%2FSelection_999(3093).png?generation=1693971823716306&alt=media)",
    "2428710": "in the evalusation scriptt, any injury is auto generated\n\n```\n\t# Derive a new any_injury label by taking the max of 1 - p(healthy) for each label group\n\thealthy_cols = [x + '_healthy' for x in all_target_categories]\n\tany_injury_labels = (1 - solution[healthy_cols]).max(axis=1)\n\tany_injury_predictions = (1 - submission[healthy_cols]).max(axis=1)\n\tany_injury_loss = sklearn.metrics.log_loss(\n\t\ty_true=any_injury_labels.values,\n\t\ty_pred=any_injury_predictions.values,\n\t\tsample_weight=solution['any_injury_weight'].values\n\t)\n\n\n```\n\nremember to consider in this at your loss function in backprop!\n\nyou don't want ending up good loss for your trained parts, and poor loss for server generated  any injury\n\n```\nliver_loss = F.cross_entropy(liver_logit, ...)\nspeen_loss = F.cross_entropy(speen_logit, ...)\n\nany_loss = customised_loss (1-softmax(liver_prob_healthy, ...) ..., )\n\n```",
    "2430598": "intermediate results\n9-sep\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Fee65ad5f2ec291f049fa760219cd3657%2FSelection_999(3158).png?generation=1694260671495384&alt=media)",
    "2427514": "what we can learm from kinectics-400 action recognition : ensmble tricks at inference?\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F94aa67eb9e63fb7e5f05c73911493811%2FSelection_999(3118).png?generation=1694079294721151&alt=media)\n\nmore on video transformer later ....",
    "2425520": "surprise!!!!\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Fb447feef9caea5a738a905b742bdaa3e%2FSelection_999(3077).png?generation=1693965542365371&alt=media)",
    "2449116": "i make a silly mistake.\nsometimes it is easier to look at z-x plance.\nbelow shows: image[:, y0:y1,:]\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F715764b271e9909b076c107f58fc993e%2FSelection_999(3322).png?generation=1695264828772404&alt=media)",
    "2425329": "find a weird distribution that makes me wonder if the hidden test also exihbits this:\n\n```\n\ndf = train_df[train_df.extravasation_injury==1] \ngb = df.groupby(['patient_id']).count() \ngb['series_id'].value_counts()\n1    100\n2    100\nName: series_id, dtype: int64\n```",
    "2412950": "related paper:\n\n[1] CLIP-Driven Universal Model for Organ Segmentation and Tumor Detection\nhttps://arxiv.org/abs/2301.00785\n\nhttps://github.com/ljwztc/CLIP-Driven-Universal-Model/blob/main/model/Universal_model.py\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F699f0a042cd3cad5645df83e80a1073c%2FSelection_999(2990).png?generation=1693237526462504&alt=media)\n",
    "2426761": "after working for two week, my observation:\n- unlike other competition, you need to decide the volume size (and voxel spacing) of you input. then you have to resample and cache the data. so it is like 1hr of caching data + 1.5 hr of training.\n- this eats up your diskspace.\n- once you decided to try new data processing and new volume size, you have to re-cache your data (i.e. eats up more diskspace) \n- in other competition, you need more compute and you may spend money on cloud gpu compute. Here, in addition, you need more diskpace. you may need to store your differet version of processed data in paid google drive.",
    "2411726": "a list of 5000+ CT scan, maybe good for self-supervised pretraining of my encoder.\nhttps://github.com/ljwztc/CLIP-Driven-Universal-Model",
    "2428551": "Thank you for sharing good ideas.\n\nCan i ask how did you make 'slice_predict' network?\n\nWhat is the label of slice prediction?",
    "2426903": "understanding  aortic_hu:\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Ff1c416c7a767b6c9a064ad4a072963c5%2FSelection_999(3104).png?generation=1694041310474157&alt=media)\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F05d2d8d25a030b04f0c5055c8b1e8470%2FSelection_999(3103).png?generation=1694041322611085&alt=media)\n\nread about contrast enhanced CT here:\n\nhttps://radiologyassistant.nl/more/ct-protocols/ct-contrast-injection-and-protocols",
    "2426246": "I have a really similar pipeline, the only difference is I use a segmentation model to get bbox for each organ (liver, spleen, kidneys) and then 3 models to predict injury.\n\nI've got 0.57 CV for the liver and kidneys and ~0.7 CV for the spleen, and it gives me 0.62 on LB. My current segmentation model is not perfect at the moment so I think with better organ localization I'll get better results.\n\nYour sub volume predictor looks interesting, I was wondering if you could provide a bit more highlights of this model?",
    "2419375": "this is is good stuffs\n\nMICCAI FLARE 2023: Fast, Low-resource, and Accurate oRgan and Pan-cancer sEgmentation in Abdomen CT\nhttps://github.com/JunMa11/FLARE\n\n- 4000 CT scans from 30+ medical centers\n- Partial-label setting\n- 14 segmentation targets: liver, spleen, pancreas, right kidney, left kidney, stomach, gallbladder, esophagus, aorta, inferior vena cava, right adrenal gland, left adrenal gland, duodenum, and tumo",
    "2427278": "how to use two ct scan and use auortic HU\nhere  auortic HU is treated as a \"time embedding\" \n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Fc54839f48871ea0094184648013e0f42%2FSelection_999(3115).png?generation=1694067930839463&alt=media)",
    "2425252": "inspiration from other competition !\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Fa0700e0b510f05e3b369aefb2f4fe298%2FSelection_999(3059).png?generation=1693937651266838&alt=media)\n\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Fd1c32f7cbf0380811c594eacd8decef7%2FSelection_999(3058).png?generation=1693937662009406&alt=media)",
    "2418538": "example of mask-guided attention\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F097a50d066c8529ed46c7d4d6df273a7%2FSelection_999(3019).png?generation=1693566315138691&alt=media)\nhttps://mdpi-res.com/d_attachment/entropy/entropy-23-00653/article_deploy/entropy-23-00653-v2.pdf?version=1621927496",
    "2418482": "grad cam activation results\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F9dfb576a6fa4c7dfa63f9e53c32f7f56%2FSelection_999(3018).png?generation=1693561745537268&alt=media)",
    "2413995": "some really good discussion of the available network architecture:\nhttps://glassboxmedicine.com/2020/08/04/chest-ct-scan-machine-learning-in-5-minutes/\n\nwhat we need here is high resolution and efficient solution:\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F5f9a384c05b11a5d40b51d71afd10262%2FSelection_999(2992).png?generation=1693302076424091&alt=media)\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F0eec8214001d5fc2232e737e8c2a666e%2FSelection_999(2991).png?generation=1693302096517671&alt=media)\n\ngoogle for \"CT scan 2d CNN, 3d CNN, 2.5 CNN\"\n\ntransformer for global attention at the upper layers can be used once the CNN reduced the feature dim.",
    "2425264": "![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F5e43d4fb8c52d46ad964858cf274bff8%2FSelection_999(3062).png?generation=1693938435367075&alt=media)\n@nischaydnk 's post on SAM-Med2D is close to what i have in mind\nhttps://www.kaggle.com/competitions/rsna-2023-abdominal-trauma-detection/discussion/437036",
    "2425701": "very nice, maybe you can upload the weight file",
    "2468460": "**can you explain how you have generated folds in this model(2.5d/3d)**",
    "2454534": "finally a 2d to 3d SAM \n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F4a8e63ee156fa320087583669b9d1e8c%2FSelection_999(3368).png?generation=1695594666992627&alt=media)\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F3f4543525a9b8dca486850f95322ae20%2FSelection_999(3369).png?generation=1695594772220979&alt=media)\nmore here:\nhttps://github.com/YichiZhang98/SAM4MIS",
    "2446642": "did you probe the hidden test data?\n\n```\njust consider liver case.\nlet A = % of true labels == healthly \nlet B = % of true labels == low (injury) \nlet C = % of true labels == high (injury) \n% means weighted percentage\n\n\nwe submit constant pobability prediction for all test samples:\np = [ 0.99999, 0.000005, 0.000005]\n\nthen lb score :\nS1 = -A*log(0.99999)-B*log(0.000005)-C*log(0.000005)\nassume log(0.99999)=0, then we have one equation:\nB+C = -S1/log(0.99999)\ni.e. A = 1+S1/log(0.99999)\n\n\n\n```",
    "2446475": "will using that  giving no module kaggle_helper \ni try to insert the data related but it is not available can you say where you found",
    "2434108": "yes, you need slice detector to do the alignment for multi-phrase CT!!!\n\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F7347bb2e52a2256550df0049b6164dee%2FSelection_999(3230).png?generation=1694497217087058&alt=media)\n\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F93bfb1b312653eb2907fc1dc84288aed%2FSelection_999(3223).png?generation=1694497235927858&alt=media)\n",
    "2432421": "easy elegant code for single/multi scan model:\n```\nclass Net(nn.Module):\n\tdef __init__(self, cfg=None):\n\t\tsuper().__init__()\n\n\n\tdef forward(self, batch):\n\n\t\timage = batch['image']\n\t\tbatch_size, D, H, W = image.shape  #(B, 96, 256, 256)\n\n\t\t... \n\t\tf = self.encoder.forward_features(x)\n\t\t....\n\t\t....\n\t\tf = self.decoder(f)\n\t\tflatten = f.mean(dim=[2,3,4]) # pool\n\t\tsplit = torch.split_with_sizes(flatten, batch['num_series'])\n\t\tpool  = torch.stack([\n\t\t\tp.max(0)[0] + p.mean(0)\n\t\t\tfor p in split])\n \n\t\tliver_logit  = self.liver_logit(pool)\n\t\tspleen_logit = self.spleen_logit(pool)\n\t\tkidney_logit = self.kidney_logit(pool)\n\t\t...\n\ndef run_check_net():\n\tnum_series = [1,1,2,1,2] #either one two scan per patient\n\tnum_patient = len(num_series)\n\tbatch_size = sum(num_series)\n\tscan_size = [96, 256, 256]  \n\tD,H,W = scan_size\n\n\timage        =  np.random.uniform(0, 1, (batch_size, D,H,W))\n\taortic_hu    =  np.random.uniform(0, 1, (batch_size ))\n\tliver_label  =  np.random.randint(0, 2, (num_patient,))\n\tspleen_label =  np.random.randint(0, 2, (num_patient,))\n\t...\n\n\t# ---\n\tbatch = dict(\n\t\tnum_series = num_series,\n\t\tnum_patient = num_patient,\n\t\timage = torch.from_numpy(image).float().cuda(),\n\t\taortic_hu  = torch.from_numpy(aortic_hu).float().cuda(),\n\n\t\tliver_label  = torch.from_numpy(liver_label).long().cuda(),\n\t\tspleen_label = torch.from_numpy(spleen_label).long().cuda(),\n\t\t....\n\t)\n \n\tnet = Net(cfg).cuda()\n\n```",
    "2432114": "i wonder if this would work\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F6f1df7506718fa315e46b9dba334482b%2FSelection_999(3183).png?generation=1694359910537670&alt=media)\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Fc6253d718653055f93db1187f8cb34e7%2FSelection_999(3181).png?generation=1694359922840424&alt=media)\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Fdf4313d4f2d8f59926dbbc7c90858ebf%2FSelection_999(3180).png?generation=1694359935802453&alt=media)\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Ffc4b526962564416fbf12161bf7ff1cc%2FSelection_999(3179).png?generation=1694359947416152&alt=media)",
    "2432110": "there are some \"dangerous trick\" one can set try for log loss\n- set p<threshold=0,  p>threshold=1\n- you can partition the p values and use constant prediction in each partition\n- rank all scores. if you know the num of +ve case (e.g. via probing+train data) you can chnage the top and bottom values\n- the injury are highly correlated",
    "2431343": "how to make beautiful cross sections ...\n(if you see better, the model also see better)\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F029bca29f9d0b4640ac5b85986c77abb%2FSelection_999(3167).png?generation=1694317890289980&alt=media)\n\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F431973c1bb7db4ba5c8c9f1b90f640d8%2FSelection_999(3165).png?generation=1694317908362596&alt=media)\n\n```\n\t      z_min= max(d1.liver_z_min,d1.spleen_z_min,d1.kidney_left_z_min,d1.kidney_right_z_min)\n\t\tz_max= min(d1.liver_z_max,d1.spleen_z_max,d1.kidney_left_z_max,d1.kidney_right_z_max)\n\n\t\ty_min= max(d1.liver_y_min,d1.spleen_y_min,d1.kidney_left_y_min,d1.kidney_right_y_min)\n\t\ty_max= min(d1.liver_y_max,d1.spleen_y_max,d1.kidney_left_y_max,d1.kidney_right_y_max)\n\n\t\tx_min= min(d1.liver_x_min,d1.spleen_x_min,d1.kidney_left_x_min,d1.kidney_right_x_min)\n\t\tx_max= max(d1.liver_x_max,d1.spleen_x_max,d1.kidney_left_x_max,d1.kidney_right_x_max)\n\t\tprint(x_min,x_max)\n\n\t\tz0 = int(z_min/d1.ndata_D*l) #scle since my image and nii bounding box are of different scale\n\t\tz1 = int(z_max/d1.ndata_D*l) \n\t\ty0 = int(y_min/d1.ndata_H*s)\n\t\ty1 = int(y_max/d1.ndata_H*s)\n\t\tx0 = int(x_min/d1.ndata_W*s)\n\t\tx1 = int(x_max/d1.ndata_W*s)\n\n\t\tv = image\n\t\tv0_mean = np_min_max_norm(v[z0:z1].mean(0))\n\t\tv1_mean = np_min_max_norm(v[:,y0:y1].mean(1))\n\t\tv2_mean = np_min_max_norm(v[:,:,x0:x1].mean(2))\n\n\t\timage_show_norm('v0_mean', v0_mean, resize=2)\n\t\timage_show_norm('v1_mean', v1_mean, resize=2)\n\t\timage_show_norm('v2_mean', v2_mean, resize=2)\n\t\tcv2.waitKey(0)\n\n```",
    "2431253": "i am surprised that Liver Tumor can be synthetically generated for training\n\nhttps://openaccess.thecvf.com/content/CVPR2023/papers/Hu_Label-Free_Liver_Tumor_Segmentation_CVPR_2023_paper.pdf\nLabel-Free Liver Tumor Segmentation",
    "2428408": "@hengck23 \nI'm new to this data.\nCan you tell me the difference between 3D vs 2.5D approaches?\nIn 3D approach, do you stack all images of 1 patient into one 3D tensor then use 3D CNN?",
    "2426743": "find something interesting ...\nalthough my model performs poorly for image level bowel injury, it does better at series level.\n\nblue: ground truth ( image level bowel injury)\norange: predicted probability\ngreen: threshold version of organe\nx-axis : slice number\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Fb9217525f6201d2234cb51b6ebbb4466%2FSelection_999(3097).png?generation=1694028070377042&alt=media)\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2Ffa1651e58a43d30ab600c27a60e24da7%2FSelection_999(3098).png?generation=1694028090825942&alt=media)\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F113660%2F6567dbc1f21eac0e3fda719d36850dd5%2FSelection_999(3100).png?generation=1694028104655954&alt=media)",
    "2414529": "Great work sir to start with!",
    "2434041": "thanks for your share."
  }
}