{
  "id": 465425,
  "title": "28th solution",
  "url": "/competitions/UBC-OCEAN/discussion/465425",
  "author_name": "Jinho Park",
  "post_date": "2024-01-04T07:59:30.740000",
  "votes": 8,
  "comment_count": 0,
  "views": 0,
  "content": "<p>It was an interesting competition and I have learned many techniques and insights from others!<br>\nThanks to the competition host, Kaggle, and <a href=\"https://www.kaggle.com/jirkaborovec\" target=\"_blank\">@jirkaborovec</a> for nice train and inference code.</p>\n<h1>Overview of my approach</h1>\n<ul>\n<li>TMA images : center crop and tiling and inference with TMA model </li>\n<li>WSI images : tile the WSI thumbnail images and classify tumor area with tumor classifier model, and extract tiles from original WSI images and classify sub-types with TMA model </li>\n<li><a href=\"https://github.com/jinhopark8345/UBC-OCEAN-30th-place-solution\" target=\"_blank\">train/inference code</a> </li>\n</ul>\n<h1>TMA pipeline</h1>\n<ul>\n<li>Train <ul>\n<li>TMA model : extract tiles from WSI images with supplemental masks (crop size : 1024x1024 -&gt; resize 512x512) and fine-tune <a href=\"https://huggingface.co/timm/maxvit_tiny_tf_512.in1k\" target=\"_blank\">maxvit_tiny_tf_512.in1k</a><br>\n(For TMA model training, I used tiles with more than 70% cancerous tumor pixels and for validation, 30% ~ 70% tumor pixels)</li></ul></li>\n<li>Inference <ul>\n<li>cropped and resized TMA tiles (extract tiles from TMA images with 2048x2048 resolution, and resize them to 512x512, stride 256, zoom : x40-&gt;x10)</li>\n<li>inference with TMA model -&gt; each tile with predicted ovarian sub type</li>\n<li>majority votes and make final prediction</li></ul></li>\n</ul>\n<h1>WSI pipeline detail</h1>\n<ul>\n<li><p>Train</p>\n<ul>\n<li>Tumor classifier : TMA model but with WSI thumbnails and compressed WSI supplemental masks</li>\n<li>(TMA model : used the same TMA model from TMA pipeline)</li></ul></li>\n<li><p>Inference</p>\n<ul>\n<li>tile WSI thumbnail image</li>\n<li>inference with Tumor classifier -&gt; each thumbnail tile with tumor or non-tumor result<ul>\n<li>no tumor tiles -&gt; 'Other'</li>\n<li>tumor tiles -&gt; center crop and pass it to TMA model and do majority votes and make final prediction</li></ul></li></ul></li>\n</ul>\n<h1>Tried but didn't work</h1>\n<ul>\n<li><a href=\"https://github.com/khtao/StainNet\" target=\"_blank\">StainNet</a>  did not get better result than simple normalization</li>\n</ul>",
  "messages": [
    {
      "id": 2586435,
      "postDate": "2024-01-04T07:59:30.740Z",
      "content": "<p>It was an interesting competition and I have learned many techniques and insights from others!<br>\nThanks to the competition host, Kaggle, and <a href=\"https://www.kaggle.com/jirkaborovec\" target=\"_blank\">@jirkaborovec</a> for nice train and inference code.</p>\n<h1>Overview of my approach</h1>\n<ul>\n<li>TMA images : center crop and tiling and inference with TMA model </li>\n<li>WSI images : tile the WSI thumbnail images and classify tumor area with tumor classifier model, and extract tiles from original WSI images and classify sub-types with TMA model </li>\n<li><a href=\"https://github.com/jinhopark8345/UBC-OCEAN-30th-place-solution\" target=\"_blank\">train/inference code</a> </li>\n</ul>\n<h1>TMA pipeline</h1>\n<ul>\n<li>Train <ul>\n<li>TMA model : extract tiles from WSI images with supplemental masks (crop size : 1024x1024 -&gt; resize 512x512) and fine-tune <a href=\"https://huggingface.co/timm/maxvit_tiny_tf_512.in1k\" target=\"_blank\">maxvit_tiny_tf_512.in1k</a><br>\n(For TMA model training, I used tiles with more than 70% cancerous tumor pixels and for validation, 30% ~ 70% tumor pixels)</li></ul></li>\n<li>Inference <ul>\n<li>cropped and resized TMA tiles (extract tiles from TMA images with 2048x2048 resolution, and resize them to 512x512, stride 256, zoom : x40-&gt;x10)</li>\n<li>inference with TMA model -&gt; each tile with predicted ovarian sub type</li>\n<li>majority votes and make final prediction</li></ul></li>\n</ul>\n<h1>WSI pipeline detail</h1>\n<ul>\n<li><p>Train</p>\n<ul>\n<li>Tumor classifier : TMA model but with WSI thumbnails and compressed WSI supplemental masks</li>\n<li>(TMA model : used the same TMA model from TMA pipeline)</li></ul></li>\n<li><p>Inference</p>\n<ul>\n<li>tile WSI thumbnail image</li>\n<li>inference with Tumor classifier -&gt; each thumbnail tile with tumor or non-tumor result<ul>\n<li>no tumor tiles -&gt; 'Other'</li>\n<li>tumor tiles -&gt; center crop and pass it to TMA model and do majority votes and make final prediction</li></ul></li></ul></li>\n</ul>\n<h1>Tried but didn't work</h1>\n<ul>\n<li><a href=\"https://github.com/khtao/StainNet\" target=\"_blank\">StainNet</a>  did not get better result than simple normalization</li>\n</ul>",
      "rawMarkdown": "It was an interesting competition and I have learned many techniques and insights from others!\nThanks to the competition host, Kaggle, and @jirkaborovec for nice train and inference code.\n\n# Overview of my approach\n- TMA images : center crop and tiling and inference with TMA model \n- WSI images : tile the WSI thumbnail images and classify tumor area with tumor classifier model, and extract tiles from original WSI images and classify sub-types with TMA model \n- [train/inference code](https://github.com/jinhopark8345/UBC-OCEAN-30th-place-solution) \n\n# TMA pipeline\n- Train \n    - TMA model : extract tiles from WSI images with supplemental masks (crop size : 1024x1024 -> resize 512x512) and fine-tune [maxvit_tiny_tf_512.in1k](https://huggingface.co/timm/maxvit_tiny_tf_512.in1k)\n(For TMA model training, I used tiles with more than 70% cancerous tumor pixels and for validation, 30% ~ 70% tumor pixels)\n- Inference \n    - cropped and resized TMA tiles (extract tiles from TMA images with 2048x2048 resolution, and resize them to 512x512, stride 256, zoom : x40->x10)\n    - inference with TMA model -> each tile with predicted ovarian sub type\n    - majority votes and make final prediction\n\n# WSI pipeline detail\n- Train\n    - Tumor classifier : TMA model but with WSI thumbnails and compressed WSI supplemental masks\n    - (TMA model : used the same TMA model from TMA pipeline)\n\n- Inference\n    - tile WSI thumbnail image\n    - inference with Tumor classifier -> each thumbnail tile with tumor or non-tumor result\n        - no tumor tiles -> 'Other'\n        - tumor tiles -> center crop and pass it to TMA model and do majority votes and make final prediction\n\n# Tried but didn't work\n- [StainNet](https://github.com/khtao/StainNet)  did not get better result than simple normalization",
      "votes": 8
    }
  ],
  "comments": [],
  "raw_markdown_by_id": {
    "2586435": "It was an interesting competition and I have learned many techniques and insights from others!\nThanks to the competition host, Kaggle, and @jirkaborovec for nice train and inference code.\n\n# Overview of my approach\n- TMA images : center crop and tiling and inference with TMA model \n- WSI images : tile the WSI thumbnail images and classify tumor area with tumor classifier model, and extract tiles from original WSI images and classify sub-types with TMA model \n- [train/inference code](https://github.com/jinhopark8345/UBC-OCEAN-30th-place-solution) \n\n# TMA pipeline\n- Train \n    - TMA model : extract tiles from WSI images with supplemental masks (crop size : 1024x1024 -> resize 512x512) and fine-tune [maxvit_tiny_tf_512.in1k](https://huggingface.co/timm/maxvit_tiny_tf_512.in1k)\n(For TMA model training, I used tiles with more than 70% cancerous tumor pixels and for validation, 30% ~ 70% tumor pixels)\n- Inference \n    - cropped and resized TMA tiles (extract tiles from TMA images with 2048x2048 resolution, and resize them to 512x512, stride 256, zoom : x40->x10)\n    - inference with TMA model -> each tile with predicted ovarian sub type\n    - majority votes and make final prediction\n\n# WSI pipeline detail\n- Train\n    - Tumor classifier : TMA model but with WSI thumbnails and compressed WSI supplemental masks\n    - (TMA model : used the same TMA model from TMA pipeline)\n\n- Inference\n    - tile WSI thumbnail image\n    - inference with Tumor classifier -> each thumbnail tile with tumor or non-tumor result\n        - no tumor tiles -> 'Other'\n        - tumor tiles -> center crop and pass it to TMA model and do majority votes and make final prediction\n\n# Tried but didn't work\n- [StainNet](https://github.com/khtao/StainNet)  did not get better result than simple normalization"
  }
}