{
  "id": 466017,
  "title": "5th place solution",
  "url": "/competitions/UBC-OCEAN/discussion/466017",
  "author_name": "sakaku",
  "post_date": "2024-01-06T18:11:21.681000",
  "votes": 14,
  "comment_count": 4,
  "views": 0,
  "content": "<p>First of all, I would like to express my gratitude to the Kaggle staff for hosting this fantastic competition, as well as to the organizers at UBC. I also want to extend my appreciation to all the hardworking participants who dedicated themselves to this competition. Special thanks go to my teammates <a href=\"https://www.kaggle.com/kapenon\" target=\"_blank\">@kapenon</a> and <a href=\"https://www.kaggle.com/tascj0\" target=\"_blank\">@tascj0</a> for their tireless efforts and insightful discussions.</p>\n<h1>Solution Overview</h1>\n<h2>Summary of submitted final solution:</h2>\n<ol>\n<li>Inference contains two stages:<ol>\n<li>Tile selection model -&gt; Only WSI</li>\n<li>Classification model -&gt; WSI and TMA</li></ol></li>\n</ol>\n<h2>Training details of segmentation model (mainly WSI, TMA is simply center-cropped):</h2>\n<ol>\n<li>Tile classification helper model (Not used for inference)<ol>\n<li>Random cropped tiles at 1536x1536, background excluded</li>\n<li>Augmentations:  Random horizontal and vertical flips, RandomRotation, RandAugment, RandomGrayscale, RandomErasing</li>\n<li>WSI label as tile label</li>\n<li>ConvNeXt-base</li>\n<li>6-class classification (Hubmap external data as “Other”)</li></ol></li>\n<li>Segmentation helper model (Not used for inference)<ol>\n<li>Use host provided mask</li>\n<li>Tumor binary classification</li>\n<li>2x magnification</li>\n<li>SEResNeXt101 UNet</li></ol></li>\n<li>Tile selection segmentation model (Used for inference)<ol>\n<li>Label generation<ol>\n<li>Inference all tiles using 1st step models and save predicted probabilities of WSI class</li>\n<li>Inference all WSIs using 2nd step models</li>\n<li>Create a heatmap at 2x magnification</li>\n<li>Heatmap GT is 0.5 classification confidence + 0.5 tumor confidence</li></ol></li>\n<li>Training<ol>\n<li>SEResNeXt101 UNet</li></ol></li></ol></li>\n</ol>\n<p>Generated heatmap example:<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F2369671%2Fcd379f02a28d0f794dedc644678c0d7f%2F61823.png?generation=1704564181303725&amp;alt=media\" alt=\"heatmaplabel\"><br>\nInference example of segmentation model:<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F2369671%2F6e02f20e8a358c0af557f97e2af934fa%2F61823compressed.jpeg?generation=1704564312351461&amp;alt=media\"></p>\n<h2>Training details of tile classification model (Used for inference)</h2>\n<ol>\n<li>Random cropped tiles at 1536x1536, background excluded</li>\n<li>Augmentations: Random horizontal and vertical flips, RandomRotation, RandAugment, RandomGrayscale, RandomErasing + StainNorm</li>\n<li>WSI label as tile label</li>\n<li>ConvNeXt-base, ConvNeXt-large, EVA (at 448x448)</li>\n<li>6-class classification (Hubmap, Camelyon16, Camelyon17, etc. tiles as “Other”)</li>\n<li>Data mining:<ol>\n<li>Train 1st round</li>\n<li>Predict all foreground tiles<ol>\n<li>Confidence &lt;0.3 tiles are pseudo labeled “Other” in 2nd round</li>\n<li>Confidence 0.3-0.6 tiles are ignored</li>\n<li>Confidence &gt;0.6 tiles are pseudo labeled as WSI label</li></ol></li>\n<li>Train 2nd round</li></ol></li>\n</ol>\n<h2>Inference details:</h2>\n<h3>WSI</h3>\n<ol>\n<li>Tile selection<ol>\n<li>Predict heatmap at 2x magnification, top-5 confidence tiles are selected for classification</li></ol></li>\n<li>Classification<ol>\n<li>Prediction 5 tiles and average predictions as WSI prediction</li>\n<li>StainNorm as TTA</li></ol></li>\n<li>There are some handling of large WSI images, refer to the submission notebook</li>\n</ol>\n<h3>TMA</h3>\n<ol>\n<li>Center crop 1 3072x3072 tile</li>\n<li>Resize to 1536x1536</li>\n<li>Predict using the classification model</li>\n<li>StainNorm as TTA</li>\n</ol>\n<h2>Used External Datasets and their license:</h2>\n<ol>\n<li>Hubmap: HuBMAP + HPA - Hacking the Human Body (<a href=\"https://www.kaggle.com/competitions/hubmap-organ-segmentation/overview\" target=\"_blank\">https://www.kaggle.com/competitions/hubmap-organ-segmentation/overview</a>)</li>\n<li>Camelyon16, 17: CC0 (<a href=\"https://www.google.com/url?q=https://camelyon17.grand-challenge.org/Data/&amp;sa=D&amp;source=docs&amp;ust=1704419788737632&amp;usg=AOvVaw1BeJOZcucbo9R0wgu5NK3q\" target=\"_blank\">https://www.google.com/url?q=https://camelyon17.grand-challenge.org/Data/&amp;sa=D&amp;source=docs&amp;ust=1704419788737632&amp;usg=AOvVaw1BeJOZcucbo9R0wgu5NK3q</a>)</li>\n<li>ovarian-bevacizumab-response (only for WSI labeled as 'Other'): CC BY 4.0 (<a href=\"https://www.google.com/url?q=https://www.cancerimagingarchive.net/collection/ovarian-bevacizumab-response/&amp;sa=D&amp;source=docs&amp;ust=1704419788739913&amp;usg=AOvVaw0hQlYStI1_qpi7N_YIuHhY\" target=\"_blank\">https://www.google.com/url?q=https://www.cancerimagingarchive.net/collection/ovarian-bevacizumab-response/&amp;sa=D&amp;source=docs&amp;ust=1704419788739913&amp;usg=AOvVaw0hQlYStI1_qpi7N_YIuHhY</a>)</li>\n</ol>\n<h2>What worked</h2>\n<ol>\n<li>Stain normalization.</li>\n<li>Data mining (pseudo labeling).</li>\n<li>Segmentation model for identifying valuable patches.</li>\n<li>Using external datasets as ‘Other’.</li>\n<li>ConvNext and EVA02 models.</li>\n<li>Multiscale ensemble.</li>\n</ol>\n<h2>Codes</h2>\n<ol>\n<li>Train: <a href=\"https://github.com/ShuzhiLiu/UBC-OCEAN_5th_solution\" target=\"_blank\">https://github.com/ShuzhiLiu/UBC-OCEAN_5th_solution</a></li>\n<li>Submission Notebook: <a href=\"https://www.kaggle.com/code/liushuzhi/5thplacesolutionsubnotebook?scriptVersionId=158180788\" target=\"_blank\">https://www.kaggle.com/code/liushuzhi/5thplacesolutionsubnotebook?scriptVersionId=158180788</a><ol>\n<li>Without EVA02: Public=0.61, Private=0.61 -&gt; Selected for final sub</li>\n<li>With EVA02: Public=0.60, Private=0.63 -&gt; Not selected due to the lack of local CV</li></ol></li>\n</ol>\n<h2>Acknowledgement</h2>\n<p>We would like to express our gratitude to the Kaggle support system and the emotional support of Rist inc.</p>",
  "messages": [
    {
      "id": 2589884,
      "postDate": "2024-01-06T18:11:21.683Z",
      "content": "<p>First of all, I would like to express my gratitude to the Kaggle staff for hosting this fantastic competition, as well as to the organizers at UBC. I also want to extend my appreciation to all the hardworking participants who dedicated themselves to this competition. Special thanks go to my teammates <a href=\"https://www.kaggle.com/kapenon\" target=\"_blank\">@kapenon</a> and <a href=\"https://www.kaggle.com/tascj0\" target=\"_blank\">@tascj0</a> for their tireless efforts and insightful discussions.</p>\n<h1>Solution Overview</h1>\n<h2>Summary of submitted final solution:</h2>\n<ol>\n<li>Inference contains two stages:<ol>\n<li>Tile selection model -&gt; Only WSI</li>\n<li>Classification model -&gt; WSI and TMA</li></ol></li>\n</ol>\n<h2>Training details of segmentation model (mainly WSI, TMA is simply center-cropped):</h2>\n<ol>\n<li>Tile classification helper model (Not used for inference)<ol>\n<li>Random cropped tiles at 1536x1536, background excluded</li>\n<li>Augmentations:  Random horizontal and vertical flips, RandomRotation, RandAugment, RandomGrayscale, RandomErasing</li>\n<li>WSI label as tile label</li>\n<li>ConvNeXt-base</li>\n<li>6-class classification (Hubmap external data as “Other”)</li></ol></li>\n<li>Segmentation helper model (Not used for inference)<ol>\n<li>Use host provided mask</li>\n<li>Tumor binary classification</li>\n<li>2x magnification</li>\n<li>SEResNeXt101 UNet</li></ol></li>\n<li>Tile selection segmentation model (Used for inference)<ol>\n<li>Label generation<ol>\n<li>Inference all tiles using 1st step models and save predicted probabilities of WSI class</li>\n<li>Inference all WSIs using 2nd step models</li>\n<li>Create a heatmap at 2x magnification</li>\n<li>Heatmap GT is 0.5 classification confidence + 0.5 tumor confidence</li></ol></li>\n<li>Training<ol>\n<li>SEResNeXt101 UNet</li></ol></li></ol></li>\n</ol>\n<p>Generated heatmap example:<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F2369671%2Fcd379f02a28d0f794dedc644678c0d7f%2F61823.png?generation=1704564181303725&amp;alt=media\" alt=\"heatmaplabel\"><br>\nInference example of segmentation model:<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F2369671%2F6e02f20e8a358c0af557f97e2af934fa%2F61823compressed.jpeg?generation=1704564312351461&amp;alt=media\"></p>\n<h2>Training details of tile classification model (Used for inference)</h2>\n<ol>\n<li>Random cropped tiles at 1536x1536, background excluded</li>\n<li>Augmentations: Random horizontal and vertical flips, RandomRotation, RandAugment, RandomGrayscale, RandomErasing + StainNorm</li>\n<li>WSI label as tile label</li>\n<li>ConvNeXt-base, ConvNeXt-large, EVA (at 448x448)</li>\n<li>6-class classification (Hubmap, Camelyon16, Camelyon17, etc. tiles as “Other”)</li>\n<li>Data mining:<ol>\n<li>Train 1st round</li>\n<li>Predict all foreground tiles<ol>\n<li>Confidence &lt;0.3 tiles are pseudo labeled “Other” in 2nd round</li>\n<li>Confidence 0.3-0.6 tiles are ignored</li>\n<li>Confidence &gt;0.6 tiles are pseudo labeled as WSI label</li></ol></li>\n<li>Train 2nd round</li></ol></li>\n</ol>\n<h2>Inference details:</h2>\n<h3>WSI</h3>\n<ol>\n<li>Tile selection<ol>\n<li>Predict heatmap at 2x magnification, top-5 confidence tiles are selected for classification</li></ol></li>\n<li>Classification<ol>\n<li>Prediction 5 tiles and average predictions as WSI prediction</li>\n<li>StainNorm as TTA</li></ol></li>\n<li>There are some handling of large WSI images, refer to the submission notebook</li>\n</ol>\n<h3>TMA</h3>\n<ol>\n<li>Center crop 1 3072x3072 tile</li>\n<li>Resize to 1536x1536</li>\n<li>Predict using the classification model</li>\n<li>StainNorm as TTA</li>\n</ol>\n<h2>Used External Datasets and their license:</h2>\n<ol>\n<li>Hubmap: HuBMAP + HPA - Hacking the Human Body (<a href=\"https://www.kaggle.com/competitions/hubmap-organ-segmentation/overview\" target=\"_blank\">https://www.kaggle.com/competitions/hubmap-organ-segmentation/overview</a>)</li>\n<li>Camelyon16, 17: CC0 (<a href=\"https://www.google.com/url?q=https://camelyon17.grand-challenge.org/Data/&amp;sa=D&amp;source=docs&amp;ust=1704419788737632&amp;usg=AOvVaw1BeJOZcucbo9R0wgu5NK3q\" target=\"_blank\">https://www.google.com/url?q=https://camelyon17.grand-challenge.org/Data/&amp;sa=D&amp;source=docs&amp;ust=1704419788737632&amp;usg=AOvVaw1BeJOZcucbo9R0wgu5NK3q</a>)</li>\n<li>ovarian-bevacizumab-response (only for WSI labeled as 'Other'): CC BY 4.0 (<a href=\"https://www.google.com/url?q=https://www.cancerimagingarchive.net/collection/ovarian-bevacizumab-response/&amp;sa=D&amp;source=docs&amp;ust=1704419788739913&amp;usg=AOvVaw0hQlYStI1_qpi7N_YIuHhY\" target=\"_blank\">https://www.google.com/url?q=https://www.cancerimagingarchive.net/collection/ovarian-bevacizumab-response/&amp;sa=D&amp;source=docs&amp;ust=1704419788739913&amp;usg=AOvVaw0hQlYStI1_qpi7N_YIuHhY</a>)</li>\n</ol>\n<h2>What worked</h2>\n<ol>\n<li>Stain normalization.</li>\n<li>Data mining (pseudo labeling).</li>\n<li>Segmentation model for identifying valuable patches.</li>\n<li>Using external datasets as ‘Other’.</li>\n<li>ConvNext and EVA02 models.</li>\n<li>Multiscale ensemble.</li>\n</ol>\n<h2>Codes</h2>\n<ol>\n<li>Train: <a href=\"https://github.com/ShuzhiLiu/UBC-OCEAN_5th_solution\" target=\"_blank\">https://github.com/ShuzhiLiu/UBC-OCEAN_5th_solution</a></li>\n<li>Submission Notebook: <a href=\"https://www.kaggle.com/code/liushuzhi/5thplacesolutionsubnotebook?scriptVersionId=158180788\" target=\"_blank\">https://www.kaggle.com/code/liushuzhi/5thplacesolutionsubnotebook?scriptVersionId=158180788</a><ol>\n<li>Without EVA02: Public=0.61, Private=0.61 -&gt; Selected for final sub</li>\n<li>With EVA02: Public=0.60, Private=0.63 -&gt; Not selected due to the lack of local CV</li></ol></li>\n</ol>\n<h2>Acknowledgement</h2>\n<p>We would like to express our gratitude to the Kaggle support system and the emotional support of Rist inc.</p>",
      "rawMarkdown": "First of all, I would like to express my gratitude to the Kaggle staff for hosting this fantastic competition, as well as to the organizers at UBC. I also want to extend my appreciation to all the hardworking participants who dedicated themselves to this competition. Special thanks go to my teammates @kapenon and @tascj0 for their tireless efforts and insightful discussions.\n\n# Solution Overview\n## Summary of submitted final solution:\n1. Inference contains two stages:\n  1. Tile selection model -> Only WSI\n  2. Classification model -> WSI and TMA\n\n## Training details of segmentation model (mainly WSI, TMA is simply center-cropped):\n1. Tile classification helper model (Not used for inference)\n  1. Random cropped tiles at 1536x1536, background excluded\n  2. Augmentations:  Random horizontal and vertical flips, RandomRotation, RandAugment, RandomGrayscale, RandomErasing\n  3. WSI label as tile label\n  4. ConvNeXt-base\n  5. 6-class classification (Hubmap external data as “Other”)\n2. Segmentation helper model (Not used for inference)\n  1. Use host provided mask\n  2. Tumor binary classification\n  3. 2x magnification\n  4. SEResNeXt101 UNet\n3. Tile selection segmentation model (Used for inference)\n  1. Label generation\n     1. Inference all tiles using 1st step models and save predicted probabilities of WSI class\n     2. Inference all WSIs using 2nd step models\n     3. Create a heatmap at 2x magnification\n     4. Heatmap GT is 0.5 classification confidence + 0.5 tumor confidence\n  2. Training\n     1. SEResNeXt101 UNet\n\n\nGenerated heatmap example:![heatmaplabel](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F2369671%2Fcd379f02a28d0f794dedc644678c0d7f%2F61823.png?generation=1704564181303725&alt=media)\nInference example of segmentation model:![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F2369671%2F6e02f20e8a358c0af557f97e2af934fa%2F61823compressed.jpeg?generation=1704564312351461&alt=media)\n\n## Training details of tile classification model (Used for inference)\n  1. Random cropped tiles at 1536x1536, background excluded\n  2. Augmentations: Random horizontal and vertical flips, RandomRotation, RandAugment, RandomGrayscale, RandomErasing + StainNorm\n  3. WSI label as tile label\n  4. ConvNeXt-base, ConvNeXt-large, EVA (at 448x448)\n  5. 6-class classification (Hubmap, Camelyon16, Camelyon17, etc. tiles as “Other”)\n  6. Data mining:\n     1. Train 1st round\n     2. Predict all foreground tiles\n         1. Confidence <0.3 tiles are pseudo labeled “Other” in 2nd round\n         2. Confidence 0.3-0.6 tiles are ignored\n         3. Confidence >0.6 tiles are pseudo labeled as WSI label\n     3. Train 2nd round\n\n\n## Inference details:\n### WSI\n1. Tile selection\n  1. Predict heatmap at 2x magnification, top-5 confidence tiles are selected for classification\n2. Classification\n  1. Prediction 5 tiles and average predictions as WSI prediction\n  2. StainNorm as TTA\n3. There are some handling of large WSI images, refer to the submission notebook\n### TMA\n1. Center crop 1 3072x3072 tile\n2. Resize to 1536x1536\n3. Predict using the classification model\n4. StainNorm as TTA\n\n\n## Used External Datasets and their license:\n1. Hubmap: HuBMAP + HPA - Hacking the Human Body (https://www.kaggle.com/competitions/hubmap-organ-segmentation/overview)\n2. Camelyon16, 17: CC0 (https://www.google.com/url?q=https://camelyon17.grand-challenge.org/Data/&sa=D&source=docs&ust=1704419788737632&usg=AOvVaw1BeJOZcucbo9R0wgu5NK3q)\n3. ovarian-bevacizumab-response (only for WSI labeled as 'Other'): CC BY 4.0 (https://www.google.com/url?q=https://www.cancerimagingarchive.net/collection/ovarian-bevacizumab-response/&sa=D&source=docs&ust=1704419788739913&usg=AOvVaw0hQlYStI1_qpi7N_YIuHhY)\n\n## What worked\n1. Stain normalization.\n2. Data mining (pseudo labeling).\n3. Segmentation model for identifying valuable patches.\n4. Using external datasets as ‘Other’.\n5. ConvNext and EVA02 models.\n6. Multiscale ensemble.\n\n## Codes\n1. Train: https://github.com/ShuzhiLiu/UBC-OCEAN_5th_solution\n2. Submission Notebook: https://www.kaggle.com/code/liushuzhi/5thplacesolutionsubnotebook?scriptVersionId=158180788\n  1. Without EVA02: Public=0.61, Private=0.61 -> Selected for final sub\n  2. With EVA02: Public=0.60, Private=0.63 -> Not selected due to the lack of local CV\n\n\n## Acknowledgement\nWe would like to express our gratitude to the Kaggle support system and the emotional support of Rist inc.\n",
      "votes": 14
    },
    {
      "id": 2600834,
      "postDate": "2024-01-13T23:43:50.727Z",
      "content": "<p>Great job!</p>\n<p>Kaggle says the link to your submission notebook can not be found.</p>",
      "rawMarkdown": "Great job!\n\nKaggle says the link to your submission notebook can not be found.",
      "replies": [
        {
          "id": 2601366,
          "postDate": "2024-01-14T11:40:33.067Z",
          "content": "<p>Thank you! I forgot to set it to public, it should be accessible now.</p>",
          "rawMarkdown": "Thank you! I forgot to set it to public, it should be accessible now."
        }
      ]
    },
    {
      "id": 2592411,
      "postDate": "2024-01-08T14:41:58.083Z",
      "content": "<p>Congratulations <a href=\"https://www.kaggle.com/liushuzhi\" target=\"_blank\">@liushuzhi</a>, to achieve such a score without MIL. I have 2 questions: what stain normalization technique did you use and did you use all the tissue tiles from camelyon 16/17 as 'Others' or only the tumor tiles provided by the tumor masks? </p>",
      "rawMarkdown": "Congratulations @liushuzhi, to achieve such a score without MIL. I have 2 questions: what stain normalization technique did you use and did you use all the tissue tiles from camelyon 16/17 as 'Others' or only the tumor tiles provided by the tumor masks? ",
      "replies": [
        {
          "id": 2592966,
          "postDate": "2024-01-09T00:44:57.733Z",
          "content": "<p>Thank you!</p>\n<ol>\n<li>Stain normalization: <a href=\"https://github.com/EIDOSLAB/torchstain\" target=\"_blank\">https://github.com/EIDOSLAB/torchstain</a></li>\n<li>We only use the tumor tiles provided by the tumor masks from Camelyon as 'Other'</li>\n</ol>",
          "rawMarkdown": "Thank you!\n1. Stain normalization: https://github.com/EIDOSLAB/torchstain\n2. We only use the tumor tiles provided by the tumor masks from Camelyon as 'Other'"
        }
      ]
    }
  ],
  "comments": [
    {
      "id": 2600834,
      "author_name": "Russ Tokuyama",
      "author_url": "",
      "post_date": "2024-01-13T23:43:50.727000",
      "content": "<p>Great job!</p>\n<p>Kaggle says the link to your submission notebook can not be found.</p>",
      "votes": 0,
      "replies": [
        {
          "id": 2601366,
          "author_name": "sakaku",
          "author_url": "",
          "post_date": "2024-01-14T11:40:33.067000",
          "content": "<p>Thank you! I forgot to set it to public, it should be accessible now.</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 2592411,
      "author_name": "Raphaël",
      "author_url": "",
      "post_date": "2024-01-08T14:41:58.083000",
      "content": "<p>Congratulations <a href=\"https://www.kaggle.com/liushuzhi\" target=\"_blank\">@liushuzhi</a>, to achieve such a score without MIL. I have 2 questions: what stain normalization technique did you use and did you use all the tissue tiles from camelyon 16/17 as 'Others' or only the tumor tiles provided by the tumor masks? </p>",
      "votes": 0,
      "replies": [
        {
          "id": 2592966,
          "author_name": "sakaku",
          "author_url": "",
          "post_date": "2024-01-09T00:44:57.733000",
          "content": "<p>Thank you!</p>\n<ol>\n<li>Stain normalization: <a href=\"https://github.com/EIDOSLAB/torchstain\" target=\"_blank\">https://github.com/EIDOSLAB/torchstain</a></li>\n<li>We only use the tumor tiles provided by the tumor masks from Camelyon as 'Other'</li>\n</ol>",
          "votes": 0,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "2589884": "First of all, I would like to express my gratitude to the Kaggle staff for hosting this fantastic competition, as well as to the organizers at UBC. I also want to extend my appreciation to all the hardworking participants who dedicated themselves to this competition. Special thanks go to my teammates @kapenon and @tascj0 for their tireless efforts and insightful discussions.\n\n# Solution Overview\n## Summary of submitted final solution:\n1. Inference contains two stages:\n  1. Tile selection model -> Only WSI\n  2. Classification model -> WSI and TMA\n\n## Training details of segmentation model (mainly WSI, TMA is simply center-cropped):\n1. Tile classification helper model (Not used for inference)\n  1. Random cropped tiles at 1536x1536, background excluded\n  2. Augmentations:  Random horizontal and vertical flips, RandomRotation, RandAugment, RandomGrayscale, RandomErasing\n  3. WSI label as tile label\n  4. ConvNeXt-base\n  5. 6-class classification (Hubmap external data as “Other”)\n2. Segmentation helper model (Not used for inference)\n  1. Use host provided mask\n  2. Tumor binary classification\n  3. 2x magnification\n  4. SEResNeXt101 UNet\n3. Tile selection segmentation model (Used for inference)\n  1. Label generation\n     1. Inference all tiles using 1st step models and save predicted probabilities of WSI class\n     2. Inference all WSIs using 2nd step models\n     3. Create a heatmap at 2x magnification\n     4. Heatmap GT is 0.5 classification confidence + 0.5 tumor confidence\n  2. Training\n     1. SEResNeXt101 UNet\n\n\nGenerated heatmap example:![heatmaplabel](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F2369671%2Fcd379f02a28d0f794dedc644678c0d7f%2F61823.png?generation=1704564181303725&alt=media)\nInference example of segmentation model:![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F2369671%2F6e02f20e8a358c0af557f97e2af934fa%2F61823compressed.jpeg?generation=1704564312351461&alt=media)\n\n## Training details of tile classification model (Used for inference)\n  1. Random cropped tiles at 1536x1536, background excluded\n  2. Augmentations: Random horizontal and vertical flips, RandomRotation, RandAugment, RandomGrayscale, RandomErasing + StainNorm\n  3. WSI label as tile label\n  4. ConvNeXt-base, ConvNeXt-large, EVA (at 448x448)\n  5. 6-class classification (Hubmap, Camelyon16, Camelyon17, etc. tiles as “Other”)\n  6. Data mining:\n     1. Train 1st round\n     2. Predict all foreground tiles\n         1. Confidence <0.3 tiles are pseudo labeled “Other” in 2nd round\n         2. Confidence 0.3-0.6 tiles are ignored\n         3. Confidence >0.6 tiles are pseudo labeled as WSI label\n     3. Train 2nd round\n\n\n## Inference details:\n### WSI\n1. Tile selection\n  1. Predict heatmap at 2x magnification, top-5 confidence tiles are selected for classification\n2. Classification\n  1. Prediction 5 tiles and average predictions as WSI prediction\n  2. StainNorm as TTA\n3. There are some handling of large WSI images, refer to the submission notebook\n### TMA\n1. Center crop 1 3072x3072 tile\n2. Resize to 1536x1536\n3. Predict using the classification model\n4. StainNorm as TTA\n\n\n## Used External Datasets and their license:\n1. Hubmap: HuBMAP + HPA - Hacking the Human Body (https://www.kaggle.com/competitions/hubmap-organ-segmentation/overview)\n2. Camelyon16, 17: CC0 (https://www.google.com/url?q=https://camelyon17.grand-challenge.org/Data/&sa=D&source=docs&ust=1704419788737632&usg=AOvVaw1BeJOZcucbo9R0wgu5NK3q)\n3. ovarian-bevacizumab-response (only for WSI labeled as 'Other'): CC BY 4.0 (https://www.google.com/url?q=https://www.cancerimagingarchive.net/collection/ovarian-bevacizumab-response/&sa=D&source=docs&ust=1704419788739913&usg=AOvVaw0hQlYStI1_qpi7N_YIuHhY)\n\n## What worked\n1. Stain normalization.\n2. Data mining (pseudo labeling).\n3. Segmentation model for identifying valuable patches.\n4. Using external datasets as ‘Other’.\n5. ConvNext and EVA02 models.\n6. Multiscale ensemble.\n\n## Codes\n1. Train: https://github.com/ShuzhiLiu/UBC-OCEAN_5th_solution\n2. Submission Notebook: https://www.kaggle.com/code/liushuzhi/5thplacesolutionsubnotebook?scriptVersionId=158180788\n  1. Without EVA02: Public=0.61, Private=0.61 -> Selected for final sub\n  2. With EVA02: Public=0.60, Private=0.63 -> Not selected due to the lack of local CV\n\n\n## Acknowledgement\nWe would like to express our gratitude to the Kaggle support system and the emotional support of Rist inc.\n",
    "2600834": "Great job!\n\nKaggle says the link to your submission notebook can not be found.",
    "2592411": "Congratulations @liushuzhi, to achieve such a score without MIL. I have 2 questions: what stain normalization technique did you use and did you use all the tissue tiles from camelyon 16/17 as 'Others' or only the tumor tiles provided by the tumor masks? "
  }
}