{
  "id": 364466,
  "title": "4th Place Solution - Split images into tiles and do 3D CNN",
  "url": "/competitions/mayo-clinic-strip-ai/discussion/364466",
  "author_name": "kaggler",
  "post_date": "2022-11-06T16:14:23.806000",
  "votes": 17,
  "comment_count": 10,
  "views": 0,
  "content": "<p>Maybe It's too late to write a solution now, but I want to share my ideas.<br>\nBecause it's a good thing to share good ideas in Kaggle.<br>\nalso I would like to thank the organizers for hosting the great competition.  </p>\n<h1>Summary</h1>\n<p>Important features of the competition data are that the image sizes given to us are very large, with an average of approximately 40000x40000, having many white background.  <br>\nThe solution I came up with was to remove background area of images and to split the images into tiles and train a 3D CNN Network.  <br>\nMy method showed a very stable Local CV without any post-processing.  </p>\n<h1>Details</h1>\n<p><img src=\"https://i.imgur.com/YstxEd7.png\" alt=\"\"><br>\n<img src=\"https://i.imgur.com/uZRyt1U.png\" alt=\"\"><br>\n<img src=\"https://i.imgur.com/fVQPrEE.png\" alt=\"\"><br>\n<img src=\"https://i.imgur.com/azahHyH.jpg\" alt=\"\"></p>",
  "messages": [
    {
      "id": 2019473,
      "postDate": "2022-11-06T16:14:23.807Z",
      "content": "<p>Maybe It's too late to write a solution now, but I want to share my ideas.<br>\nBecause it's a good thing to share good ideas in Kaggle.<br>\nalso I would like to thank the organizers for hosting the great competition.  </p>\n<h1>Summary</h1>\n<p>Important features of the competition data are that the image sizes given to us are very large, with an average of approximately 40000x40000, having many white background.  <br>\nThe solution I came up with was to remove background area of images and to split the images into tiles and train a 3D CNN Network.  <br>\nMy method showed a very stable Local CV without any post-processing.  </p>\n<h1>Details</h1>\n<p><img src=\"https://i.imgur.com/YstxEd7.png\" alt=\"\"><br>\n<img src=\"https://i.imgur.com/uZRyt1U.png\" alt=\"\"><br>\n<img src=\"https://i.imgur.com/fVQPrEE.png\" alt=\"\"><br>\n<img src=\"https://i.imgur.com/azahHyH.jpg\" alt=\"\"></p>",
      "rawMarkdown": "Maybe It's too late to write a solution now, but I want to share my ideas.\nBecause it's a good thing to share good ideas in Kaggle.\nalso I would like to thank the organizers for hosting the great competition.  \n\n# Summary  \nImportant features of the competition data are that the image sizes given to us are very large, with an average of approximately 40000x40000, having many white background.  \nThe solution I came up with was to remove background area of images and to split the images into tiles and train a 3D CNN Network.  \nMy method showed a very stable Local CV without any post-processing.  \n  \n# Details\n\n![](https://i.imgur.com/YstxEd7.png)\n![](https://i.imgur.com/uZRyt1U.png)\n![](https://i.imgur.com/fVQPrEE.png)\n![](https://i.imgur.com/azahHyH.jpg)\n",
      "votes": 17
    },
    {
      "id": 2045576,
      "postDate": "2022-11-27T13:14:49.580Z",
      "content": "<p>May I know what was your rationale behind using 3D CNN for this problem? Are there any intuitive benefits to this? </p>",
      "rawMarkdown": "May I know what was your rationale behind using 3D CNN for this problem? Are there any intuitive benefits to this? ",
      "votes": 1,
      "replies": [
        {
          "id": 2046345,
          "postDate": "2022-11-28T06:33:02.803Z",
          "content": "<p>Good Question. With 3D Convolution, I could consider whole regions of data during training. that's all. If I use 2d CNN, I need to remove a lot of regions that are not relevent to CE or LAA</p>",
          "rawMarkdown": "Good Question. With 3D Convolution, I could consider whole regions of data during training. that's all. If I use 2d CNN, I need to remove a lot of regions that are not relevent to CE or LAA",
          "votes": 2
        },
        {
          "id": 2046582,
          "postDate": "2022-11-28T08:50:45.123Z",
          "content": "<p>\"Regions that are not relevant to CE or LAA\" here you refer to the background in the original WSI? </p>\n<p>Btw, have you tried performing model explanability on your model? I am super curious about how this model make  predictions ^^ 😁</p>",
          "rawMarkdown": "\"Regions that are not relevant to CE or LAA\" here you refer to the background in the original WSI? \n\nBtw, have you tried performing model explanability on your model? I am super curious about how this model make  predictions ^^ 😁"
        },
        {
          "id": 2046742,
          "postDate": "2022-11-28T10:57:51.700Z",
          "content": "<p>\"Regions that are not relevant to CE or LAA\" here you refer to the background in the original WSI?\" -&gt; Answer is those white background regions + regions that are not relevant to CE or LAA that is determined by 3D CNN during backpropagation.<br>\n 3D CNN is spatiotemporal. we can see a lot of wider regions that consist of tiled-patch. so I assume the 3D CNN network can differentiate which patch is important or not.<br>\nif we use 2d CNN, we need to pick up what seems relevant to CE or LAA since we don't simply resize our image.  Many top players here manually or with some criteria like choosing regions that have the most pixels picked up some regions that seem relevant to CE or LAA. also some guys used MIL strategy. there are tons of papers dealing with WSI.  but I just wanted to avoid preprocessing and try to consider \"whole regions\" by teaching 3D CNN.</p>\n<p>may I ask you what method can check the explanability of the model? I just checked consistent logloss and auc score throughout the competition. If you suggest how the model's explanability is checked, then i will try that.</p>",
          "rawMarkdown": "\"Regions that are not relevant to CE or LAA\" here you refer to the background in the original WSI?\" -> Answer is those white background regions + regions that are not relevant to CE or LAA that is determined by 3D CNN during backpropagation.\n 3D CNN is spatiotemporal. we can see a lot of wider regions that consist of tiled-patch. so I assume the 3D CNN network can differentiate which patch is important or not.\nif we use 2d CNN, we need to pick up what seems relevant to CE or LAA since we don't simply resize our image.  Many top players here manually or with some criteria like choosing regions that have the most pixels picked up some regions that seem relevant to CE or LAA. also some guys used MIL strategy. there are tons of papers dealing with WSI.  but I just wanted to avoid preprocessing and try to consider \"whole regions\" by teaching 3D CNN.\n\nmay I ask you what method can check the explanability of the model? I just checked consistent logloss and auc score throughout the competition. If you suggest how the model's explanability is checked, then i will try that.",
          "votes": 1
        },
        {
          "id": 2047030,
          "postDate": "2022-11-28T15:04:32.653Z",
          "content": "<p>Wow, using 3D CNN to learn to differentiate unimportant tiles is a great idea. </p>\n<p>The model explainability I refer to is explained in this notebook (<a href=\"https://www.kaggle.com/code/allunia/mayo-clinic-strip-ai-can-i-trust-my-model)\" target=\"_blank\">https://www.kaggle.com/code/allunia/mayo-clinic-strip-ai-can-i-trust-my-model)</a>. Basically it shows how your model makes predictions.</p>",
          "rawMarkdown": "Wow, using 3D CNN to learn to differentiate unimportant tiles is a great idea. \n\nThe model explainability I refer to is explained in this notebook (https://www.kaggle.com/code/allunia/mayo-clinic-strip-ai-can-i-trust-my-model). Basically it shows how your model makes predictions.",
          "votes": 1
        },
        {
          "id": 2047161,
          "postDate": "2022-11-28T16:50:28.240Z",
          "content": "<p><a href=\"https://www.kaggle.com/trunghjieu\" target=\"_blank\">@trunghjieu</a>  Could you please check your link? i can't see the notebook now.</p>",
          "rawMarkdown": "@trunghjieu  Could you please check your link? i can't see the notebook now."
        },
        {
          "id": 2047840,
          "postDate": "2022-11-29T04:28:03.900Z",
          "content": "<p>My bad, here is the link: <br>\n<a href=\"https://www.kaggle.com/code/allunia/mayo-clinic-strip-ai-can-i-trust-my-model\" target=\"_blank\">https://www.kaggle.com/code/allunia/mayo-clinic-strip-ai-can-i-trust-my-model</a></p>",
          "rawMarkdown": "My bad, here is the link: \nhttps://www.kaggle.com/code/allunia/mayo-clinic-strip-ai-can-i-trust-my-model"
        },
        {
          "id": 2049397,
          "postDate": "2022-11-30T05:43:55.763Z",
          "content": "<p>I will try. Thanks!</p>",
          "rawMarkdown": "I will try. Thanks!",
          "votes": 1
        }
      ]
    },
    {
      "id": 2030966,
      "postDate": "2022-11-15T18:42:29.547Z",
      "content": "<p>Good work <a href=\"https://www.kaggle.com/deepkim\" target=\"_blank\">@deepkim</a> :) </p>",
      "rawMarkdown": "Good work @deepkim :) ",
      "votes": 1,
      "replies": [
        {
          "id": 2032285,
          "postDate": "2022-11-16T14:30:10.427Z",
          "content": "<p>Thanks for the reply!<br>\n<a href=\"https://www.kaggle.com/icemantd\" target=\"_blank\">@icemantd</a> </p>",
          "rawMarkdown": "Thanks for the reply!\n@icemantd ",
          "votes": 1
        }
      ]
    }
  ],
  "comments": [
    {
      "id": 2045576,
      "author_name": "trunghjieu",
      "author_url": "",
      "post_date": "2022-11-27T13:14:49.580000",
      "content": "<p>May I know what was your rationale behind using 3D CNN for this problem? Are there any intuitive benefits to this? </p>",
      "votes": 1,
      "replies": [
        {
          "id": 2046345,
          "author_name": "kaggler",
          "author_url": "",
          "post_date": "2022-11-28T06:33:02.803000",
          "content": "<p>Good Question. With 3D Convolution, I could consider whole regions of data during training. that's all. If I use 2d CNN, I need to remove a lot of regions that are not relevent to CE or LAA</p>",
          "votes": 2,
          "replies": []
        },
        {
          "id": 2046582,
          "author_name": "trunghjieu",
          "author_url": "",
          "post_date": "2022-11-28T08:50:45.123000",
          "content": "<p>\"Regions that are not relevant to CE or LAA\" here you refer to the background in the original WSI? </p>\n<p>Btw, have you tried performing model explanability on your model? I am super curious about how this model make  predictions ^^ 😁</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 2046742,
          "author_name": "kaggler",
          "author_url": "",
          "post_date": "2022-11-28T10:57:51.700000",
          "content": "<p>\"Regions that are not relevant to CE or LAA\" here you refer to the background in the original WSI?\" -&gt; Answer is those white background regions + regions that are not relevant to CE or LAA that is determined by 3D CNN during backpropagation.<br>\n 3D CNN is spatiotemporal. we can see a lot of wider regions that consist of tiled-patch. so I assume the 3D CNN network can differentiate which patch is important or not.<br>\nif we use 2d CNN, we need to pick up what seems relevant to CE or LAA since we don't simply resize our image.  Many top players here manually or with some criteria like choosing regions that have the most pixels picked up some regions that seem relevant to CE or LAA. also some guys used MIL strategy. there are tons of papers dealing with WSI.  but I just wanted to avoid preprocessing and try to consider \"whole regions\" by teaching 3D CNN.</p>\n<p>may I ask you what method can check the explanability of the model? I just checked consistent logloss and auc score throughout the competition. If you suggest how the model's explanability is checked, then i will try that.</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 2047030,
          "author_name": "trunghjieu",
          "author_url": "",
          "post_date": "2022-11-28T15:04:32.653000",
          "content": "<p>Wow, using 3D CNN to learn to differentiate unimportant tiles is a great idea. </p>\n<p>The model explainability I refer to is explained in this notebook (<a href=\"https://www.kaggle.com/code/allunia/mayo-clinic-strip-ai-can-i-trust-my-model)\" target=\"_blank\">https://www.kaggle.com/code/allunia/mayo-clinic-strip-ai-can-i-trust-my-model)</a>. Basically it shows how your model makes predictions.</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 2047161,
          "author_name": "kaggler",
          "author_url": "",
          "post_date": "2022-11-28T16:50:28.240000",
          "content": "<p><a href=\"https://www.kaggle.com/trunghjieu\" target=\"_blank\">@trunghjieu</a>  Could you please check your link? i can't see the notebook now.</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 2047840,
          "author_name": "trunghjieu",
          "author_url": "",
          "post_date": "2022-11-29T04:28:03.900000",
          "content": "<p>My bad, here is the link: <br>\n<a href=\"https://www.kaggle.com/code/allunia/mayo-clinic-strip-ai-can-i-trust-my-model\" target=\"_blank\">https://www.kaggle.com/code/allunia/mayo-clinic-strip-ai-can-i-trust-my-model</a></p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 2049397,
          "author_name": "kaggler",
          "author_url": "",
          "post_date": "2022-11-30T05:43:55.763000",
          "content": "<p>I will try. Thanks!</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 2030966,
      "author_name": "tdiceman",
      "author_url": "",
      "post_date": "2022-11-15T18:42:29.547000",
      "content": "<p>Good work <a href=\"https://www.kaggle.com/deepkim\" target=\"_blank\">@deepkim</a> :) </p>",
      "votes": 1,
      "replies": [
        {
          "id": 2032285,
          "author_name": "kaggler",
          "author_url": "",
          "post_date": "2022-11-16T14:30:10.427000",
          "content": "<p>Thanks for the reply!<br>\n<a href=\"https://www.kaggle.com/icemantd\" target=\"_blank\">@icemantd</a> </p>",
          "votes": 1,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "2019473": "Maybe It's too late to write a solution now, but I want to share my ideas.\nBecause it's a good thing to share good ideas in Kaggle.\nalso I would like to thank the organizers for hosting the great competition.  \n\n# Summary  \nImportant features of the competition data are that the image sizes given to us are very large, with an average of approximately 40000x40000, having many white background.  \nThe solution I came up with was to remove background area of images and to split the images into tiles and train a 3D CNN Network.  \nMy method showed a very stable Local CV without any post-processing.  \n  \n# Details\n\n![](https://i.imgur.com/YstxEd7.png)\n![](https://i.imgur.com/uZRyt1U.png)\n![](https://i.imgur.com/fVQPrEE.png)\n![](https://i.imgur.com/azahHyH.jpg)\n",
    "2045576": "May I know what was your rationale behind using 3D CNN for this problem? Are there any intuitive benefits to this? ",
    "2030966": "Good work @deepkim :) "
  }
}