{
  "id": 332941,
  "title": "[ placeholder  LB 0.81 single fold, coat-parallel-small at 1536 ] my experiment results",
  "url": "/competitions/hubmap-organ-segmentation/discussion/332941",
  "author_name": "hengck23",
  "post_date": "2022-06-24T03:28:40.535000",
  "votes": 259,
  "comment_count": 341,
  "views": 0,
  "content": "<p>\"All experiment results are only made possible by the Z8 by HP workstation with 2x A6000 48GB Nvidia GPU cards. With fast and large GPU cards, you can enjoy designing models and sleep early without worrying about out-of-memory errors :) \"</p>\n<h2>ㅤ ㅤ</h2>\n<p>ㅤ ㅤ<br>\nThis is work in progress.  results will be updated as and when experiments  complete !!! <br>\nIt has two parts:<br>\n<strong>1) benchmaking current solutions</strong><br>\n<img src=\"https://i.ibb.co/6nf8dDD/Picture1.png\" alt=\"https://i.ibb.co/6nf8dDD/Picture1.png\"><br>\n<img src=\"https://i.ibb.co/JHdsCw0/Selection-081.png\" alt=\"https://i.ibb.co/JHdsCw0/Selection-081.png\"><br>\nㅤ ㅤ<br>\n<strong>2) progress report of my method (which hopefully will work)</strong><br>\nㅤ ㅤ<br>\nmy approach follows the NLP method:</p>\n<ol>\n<li>collect many stains of PAS, H&amp;E, DAB/H of the target organs (external data)</li>\n<li>select a image transformer model for segmentation</li>\n<li>pretrain with unsupervised learning (e.g. masked patch prediction, aka 2d image token)</li>\n<li>finetune with few-shot supervised learning (kaggle train data + some hand-label data (mainly for  DAB/H  stain) )<br>\nㅤ ㅤ</li>\n<li>lower priority:<br>\nif I got time, maybe I can explore using pretrain transformer + GAN/diffusion model to generate more data.</li>\n</ol>\n<h2>ㅤ ㅤ</h2>\n<p>reference paper:<br>\n[1] BEiT: BERT Pre-Training of Image Transformers<br>\n<a href=\"https://openreview.net/pdf?id=p-BhZSz59o4\" target=\"_blank\">https://openreview.net/pdf?id=p-BhZSz59o4</a><br>\n<a href=\"https://www.bilibili.com/video/BV1PF411z7mf/\" target=\"_blank\">https://www.bilibili.com/video/BV1PF411z7mf/</a><br>\nㅤ<br>\n[2] Self-Supervised Pre-Training of Swin Transformers for 3D Medical Image Analysis<br>\n<a href=\"https://arxiv.org/pdf/2111.14791.pdf\" target=\"_blank\">https://arxiv.org/pdf/2111.14791.pdf</a></p>",
  "messages": [
    {
      "id": 1831209,
      "postDate": "2022-06-24T03:28:40.537Z",
      "content": "<p>\"All experiment results are only made possible by the Z8 by HP workstation with 2x A6000 48GB Nvidia GPU cards. With fast and large GPU cards, you can enjoy designing models and sleep early without worrying about out-of-memory errors :) \"</p>\n<h2>ㅤ ㅤ</h2>\n<p>ㅤ ㅤ<br>\nThis is work in progress.  results will be updated as and when experiments  complete !!! <br>\nIt has two parts:<br>\n<strong>1) benchmaking current solutions</strong><br>\n<img src=\"https://i.ibb.co/6nf8dDD/Picture1.png\" alt=\"https://i.ibb.co/6nf8dDD/Picture1.png\"><br>\n<img src=\"https://i.ibb.co/JHdsCw0/Selection-081.png\" alt=\"https://i.ibb.co/JHdsCw0/Selection-081.png\"><br>\nㅤ ㅤ<br>\n<strong>2) progress report of my method (which hopefully will work)</strong><br>\nㅤ ㅤ<br>\nmy approach follows the NLP method:</p>\n<ol>\n<li>collect many stains of PAS, H&amp;E, DAB/H of the target organs (external data)</li>\n<li>select a image transformer model for segmentation</li>\n<li>pretrain with unsupervised learning (e.g. masked patch prediction, aka 2d image token)</li>\n<li>finetune with few-shot supervised learning (kaggle train data + some hand-label data (mainly for  DAB/H  stain) )<br>\nㅤ ㅤ</li>\n<li>lower priority:<br>\nif I got time, maybe I can explore using pretrain transformer + GAN/diffusion model to generate more data.</li>\n</ol>\n<h2>ㅤ ㅤ</h2>\n<p>reference paper:<br>\n[1] BEiT: BERT Pre-Training of Image Transformers<br>\n<a href=\"https://openreview.net/pdf?id=p-BhZSz59o4\" target=\"_blank\">https://openreview.net/pdf?id=p-BhZSz59o4</a><br>\n<a href=\"https://www.bilibili.com/video/BV1PF411z7mf/\" target=\"_blank\">https://www.bilibili.com/video/BV1PF411z7mf/</a><br>\nㅤ<br>\n[2] Self-Supervised Pre-Training of Swin Transformers for 3D Medical Image Analysis<br>\n<a href=\"https://arxiv.org/pdf/2111.14791.pdf\" target=\"_blank\">https://arxiv.org/pdf/2111.14791.pdf</a></p>",
      "rawMarkdown": "\n\"All experiment results are only made possible by the Z8 by HP workstation with 2x A6000 48GB Nvidia GPU cards. With fast and large GPU cards, you can enjoy designing models and sleep early without worrying about out-of-memory errors :) \"\n\nㅤ ㅤ\n-------\n\nㅤ ㅤ\n\nThis is work in progress.  results will be updated as and when experiments  complete !!! \nIt has two parts:\n\n**1) benchmaking current solutions**\n\n![https://i.ibb.co/6nf8dDD/Picture1.png](https://i.ibb.co/6nf8dDD/Picture1.png)\n![https://i.ibb.co/JHdsCw0/Selection-081.png](https://i.ibb.co/JHdsCw0/Selection-081.png)\n\nㅤ ㅤ\n\n**2) progress report of my method (which hopefully will work)**\nㅤ ㅤ\n\n\n\nmy approach follows the NLP method:\n1. collect many stains of PAS, H&E, DAB/H of the target organs (external data)\n2. select a image transformer model for segmentation\n3. pretrain with unsupervised learning (e.g. masked patch prediction, aka 2d image token)\n4. finetune with few-shot supervised learning (kaggle train data + some hand-label data (mainly for  DAB/H  stain) )\nㅤ ㅤ\n5. lower priority:\n\nif I got time, maybe I can explore using pretrain transformer + GAN/diffusion model to generate more data.\nㅤ ㅤ\n\n---\n\n\nreference paper:\n\n[1] BEiT: BERT Pre-Training of Image Transformers\nhttps://openreview.net/pdf?id=p-BhZSz59o4\nhttps://www.bilibili.com/video/BV1PF411z7mf/\n ㅤ\n\n[2] Self-Supervised Pre-Training of Swin Transformers for 3D Medical Image Analysis\nhttps://arxiv.org/pdf/2111.14791.pdf\n\n\n",
      "votes": 259
    },
    {
      "id": 1871062,
      "postDate": "2022-07-26T03:58:40.490Z",
      "content": "<p>surprise!!!!</p>\n<p>the winner is 5-fold segformer-mit-b2 with CV=0.787, LB=0.78.<br>\nThe model size is only 99mb.</p>\n<p>I haven't investigate the reasons, but I think it could be:</p>\n<ul>\n<li>use of mix upsample (see discussion below)</li>\n<li>I use many, many iterations for training  … it don't over fit up to 400 epoch</li>\n<li>swa over a larger epoch</li>\n<li>MIT uses no positional encoding at all (no absolute or relative)</li>\n<li>MIT model I used is not complex (see imagenet and ADEK20 performance)</li>\n</ul>",
      "rawMarkdown": "surprise!!!!\n\nthe winner is 5-fold segformer-mit-b2 with CV=0.787, LB=0.78.\nThe model size is only 99mb.\n\nI haven't investigate the reasons, but I think it could be:\n- use of mix upsample (see discussion below)\n- I use many, many iterations for training  ... it don't over fit up to 400 epoch\n- swa over a larger epoch\n- MIT uses no positional encoding at all (no absolute or relative)\n- MIT model I used is not complex (see imagenet and ADEK20 performance)",
      "votes": 11,
      "replies": [
        {
          "id": 1871219,
          "postDate": "2022-07-26T06:36:31.403Z",
          "content": "<p>Good results, I'm also trying segformer without pretrained weights from imagenet, and fold0 cv=0.76. Did you use pretrained weights?</p>",
          "rawMarkdown": "Good results, I'm also trying segformer without pretrained weights from imagenet, and fold0 cv=0.76. Did you use pretrained weights?",
          "votes": 2
        },
        {
          "id": 1871222,
          "postDate": "2022-07-26T06:41:57.667Z",
          "content": "<p>i use pretrained weight. <br>\ni just do another probe: Hubmap-LB is an amazing 0.55 (normalised to 0.762142857)</p>",
          "rawMarkdown": "i use pretrained weight. \ni just do another probe: Hubmap-LB is an amazing 0.55 (normalised to 0.762142857)",
          "votes": 1
        },
        {
          "id": 1872945,
          "postDate": "2022-07-27T10:46:31.590Z",
          "content": "<p>more surprise!!!<br>\nsingle-fold (fold-3) segformer-mit-b2 alone is already LB 0.79 (not low 0.79+  but a good 0.79+)</p>\n<p>breakdown:</p>\n<ul>\n<li>Hubmap-LB 0.55+(normalised to 0.762142857  to    0.774614286)</li>\n<li>HPA-LB 0.23+ ~0.24+(normalised to 0.826296296to 0.89456)</li>\n</ul>\n<p>local cv HPA = 0.783965</p>\n<p>note that score on submission page is trauncated (?) and not rounded</p>\n<h2><img src=\"https://i.ibb.co/QCVy0yR/Selection-094.png\" alt=\"https://i.ibb.co/QCVy0yR/Selection-094.png\"></h2>\n<p>either:</p>\n<ul>\n<li>segformer-mit-b2 is good at generalising HPA</li>\n<li>HPA fold-3 train dataset has duplicates with kaggle public public test (e.g. tissue slice from same person)</li>\n</ul>",
          "rawMarkdown": "more surprise!!!\nsingle-fold (fold-3) segformer-mit-b2 alone is already LB 0.79 (not low 0.79+  but a good 0.79+)\n\nbreakdown:\n- Hubmap-LB 0.55+(normalised to 0.762142857  to\t0.774614286)\n- HPA-LB 0.23+ ~0.24+(normalised to 0.826296296to 0.89456)\n\nlocal cv HPA = 0.783965\n\nnote that score on submission page is trauncated (?) and not rounded\n\n![https://i.ibb.co/QCVy0yR/Selection-094.png](https://i.ibb.co/QCVy0yR/Selection-094.png)\n---\n\neither:\n- segformer-mit-b2 is good at generalising HPA\n- HPA fold-3 train dataset has duplicates with kaggle public public test (e.g. tissue slice from same person)",
          "votes": 7
        },
        {
          "id": 1873062,
          "postDate": "2022-07-27T12:29:39.310Z",
          "content": "<p><a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a> I am trying with segformer, I am not sure that I am training correct, I don't have much time for two weeks to test but I am getting values such as:<br>\nMean_iou: 0.7336344062222001<br>\nMean accuracy: 0.7336344062222001</p>\n<p>in epoch 1 ! using 256 tiles and I am not sure this is normal or not,  I am using a demo starting code which is not complex !! </p>",
          "rawMarkdown": "@hengck23 I am trying with segformer, I am not sure that I am training correct, I don't have much time for two weeks to test but I am getting values such as:\nMean_iou: 0.7336344062222001\nMean accuracy: 0.7336344062222001\n\nin epoch 1 ! using 256 tiles and I am not sure this is normal or not,  I am using a demo starting code which is not complex !! ",
          "votes": 1
        },
        {
          "id": 1873065,
          "postDate": "2022-07-27T12:31:51.163Z",
          "content": "<p>I smell something wrong, I just modified the basic training code with this competition dataset and rewrote the evaluation process. </p>",
          "rawMarkdown": "I smell something wrong, I just modified the basic training code with this competition dataset and rewrote the evaluation process. ",
          "votes": 1
        },
        {
          "id": 1873232,
          "postDate": "2022-07-27T13:54:23.303Z",
          "content": "<p><a href=\"https://www.kaggle.com/asalhi\" target=\"_blank\">@asalhi</a>   I don't have much time for two weeks to test but I am getting values such as:\"</p>\n<p>I am not sure if 256 tile is good enough. i trained with images resized from 3000 to 768.<br>\nthere is a couple of tricks that may be important:</p>\n<ul>\n<li>use of mix upsampling</li>\n<li>the aux loss for regularisation is at the encoder output.</li>\n</ul>\n<p>please see the new added folder at \"segformer-mit-b2\", \"train-log-segformer-mit-b2\"<br>\n<a href=\"https://www.kaggle.com/datasets/hengck23/hubmap-discuss-00\" target=\"_blank\">https://www.kaggle.com/datasets/hengck23/hubmap-discuss-00</a></p>",
          "rawMarkdown": "@asalhi   I don't have much time for two weeks to test but I am getting values such as:\"\n\nI am not sure if 256 tile is good enough. i trained with images resized from 3000 to 768.\nthere is a couple of tricks that may be important:\n- use of mix upsampling\n- the aux loss for regularisation is at the encoder output.\n\nplease see the new added folder at \"segformer-mit-b2\", \"train-log-segformer-mit-b2\"\nhttps://www.kaggle.com/datasets/hengck23/hubmap-discuss-00",
          "votes": 4
        },
        {
          "id": 1873357,
          "postDate": "2022-07-27T14:42:28.987Z",
          "content": "<p>Thanks so much for sharing your knowledge. As always very valuable.</p>\n<p>One question I have is about the license to use your model. On SegFormer's Github it says use is for non-commercial only. Wouldn't that conflict with the competition license (open source) in case of winning?</p>",
          "rawMarkdown": "Thanks so much for sharing your knowledge. As always very valuable.\n\nOne question I have is about the license to use your model. On SegFormer's Github it says use is for non-commercial only. Wouldn't that conflict with the competition license (open source) in case of winning?",
          "votes": 1
        },
        {
          "id": 1873474,
          "postDate": "2022-07-27T16:17:55.387Z",
          "content": "<p><a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a> hi I want ask you some question, first congratulations on your good scores!</p>\n<ul>\n<li>I saw your kaggle dataset\"hubmap-discuss-00\" the mean, std are [0.485, 0.456, 0.406] and [0.229, 0.224, 0.225] respectively, how did you decide the normalization value? by statistics the RGB value or what?</li>\n<li>did you do any preprocessing to original images?<br>\nthanks!👍</li>\n</ul>",
          "rawMarkdown": "@hengck23 hi I want ask you some question, first congratulations on your good scores!\n- I saw your kaggle dataset\"hubmap-discuss-00\" the mean, std are [0.485, 0.456, 0.406] and [0.229, 0.224, 0.225] respectively, how did you decide the normalization value? by statistics the RGB value or what?\n- did you do any preprocessing to original images?\nthanks!👍"
        },
        {
          "id": 1873487,
          "postDate": "2022-07-27T16:26:37.367Z",
          "content": "<p>\"I am not sure if 256 tile is good enough. i trained with images resized from 3000 to 768.\"</p>\n<p>So you didn't use tiles? Just resizing to 768?</p>",
          "rawMarkdown": "\"I am not sure if 256 tile is good enough. i trained with images resized from 3000 to 768.\"\n\nSo you didn't use tiles? Just resizing to 768?"
        },
        {
          "id": 1873772,
          "postDate": "2022-07-27T22:32:22.497Z",
          "content": "<p><a href=\"https://ibb.co/VvCHv1M\"><img src=\"https://i.ibb.co/YtdDtCf/Selection-090.png\" alt=\"Selection-090\"></a></p>",
          "rawMarkdown": "<a href=\"https://ibb.co/VvCHv1M\"><img src=\"https://i.ibb.co/YtdDtCf/Selection-090.png\" alt=\"Selection-090\" border=\"0\"></a>"
        },
        {
          "id": 1873790,
          "postDate": "2022-07-27T22:51:53.393Z",
          "content": "<p><a href=\"https://ibb.co/hZSvg6h\"><img src=\"https://i.ibb.co/vQS8cFg/Selection-093.png\" alt=\"Selection-093\"></a></p>",
          "rawMarkdown": "<a href=\"https://ibb.co/hZSvg6h\"><img src=\"https://i.ibb.co/vQS8cFg/Selection-093.png\" alt=\"Selection-093\" border=\"0\"></a>",
          "votes": 2
        },
        {
          "id": 1874218,
          "postDate": "2022-07-28T06:25:10.993Z",
          "content": "<p>thanks for sharing. May I ask:<br>\nwhat makes you use 'aux2_loss' alone instead of using 4 'aux[%d]_loss' outputs ?  <br>\nno lr schduler applied?</p>",
          "rawMarkdown": "thanks for sharing. May I ask:\nwhat makes you use 'aux2_loss' alone instead of using 4 'aux[%d]_loss' outputs ?  \nno lr schduler applied?"
        },
        {
          "id": 1874311,
          "postDate": "2022-07-28T07:37:28.713Z",
          "content": "<p>by experiment results. it is trial and error</p>",
          "rawMarkdown": "by experiment results. it is trial and error"
        },
        {
          "id": 1874381,
          "postDate": "2022-07-28T08:40:46.413Z",
          "content": "<p><a href=\"https://www.kaggle.com/robsonsan\" target=\"_blank\">@robsonsan</a> \"Wouldn't that conflict with the competition license (open source) in case of winning?\"</p>\n<p>thanks for pointing that out. i would consider that  a month later (to see if I am still a prize contender).<br>\nperformance is limited by data and not method. so segformer can be easily replaced. i just have to investigate the results for its good performance :)</p>\n<p>on a side note:<br>\n<img src=\"https://i.ibb.co/fSSJx0q/Selection-096.png\" alt=\"https://i.ibb.co/fSSJx0q/Selection-096.png\"></p>",
          "rawMarkdown": "@robsonsan \"Wouldn't that conflict with the competition license (open source) in case of winning?\"\n\nthanks for pointing that out. i would consider that  a month later (to see if I am still a prize contender).\nperformance is limited by data and not method. so segformer can be easily replaced. i just have to investigate the results for its good performance :)\n\non a side note:\n![https://i.ibb.co/fSSJx0q/Selection-096.png](https://i.ibb.co/fSSJx0q/Selection-096.png)",
          "votes": 2
        },
        {
          "id": 1874604,
          "postDate": "2022-07-28T11:30:49.470Z",
          "content": "<p>did another experiment:</p>\n<p>swin-v1-small + segformer (single fold only , fold 3)<br>\nLB (0.76+)<br>\nbreakdown:<br>\nLB-Humap (0.54+)<br>\nLB-HPA (0.76+) - (0.54+) = (0.22+) to (0.23+)</p>\n<p>local cv:<br>\nall    0.787098<br>\nkidney    0.951417<br>\nprostate    0.815064<br>\nlargeintestine    0.903701<br>\nspleen    0.852030<br>\nlung    0.230929</p>",
          "rawMarkdown": "did another experiment:\n\nswin-v1-small + segformer (single fold only , fold 3)\nLB (0.76+)\nbreakdown:\nLB-Humap (0.54+)\nLB-HPA (0.76+) - (0.54+) = (0.22+) to (0.23+)\n\n\nlocal cv:\nall\t0.787098\nkidney\t0.951417\nprostate\t0.815064\nlargeintestine\t0.903701\nspleen\t0.852030\nlung\t0.230929",
          "votes": 2
        },
        {
          "id": 1874614,
          "postDate": "2022-07-28T11:40:22.837Z",
          "content": "<p>Lung segmentation is a challenge …</p>",
          "rawMarkdown": "Lung segmentation is a challenge ..."
        },
        {
          "id": 1874624,
          "postDate": "2022-07-28T11:46:43.687Z",
          "content": "<p>\"Lung segmentation\" …</p>\n<p>this one you probably have to use some tricks.</p>\n<p>e.g.</p>\n<ul>\n<li><p>you can check the size of sizes of the FTU from the json files. i suspect maybe you can can use size to filter the results, etc. but I am not sure.</p></li>\n<li><p>you can relabel the train image to include </p></li>\n<li><p>it is mentioned \"there is at least one FTU per image\", I haven't probe the missing rate in LB set</p></li>\n</ul>",
          "rawMarkdown": "\"Lung segmentation\" ...\n\nthis one you probably have to use some tricks.\n\ne.g.\n- you can check the size of sizes of the FTU from the json files. i suspect maybe you can can use size to filter the results, etc. but I am not sure.\n\n- you can relabel the train image to include \n\n- it is mentioned \"there is at least one FTU per image\", I haven't probe the missing rate in LB set",
          "votes": 1
        },
        {
          "id": 1874631,
          "postDate": "2022-07-28T11:57:40.210Z",
          "content": "<p>Thanks for the tips. I'm also working on some other hypotheses to see if my models can generalize to lung tissue. For now I'm avoiding using external data</p>",
          "rawMarkdown": "Thanks for the tips. I'm also working on some other hypotheses to see if my models can generalize to lung tissue. For now I'm avoiding using external data"
        },
        {
          "id": 1894011,
          "postDate": "2022-08-11T08:10:50.383Z",
          "content": "<p><a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a> FYI - I think the license was changed recently <br>\n <img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3641623%2Fbc1eca113e4a5d5db2913330d3028b71%2Fseg_lice.png?generation=1660205517627981&amp;alt=media\" alt=\"\"></p>",
          "rawMarkdown": "@hengck23 FYI - I think the license was changed recently \n ![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3641623%2Fbc1eca113e4a5d5db2913330d3028b71%2Fseg_lice.png?generation=1660205517627981&alt=media)"
        },
        {
          "id": 1894038,
          "postDate": "2022-08-11T08:31:21.240Z",
          "content": "<p>oops, someone discovered our post</p>",
          "rawMarkdown": "oops, someone discovered our post",
          "votes": 1
        },
        {
          "id": 1894356,
          "postDate": "2022-08-11T12:43:21.980Z",
          "content": "<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F437986%2F15e768421588378942b42f3512631f0d%2FiShot2022-08-11%2020.42.43.jpg?generation=1660221783814291&amp;alt=media\" alt=\"\"></p>\n<p>finally</p>",
          "rawMarkdown": "![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F437986%2F15e768421588378942b42f3512631f0d%2FiShot2022-08-11%2020.42.43.jpg?generation=1660221783814291&alt=media)\n\nfinally"
        },
        {
          "id": 1911216,
          "postDate": "2022-08-24T01:18:54.190Z",
          "content": "<p>Can we use segformer or not? I\"m not an expert in License issues.</p>",
          "rawMarkdown": "Can we use segformer or not? I\"m not an expert in License issues.",
          "votes": 2
        },
        {
          "id": 1911580,
          "postDate": "2022-08-24T07:28:48.237Z",
          "content": "<p>I think we can use Segformer unless we claim to the prize. </p>",
          "rawMarkdown": "I think we can use Segformer unless we claim to the prize. ~~@AddisonHoward, can you verify this license issue?~~"
        },
        {
          "id": 1912166,
          "postDate": "2022-08-24T14:53:48.993Z",
          "content": "<p><a href=\"https://www.kaggle.com/cheulkay\" target=\"_blank\">@cheulkay</a> Thanks for your clarification</p>",
          "rawMarkdown": "@cheulkay Thanks for your clarification"
        },
        {
          "id": 1934514,
          "postDate": "2022-09-11T12:20:55.087Z",
          "content": "<p>how do I know overffiting in training?</p>",
          "rawMarkdown": "how do I know overffiting in training?"
        }
      ]
    },
    {
      "id": 1832268,
      "postDate": "2022-06-24T22:03:05.767Z",
      "content": "<p>how many hubmap images are there in the test set:</p>\n<p><img src=\"https://i.ibb.co/P5hNDrb/Selection-029.png\" alt=\"https://i.ibb.co/P5hNDrb/Selection-029.png\"></p>\n<p>we know:</p>\n<ul>\n<li>public test : 55% of the test data, private test = 45%</li>\n<li>roughly 550 test images </li>\n<li>public test : Hubmap+HPA, private test = Hubmap only</li>\n</ul>\n<pre><code>num_hubmap = len(test_df[test_df.data_source=='Hubmap'])\nnum_hpa = len(test_df[test_df.data_source=='HPA'])\nnum = len(test_df)\n\nif num_hubmap &gt; int(0.90*num):\n    submit_df.to_csv('submission.csv',index=False)\n</code></pre>\n<hr>\n<p>smarter way to probe without wasting submission slot</p>\n<pre><code># some task which you already know the notebook running time\n\nsleep (num_hubmap*10_min)\n\n#you can deduce value of num_hubmap from additional running time\n</code></pre>\n<pre><code># some  monotnic function that you already know\n    if (num&gt;   0) and (num&lt;=545): threshold =-1  #lb 0.3+  (submit all filled rle)\n    if (num&gt;=546) and (num&lt;=546): threshold =0.3 #lb 0.56\n    if (num&gt;=547) and (num&lt;=547): threshold =0.4 #lb 0.54\n    if (num&gt;=548) and (num&lt;=548): threshold =0.5 #lb 0.52\n    if (num&gt;=549) and (num&lt;1000): threshold =100 #lb 0.00 (submit all empty rle)\n\n\n#you can deduce value of num  from lbscore\n</code></pre>",
      "rawMarkdown": "how many hubmap images are there in the test set:\n\n![https://i.ibb.co/P5hNDrb/Selection-029.png](https://i.ibb.co/P5hNDrb/Selection-029.png)\n\n\nwe know:\n - public test : 55% of the test data, private test = 45%\n - roughly 550 test images \n - public test : Hubmap+HPA, private test = Hubmap only\n\n```\n\nnum_hubmap = len(test_df[test_df.data_source=='Hubmap'])\nnum_hpa = len(test_df[test_df.data_source=='HPA'])\nnum = len(test_df)\n\nif num_hubmap > int(0.90*num):\n    submit_df.to_csv('submission.csv',index=False)\n\n```\n\n---\n\nsmarter way to probe without wasting submission slot\n\n```\n# some task which you already know the notebook running time\n\nsleep (num_hubmap*10_min)\n\n#you can deduce value of num_hubmap from additional running time\n```\n\n```\n# some  monotnic function that you already know\n    if (num>   0) and (num<=545): threshold =-1  #lb 0.3+  (submit all filled rle)\n    if (num>=546) and (num<=546): threshold =0.3 #lb 0.56\n    if (num>=547) and (num<=547): threshold =0.4 #lb 0.54\n    if (num>=548) and (num<=548): threshold =0.5 #lb 0.52\n    if (num>=549) and (num<1000): threshold =100 #lb 0.00 (submit all empty rle)\n\n \n#you can deduce value of num  from lbscore\n```",
      "votes": 12,
      "replies": [
        {
          "id": 1838869,
          "postDate": "2022-06-30T22:54:51.847Z",
          "content": "<p>\"roughly 550 test images \"<br>\nthere are exactly 529 test images, of which Hubmap=448, HPA=81</p>\n<p>public test : 55% of the test data()<br>\n291 --&gt; Hubmap=210,  HPA=81</p>\n<p>private test = 45%<br>\n238--&gt; Hubmap= 238</p>",
          "rawMarkdown": "\"roughly 550 test images \"\nthere are exactly 529 test images, of which Hubmap=448, HPA=81\n\npublic test : 55% of the test data()\n291 --> Hubmap=210,  HPA=81\n\nprivate test = 45%\n238--> Hubmap= 238",
          "votes": 8
        }
      ]
    },
    {
      "id": 1930370,
      "postDate": "2022-09-07T19:31:14.170Z",
      "content": "<p>if you like my work and would like to learn how to apply 3d transformer for 3d ct scan classification, please follow<br>\n<a href=\"https://www.kaggle.com/competitions/rsna-2022-cervical-spine-fracture-detection/discussion/350859\" target=\"_blank\">https://www.kaggle.com/competitions/rsna-2022-cervical-spine-fracture-detection/discussion/350859</a></p>\n<p>i will modify many of the 2d vit used here (e.g. mix-trasnformer, PVTv2,coat) for 3d</p>",
      "rawMarkdown": "if you like my work and would like to learn how to apply 3d transformer for 3d ct scan classification, please follow\nhttps://www.kaggle.com/competitions/rsna-2022-cervical-spine-fracture-detection/discussion/350859\n\ni will modify many of the 2d vit used here (e.g. mix-trasnformer, PVTv2,coat) for 3d",
      "votes": 7,
      "replies": [
        {
          "id": 1952891,
          "postDate": "2022-09-24T03:59:53.573Z",
          "content": "<p>besides the above, here is another competition i am taking part:</p>\n<p><a href=\"https://www.kaggle.com/competitions/novozymes-enzyme-stability-prediction/discussion/354631\" target=\"_blank\">https://www.kaggle.com/competitions/novozymes-enzyme-stability-prediction/discussion/354631</a></p>",
          "rawMarkdown": "besides the above, here is another competition i am taking part:\n\nhttps://www.kaggle.com/competitions/novozymes-enzyme-stability-prediction/discussion/354631"
        }
      ]
    },
    {
      "id": 1894487,
      "postDate": "2022-08-11T14:29:17.767Z",
      "content": "<p>Thanks for your wonderful sharing as always 😃.  I have just tried your upernet with swin-tiny and got 0.79 cv, but the lb score is only 0.61. Do I miss anything important? <a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a> </p>",
      "rawMarkdown": "Thanks for your wonderful sharing as always 😃.  I have just tried your upernet with swin-tiny and got 0.79 cv, but the lb score is only 0.61. Do I miss anything important? @hengck23 ",
      "votes": 7
    },
    {
      "id": 1869702,
      "postDate": "2022-07-25T01:42:12.997Z",
      "content": "<p>i put code for upernet + swin transformer v2 for variable image size input at: <br>\n<a href=\"https://www.kaggle.com/code/hengck23/lb-0-75-variable-size-swin-transformer-v1-and-v2\" target=\"_blank\">https://www.kaggle.com/code/hengck23/lb-0-75-variable-size-swin-transformer-v1-and-v2</a></p>\n<p>this is beta release. using provided upernet+swin v1 (or v2) will get you about LB 0.75 (15 min submission time).<br>\nplan:</p>\n<ul>\n<li> [done]</li>\n<li>modification to use UN-MAE, uniform masked autoencoder, for SSL pertaining with unlabelled data<br>\n(<a href=\"https://github.com/implus/UM-MAE\" target=\"_blank\">https://github.com/implus/UM-MAE</a>)</li>\n</ul>\n<p>it would be faster for me if anyone can upload and share their downloaded images from HPA, etc</p>",
      "rawMarkdown": "i put code for upernet + swin transformer v2 for variable image size input at: \nhttps://www.kaggle.com/code/hengck23/lb-0-75-variable-size-swin-transformer-v1-and-v2\n\nthis is beta release. using provided upernet+swin v1 (or v2) will get you about LB 0.75 (15 min submission time).\nplan:\n- ~~ release of my training log, hyperprameters, experimental results~~ [done]\n- modification to use UN-MAE, uniform masked autoencoder, for SSL pertaining with unlabelled data\n(https://github.com/implus/UM-MAE)\n\nit would be faster for me if anyone can upload and share their downloaded images from HPA, etc",
      "votes": 7,
      "replies": [
        {
          "id": 1870350,
          "postDate": "2022-07-25T13:44:39.003Z",
          "content": "<p>Do you train with whole images or tiles?</p>",
          "rawMarkdown": "Do you train with whole images or tiles?\n",
          "votes": 2
        },
        {
          "id": 1877490,
          "postDate": "2022-07-30T17:32:41.863Z",
          "content": "<p>👋, <a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a> , </p>\n<ul>\n<li>Resize from 3000 to 768. </li>\n<li>Use external data. <br>\nAre these two steps get swin v1/v2 a LB score of 0.75?</li>\n</ul>",
          "rawMarkdown": "👋, @hengck23 , \n* Resize from 3000 to 768. \n* Use external data. \nAre these two steps get swin v1/v2 a LB score of 0.75?"
        },
        {
          "id": 1877504,
          "postDate": "2022-07-30T17:51:09.310Z",
          "content": "<p>no need to use external data. just check the code I posted</p>",
          "rawMarkdown": "no need to use external data. just check the code I posted"
        },
        {
          "id": 1877513,
          "postDate": "2022-07-30T18:11:22.927Z",
          "content": "<p>I've tried tiled images with ConvNext, getting a LB score of 0.71 by 5 fold ensemble🙉, but oof is slightly better than your experiments, I'll try whole images later!</p>",
          "rawMarkdown": "I've tried tiled images with ConvNext, getting a LB score of 0.71 by 5 fold ensemble🙉, but oof is slightly better than your experiments, I'll try whole images later!",
          "votes": 1
        },
        {
          "id": 1879826,
          "postDate": "2022-08-01T09:38:21.637Z",
          "content": "<p>i managed to put everything together, SL, SSL learning, online, offline learning.<br>\nthis will be next software release.</p>\n<p>the consistency feature loss in the middle ensure SSL aligned with SL learning</p>\n<p><img src=\"https://i.ibb.co/vzsSQ1t/Selection-127.png\" alt=\"https://i.ibb.co/vzsSQ1t/Selection-127.png\"></p>",
          "rawMarkdown": "i managed to put everything together, SL, SSL learning, online, offline learning.\nthis will be next software release.\n\nthe consistency feature loss in the middle ensure SSL aligned with SL learning\n\n![https://i.ibb.co/vzsSQ1t/Selection-127.png](https://i.ibb.co/vzsSQ1t/Selection-127.png)",
          "votes": 1
        },
        {
          "id": 1879832,
          "postDate": "2022-08-01T09:40:10.173Z",
          "content": "<p>\" but oof is slightly better than your experiments, I'll try whole images later!\"<br>\nyour oof must be the same as your lb submission (i.e. you compute only one score for the whole image after the tiles are combined)</p>",
          "rawMarkdown": "\" but oof is slightly better than your experiments, I'll try whole images later!\"\nyour oof must be the same as your lb submission (i.e. you compute only one score for the whole image after the tiles are combined)"
        }
      ]
    },
    {
      "id": 1951249,
      "postDate": "2022-09-23T00:05:53.570Z",
      "content": "<p>seems that i select the wrong submission<br>\n<a href=\"https://ibb.co/1Q1wxDb\"><img src=\"https://i.ibb.co/MSr3LY9/Selection-317.png\" alt=\"Selection-317\"></a></p>\n<p>interesting:</p>\n<ul>\n<li>i correctly predicted the highest public LB score</li>\n<li>i correctly predicted the shakeup</li>\n<li>i correctly dreamt of my ranking and medal (just one off the gold medal) just the day before</li>\n</ul>",
      "rawMarkdown": "seems that i select the wrong submission\n<a href=\"https://ibb.co/1Q1wxDb\"><img src=\"https://i.ibb.co/MSr3LY9/Selection-317.png\" alt=\"Selection-317\" border=\"0\"></a>\n\ninteresting:\n- i correctly predicted the highest public LB score\n- i correctly predicted the shakeup\n- i correctly dreamt of my ranking and medal (just one off the gold medal) just the day before\n",
      "votes": 5,
      "replies": [
        {
          "id": 1951254,
          "postDate": "2022-09-23T00:16:19.233Z",
          "content": "<p>oh…<br>\nYou are 1th to my team..<br>\nThank you very much for this competition.</p>",
          "rawMarkdown": "oh...\nYou are 1th to my team..\nThank you very much for this competition.",
          "votes": 3
        },
        {
          "id": 1951383,
          "postDate": "2022-09-23T03:13:14.250Z",
          "content": "<p>Thanks you, <a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a> , I learned a lot from you thread，i'll never got the order without your  generous share .By the way, I also chose wrong submision.I get 0.83 last two days so chose the new😂.</p>",
          "rawMarkdown": "Thanks you, @hengck23 , I learned a lot from you thread，i'll never got the order without your  generous share .By the way, I also chose wrong submision.I get 0.83 last two days so chose the new😂.",
          "votes": 1
        },
        {
          "id": 1952653,
          "postDate": "2022-09-23T19:55:16.073Z",
          "content": "<p>Thanks for all the sharing in the competition <a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a> and such a strong finish. </p>\n<p><em>I correctly dreamt of my ranking and medal (just one off the gold medal) just the day before</em></p>\n<p>Not going to lie, this has happened to me in few of the previous competitions where I also missed solo gold by marginal ranks 🥲 It's really disheartening haha.</p>",
          "rawMarkdown": "Thanks for all the sharing in the competition @hengck23 and such a strong finish. \n\n*I correctly dreamt of my ranking and medal (just one off the gold medal) just the day before*\n\nNot going to lie, this has happened to me in few of the previous competitions where I also missed solo gold by marginal ranks 🥲 It's really disheartening haha.\n "
        }
      ]
    },
    {
      "id": 1833464,
      "postDate": "2022-06-26T03:27:59.327Z",
      "content": "<p>my first baseline at public LB 0.56</p>\n<p>one fold only:</p>\n<p>train_dataset : </p>\n<ul>\n<li>len = 280<ul>\n<li>kidney  81 (0.289) </li>\n<li>prostate  72 (0.257) </li>\n<li>largeintestine  47 (0.168) </li>\n<li>spleen  46 (0.164) </li>\n<li>lung  34 (0.121) </li></ul></li>\n</ul>\n<p>valid_dataset : </p>\n<ul>\n<li>len = 71<ul>\n<li>kidney  18 (0.254) </li>\n<li>prostate  21 (0.296) </li>\n<li>largeintestine  11 (0.155) </li>\n<li>spleen   7 (0.099) </li>\n<li>lung  14 (0.197) </li></ul></li>\n</ul>\n<p><img src=\"https://i.ibb.co/sQmXBwB/Selection-047.png\" alt=\"https://i.ibb.co/sQmXBwB/Selection-047.png\"></p>",
      "rawMarkdown": "my first baseline at public LB 0.56\n\none fold only:\n\ntrain_dataset : \n- len = 280\n -  kidney  81 (0.289) \n -  prostate  72 (0.257) \n -  largeintestine  47 (0.168) \n -  spleen  46 (0.164) \n -  lung  34 (0.121) \n\nvalid_dataset : \n- len = 71\n -  kidney  18 (0.254) \n -  prostate  21 (0.296) \n -  largeintestine  11 (0.155) \n -  spleen   7 (0.099) \n -  lung  14 (0.197) \n\n![https://i.ibb.co/sQmXBwB/Selection-047.png](https://i.ibb.co/sQmXBwB/Selection-047.png)",
      "votes": 7,
      "replies": [
        {
          "id": 1833509,
          "postDate": "2022-06-26T04:45:39.567Z",
          "content": "<p>hello <a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a>,<br>\ndoes your model converge after 18 epochs?</p>",
          "rawMarkdown": "hello @hengck23,\ndoes your model converge after 18 epochs?"
        },
        {
          "id": 1833612,
          "postDate": "2022-06-26T07:03:13.020Z",
          "content": "<p>\"does your model converge after 18 epochs?\"<br>\nyes for the above experiment. (I use little augmentation and the number of output channels in decoder is large)</p>",
          "rawMarkdown": "\"does your model converge after 18 epochs?\"\nyes for the above experiment. (I use little augmentation and the number of output channels in decoder is large)",
          "votes": 1
        },
        {
          "id": 1833908,
          "postDate": "2022-06-26T12:52:26.313Z",
          "content": "<p>update:<br>\nmodel = resnext50 + unet (use ASPP for center block, adjust approriate dilation for different input image size)<br>\ntrain image size = 512x512<br>\ntrain augment = random rotate, random scale, flip<br>\nhyperparameter = 80 epoch, batch_size 16, lookahead+RAMDA opt<br>\nlocal cv:  0.707 (at threshold 0.50)</p>\n<hr>\n<p>train image size = 640x640<br>\nlocal cv:  0.715 (fold-0 at threshold 0.50) / 0.753 (fold-1)</p>",
          "rawMarkdown": "update:\nmodel = resnext50 + unet (use ASPP for center block, adjust approriate dilation for different input image size)\ntrain image size = 512x512\ntrain augment = random rotate, random scale, flip\nhyperparameter = 80 epoch, batch_size 16, lookahead+RAMDA opt\nlocal cv:  0.707 (at threshold 0.50)\n\n---\n\ntrain image size = 640x640\nlocal cv:  0.715 (fold-0 at threshold 0.50) / 0.753 (fold-1)",
          "votes": 2
        },
        {
          "id": 1843190,
          "postDate": "2022-07-04T16:05:36.517Z",
          "content": "<p>why do you rescale it by \"512/3000\" if your model receives images of 480x480??</p>",
          "rawMarkdown": "why do you rescale it by \"512/3000\" if your model receives images of 480x480??",
          "votes": 1
        },
        {
          "id": 1858816,
          "postDate": "2022-07-17T08:21:56.507Z",
          "content": "<p>By experiment results. Sometimes, but not all times, your can get better results when your inference size is larger than the train size</p>",
          "rawMarkdown": "By experiment results. Sometimes, but not all times, your can get better results when your inference size is larger than the train size"
        },
        {
          "id": 1858817,
          "postDate": "2022-07-17T08:25:25.277Z",
          "content": "<p>I confirm that, thats the first thing I tried, learned this from starfish competition 🙂<br>\nBut you have to change the std and mean values also for some inference pipelines</p>",
          "rawMarkdown": "I confirm that, thats the first thing I tried, learned this from starfish competition 🙂\nBut you have to change the std and mean values also for some inference pipelines"
        }
      ]
    },
    {
      "id": 1831307,
      "postDate": "2022-06-24T05:22:07.410Z",
      "content": "<p>I love your threads :-) especially the \"my experiment results\" one , It's like a story of how research and experiments should be. <br>\nGreat work :-) </p>",
      "rawMarkdown": "I love your threads :-) especially the \"my experiment results\" one , It's like a story of how research and experiments should be. \nGreat work :-) \n",
      "votes": 7,
      "replies": [
        {
          "id": 1837899,
          "postDate": "2022-06-30T03:18:10.663Z",
          "content": "<p>100% agree with you <a href=\"https://www.kaggle.com/asalhi\" target=\"_blank\">@asalhi</a> , <a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a> threads are very informative and inspirational! Thanks for sharing all this with the wider Kaggle community.</p>",
          "rawMarkdown": "100% agree with you @asalhi , @hengck23 threads are very informative and inspirational! Thanks for sharing all this with the wider Kaggle community.",
          "votes": 1
        }
      ]
    },
    {
      "id": 1925481,
      "postDate": "2022-09-04T02:19:26.513Z",
      "content": "<p>this is a nice paper to read. i think some of the conclusion also applies to this kaggle competition according to my results:<br>\n<a href=\"https://www.arxiv-vanity.com/papers/2201.08683/\" target=\"_blank\">https://www.arxiv-vanity.com/papers/2201.08683/</a><br>\nA Comprehensive Study of Vision Transformers on Dense Prediction Tasks</p>\n<p>We studied different aspects of VTs and CNNs as feature extractors for object detection and semantic segmentation on challenging and real-world data. The main results and key insights derived from our experiments are as follows:</p>\n<ul>\n<li><p>VTs outperform CNNs in in-distribution dataset while having lower inference speed, but less computational complexity. Hence, if the GPUs are optimized for Transformer architectures, they have the potential to become dominant in computer vision.</p></li>\n<li><p>VTs generalize better to OOD datasets. Our loss landscape analysis shows that VTs converge to flatter minima compared to CNNs, which can explain their generalizability.</p></li>\n<li><p>VTs are more robust to natural corruptions and adversarial attacks compared to CNNs. We believe that this could be attributed to the global receptive field as well as the dynamic nature of self-attention.</p></li>\n<li><p>VTs are less-texture biased than CNNs, which can be attributed to their global receptive field, allowing them to focus better on global shape-based cues as opposed to local texture-based cues.</p></li>\n</ul>",
      "rawMarkdown": "this is a nice paper to read. i think some of the conclusion also applies to this kaggle competition according to my results:\nhttps://www.arxiv-vanity.com/papers/2201.08683/\nA Comprehensive Study of Vision Transformers on Dense Prediction Tasks\n\n\n\nWe studied different aspects of VTs and CNNs as feature extractors for object detection and semantic segmentation on challenging and real-world data. The main results and key insights derived from our experiments are as follows:\n\n-  VTs outperform CNNs in in-distribution dataset while having lower inference speed, but less computational complexity. Hence, if the GPUs are optimized for Transformer architectures, they have the potential to become dominant in computer vision.\n\n-  VTs generalize better to OOD datasets. Our loss landscape analysis shows that VTs converge to flatter minima compared to CNNs, which can explain their generalizability.\n\n\n-  VTs are more robust to natural corruptions and adversarial attacks compared to CNNs. We believe that this could be attributed to the global receptive field as well as the dynamic nature of self-attention.\n\n-  VTs are less-texture biased than CNNs, which can be attributed to their global receptive field, allowing them to focus better on global shape-based cues as opposed to local texture-based cues.\n",
      "votes": 5
    },
    {
      "id": 1921312,
      "postDate": "2022-08-31T17:50:22.663Z",
      "content": "<p>are you stuck at 0.80?</p>\n<ul>\n<li>build better model, augmentation, etc  </li>\n</ul>\n<p>are you stuck at 0.81?</p>\n<ul>\n<li>build better resolution  </li>\n<li>some fold are better than other (i.e. some training images are better). try different random seeds, weigh more on some fold, etc …  <br>\nsubmit for certain folds …<br>\nWARNING!!!! this may overfit to lb public test and lb private test</li>\n</ul>\n<p>are you stuck at 0.82?</p>\n<ul>\n<li>maybe  the best fold \"changes with score\" </li>\n<li>maybe  the best threshold  \"changes with score\" </li>\n</ul>\n<p>… adjust accordingly</p>\n<hr>\n<p>note:<br>\nlb-HPA is always in 0.21 to 0.22<br>\nlb-Hubmap stops at 0.60 (even at lb 0.83)</p>",
      "rawMarkdown": "are you stuck at 0.80?\n- build better model, augmentation, etc  \n\nare you stuck at 0.81?\n- build better resolution  \n- some fold are better than other (i.e. some training images are better). try different random seeds, weigh more on some fold, etc ...  \nsubmit for certain folds ...\nWARNING!!!! this may overfit to lb public test and lb private test\n\n\nare you stuck at 0.82?\n- maybe  the best fold \"changes with score\" \n- maybe  the best threshold  \"changes with score\" \n\n... adjust accordingly\n\n---\n\nnote:\nlb-HPA is always in 0.21 to 0.22\nlb-Hubmap stops at 0.60 (even at lb 0.83)",
      "votes": 5,
      "replies": [
        {
          "id": 1921314,
          "postDate": "2022-08-31T17:53:31.153Z",
          "content": "<p>Out of interest, what do you think are the HuBMAP-only equivalents are for these values?</p>",
          "rawMarkdown": "Out of interest, what do you think are the HuBMAP-only equivalents are for these values?"
        },
        {
          "id": 1921658,
          "postDate": "2022-09-01T01:21:44.750Z",
          "content": "<p>Same with you, my lb-HuBMAP reached 0.60 when my lb is 0.82, and when I get lb 0.83, lb-HuBMAP is still 0.60😂</p>",
          "rawMarkdown": "Same with you, my lb-HuBMAP reached 0.60 when my lb is 0.82, and when I get lb 0.83, lb-HuBMAP is still 0.60😂"
        },
        {
          "id": 1921674,
          "postDate": "2022-09-01T01:35:26.510Z",
          "content": "<p>technically, it is:<br>\nlb = 0.830 to 0.839<br>\nlb-HuBMAP= (0.600 to 0.609)/0.7217 = 0.8314 to 0.8438<br>\nlb-HPA= (0.221 to 0.239)/0.2783 = 0.7941 to 0.8588</p>\n<hr>\n<p>local cv (HPA) ~0.82</p>",
          "rawMarkdown": "technically, it is:\nlb = 0.830 to 0.839\nlb-HuBMAP= (0.600 to 0.609)/0.7217 = 0.8314 to 0.8438\nlb-HPA= (0.221 to 0.239)/0.2783 = 0.7941 to 0.8588\n\n---\nlocal cv (HPA) ~0.82"
        },
        {
          "id": 1925783,
          "postDate": "2022-09-04T09:48:10.267Z",
          "content": "<p>Does that mean when I reach 0.6 on HuBMAP, can I finally rest and pray?</p>",
          "rawMarkdown": "Does that mean when I reach 0.6 on HuBMAP, can I finally rest and pray?",
          "votes": 2
        },
        {
          "id": 1925860,
          "postDate": "2022-09-04T11:48:56.073Z",
          "content": "<p>no. you have to check your ranking. it will be 0.82 everywhere after a week</p>",
          "rawMarkdown": "no. you have to check your ranking. it will be 0.82 everywhere after a week",
          "votes": 1
        },
        {
          "id": 1926617,
          "postDate": "2022-09-05T02:02:44.963Z",
          "content": "<p>an example of trying different seeds  <br>\nLB = 0.78,0.80,0.79,0.75,0.80  <br>\nCV = 0.803159,0.764383,0.777201,0.818149,0.791553  </p>\n<p>different fold have different results (due to label noise)</p>\n<p>good public = worse private?<br>\nhow to prevent shake up?</p>",
          "rawMarkdown": "an example of trying different seeds  \nLB = 0.78,0.80,0.79,0.75,0.80  \nCV = 0.803159,0.764383,0.777201,0.818149,0.791553  \n\ndifferent fold have different results (due to label noise)\n\ngood public = worse private?\nhow to prevent shake up?"
        },
        {
          "id": 1926719,
          "postDate": "2022-09-05T04:17:59.583Z",
          "content": "<p>Have you test the hubmap score of different folds? Kind of curious😋</p>",
          "rawMarkdown": "Have you test the hubmap score of different folds? Kind of curious😋"
        },
        {
          "id": 1927375,
          "postDate": "2022-09-05T15:34:36.630Z",
          "content": "<p>Got stuck at 0.80 for quite a long time…</p>",
          "rawMarkdown": "Got stuck at 0.80 for quite a long time...",
          "votes": 1
        },
        {
          "id": 1928257,
          "postDate": "2022-09-06T11:18:09.643Z",
          "content": "<p>\"Got stuck at 0.80 for quite a long time…\"</p>\n<p>change/select fold, ensemble resolution, change threshold</p>",
          "rawMarkdown": "\"Got stuck at 0.80 for quite a long time…\"\n\nchange/select fold, ensemble resolution, change threshold\n"
        },
        {
          "id": 1928603,
          "postDate": "2022-09-06T14:32:25.313Z",
          "content": "<p>Hi Heng, I've not tried ensembling models, but tried to change the seeds &amp; try new augments. It looks like my CV fluctuates… Is there a good way to reduce the impact of labeling noise? I'm not an expert in the medical domain, so I'm not sure all the FTUs in the HPA images are fully labeled. Maybe pseudo-labeling might help?</p>",
          "rawMarkdown": "Hi Heng, I've not tried ensembling models, but tried to change the seeds & try new augments. It looks like my CV fluctuates... Is there a good way to reduce the impact of labeling noise? I'm not an expert in the medical domain, so I'm not sure all the FTUs in the HPA images are fully labeled. Maybe pseudo-labeling might help?"
        },
        {
          "id": 1930129,
          "postDate": "2022-09-07T15:23:40.723Z",
          "content": "<p>If we are stuck at 0.78, how can we do?</p>",
          "rawMarkdown": "If we are stuck at 0.78, how can we do?"
        },
        {
          "id": 1930374,
          "postDate": "2022-09-07T19:40:24.757Z",
          "content": "<p>\"If we are stuck at 0.78, how can we do?\"</p>\n<p>i assume you are talking about single model solution at 768x768 input resolution.</p>\n<p>then you are still having some issues with augmentation, TTA, training (learning rate/overfitting), ensemble single fold (SWA) or multiple fold for single model, threshold, … etc</p>\n<p>you have two choices:  <br>\n1) you can still finetune you single model solution. but you will be cap to about 0.79 at 768x768</p>\n<p>2) increase resolution,  proceed to train multiple architecture for ensemble. but you will be cap 0.78 + 0.02</p>\n<p>i would do both and (1) and (2). more exploration would means more training results and more information for algorithm debug</p>",
          "rawMarkdown": "\"If we are stuck at 0.78, how can we do?\"\n\ni assume you are talking about single model solution at 768x768 input resolution.\n\nthen you are still having some issues with augmentation, TTA, training (learning rate/overfitting), ensemble single fold (SWA) or multiple fold for single model, threshold, ... etc\n\nyou have two choices:  \n1) you can still finetune you single model solution. but you will be cap to about 0.79 at 768x768\n\n2) increase resolution,  proceed to train multiple architecture for ensemble. but you will be cap 0.78 + 0.02\n\ni would do both and (1) and (2). more exploration would means more training results and more information for algorithm debug\n",
          "votes": 1
        },
        {
          "id": 1930522,
          "postDate": "2022-09-08T02:04:06.060Z",
          "content": "<p>Thanks a lot for your share, I will keep moving based on your tips! </p>",
          "rawMarkdown": "Thanks a lot for your share, I will keep moving based on your tips! "
        },
        {
          "id": 1930529,
          "postDate": "2022-09-08T02:15:12.853Z",
          "content": "<p>poem : The Road Not Taken by Robert Frost</p>\n<p>Two roads diverged in a wood, and I—<br>\nI took the one less traveled by,<br>\nAnd that has made all the difference.</p>",
          "rawMarkdown": "poem : The Road Not Taken by Robert Frost\n\n\nTwo roads diverged in a wood, and I—\nI took the one less traveled by,\nAnd that has made all the difference.\n",
          "votes": 7
        },
        {
          "id": 1930552,
          "postDate": "2022-09-08T03:17:14.383Z",
          "content": "<p>Thank you very much for sharing your all experiments and tips</p>",
          "rawMarkdown": "Thank you very much for sharing your all experiments and tips",
          "votes": 1
        }
      ]
    },
    {
      "id": 1907670,
      "postDate": "2022-08-21T00:54:45.903Z",
      "content": "<p>this is what every kaggler should know</p>\n<p>\"This a question that comes up all the time in machine learning: How well can we do with the data we have? Even when we have a result, it can be hard to tell if it's a good result. What more could we do with better approaches? Or are we already close to the upper bound?\"</p>\n<p>link:   <br>\n<a href=\"https://drivendata.co/blog/aleatoric-limit1\" target=\"_blank\">https://drivendata.co/blog/aleatoric-limit1</a>  <br>\n<a href=\"https://drivendata.co/blog/aleatoric-limit2\" target=\"_blank\">https://drivendata.co/blog/aleatoric-limit2</a></p>\n<p>i thing kaggle can have a blog to invite kagglers to make post like this.<br>\ngood post will be given free TPU/GPU hours etc.</p>\n<p>this is not the same as notebook as this focus on content rather than code</p>",
      "rawMarkdown": "this is what every kaggler should know\n\n\"This a question that comes up all the time in machine learning: How well can we do with the data we have? Even when we have a result, it can be hard to tell if it's a good result. What more could we do with better approaches? Or are we already close to the upper bound?\"\n\nlink:   \nhttps://drivendata.co/blog/aleatoric-limit1  \nhttps://drivendata.co/blog/aleatoric-limit2\n\n\ni thing kaggle can have a blog to invite kagglers to make post like this.\ngood post will be given free TPU/GPU hours etc.\n\nthis is not the same as notebook as this focus on content rather than code",
      "votes": 5
    },
    {
      "id": 1882428,
      "postDate": "2022-08-03T09:15:46.607Z",
      "content": "<p>look what i have found<br>\n<img src=\"https://i.ibb.co/0X3dDs4/Selection-171.png\" alt=\"https://i.ibb.co/0X3dDs4/Selection-171.png\"></p>",
      "rawMarkdown": "look what i have found\n![https://i.ibb.co/0X3dDs4/Selection-171.png](https://i.ibb.co/0X3dDs4/Selection-171.png)",
      "votes": 6,
      "replies": [
        {
          "id": 1884597,
          "postDate": "2022-08-04T14:17:39.420Z",
          "rawMarkdown": "",
          "isDeleted": true
        },
        {
          "id": 1893184,
          "postDate": "2022-08-10T15:47:23.177Z",
          "content": "<p><a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a> Hi heng, Would you mind share more information about this image, is it from hubmap (<a href=\"https://portal.hubmapconsortium.org/)\" target=\"_blank\">https://portal.hubmapconsortium.org/)</a>? thank you.</p>",
          "rawMarkdown": "@hengck23 Hi heng, Would you mind share more information about this image, is it from hubmap (https://portal.hubmapconsortium.org/)? thank you.\n"
        }
      ]
    },
    {
      "id": 1874042,
      "postDate": "2022-07-28T03:20:45.080Z",
      "content": "<p>one free trick for all:</p>\n<p><img src=\"https://i.ibb.co/6mgvGXv/Selection-095.png\" alt=\"https://i.ibb.co/6mgvGXv/Selection-095.png\"></p>\n<p>i haven't tried to add 2021 kaggle train data yet (kidney and large intestine). i also expect some improvement from there</p>\n<hr>\n<p>we now enter phrase 2 of the competition: from 0.80 to ~0.83</p>\n<ul>\n<li>it is now the battle of external data, SSL masked pertaining, unlabelled learning … weak/self/semi-supervised, domain adaption, …</li>\n</ul>",
      "rawMarkdown": "one free trick for all:\n\n![https://i.ibb.co/6mgvGXv/Selection-095.png](https://i.ibb.co/6mgvGXv/Selection-095.png)\n\ni haven't tried to add 2021 kaggle train data yet (kidney and large intestine). i also expect some improvement from there\n\n---\n\nwe now enter phrase 2 of the competition: from 0.80 to ~0.83\n\n- it is now the battle of external data, SSL masked pertaining, unlabelled learning ... weak/self/semi-supervised, domain adaption, ...",
      "votes": 6,
      "replies": [
        {
          "id": 1874116,
          "postDate": "2022-07-28T05:05:03.740Z",
          "content": "<p>Great 0.8 :-)<br>\nMy 0.75 was achived with basline notebook and some new training with larger bone with some size modification I achived 0.7.<br>\nAnd a trick ( or approch) that pushed the score from 0.70 to 0.75 , a boost that I belive you didn’t yet try and I guess with your current solution it might give you a boost of 0.02 or so.  Or maybe not! If segformer is doing great with HuBMap. </p>",
          "rawMarkdown": "Great 0.8 :-)\nMy 0.75 was achived with basline notebook and some new training with larger bone with some size modification I achived 0.7.\nAnd a trick ( or approch) that pushed the score from 0.70 to 0.75 , a boost that I belive you didn’t yet try and I guess with your current solution it might give you a boost of 0.02 or so.  Or maybe not! If segformer is doing great with HuBMap. ",
          "votes": -1
        },
        {
          "id": 1886147,
          "postDate": "2022-08-05T16:01:04.877Z",
          "content": "<p>That is very intuitive. It would probably work for all organs.</p>",
          "rawMarkdown": "That is very intuitive. It would probably work for all organs."
        },
        {
          "id": 1886216,
          "postDate": "2022-08-05T16:27:16.787Z",
          "content": "<p>I am curious about which way you choose for training, the whole image(resize) or image tiles.</p>",
          "rawMarkdown": "I am curious about which way you choose for training, the whole image(resize) or image tiles."
        }
      ]
    },
    {
      "id": 1945022,
      "postDate": "2022-09-18T18:53:39.057Z",
      "content": "<p><a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a> - Your experience of coat-small (+- parallel) with 1x1 daformer outperforming the medium model with 3x3 - is this purely because you are able to train the small model at a higher resolution than medium, or do you think the smaller model is genuinely better? I ask because I believe segformer b3 as an encoder outperforms b5 on this dataset even at higher resolutions.</p>",
      "rawMarkdown": "@hengck23 - Your experience of coat-small (+- parallel) with 1x1 daformer outperforming the medium model with 3x3 - is this purely because you are able to train the small model at a higher resolution than medium, or do you think the smaller model is genuinely better? I ask because I believe segformer b3 as an encoder outperforms b5 on this dataset even at higher resolutions.",
      "votes": 3,
      "replies": [
        {
          "id": 1946523,
          "postDate": "2022-09-19T21:10:50.643Z",
          "content": "<p>In my experiments, at the same resoluton, CoatMedium(4) + Daformer3x3 works better than CoatSmall(5) + Daformer1x1 - this seems to be different from others' experience. </p>",
          "rawMarkdown": "In my experiments, at the same resoluton, CoatMedium(4) + Daformer3x3 works better than CoatSmall(5) + Daformer1x1 - this seems to be different from others' experience. ",
          "votes": 1
        }
      ]
    },
    {
      "id": 1952700,
      "postDate": "2022-09-23T20:42:39.293Z",
      "content": "<p>with both the private and public score revealed, i discover something interesting.</p>\n<p>i made a bug by loading a mitb6 encoder with a trained mit5 model at submission inference. this means that  only the early layer are loaded and the unloaded weights are randomly initialized. However the performer is better then loading the correct model. at first i thought this is better \"by chance\". but now both private and public scores actually improved, meaning that improvement are not \"by chance\".</p>\n<p>for those that are doing research and writing paper, you may want to investigate on this. it seems possible just to \"perturb from train optimum (esp on just upper layers)\" and get better validation results.</p>\n<p>i also note that transformer is trained with drop path and \"residual add\" in FF and attention block enforces learning to get residual=0</p>",
      "rawMarkdown": "with both the private and public score revealed, i discover something interesting.\n\ni made a bug by loading a mitb6 encoder with a trained mit5 model at submission inference. this means that  only the early layer are loaded and the unloaded weights are randomly initialized. However the performer is better then loading the correct model. at first i thought this is better \"by chance\". but now both private and public scores actually improved, meaning that improvement are not \"by chance\".\n\nfor those that are doing research and writing paper, you may want to investigate on this. it seems possible just to \"perturb from train optimum (esp on just upper layers)\" and get better validation results.\n\ni also note that transformer is trained with drop path and \"residual add\" in FF and attention block enforces learning to get residual=0",
      "votes": 4,
      "replies": [
        {
          "id": 1956303,
          "postDate": "2022-09-26T11:39:19.983Z",
          "content": "<p><a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a> On Sept23 at ~1AM UTC when the \"Private leaderboard was disclosed\" vs at ~6PM UTC when the \"leaderboard was finalized\" I noticed a change in the Private LB ranks. My team's Private LB rank improved by 30 places. Why so?  Were some of the teams disqualified during this time? If yes why were they disqualified ?</p>",
          "rawMarkdown": "@hengck23 On Sept23 at ~1AM UTC when the \"Private leaderboard was disclosed\" vs at ~6PM UTC when the \"leaderboard was finalized\" I noticed a change in the Private LB ranks. My team's Private LB rank improved by 30 places. Why so?  Were some of the teams disqualified during this time? If yes why were they disqualified ?"
        },
        {
          "id": 1956334,
          "postDate": "2022-09-26T11:55:58.127Z",
          "content": "<p><a href=\"https://www.kaggle.com/desaijairav\" target=\"_blank\">@desaijairav</a> I'm not hengck23 but lemme answer. 70 teams were disqualified for cheating: <a href=\"https://www.kaggle.com/competitions/hubmap-organ-segmentation/discussion/354700#:~:text=anti%2Dcheating%20algorithm\" target=\"_blank\">related thread</a>. Probably, they used multiple accounts to submit more than five times a day, in order to either verify modifications on their programs, or to fine-tune the threshold for each organ.</p>\n<p>PS you can check the very first rule of this competition <a href=\"https://www.kaggle.com/competitions/hubmap-organ-segmentation/rules#:~:text=One%20account%20per%20participant\" target=\"_blank\">here</a>: One account per participant</p>",
          "rawMarkdown": "@desaijairav I'm not hengck23 but lemme answer. 70 teams were disqualified for cheating: [related thread](https://www.kaggle.com/competitions/hubmap-organ-segmentation/discussion/354700#:~:text=anti%2Dcheating%20algorithm). Probably, they used multiple accounts to submit more than five times a day, in order to either verify modifications on their programs, or to fine-tune the threshold for each organ.\n\nPS you can check the very first rule of this competition [here](https://www.kaggle.com/competitions/hubmap-organ-segmentation/rules#:~:text=One%20account%20per%20participant): One account per participant",
          "votes": 1
        },
        {
          "id": 1956746,
          "postDate": "2022-09-26T15:27:48.753Z",
          "content": "<p>Thanks a lot <a href=\"https://www.kaggle.com/cheulkay\" target=\"_blank\">@cheulkay</a> !! That was a exactly what I was looking for. </p>",
          "rawMarkdown": "Thanks a lot @cheulkay !! That was a exactly what I was looking for. "
        },
        {
          "id": 1958040,
          "postDate": "2022-09-27T09:00:02.890Z",
          "content": "<p>Another quick question- Was Segformer allowed to be used? I could see Segformer in some of the shared notebooks which are medal winners. It had \"Apache 2.0\" license initially &amp; later changed to \"Other\". </p>\n<p>In terms of licensing any insights/links around what is allowed/not allowed? I went through the Kaggle rules &amp; License conditions but the Technical-Legal language often becomes difficult to understand.  </p>",
          "rawMarkdown": "Another quick question- Was Segformer allowed to be used? I could see Segformer in some of the shared notebooks which are medal winners. It had \"Apache 2.0\" license initially & later changed to \"Other\". \n\nIn terms of licensing any insights/links around what is allowed/not allowed? I went through the Kaggle rules & License conditions but the Technical-Legal language often becomes difficult to understand.  "
        },
        {
          "id": 1958644,
          "postDate": "2022-09-27T15:05:08.633Z",
          "content": "<p>I have  inquired of the question to the competition host.<br>\nAfter their reply, I'll share their opinion with my solution:)</p>",
          "rawMarkdown": "I have  inquired of the question to the competition host.\nAfter their reply, I'll share their opinion with my solution:)",
          "votes": 1
        }
      ]
    },
    {
      "id": 1951265,
      "postDate": "2022-09-23T00:32:57.737Z",
      "content": "<p>my 13-th place solution: public 0.83, private: 0.81~0.82<br>\n<a href=\"https://www.kaggle.com/code/hengck23/lb0-83-submit/edit/run/104911483\" target=\"_blank\">https://www.kaggle.com/code/hengck23/lb0-83-submit/edit/run/104911483</a></p>\n<pre><code>organ_threshold = { \n    'Hubmap': { \n        'kidney' : 0.28, \n        'prostate' : 0.28, \n        'largeintestine': 0.28, \n        'spleen' : 0.28, \n        'lung' : 0.05, \n    }, \n    'HPA': { \n        'kidney' : 0.50, \n        'prostate' : 0.50, \n        'largeintestine': 0.50, \n        'spleen' : 0.50, \n        'lung' : 0.10, \n    }, \n}\n\nmodel = [ \n    dotdict( #[1]\n        is_use=1,\n        image_size=1024,\n        module='model_pvt_v2_daformer',\n        param={'encoder': pvt_v2_b4_level5, 'decoder': daformer_conv3x3, },\n        checkpoint=[\n            '../input/hubmap-submit-06-weight0/pvt_v2_b4_level5-daformer_conv3x3-aug5b-1024-fold-3-swa.pth',\n            '../input/hubmap-submit-06-weight0/pvt_v2_b4_level5-daformer_conv3x3-aug5b-1024-fold-2-swa.pth', \n            '../input/hubmap-submit-06-weight0/pvt_v2_b4_level5-daformer_conv3x3-aug5b-1024-fold-1-swa.pth',\n\n            #'../input/hubmap-submit-06-weight0/pvt_v2_b4_level5-daformer_conv3x3-aug5b-1024-fold-4-swa.pth',\n\n        ],\n    ),\n    dotdict(#[2]\n        is_use = 1,\n        image_size = 1536,\n        module = 'model_coat_daformer',\n        param={'encoder': coat_parallel_small_level5, 'decoder':daformer_conv1x1},\n        checkpoint = [ \n            '../input/hubmap-submit-06-weight0/coat_parallel_small_level5-daformer_conv1x1-aug8b-1536-fold-3-swa.pth',\n            '../input/hubmap-submit-06-weight0/coat_parallel_small_level5-daformer_conv1x1-aug8b-1536-fold-2-swa.pth', \n            '../input/hubmap-submit-06-weight0/coat_parallel_small_level5-daformer_conv1x1-aug8b-1536-fold-1-swa.pth',\n\n            #'../input/hubmap-submit-06-weight0/coat_parallel_small_level5-daformer_conv1x1-aug8b-1536-fold-4-swa.pth', \n            #'../input/hubmap-submit-06-weight0/coat_parallel_small_level5-daformer_conv1x1-aug8b-1536-fold-0-swa.pth',  \n        ],\n    ),\n\n\n    dotdict( #[3]\n        is_use=1,\n        image_size=1536,\n        module='model_effnet_smp_unet',\n        param={'encoder': tf_efficientnet_b6, 'decoder': smp_unet},  \n        checkpoint=[\n            '../input/hubmap-submit-06-weight0/tf_efficientnet_b6-unet-aug8b-1536-fold-3-swa.pth', \n            '../input/hubmap-submit-06-weight0/tf_efficientnet_b6-unet-aug8b-1536-fold-2-swa.pth',\n            '../input/hubmap-submit-06-weight0/tf_efficientnet_b6-unet-aug8b-1536-fold-1-swa.pth',\n        ],\n    ),\n    dotdict(#[4]\n        is_use = 1,\n        image_size = 768,\n        module = 'model_dualvit_daformer',\n        param={'encoder': dual_vit_b, 'decoder':daformer_conv3x3},\n        checkpoint = [\n             '../input/hubmap-submit-06-weight0/dual_vit_b-daformer_conv3x3-aug8-768-fold-3-swa.pth',\n             '../input/hubmap-submit-06-weight0/dual_vit_b-daformer_conv3x3-aug8-768-fold-2-swa.pth', \n             '../input/hubmap-submit-06-weight0/dual_vit_b-daformer_conv3x3-aug8-768-fold-1-swa.pth',\n\n             #'../input/hubmap-submit-06-weight0/dual_vit_b-daformer_conv3x3-aug8-768-fold-4-swa.pth',\n        ],\n    ), \n\n\n    dotdict(#[5]\n        is_use=1,\n        image_size=1280,\n        module='model_convnext_smp_unet',\n        param={'encoder': convnext_large_384_in22ft1k, 'decoder': smp_unet},   \n        checkpoint=[\n            '../input/hubmap-submit-06-weight0/convnext_large_384_in22ft1k-smp_unet-aug8b-1280-fold-3-swa.pth',\n            '../input/hubmap-submit-06-weight0/convnext_large_384_in22ft1k-smp_unet-aug8b-1280-fold-2-swa.pth',\n            '../input/hubmap-submit-06-weight0/convnext_large_384_in22ft1k-smp_unet-aug8b-1280-fold-1-swa.pth',\n\n            #'../input/hubmap-submit-06-weight0/convnext_large_384_in22ft1k-smp_unet-aug8b-1280-fold-4-swa.pth',\n        ],\n    ), \n\n\n\n      dotdict(\n        is_use=1,\n        image_size=768,\n        module='model_pvt_v2_daformer',\n        param={'encoder': pvt_v2_b4, 'decoder': daformer_conv3x3},   \n        checkpoint=[\n            #'../input/hubmap-submit-06-weight1/pvt_v2_b4-aug8b-768-different-seed-fold-0-swa.pth', #0.78\n            '../input/hubmap-submit-06-weight1/pvt_v2_b4-aug8b-768-different-seed-fold-1-swa.pth', # 0.80\n            #'../input/hubmap-submit-06-weight1/pvt_v2_b4-aug8b-768-different-seed-fold-2-swa.pth', #0.79 \n        ],\n    ),\n</code></pre>\n<p>you will get private score 0.81 to 0.82 depending on how you select the base models (e.g. remove comment #)</p>",
      "rawMarkdown": "my 13-th place solution: public 0.83, private: 0.81~0.82\nhttps://www.kaggle.com/code/hengck23/lb0-83-submit/edit/run/104911483\n```\norgan_threshold = { \n    'Hubmap': { \n        'kidney' : 0.28, \n        'prostate' : 0.28, \n        'largeintestine': 0.28, \n        'spleen' : 0.28, \n        'lung' : 0.05, \n    }, \n    'HPA': { \n        'kidney' : 0.50, \n        'prostate' : 0.50, \n        'largeintestine': 0.50, \n        'spleen' : 0.50, \n        'lung' : 0.10, \n    }, \n}\n\nmodel = [ \n    dotdict( #[1]\n        is_use=1,\n        image_size=1024,\n        module='model_pvt_v2_daformer',\n        param={'encoder': pvt_v2_b4_level5, 'decoder': daformer_conv3x3, },\n        checkpoint=[\n            '../input/hubmap-submit-06-weight0/pvt_v2_b4_level5-daformer_conv3x3-aug5b-1024-fold-3-swa.pth',\n            '../input/hubmap-submit-06-weight0/pvt_v2_b4_level5-daformer_conv3x3-aug5b-1024-fold-2-swa.pth', \n            '../input/hubmap-submit-06-weight0/pvt_v2_b4_level5-daformer_conv3x3-aug5b-1024-fold-1-swa.pth',\n            \n            #'../input/hubmap-submit-06-weight0/pvt_v2_b4_level5-daformer_conv3x3-aug5b-1024-fold-4-swa.pth',\n             \n        ],\n    ),\n    dotdict(#[2]\n        is_use = 1,\n        image_size = 1536,\n        module = 'model_coat_daformer',\n        param={'encoder': coat_parallel_small_level5, 'decoder':daformer_conv1x1},\n        checkpoint = [ \n            '../input/hubmap-submit-06-weight0/coat_parallel_small_level5-daformer_conv1x1-aug8b-1536-fold-3-swa.pth',\n            '../input/hubmap-submit-06-weight0/coat_parallel_small_level5-daformer_conv1x1-aug8b-1536-fold-2-swa.pth', \n            '../input/hubmap-submit-06-weight0/coat_parallel_small_level5-daformer_conv1x1-aug8b-1536-fold-1-swa.pth',\n            \n            #'../input/hubmap-submit-06-weight0/coat_parallel_small_level5-daformer_conv1x1-aug8b-1536-fold-4-swa.pth', \n            #'../input/hubmap-submit-06-weight0/coat_parallel_small_level5-daformer_conv1x1-aug8b-1536-fold-0-swa.pth',  \n        ],\n    ),\n \n    \n    dotdict( #[3]\n        is_use=1,\n        image_size=1536,\n        module='model_effnet_smp_unet',\n        param={'encoder': tf_efficientnet_b6, 'decoder': smp_unet},  \n        checkpoint=[\n            '../input/hubmap-submit-06-weight0/tf_efficientnet_b6-unet-aug8b-1536-fold-3-swa.pth', \n            '../input/hubmap-submit-06-weight0/tf_efficientnet_b6-unet-aug8b-1536-fold-2-swa.pth',\n            '../input/hubmap-submit-06-weight0/tf_efficientnet_b6-unet-aug8b-1536-fold-1-swa.pth',\n        ],\n    ),\n    dotdict(#[4]\n        is_use = 1,\n        image_size = 768,\n        module = 'model_dualvit_daformer',\n        param={'encoder': dual_vit_b, 'decoder':daformer_conv3x3},\n        checkpoint = [\n             '../input/hubmap-submit-06-weight0/dual_vit_b-daformer_conv3x3-aug8-768-fold-3-swa.pth',\n             '../input/hubmap-submit-06-weight0/dual_vit_b-daformer_conv3x3-aug8-768-fold-2-swa.pth', \n             '../input/hubmap-submit-06-weight0/dual_vit_b-daformer_conv3x3-aug8-768-fold-1-swa.pth',\n             \n             #'../input/hubmap-submit-06-weight0/dual_vit_b-daformer_conv3x3-aug8-768-fold-4-swa.pth',\n        ],\n    ), \n\n    \n    dotdict(#[5]\n        is_use=1,\n        image_size=1280,\n        module='model_convnext_smp_unet',\n        param={'encoder': convnext_large_384_in22ft1k, 'decoder': smp_unet},   \n        checkpoint=[\n            '../input/hubmap-submit-06-weight0/convnext_large_384_in22ft1k-smp_unet-aug8b-1280-fold-3-swa.pth',\n            '../input/hubmap-submit-06-weight0/convnext_large_384_in22ft1k-smp_unet-aug8b-1280-fold-2-swa.pth',\n            '../input/hubmap-submit-06-weight0/convnext_large_384_in22ft1k-smp_unet-aug8b-1280-fold-1-swa.pth',\n            \n            #'../input/hubmap-submit-06-weight0/convnext_large_384_in22ft1k-smp_unet-aug8b-1280-fold-4-swa.pth',\n        ],\n    ), \n    \n \n \n      dotdict(\n        is_use=1,\n        image_size=768,\n        module='model_pvt_v2_daformer',\n        param={'encoder': pvt_v2_b4, 'decoder': daformer_conv3x3},   \n        checkpoint=[\n            #'../input/hubmap-submit-06-weight1/pvt_v2_b4-aug8b-768-different-seed-fold-0-swa.pth', #0.78\n            '../input/hubmap-submit-06-weight1/pvt_v2_b4-aug8b-768-different-seed-fold-1-swa.pth', # 0.80\n            #'../input/hubmap-submit-06-weight1/pvt_v2_b4-aug8b-768-different-seed-fold-2-swa.pth', #0.79 \n        ],\n    ),\n\n```\n\nyou will get private score 0.81 to 0.82 depending on how you select the base models (e.g. remove comment #)",
      "votes": 4
    },
    {
      "id": 1948830,
      "postDate": "2022-09-21T10:34:35.917Z",
      "content": "<p>Thanks for everything <a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a>. Learned a lot from this topic. Hope to you see on Mayo Clinic competition…</p>",
      "rawMarkdown": "Thanks for everything @hengck23. Learned a lot from this topic. Hope to you see on Mayo Clinic competition...",
      "votes": 4,
      "replies": [
        {
          "id": 1949496,
          "postDate": "2022-09-21T17:36:28.413Z",
          "content": "<p>Many thanks, <a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a>! I also learned quite a lot from this thread.</p>",
          "rawMarkdown": "Many thanks, @hengck23! I also learned quite a lot from this thread."
        }
      ]
    },
    {
      "id": 1883676,
      "postDate": "2022-08-04T02:27:55.620Z",
      "content": "<p>best backbone for segformer<br>\n<a href=\"https://openaccess.thecvf.com/content/CVPR2022/papers/Gu_Multi-Scale_High-Resolution_Vision_Transformer_for_Semantic_Segmentation_CVPR_2022_paper.pdf\" target=\"_blank\">https://openaccess.thecvf.com/content/CVPR2022/papers/Gu_Multi-Scale_High-Resolution_Vision_Transformer_for_Semantic_Segmentation_CVPR_2022_paper.pdf</a></p>\n<p><img src=\"https://i.ibb.co/7XpM0P3/Selection-176.png\" alt=\"https://i.ibb.co/7XpM0P3/Selection-176.png\"></p>",
      "rawMarkdown": "best backbone for segformer\nhttps://openaccess.thecvf.com/content/CVPR2022/papers/Gu_Multi-Scale_High-Resolution_Vision_Transformer_for_Semantic_Segmentation_CVPR_2022_paper.pdf\n\n![https://i.ibb.co/7XpM0P3/Selection-176.png](https://i.ibb.co/7XpM0P3/Selection-176.png)",
      "votes": 3
    },
    {
      "id": 1880720,
      "postDate": "2022-08-02T02:00:07.140Z",
      "content": "<p>another paper improving segformer<br>\n<img src=\"https://i.ibb.co/4jmKVFK/Selection-135.png\" alt=\"https://i.ibb.co/4jmKVFK/Selection-135.png\"></p>",
      "rawMarkdown": "another paper improving segformer\n![https://i.ibb.co/4jmKVFK/Selection-135.png](https://i.ibb.co/4jmKVFK/Selection-135.png)",
      "votes": 3,
      "replies": [
        {
          "id": 1881570,
          "postDate": "2022-08-02T16:26:00.603Z",
          "rawMarkdown": "",
          "votes": 2,
          "isDeleted": true
        }
      ]
    },
    {
      "id": 1907339,
      "postDate": "2022-08-20T17:22:34.560Z",
      "content": "<p>i realize i made a mistake. i have been computing dice validation dice at train size of 3000.<br>\nBut there are image with pixel size less than 0.4 um, i.e. these images are \"much larger\". hence the dice for these hidden test images (largeintestine) are worse than your local results.</p>\n<p>hence size 768 seem to be sufficient for most organ, it may be too small for largeintestine. if you are using 768 for largeintestine, you need a better enlarging mask method (rather than just bilinear upscale)</p>\n<p>it is for this reason, using larger image input like 1024, 1280, 1536 improves LB scores.</p>\n<p>here are the LB scores(single fold):</p>\n<p>LB 0.81</p>\n<ul>\n<li>input = 1536</li>\n<li>augmentation = more + staintool + downsize/upsize for prostate 6 um</li>\n<li>COAT-parallel small (5 level)</li>\n</ul>\n<p>LB 0.80</p>\n<ul>\n<li>input = 1024</li>\n<li>augmentation = more </li>\n<li>COAT-parallel small (5 level)</li>\n</ul>\n<p>LB 0.79</p>\n<ul>\n<li>input = 768</li>\n<li>augmentation = more </li>\n<li>COAT-parallel small (4 level)</li>\n</ul>\n<p>1536 already max out my GPU.  <br>\nto go to 2048, i either need to 4x overlap 1536 tiles or single image using gradient check.</p>\n<p>maybe i need to rewrite the code using<br>\n<a href=\"https://openaccess.thecvf.com/content/CVPR2022/papers/Mangalam_Reversible_Vision_Transformers_CVPR_2022_paper.pdf\" target=\"_blank\">https://openaccess.thecvf.com/content/CVPR2022/papers/Mangalam_Reversible_Vision_Transformers_CVPR_2022_paper.pdf</a></p>\n<p>\"Reversible Vision Transformers achieve a reduced memory<br>\nfootprint of up to 15.5× at identical model complexity, parameters and accuracy,\" </p>",
      "rawMarkdown": "i realize i made a mistake. i have been computing dice validation dice at train size of 3000.\nBut there are image with pixel size less than 0.4 um, i.e. these images are \"much larger\". hence the dice for these hidden test images (largeintestine) are worse than your local results.\n\nhence size 768 seem to be sufficient for most organ, it may be too small for largeintestine. if you are using 768 for largeintestine, you need a better enlarging mask method (rather than just bilinear upscale)\n\nit is for this reason, using larger image input like 1024, 1280, 1536 improves LB scores.\n\nhere are the LB scores(single fold):\n\nLB 0.81\n- input = 1536\n- augmentation = more + staintool + downsize/upsize for prostate 6 um\n- COAT-parallel small (5 level)\n\nLB 0.80\n- input = 1024\n- augmentation = more \n- COAT-parallel small (5 level)\n\nLB 0.79\n- input = 768\n- augmentation = more \n- COAT-parallel small (4 level)\n\n1536 already max out my GPU.  \nto go to 2048, i either need to 4x overlap 1536 tiles or single image using gradient check.\n\nmaybe i need to rewrite the code using\nhttps://openaccess.thecvf.com/content/CVPR2022/papers/Mangalam_Reversible_Vision_Transformers_CVPR_2022_paper.pdf\n\n\"Reversible Vision Transformers achieve a reduced memory\nfootprint of up to 15.5× at identical model complexity, parameters and accuracy,\" ",
      "votes": 4,
      "replies": [
        {
          "id": 1907369,
          "postDate": "2022-08-20T17:48:47.923Z",
          "content": "<p>What puzzles me is that large image input(1024) gives me worse performance on LB.</p>",
          "rawMarkdown": "What puzzles me is that large image input(1024) gives me worse performance on LB.",
          "votes": 6
        },
        {
          "id": 1907377,
          "postDate": "2022-08-20T17:56:40.723Z",
          "content": "<p>try a few folds?</p>\n<p>the training of large images is not the same as small images.<br>\nfirst your transformer needs to be larger because you need larger receptive field.</p>\n<p>this makes the transformer too powerful and you need more regularization.  <br>\ni use more augmentation and more aux loss.  </p>\n<p>swinv2 paper (which also uses 1536) uses feature distillation as regularization.</p>\n<p>if you do it correctly you will seed you local validation improves greatly for some organs,<br>\nnotably my local cv has 0.915 for largeintestine </p>",
          "rawMarkdown": "try a few folds?\n\nthe training of large images is not the same as small images.\nfirst your transformer needs to be larger because you need larger receptive field.\n\nthis makes the transformer too powerful and you need more regularization.  \ni use more augmentation and more aux loss.  \n\nswinv2 paper (which also uses 1536) uses feature distillation as regularization.\n\nif you do it correctly you will seed you local validation improves greatly for some organs,\nnotably my local cv has 0.915 for largeintestine ",
          "votes": 5
        },
        {
          "id": 1907526,
          "postDate": "2022-08-20T21:14:34.253Z",
          "content": "<p>Let's begin the GPU war</p>",
          "rawMarkdown": "Let's begin the GPU war"
        },
        {
          "id": 1907617,
          "postDate": "2022-08-21T00:00:00.593Z",
          "content": "<p>i wonder if anyone try CNN + large image (e.g. efficient or resnet at 1024, 1028, 1536, 2048)?</p>\n<p>it is not a gpu war but a race towards larger input size.<br>\nusing larger gpu  is only one of the many available methods.</p>",
          "rawMarkdown": "i wonder if anyone try CNN + large image (e.g. efficient or resnet at 1024, 1028, 1536, 2048)?\n\nit is not a gpu war but a race towards larger input size.\nusing larger gpu  is only one of the many available methods.",
          "votes": 3
        },
        {
          "id": 1907974,
          "postDate": "2022-08-21T08:45:49.320Z",
          "content": "<p>large image for PVTv2-b4 (single fold)</p>\n<p>LB 0.80  <br>\n    input = 1024<br>\n    augmentation = more + downsize/upsize for prostate 6 um<br>\n    PVTv2-b4 (5 level)</p>\n<p>LB 0.79  <br>\n    input = 768<br>\n    augmentation = more<br>\n    PVTv2-b4 (4 level)</p>",
          "rawMarkdown": "large image for PVTv2-b4 (single fold)\n\nLB 0.80  \n    input = 1024\n    augmentation = more + downsize/upsize for prostate 6 um\n    PVTv2-b4 (5 level)\n\nLB 0.79  \n    input = 768\n    augmentation = more\n    PVTv2-b4 (4 level)\n",
          "votes": 1
        },
        {
          "id": 1909056,
          "postDate": "2022-08-22T09:23:04.633Z",
          "content": "<p><a href=\"https://ibb.co/g7Mr1yj\"><img src=\"https://i.ibb.co/MhDgTn2/Selection-030.png\" alt=\"Selection-030\"></a></p>",
          "rawMarkdown": "<a href=\"https://ibb.co/g7Mr1yj\"><img src=\"https://i.ibb.co/MhDgTn2/Selection-030.png\" alt=\"Selection-030\" border=\"0\"></a>"
        },
        {
          "id": 1911181,
          "postDate": "2022-08-24T00:52:46.453Z",
          "content": "<p>Hi Heng, may I ask what's \"PVTv2\" model? I've  been got stuck at 0.8 for quite a while, and have no idea to improve further. Thanks!</p>",
          "rawMarkdown": "Hi Heng, may I ask what's \"PVTv2\" model? I've  been got stuck at 0.8 for quite a while, and have no idea to improve further. Thanks!"
        },
        {
          "id": 1911378,
          "postDate": "2022-08-24T04:08:10.060Z",
          "content": "<p>paper: PVT v2: Improved Baselines with Pyramid Vision Transformer<br>\n<a href=\"https://github.com/whai362/PVT\" target=\"_blank\">https://github.com/whai362/PVT</a></p>\n<p>all CVT , PVTv2, MIT (segformer's mix transformer) share almost smiliar structure</p>",
          "rawMarkdown": "paper: PVT v2: Improved Baselines with Pyramid Vision Transformer\nhttps://github.com/whai362/PVT\n\nall CVT , PVTv2, MIT (segformer's mix transformer) share almost smiliar structure"
        },
        {
          "id": 1911382,
          "postDate": "2022-08-24T04:12:29.887Z",
          "content": "<p>i find a better (?) way to add level to pyramid transformer.<br>\ne.g. given pretrain weights for 4 level depths = [ 3,3,18,3], you can actually do change to 5 level depths = [3,3,15,5,3].</p>\n<p>i.e. you can shorten the third level</p>",
          "rawMarkdown": "i find a better (?) way to add level to pyramid transformer.\ne.g. given pretrain weights for 4 level depths = [ 3,3,18,3], you can actually do change to 5 level depths = [3,3,15,5,3].\n\ni.e. you can shorten the third level",
          "replies": [
            {
              "id": 1914599,
              "postDate": "2022-08-26T08:01:52.433Z",
              "content": "<blockquote>\n  <p>i find a better (?) way to add level to pyramid transformer.<br>\n  e.g. given pretrain weights for 4 level depths = [ 3,3,18,3], you can actually do change to 5 level depths = [3,3,15,5,3].</p>\n  <p>i.e. you can shorten the third level</p>\n</blockquote>\n<p>Hi, <a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a> ,<br>\nThank you for the models sharing, it really helps me on the learning of model structure and arrangement with backbones and decoders.</p>\n<p>I have a few questions about the above-mentioned depths (maybe the questions is so stupid because of my ignorance): </p>\n<ol>\n<li><p>According to the change of depths(from [3,3,18,3] to [3,3,15,5,3]), the relevant 'num_stages' will also change from 4 to 5, so the 'embed_dims / num_heads / mlp_ratios / sr_ratios' also need to be adjusted, is that right?</p></li>\n<li><p>If I used the pre-tained weight (i.e. pvt2_b4), does pre-trained weight still match the new model level?</p></li>\n</ol>\n<p>Thank you again for the selfless sharing. </p>\n<p>Best Regards</p>",
              "rawMarkdown": "> i find a better (?) way to add level to pyramid transformer.\n> e.g. given pretrain weights for 4 level depths = [ 3,3,18,3], you can actually do change to 5 level depths = [3,3,15,5,3].\n> \n> i.e. you can shorten the third level\n\nHi, @hengck23 ,\nThank you for the models sharing, it really helps me on the learning of model structure and arrangement with backbones and decoders.\n\nI have a few questions about the above-mentioned depths (maybe the questions is so stupid because of my ignorance): \n\n1.  According to the change of depths(from [3,3,18,3] to [3,3,15,5,3]), the relevant 'num_stages' will also change from 4 to 5, so the 'embed_dims / num_heads / mlp_ratios / sr_ratios' also need to be adjusted, is that right?\n\n2. If I used the pre-tained weight (i.e. pvt2_b4), does pre-trained weight still match the new model level?\n\nThank you again for the selfless sharing. \n\nBest Regards\n"
            }
          ]
        },
        {
          "id": 1911496,
          "postDate": "2022-08-24T06:14:37.277Z",
          "content": "<p>Hi <a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a>, thanks for your tips. Though having some experience in designing networks, I still struggle to have a god feeling about which direction to modify an existing network. Any rule of thumb according to your work/research experience? <br>\nThank you!</p>",
          "rawMarkdown": "Hi @hengck23, thanks for your tips. Though having some experience in designing networks, I still struggle to have a god feeling about which direction to modify an existing network. Any rule of thumb according to your work/research experience? \nThank you!"
        },
        {
          "id": 1911511,
          "postDate": "2022-08-24T06:24:10.840Z",
          "content": "<p>we already reached the max accurately , which is limited by the label noise.<br>\nsince performance is limited by data, there is no gain in designing better network.</p>\n<p>however,increase of image size can reduce the predicted mask up scaling error, but there is little additional detection of missed FTU i think.</p>\n<p>the next boost will be better data or better network to learned in self-supervsied:</p>\n<ul>\n<li>find a way to use unlablled data (hpa or hubmap), just expand a little of the decision boundary is good</li>\n<li>online learning of hidden test data</li>\n</ul>",
          "rawMarkdown": "we already reached the max accurately , which is limited by the label noise.\nsince performance is limited by data, there is no gain in designing better network.\n\nhowever,increase of image size can reduce the predicted mask up scaling error, but there is little additional detection of missed FTU i think.\n\nthe next boost will be better data or better network to learned in self-supervsied:\n- find a way to use unlablled data (hpa or hubmap), just expand a little of the decision boundary is good\n- online learning of hidden test data",
          "votes": 1
        },
        {
          "id": 1911534,
          "postDate": "2022-08-24T06:55:24.380Z",
          "content": "<p>Wait, the provided HPA images are not fully labeled? Or you mean external data on the internet? </p>\n<blockquote>\n  <p>the next boost will be better data <br>\n  I noticed you mentioned the idea of \"mixup\" or more augmentations in the thread, this also resorts to \"creating better data\" right?</p>\n</blockquote>\n<p>As for self-supervised learning, I'm not an expert in this domain, need to do some homework to understand how it works.<br>\nThank you, heng!</p>",
          "rawMarkdown": "Wait, the provided HPA images are not fully labeled? Or you mean external data on the internet? \n> the next boost will be better data \nI noticed you mentioned the idea of \"mixup\" or more augmentations in the thread, this also resorts to \"creating better data\" right?\n\nAs for self-supervised learning, I'm not an expert in this domain, need to do some homework to understand how it works.\nThank you, heng!\n"
        },
        {
          "id": 1911586,
          "postDate": "2022-08-24T07:30:14.180Z",
          "content": "<p>external data.<br>\naccording to the papers, all pretraining using external data for transformer would lead to 1 to 2 % improvement.<br>\nbut is still have to goes back to the issue, how bad are our labels, have we reached the best performance?</p>",
          "rawMarkdown": "external data.\naccording to the papers, all pretraining using external data for transformer would lead to 1 to 2 % improvement.\nbut is still have to goes back to the issue, how bad are our labels, have we reached the best performance?"
        },
        {
          "id": 1911621,
          "postDate": "2022-08-24T07:49:47.033Z",
          "content": "<p>I did some  large size experiments in cnn and transformers.</p>\n<table>\n<thead>\n<tr>\n<th>net</th>\n<th>image size</th>\n<th>cv</th>\n<th>lb</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>efficientnet_b5 + unet</td>\n<td>1536</td>\n<td>0.7966</td>\n<td>0.80</td>\n</tr>\n<tr>\n<td>coat_parallel_small(5 level) + daformer_conv1x1</td>\n<td>1536</td>\n<td>0.8034</td>\n<td>0.77</td>\n</tr>\n</tbody>\n</table>\n<p>Both of lb are 5 folds ensemble results.<br>\nI don't know why my transformer model has such a big gap.</p>",
          "rawMarkdown": "I did some  large size experiments in cnn and transformers.\n\n| net | image size|  cv| lb |\n| --- | --- |  --- |  --- |\n| efficientnet_b5 + unet | 1536 |0.7966 | 0.80 |\n| coat_parallel_small(5 level) + daformer_conv1x1 | 1536 | 0.8034| 0.77|\n\nBoth of lb are 5 folds ensemble results.\nI don't know why my transformer model has such a big gap.",
          "votes": 3
        },
        {
          "id": 1911648,
          "postDate": "2022-08-24T08:08:17.727Z",
          "content": "<p>i think it is over fitting or bug.<br>\nyou should have aux loss for all parallel block output expect the first one. use more augmentation?</p>\n<p>cv dice is not a good indicator.<br>\nhow many iterations/epoch did you train?</p>\n<p>check your cv bce loss.<br>\nat least 1536 cv bce should be better than 1024, which is better than 768.</p>\n<p>better bce indicates  \"better margin\"</p>\n<p>check the train/valid bce of your unet and coat_parallel_small</p>\n<hr>\n<p>you can only add a few new uninitialized serial block layers. we still need pretrain weights for most of the serial block layers/parallel block layers. else i think it will overfit.</p>\n<hr>\n<p>0.77 seems like a bug. how about try 768 first?<br>\nor try without swa first.</p>",
          "rawMarkdown": "i think it is over fitting or bug.\nyou should have aux loss for all parallel block output expect the first one. use more augmentation?\n\ncv dice is not a good indicator.\nhow many iterations/epoch did you train?\n\ncheck your cv bce loss.\nat least 1536 cv bce should be better than 1024, which is better than 768.\n\nbetter bce indicates  \"better margin\"\n\ncheck the train/valid bce of your unet and coat_parallel_small\n\n---\n\nyou can only add a few new uninitialized serial block layers. we still need pretrain weights for most of the serial block layers/parallel block layers. else i think it will overfit.\n\n---\n\n0.77 seems like a bug. how about try 768 first?\nor try without swa first."
        },
        {
          "id": 1911665,
          "postDate": "2022-08-24T08:17:41.013Z",
          "content": "<p>my parallel block. use is skip first = True</p>\n<p><a href=\"https://gist.github.com/hengck23/b2c2bcd8de06248add46097ec55ce578#file-my-parallel-blovk\" target=\"_blank\">https://gist.github.com/hengck23/b2c2bcd8de06248add46097ec55ce578#file-my-parallel-blovk</a></p>",
          "rawMarkdown": "my parallel block. use is skip first = True\n\nhttps://gist.github.com/hengck23/b2c2bcd8de06248add46097ec55ce578#file-my-parallel-blovk"
        },
        {
          "id": 1911673,
          "postDate": "2022-08-24T08:28:55.990Z",
          "content": "<p><a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a>  Thanks for your advice. I will check them.<br>\nI did more aux and more augmentation and training with 400 epoch.</p>\n<p>More aux:<br>\n`</p>\n<pre><code>    if self.CFG.aux:\n        aux_logits = res['aux_logits']\n        for aux_logit in aux_logits:\n            loss += 0.2*self.criterion_aux_loss(aux_logit, masks)\n</code></pre>\n<p>`</p>\n<p>Basic aug:  flip , rotate, transpose, contrast,hsv, noise, etc.<br>\nMore aug: </p>\n<p><code>\n        ElasticTransform,\n        GridDistortion,\n        RandomGamma,\n        Cutout, etc\n</code></p>\n<p>I will  try  more heavy augmentation.</p>",
          "rawMarkdown": "@hengck23  Thanks for your advice. I will check them.\nI did more aux and more augmentation and training with 400 epoch.\n\nMore aux:\n`\n\n        if self.CFG.aux:\n            aux_logits = res['aux_logits']\n            for aux_logit in aux_logits:\n                loss += 0.2*self.criterion_aux_loss(aux_logit, masks)\n`\n\nBasic aug:  flip , rotate, transpose, contrast,hsv, noise, etc.\nMore aug: \n\n`\n        ElasticTransform,\n        GridDistortion,\n        RandomGamma,\n        Cutout, etc\n`\n\nI will  try  more heavy augmentation.",
          "votes": 3
        },
        {
          "id": 1911677,
          "postDate": "2022-08-24T08:32:22.637Z",
          "content": "<p>what is your batch size? </p>\n<p>\"I did more aux and more augmentation and training with 400 epoch.\"<br>\n\"I will try more heavy augmentation.\"</p>\n<p>i suggest you train and submit a coat small parallel at 768. use this as reference to judge and guide your 1536 training. (the loss curve should be better than 768). you must get 0.78-79 for 768. 1536 will give you +0.02</p>\n<hr>\n<p>note<br>\nswap color channel and gray definitely hurts LB score for my experiemnts</p>",
          "rawMarkdown": "what is your batch size? \n\n\"I did more aux and more augmentation and training with 400 epoch.\"\n\"I will try more heavy augmentation.\"\n\ni suggest you train and submit a coat small parallel at 768. use this as reference to judge and guide your 1536 training. (the loss curve should be better than 768). you must get 0.78-79 for 768. 1536 will give you +0.02\n\n---\n\nnote\nswap color channel and gray definitely hurts LB score for my experiemnts",
          "votes": 2
        },
        {
          "id": 1911714,
          "postDate": "2022-08-24T08:59:11.183Z",
          "content": "<p>total batch size = 8.<br>\nI will try it following your opinion.</p>\n<p><code>\ni suggest you train and submit a coat small parallel at 768. use this as reference to judge and guide your 1536 training. (the loss curve should be better than 768). you must get 0.78-79 for 768. 1536 will give you +0.02\n</code></p>\n<p>Really thanks for your kind answer and always learn a lot from your disscusion. </p>",
          "rawMarkdown": "total batch size = 8.\nI will try it following your opinion.\n\n`\ni suggest you train and submit a coat small parallel at 768. use this as reference to judge and guide your 1536 training. (the loss curve should be better than 768). you must get 0.78-79 for 768. 1536 will give you +0.02\n`\n\nReally thanks for your kind answer and always learn a lot from your disscusion. "
        },
        {
          "id": 1912170,
          "postDate": "2022-08-24T14:55:42.830Z",
          "content": "<p><a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a> </p>\n<blockquote>\n  <p>external data.<br>\n  according to the papers, all pretraining using external data for transformer would lead to 1 to 2 % improvement.<br>\n  Understood. </p>\n  <p>but is still have to goes back to the issue, how bad are our labels, have we reached the best performance?<br>\n  You're right. Tha't a good question. </p>\n</blockquote>",
          "rawMarkdown": "@hengck23 \n> external data.\naccording to the papers, all pretraining using external data for transformer would lead to 1 to 2 % improvement.\nUnderstood. \n\n> but is still have to goes back to the issue, how bad are our labels, have we reached the best performance?\nYou're right. Tha't a good question. "
        },
        {
          "id": 1913332,
          "postDate": "2022-08-25T09:28:53.363Z",
          "content": "<p><a href=\"https://www.kaggle.com/yingpengchen\" target=\"_blank\">@yingpengchen</a> </p>\n<p>my results for tf_efficientnet_b6 smp unet 1536 single fold (fold3)<br>\nLB =0.80</p>\n<p>(i think ensemble will be 0.80~0.81)<br>\nmaybe b6 is better than b5 or maybe my augmentation is better</p>",
          "rawMarkdown": "@yingpengchen \n\nmy results for tf_efficientnet_b6 smp unet 1536 single fold (fold3)\nLB =0.80\n\n(i think ensemble will be 0.80~0.81)\nmaybe b6 is better than b5 or maybe my augmentation is better\n",
          "votes": 2
        },
        {
          "id": 1914312,
          "postDate": "2022-08-26T01:44:34.183Z",
          "content": "<p><a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a> </p>\n<p>Great job! </p>\n<p><code>\nmaybe b6 is better than b5 or maybe my augmentation is better\n</code></p>\n<p>Maybe augmentation more important, I try tf_efficientnet_b7 smp unet 1536 improve cv but drop lb seriously.</p>\n<p>I guess the lb limit is 0.81 with single model( single fold or ensemble n folds).</p>",
          "rawMarkdown": "@hengck23 \n\nGreat job! \n\n`\nmaybe b6 is better than b5 or maybe my augmentation is better\n`\n\nMaybe augmentation more important, I try tf_efficientnet_b7 smp unet 1536 improve cv but drop lb seriously.\n\nI guess the lb limit is 0.81 with single model( single fold or ensemble n folds).",
          "votes": 1
        },
        {
          "id": 1914324,
          "postDate": "2022-08-26T02:12:35.947Z",
          "content": "<p>\"Maybe augmentation more important, \"</p>\n<p>too much and too little augmentation is no good.it is easy to obtain CV 0.80.<br>\ni once made a mistake. i load rubbish ground truth mask for external data and train together with kaggle train data.<br>\ni can still obtain CV 0.80 for kaggle validation in that case (but of course LB score is not good)</p>\n<p>it is important to visualize prediction on external data.</p>",
          "rawMarkdown": "\"Maybe augmentation more important, \"\n\ntoo much and too little augmentation is no good.it is easy to obtain CV 0.80.\ni once made a mistake. i load rubbish ground truth mask for external data and train together with kaggle train data.\ni can still obtain CV 0.80 for kaggle validation in that case (but of course LB score is not good)\n\nit is important to visualize prediction on external data.\n",
          "votes": 1
        },
        {
          "id": 1914859,
          "postDate": "2022-08-26T13:37:41.830Z",
          "content": "<blockquote>\n  <blockquote>\n    <p>'embed_dims / num_heads / mlp_ratios / sr_ratios' also need to be adjusted, is that right?<br>\n    for the last level i just use previous level values. <br>\n    the last level is not very deep, so i don't think it matters.</p>\n  </blockquote>\n</blockquote>\n<p>from another paper:<br>\n<a href=\"https://ibb.co/HdGkVK0\"><img src=\"https://i.ibb.co/M6P3sgb/Selection-088.png\" alt=\"Selection-088\"></a></p>\n<blockquote>\n  <blockquote>\n    <p>If I used the pre-tained weight (i.e. pvt2_b4), does pre-trained weight still match the new model level?<br>\n    you can only load pretrain model up to old levels. the new level are trained from scratch. hence the new level cannot be very deep because you don't have pretrain weight.</p>\n  </blockquote>\n</blockquote>\n<p>what i am doing is like extending resnet backbone from 4 layers to 5,6 layers (p6,p7) to detect large object in FPN</p>",
          "rawMarkdown": ">> 'embed_dims / num_heads / mlp_ratios / sr_ratios' also need to be adjusted, is that right?\nfor the last level i just use previous level values. \nthe last level is not very deep, so i don't think it matters.\n\nfrom another paper:\n<a href=\"https://ibb.co/HdGkVK0\"><img src=\"https://i.ibb.co/M6P3sgb/Selection-088.png\" alt=\"Selection-088\" border=\"0\"></a>\n\n>>If I used the pre-tained weight (i.e. pvt2_b4), does pre-trained weight still match the new model level?\nyou can only load pretrain model up to old levels. the new level are trained from scratch. hence the new level cannot be very deep because you don't have pretrain weight.\n\nwhat i am doing is like extending resnet backbone from 4 layers to 5,6 layers (p6,p7) to detect large object in FPN\n"
        },
        {
          "id": 1914861,
          "postDate": "2022-08-26T13:40:40.460Z",
          "content": "<p>since the new layer is small, one can simply use conv instead of trasnformer</p>",
          "rawMarkdown": "since the new layer is small, one can simply use conv instead of trasnformer"
        },
        {
          "id": 1915442,
          "postDate": "2022-08-27T01:43:00.267Z",
          "content": "<p>Thank you for the fast reply. The new layer advice helps me a lot. </p>",
          "rawMarkdown": "Thank you for the fast reply. The new layer advice helps me a lot. "
        },
        {
          "id": 1915512,
          "postDate": "2022-08-27T03:07:33.960Z",
          "content": "<p>you train a normal network first.<br>\nthen freeze (or partially freeze) the trained network and train only the new layers, etc.</p>",
          "rawMarkdown": "you train a normal network first.\nthen freeze (or partially freeze) the trained network and train only the new layers, etc."
        },
        {
          "id": 1918676,
          "postDate": "2022-08-29T18:33:12.663Z",
          "content": "<p><a href=\"https://www.kaggle.com/yingpengchen\" target=\"_blank\">@yingpengchen</a> </p>\n<blockquote>\n  <blockquote>\n    <p>training with 400 epoch.</p>\n  </blockquote>\n</blockquote>\n<p>it seems to me that 400 is too many.<br>\ni use about 200 to 230 for batch size 4 </p>",
          "rawMarkdown": "@yingpengchen \n\n>>training with 400 epoch.\n\nit seems to me that 400 is too many.\ni use about 200 to 230 for batch size 4 ",
          "votes": 2
        },
        {
          "id": 1918901,
          "postDate": "2022-08-30T01:13:21.380Z",
          "content": "<p><a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a> <br>\nThanks for your tips. <br>\n I also observed this phenomenon, after epochs greater than 300, the avg_loss is increasing.</p>",
          "rawMarkdown": "@hengck23 \nThanks for your tips. \n I also observed this phenomenon, after epochs greater than 300, the avg_loss is increasing.\n"
        },
        {
          "id": 1925499,
          "postDate": "2022-09-04T02:58:09.690Z",
          "content": "<p>The thing about larger image with efficient net or resnet is…   I think it is suggested to use 224 image size with resnet18 and effnet b0 where 240 size with efficient net b1 and goes to 700 image size for efficient net b7. Though CNN  would work with any size of image still we need to create much larger efficient net like b9 Or b10( if exist) </p>\n<p>Don't know if <a href=\"https://www.kaggle.com/yingpengchen\" target=\"_blank\">@yingpengchen</a> if efficient net with 0.80 is most probably overfit<br>\nCorrect me if I am thinking in wrong direction. </p>",
          "rawMarkdown": "The thing about larger image with efficient net or resnet is...   I think it is suggested to use 224 image size with resnet18 and effnet b0 where 240 size with efficient net b1 and goes to 700 image size for efficient net b7. Though CNN  would work with any size of image still we need to create much larger efficient net like b9 Or b10( if exist) \n\nDon't know if @yingpengchen if efficient net with 0.80 is most probably overfit\nCorrect me if I am thinking in wrong direction. "
        },
        {
          "id": 1926781,
          "postDate": "2022-09-05T05:40:41.230Z",
          "content": "<p><a href=\"https://www.kaggle.com/bibhabasumohapatra\" target=\"_blank\">@bibhabasumohapatra</a> it's possible, but currently we don't have such a trained model like b9 or b10.</p>\n<p><code>\nDon't know if @yingpengchen if efficient net with 0.80 is most probably overfit\n</code></p>\n<p>It's hard to say, but compared to the 768 lb+0.02 improvement for me.</p>",
          "rawMarkdown": "@bibhabasumohapatra it's possible, but currently we don't have such a trained model like b9 or b10.\n\n`\nDon't know if @yingpengchen if efficient net with 0.80 is most probably overfit\n`\n\nIt's hard to say, but compared to the 768 lb+0.02 improvement for me.",
          "votes": 1
        },
        {
          "id": 1926789,
          "postDate": "2022-09-05T06:04:35.247Z",
          "content": "<p>Wait, you guys are training for 300-400 epochs? My models converge after 30 epochs.</p>",
          "rawMarkdown": "Wait, you guys are training for 300-400 epochs? My models converge after 30 epochs.",
          "votes": 4
        },
        {
          "id": 1939399,
          "postDate": "2022-09-14T17:05:52.030Z",
          "content": "<p><a href=\"https://www.kaggle.com/gunesevitan\" target=\"_blank\">@gunesevitan</a> exactly . . . 30 to max 35 is fine almost 45 . . . my model converges. never thought of 300 epochs . .. 😯😯 </p>",
          "rawMarkdown": "@gunesevitan exactly . . . 30 to max 35 is fine almost 45 . . . my model converges. never thought of 300 epochs . .. 😯😯 "
        },
        {
          "id": 1944014,
          "postDate": "2022-09-18T01:48:05.853Z",
          "content": "<p>Hi, I am a beginner. I would like to ask what exactly \"augmentation = more\" is. <br>\nThe gap between my cv and lb is huge (0.7 vs 0.43). <br>\nA kind person told me it was because I didn't use data augmentation during training and testing.<br>\nI would like to ask if I can improve my score by applying more data augmentation like these. <br>\nOr do you have any better suggestions to improve this situation? thank you very much🙏🙏</p>",
          "rawMarkdown": "Hi, I am a beginner. I would like to ask what exactly \"augmentation = more\" is. \nThe gap between my cv and lb is huge (0.7 vs 0.43). \nA kind person told me it was because I didn't use data augmentation during training and testing.\nI would like to ask if I can improve my score by applying more data augmentation like these. \nOr do you have any better suggestions to improve this situation? thank you very much🙏🙏"
        }
      ]
    },
    {
      "id": 1870978,
      "postDate": "2022-07-26T01:58:11.867Z",
      "content": "<p>as shown in the CV-LB graph at the top, all my CV-HPA, LB-HPA,LB-Hubmap,LB-public has converged!<br>\nI was right that the upper limit is about 0.80 without external data.</p>\n<p>this could be the bronze medal limit after 2 months</p>\n<hr>\n<p>I choose a variety of encoder, decoder, optimizer. These are not chosen at random but target at the root of problems</p>",
      "rawMarkdown": "as shown in the CV-LB graph at the top, all my CV-HPA, LB-HPA,LB-Hubmap,LB-public has converged!\nI was right that the upper limit is about 0.80 without external data.\n\nthis could be the bronze medal limit after 2 months\n\n---\n\nI choose a variety of encoder, decoder, optimizer. These are not chosen at random but target at the root of problems",
      "votes": 3,
      "replies": [
        {
          "id": 1872506,
          "postDate": "2022-07-27T03:32:05.373Z",
          "content": "<p>Hi hengck23,</p>\n<p>How did you reach the 0.8 upper limit? Why isn't it 1? I saw your probe post further down with the guess, but I couldn't tell how you reached that conclusion. Is it some out of distribution thing? Thanks</p>",
          "rawMarkdown": "Hi hengck23,\n\nHow did you reach the 0.8 upper limit? Why isn't it 1? I saw your probe post further down with the guess, but I couldn't tell how you reached that conclusion. Is it some out of distribution thing? Thanks"
        },
        {
          "id": 1872513,
          "postDate": "2022-07-27T03:43:19.347Z",
          "content": "<p>it cannot be 1 becuase of label noise.<br>\na quick guide is train dice &gt;= local validation dice &gt;=leaderboard dice</p>\n<p>train dice is the upper limit at the point before overfitting. you can train you model for very long iterations to find the point of overfitting (i.e. when your validation dice becomes a V shape.)</p>",
          "rawMarkdown": "it cannot be 1 becuase of label noise.\na quick guide is train dice >= local validation dice >=leaderboard dice\n\ntrain dice is the upper limit at the point before overfitting. you can train you model for very long iterations to find the point of overfitting (i.e. when your validation dice becomes a V shape.)\n\n",
          "votes": 2
        },
        {
          "id": 1874056,
          "postDate": "2022-07-28T04:04:48.503Z",
          "content": "<p>Thank you for the quick, and helpful reply!</p>",
          "rawMarkdown": "Thank you for the quick, and helpful reply!"
        }
      ]
    },
    {
      "id": 1867021,
      "postDate": "2022-07-23T01:02:51.697Z",
      "content": "<p>what is the normalized size of hidden test images?</p>\n<p>in order to apply transformer segmentation, i need to have a rough ideal of the max and min input size of the test image.<br>\n(i need to decide absolute/relative positional encoding, token patch size ….)<br>\nhence i do a probe.</p>\n<p>the results: all test image are within 0.8 to 1.2 of normalized size.</p>\n<pre><code>    test_df = pd.read_csv('../input/hubmap-organ-segmentation/test.csv')                        \n    test_df.loc[:,'norm_size']= test_df.pixel_size/0.4 * test_df.img_height/3000                         \n                    #assume img_height==img_width       \n    max_norm_size = test_df.norm_size.max()                        \n    min_norm_size = test_df.norm_size.min()                        \n</code></pre>\n<p>below two conditions are probed true:</p>\n<pre><code>if (min_norm_size&gt;=0.8) and (min_norm_size&lt;1.0): \nif (max_norm_size&gt;=1.0) and (max_norm_size&lt;1.2):  \n</code></pre>\n<p>note we can also deuce that smallest 160x160 test images mentioned refer to prostate<br>\nimages with pixel size 6.2630  um. (you should do resize artifacts augmentation for this case in training)</p>\n<p>largest 4500x4500 test image refer to large intestine with pixel size 0.229  um</p>",
      "rawMarkdown": "what is the normalized size of hidden test images?\n\nin order to apply transformer segmentation, i need to have a rough ideal of the max and min input size of the test image.\n(i need to decide absolute/relative positional encoding, token patch size ....)\nhence i do a probe.\n\nthe results: all test image are within 0.8 to 1.2 of normalized size.\n\n```\n    test_df = pd.read_csv('../input/hubmap-organ-segmentation/test.csv')\t\t\t\t\t\t\n    test_df.loc[:,'norm_size']= test_df.pixel_size/0.4 * test_df.img_height/3000 \t\t\t\t\t\t\n    \t\t\t\t#assume img_height==img_width\t\t\n    max_norm_size = test_df.norm_size.max()\t\t\t\t\t\t\n    min_norm_size = test_df.norm_size.min()\t\t\t\t\t\t\n\n```\n\nbelow two conditions are probed true:\n\n```    \nif (min_norm_size>=0.8) and (min_norm_size<1.0): \nif (max_norm_size>=1.0) and (max_norm_size<1.2):  \n```\n\nnote we can also deuce that smallest 160x160 test images mentioned refer to prostate\nimages with pixel size 6.2630  um. (you should do resize artifacts augmentation for this case in training)\n\nlargest 4500x4500 test image refer to large intestine with pixel size 0.229  um",
      "votes": 3,
      "replies": [
        {
          "id": 1868097,
          "postDate": "2022-07-23T17:29:41.347Z",
          "content": "<p>\"assume img_height==img_width\" <br>\nThis passed:<br>\nif (df['img_width']==df['img_height']).all():</p>\n<p>All images are square</p>",
          "rawMarkdown": "\"assume img_height==img_width\" \nThis passed:\nif (df['img_width']==df['img_height']).all():\n\nAll images are square",
          "votes": 1
        }
      ]
    },
    {
      "id": 1864027,
      "postDate": "2022-07-20T17:14:41.743Z",
      "content": "<p>maybe this also works for our problem: labelled kaggle train images + unlabelled download external data</p>\n<p><a href=\"https://www.youtube.com/watch?v=FTmvdARsbnI\" target=\"_blank\">https://www.youtube.com/watch?v=FTmvdARsbnI</a><br>\nMedAI Session 25: Training medical image segmentation models with less labeled data | Sarah Hooper</p>",
      "rawMarkdown": "maybe this also works for our problem: labelled kaggle train images + unlabelled download external data\n\nhttps://www.youtube.com/watch?v=FTmvdARsbnI\nMedAI Session 25: Training medical image segmentation models with less labeled data | Sarah Hooper",
      "votes": 3,
      "replies": [
        {
          "id": 1877358,
          "postDate": "2022-07-30T14:59:22.810Z",
          "content": "<p>this is mentioned in the video. i put it into picture.<br>\nstage1: train normally in supervised to get an initial model (and baseline results)<br>\nstage2: train joint supervised and unsupervised (and see if you get improved results)</p>\n<p><img src=\"https://i.ibb.co/t2mP3Ns/Selection-118.png\" alt=\"https://i.ibb.co/t2mP3Ns/Selection-118.png\"></p>\n<p>there is a final stage 3 which uses pesudo labels</p>",
          "rawMarkdown": "this is mentioned in the video. i put it into picture.\nstage1: train normally in supervised to get an initial model (and baseline results)\nstage2: train joint supervised and unsupervised (and see if you get improved results)\n\n![https://i.ibb.co/t2mP3Ns/Selection-118.png](https://i.ibb.co/t2mP3Ns/Selection-118.png)\n\nthere is a final stage 3 which uses pesudo labels",
          "votes": 1
        }
      ]
    },
    {
      "id": 1881977,
      "postDate": "2022-08-03T01:42:43.543Z",
      "content": "<p>you may think that the results of Hunmap are inferior to that of HPA because of colors of the stains.<br>\nBut this may not be true.</p>\n<p>You can verify this by  changing the color of your validation HPA stains (e.g. HSV shift, convert to gray, stain color transfer) and compare with results of the original colored HPA images. You should see similar relative performance in your Lb-HPA and Lb-Humap score.</p>\n<p>Likewise for other factors like pixel size in um, slice thickness, resolution, etc …</p>\n<hr>\n<p>Hubmap are real lab tissue slides. there are many more issues, see below.<br>\nthis is left as an exercise for you: \"how to prove that if these issues actually exist in the hidden test set?\"</p>\n<p><img src=\"https://i.ibb.co/DgTsVxk/Selection-164.png\" alt=\"https://i.ibb.co/DgTsVxk/Selection-164.png\"></p>\n<hr>\n<p>even if these issues does not exist in the hidden test set, it will still boost your chance in the \"Judges prizes\" if analysis and results are presented to show your robustness of your model against real artifacts.</p>\n<hr>\n<p>on a side note, when i develop commercial computer vision model for by clients, \"black box\" testing is common. We do not see the test set at all. What we know is the feedback of the results (e.g. score against other bidding vendors, competitor products). So we have devised a way to fault find the issues even if we do not see the images. e.g.</p>\n<ul>\n<li>using auto-encoders, etc to measure out-of distributions from your train set</li>\n<li>apply your model on large test set (including out of distributions). train a classifier to classify the type of errors. then you can map error to input image.</li>\n</ul>\n<hr>\n<p>external data may not help you to detect more FTU, but they are definitely of great help to remove false positive and show your model weakness and issues</p>\n<hr>\n<p>the score of LB-hubmap-public and LB-hubmap-private may be closer then what your think (i.e. little shakeup). it is likely that a sample tissues has many cropped slide samples. They are then split between public and private set.</p>",
      "rawMarkdown": "you may think that the results of Hunmap are inferior to that of HPA because of colors of the stains.\nBut this may not be true.\n\nYou can verify this by  changing the color of your validation HPA stains (e.g. HSV shift, convert to gray, stain color transfer) and compare with results of the original colored HPA images. You should see similar relative performance in your Lb-HPA and Lb-Humap score.\n\nLikewise for other factors like pixel size in um, slice thickness, resolution, etc ...\n\n---\n\nHubmap are real lab tissue slides. there are many more issues, see below.\nthis is left as an exercise for you: \"how to prove that if these issues actually exist in the hidden test set?\"\n\n\n![https://i.ibb.co/DgTsVxk/Selection-164.png](https://i.ibb.co/DgTsVxk/Selection-164.png)\n\n---\n\neven if these issues does not exist in the hidden test set, it will still boost your chance in the \"Judges prizes\" if analysis and results are presented to show your robustness of your model against real artifacts.\n\n---\n\non a side note, when i develop commercial computer vision model for by clients, \"black box\" testing is common. We do not see the test set at all. What we know is the feedback of the results (e.g. score against other bidding vendors, competitor products). So we have devised a way to fault find the issues even if we do not see the images. e.g.\n\n- using auto-encoders, etc to measure out-of distributions from your train set\n- apply your model on large test set (including out of distributions). train a classifier to classify the type of errors. then you can map error to input image.\n\n---\n\nexternal data may not help you to detect more FTU, but they are definitely of great help to remove false positive and show your model weakness and issues\n\n---\n\nthe score of LB-hubmap-public and LB-hubmap-private may be closer then what your think (i.e. little shakeup). it is likely that a sample tissues has many cropped slide samples. They are then split between public and private set.",
      "votes": 4
    },
    {
      "id": 1875484,
      "postDate": "2022-07-29T04:07:45.280Z",
      "content": "<p>beware!!!!</p>\n<p>the distribution of the organ in Hubmap is not what you think</p>\n<p><img src=\"https://i.ibb.co/k9FBv0V/Selection-136.png\" alt=\"https://i.ibb.co/k9FBv0V/Selection-136.png\"></p>",
      "rawMarkdown": "beware!!!!\n\nthe distribution of the organ in Hubmap is not what you think\n\n![https://i.ibb.co/k9FBv0V/Selection-136.png](https://i.ibb.co/k9FBv0V/Selection-136.png)\n ",
      "votes": 4,
      "replies": [
        {
          "id": 1875821,
          "postDate": "2022-07-29T10:14:44.740Z",
          "content": "<p>this confirms with my observation that the recent improvement in my LB score especially from 0.76 to 8.80 actually comes from prostate, lung and spleen.</p>\n<p>it is also noted that segformer is strong in lung.</p>\n<p>further, the FTU object size for spleen is larger then the rest. one have to take cares of scale. if you are using tiling, you need to check if your tile can contain the largest FTU object or not</p>",
          "rawMarkdown": "this confirms with my observation that the recent improvement in my LB score especially from 0.76 to 8.80 actually comes from prostate, lung and spleen.\n\nit is also noted that segformer is strong in lung.\n\nfurther, the FTU object size for spleen is larger then the rest. one have to take cares of scale. if you are using tiling, you need to check if your tile can contain the largest FTU object or not",
          "votes": 3
        }
      ]
    },
    {
      "id": 1870646,
      "postDate": "2022-07-25T17:30:06.703Z",
      "content": "<p>i realise one very important note:</p>\n<ul>\n<li>you should make post submission to last year competition using your current model to see your domain shift </li>\n</ul>",
      "rawMarkdown": "i realise one very important note:\n- you should make post submission to last year competition using your current model to see your domain shift ",
      "votes": 4
    },
    {
      "id": 1858202,
      "postDate": "2022-07-16T18:28:24.303Z",
      "content": "<p>update of results LB 0.72:<br>\n<img src=\"https://i.ibb.co/rmnSNH0/Selection-060.png\" alt=\"https://i.ibb.co/rmnSNH0/Selection-060.png\"></p>",
      "rawMarkdown": "update of results LB 0.72:\n![https://i.ibb.co/rmnSNH0/Selection-060.png](https://i.ibb.co/rmnSNH0/Selection-060.png)",
      "votes": 4,
      "replies": [
        {
          "id": 1860583,
          "postDate": "2022-07-18T12:01:17.177Z",
          "content": "<p><img src=\"https://i.ibb.co/wrx84gs/Selection-096.png\" alt=\"https://i.ibb.co/wrx84gs/Selection-096.png\"></p>\n<p>surprise! surprise! the probe by organ is not what i would expect …</p>\n<p>i wonder anyone has probed the distribution of the organ and willing to share?</p>\n<p>the domain shift is not as large as expected. this is good news. <br>\nnot reported in the table are training score : ~0.85<br>\ni estimate final leader board at the last day of competition:<br>\npublic LB : 0.80 (HPA=0.81, Hubmap=0.80)<br>\nprivate LB : &gt;=0.79 (Hubmap&gt;=0.79)</p>",
          "rawMarkdown": "![https://i.ibb.co/wrx84gs/Selection-096.png](https://i.ibb.co/wrx84gs/Selection-096.png)\n\nsurprise! surprise! the probe by organ is not what i would expect ...\n\ni wonder anyone has probed the distribution of the organ and willing to share?\n\nthe domain shift is not as large as expected. this is good news. \nnot reported in the table are training score : ~0.85\ni estimate final leader board at the last day of competition:\npublic LB : 0.80 (HPA=0.81, Hubmap=0.80)\nprivate LB : >=0.79 (Hubmap>=0.79)",
          "votes": 2
        },
        {
          "id": 1861332,
          "postDate": "2022-07-19T01:15:20.237Z",
          "content": "<p>what is the key to improvement?<br>\nreceptive field size, scale?<br>\ndid you interpret results correctly?</p>\n<p>the reason why we try different models is to test if their responses are similar to the same data.<br>\nthis reveal data characteristics … more to come : other segmentation architecture besides unet, etc </p>\n<p><img src=\"https://i.ibb.co/7yVHRcz/Selection-095.png\" alt=\"https://i.ibb.co/7yVHRcz/Selection-095.png\"></p>",
          "rawMarkdown": "what is the key to improvement?\nreceptive field size, scale?\ndid you interpret results correctly?\n\nthe reason why we try different models is to test if their responses are similar to the same data.\nthis reveal data characteristics ... more to come : other segmentation architecture besides unet, etc \n\n![https://i.ibb.co/7yVHRcz/Selection-095.png](https://i.ibb.co/7yVHRcz/Selection-095.png)",
          "votes": 1
        },
        {
          "id": 1861362,
          "postDate": "2022-07-19T01:45:15.123Z",
          "content": "<p>do compare the results with hubmap paper:<br>\n<a href=\"https://www.biorxiv.org/content/10.1101/2021.11.09.467810v1.full.pdf\" target=\"_blank\">https://www.biorxiv.org/content/10.1101/2021.11.09.467810v1.full.pdf</a></p>\n<p>Supplementary table 5. Algorithm performance. (without domain shift)<br>\nKaggle reproduced (kidney) :0.93~0.97<br>\nTransfer learning (trained on kidney &amp; colon, tested on colon) : ~0.88 </p>\n<p>gives you an idea of effect of domain shift (ours), annotation error, etc</p>",
          "rawMarkdown": "do compare the results with hubmap paper:\nhttps://www.biorxiv.org/content/10.1101/2021.11.09.467810v1.full.pdf\n\nSupplementary table 5. Algorithm performance. (without domain shift)\nKaggle reproduced (kidney) :0.93~0.97\nTransfer learning (trained on kidney & colon, tested on colon) : ~0.88 \n\ngives you an idea of effect of domain shift (ours), annotation error, etc"
        },
        {
          "id": 1861472,
          "postDate": "2022-07-19T03:58:49.477Z",
          "content": "<p>5-fold unet-efficientb7 (lb=0.75)<br>\nresults on the given public test spleen image</p>\n<p><img src=\"https://i.ibb.co/hBMg88Q/Selection-101.png\" alt=\"https://i.ibb.co/hBMg88Q/Selection-101.png\"></p>",
          "rawMarkdown": "5-fold unet-efficientb7 (lb=0.75)\nresults on the given public test spleen image\n\n![https://i.ibb.co/hBMg88Q/Selection-101.png](https://i.ibb.co/hBMg88Q/Selection-101.png)",
          "votes": 5
        },
        {
          "id": 1861527,
          "postDate": "2022-07-19T05:00:26.540Z",
          "content": "<p>ccf-research-kaggle-2021 : hubmap CL_HandE_1234_B004_bottomleft.tiff<br>\n(but i don't know what is the um per pixel size for the datset. can anyone advise?)</p>\n<p><img src=\"https://i.ibb.co/YcfHVLD/Selection-102.png\" alt=\"https://i.ibb.co/YcfHVLD/Selection-102.png\"></p>",
          "rawMarkdown": "ccf-research-kaggle-2021 : hubmap CL_HandE_1234_B004_bottomleft.tiff\n(but i don't know what is the um per pixel size for the datset. can anyone advise?)\n\n![https://i.ibb.co/YcfHVLD/Selection-102.png](https://i.ibb.co/YcfHVLD/Selection-102.png)",
          "votes": 2
        },
        {
          "id": 1861561,
          "postDate": "2022-07-19T05:17:51.683Z",
          "content": "<p>kaggle 2021 hubmap kidney image</p>\n<p><img src=\"https://i.ibb.co/r5Y8gbW/Selection-104.png\" alt=\"https://i.ibb.co/r5Y8gbW/Selection-104.png\"></p>",
          "rawMarkdown": "kaggle 2021 hubmap kidney image\n\n![https://i.ibb.co/r5Y8gbW/Selection-104.png](https://i.ibb.co/r5Y8gbW/Selection-104.png)"
        },
        {
          "id": 1862452,
          "postDate": "2022-07-19T17:45:20.037Z",
          "content": "<p>how do you ensemble 5 fold seg models? you get average? what is your method?</p>",
          "rawMarkdown": "how do you ensemble 5 fold seg models? you get average? what is your method?"
        },
        {
          "id": 1862544,
          "postDate": "2022-07-19T19:29:04.253Z",
          "content": "<p>just average</p>",
          "rawMarkdown": "just average",
          "votes": 1
        },
        {
          "id": 1863905,
          "postDate": "2022-07-20T15:30:31.547Z",
          "content": "<p>added uper-net-convnext-large to the ensemble</p>\n<p>the very best model<br>\n1) upernet-convnext-large : LB=0.75<br>\n2) unet-efficientb7: LB=0.75<br>\n3) upernet-swin-tx-small: LB=0.75</p>",
          "rawMarkdown": "added uper-net-convnext-large to the ensemble\n\nthe very best model\n1) upernet-convnext-large : LB=0.75\n2) unet-efficientb7: LB=0.75\n3) upernet-swin-tx-small: LB=0.75\n",
          "votes": 1
        },
        {
          "id": 1866539,
          "postDate": "2022-07-22T15:03:42.510Z",
          "content": "<p>Hi <a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a> </p>\n<p>As always, it's a joy to read your analysis and discussion. May I know for the prediction you showed for Spleen what was your threshold strategy? did you learn the threshold on all five fold? or hard-coded one?</p>",
          "rawMarkdown": "Hi @hengck23 \n\nAs always, it's a joy to read your analysis and discussion. May I know for the prediction you showed for Spleen what was your threshold strategy? did you learn the threshold on all five fold? or hard-coded one?"
        },
        {
          "id": 1866959,
          "postDate": "2022-07-22T22:16:13.407Z",
          "content": "<p>learned my experiments , turns out to be about 0.5 for organ spleen.<br>\nensemble such that the curve is almost flat over the maximum and insensitive to threshold</p>",
          "rawMarkdown": "learned my experiments , turns out to be about 0.5 for organ spleen.\nensemble such that the curve is almost flat over the maximum and insensitive to threshold"
        },
        {
          "id": 1870270,
          "postDate": "2022-07-25T12:36:10.813Z",
          "content": "<p>What image size are you using?</p>",
          "rawMarkdown": "What image size are you using?"
        },
        {
          "id": 1870275,
          "postDate": "2022-07-25T12:42:31.797Z",
          "content": "<p>768 ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎</p>",
          "rawMarkdown": "768 ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎"
        },
        {
          "id": 1870537,
          "postDate": "2022-07-25T16:11:26.737Z",
          "content": "<blockquote>\n  <p>ccf-research-kaggle-2021 : hubmap CL_HandE_1234_B004_bottomleft.tiff<br>\n  (but i don't know what is the um per pixel size for the datset. can anyone advise?)</p>\n</blockquote>\n<p>Is that dataset an extension of HuBMAP Kidney Segmentation? Their raw dimensions are very close to upper limit of HuBMAP image dimensions in this competition. I think large intestine images could be very similar.</p>",
          "rawMarkdown": "> ccf-research-kaggle-2021 : hubmap CL_HandE_1234_B004_bottomleft.tiff\n(but i don't know what is the um per pixel size for the datset. can anyone advise?)\n\nIs that dataset an extension of HuBMAP Kidney Segmentation? Their raw dimensions are very close to upper limit of HuBMAP image dimensions in this competition. I think large intestine images could be very similar."
        }
      ]
    },
    {
      "id": 1951266,
      "postDate": "2022-09-23T00:38:31.290Z",
      "content": "<p>I've learned a lot things from your post and comments. I deeply thank you very much for sharing your experiments and results that are very insightful and helpful.</p>",
      "rawMarkdown": "I've learned a lot things from your post and comments. I deeply thank you very much for sharing your experiments and results that are very insightful and helpful.",
      "votes": 1
    },
    {
      "id": 1937218,
      "postDate": "2022-09-13T10:52:24.920Z",
      "content": "<p>Hello,<br>\nCould anyone help me understand what aux-loss means? Is it like a supportive loss function for organ type classification? Any notebook/snippet I can refer to?</p>",
      "rawMarkdown": "Hello,\nCould anyone help me understand what aux-loss means? Is it like a supportive loss function for organ type classification? Any notebook/snippet I can refer to?\n",
      "votes": 1,
      "replies": [
        {
          "id": 1937273,
          "postDate": "2022-09-13T11:41:22.283Z",
          "content": "<p>Hi, it's usually used to stabilize the training and to add more regularization. You compute the loss between intermediate outputs (from encoder stages) and your downsampled (used in the notebooks by OP of this discussion, many thanks, <a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a>) masks. Of course, you can adjust and modify everything based on what kind of constraint you want to put or emphasize more </p>",
          "rawMarkdown": "Hi, it's usually used to stabilize the training and to add more regularization. You compute the loss between intermediate outputs (from encoder stages) and your downsampled (used in the notebooks by OP of this discussion, many thanks, @hengck23) masks. Of course, you can adjust and modify everything based on what kind of constraint you want to put or emphasize more ",
          "votes": 1
        },
        {
          "id": 1937338,
          "postDate": "2022-09-13T12:30:43.887Z",
          "content": "<p>it is an old method introduced by google inception model in the early days ….<br>\n<img src=\"https://drek4537l1klr.cloudfront.net/ferlitsch/Figures/CH06_F03_Ferlitsch.png\" alt=\"https://drek4537l1klr.cloudfront.net/ferlitsch/Figures/CH06_F03_Ferlitsch.png\"> </p>\n<p>you can also google for:<br>\ndeep supervised, auxiliary loss, segmentation, mmseg auxiliary loss</p>\n<hr>\n<p>in the old days, because batchnom were not invented, there is problem of diminishing gradients. Hence you insert auxiliary loss to back-propagates gradients from the middle.</p>\n<p>for today when the model is too strong (like transformer), there is little gradients from the top because you have almost zero loss. in this case you can make the problem more difficult (i,e, larger loss, more gradient) by asking the model to make prediction using only up the intermediate layers</p>\n<p><a href=\"https://discuss.pytorch.org/t/how-to-implement-deeply-supervised-network/6203\" target=\"_blank\">https://discuss.pytorch.org/t/how-to-implement-deeply-supervised-network/6203</a><br>\n <img src=\"https://discuss.pytorch.org/uploads/default/original/2X/f/f3722aaedf882e62f17b316805f8170ddaada1e2.png\" alt=\"https://discuss.pytorch.org/uploads/default/original/2X/f/f3722aaedf882e62f17b316805f8170ddaada1e2.png\">  </p>\n<hr>\n<p>in either case, the results will be a smoother loss landscape and better generalization (less over fitting)</p>",
          "rawMarkdown": "it is an old method introduced by google inception model in the early days ....\n![https://drek4537l1klr.cloudfront.net/ferlitsch/Figures/CH06_F03_Ferlitsch.png](https://drek4537l1klr.cloudfront.net/ferlitsch/Figures/CH06_F03_Ferlitsch.png) \n\nyou can also google for:\ndeep supervised, auxiliary loss, segmentation, mmseg auxiliary loss\n\n\n---\n\nin the old days, because batchnom were not invented, there is problem of diminishing gradients. Hence you insert auxiliary loss to back-propagates gradients from the middle.\n\nfor today when the model is too strong (like transformer), there is little gradients from the top because you have almost zero loss. in this case you can make the problem more difficult (i,e, larger loss, more gradient) by asking the model to make prediction using only up the intermediate layers\n\nhttps://discuss.pytorch.org/t/how-to-implement-deeply-supervised-network/6203\n ![https://discuss.pytorch.org/uploads/default/original/2X/f/f3722aaedf882e62f17b316805f8170ddaada1e2.png](https://discuss.pytorch.org/uploads/default/original/2X/f/f3722aaedf882e62f17b316805f8170ddaada1e2.png)  \n\n\n---\n\nin either case, the results will be a smoother loss landscape and better generalization (less over fitting)",
          "votes": 4
        },
        {
          "id": 1945817,
          "postDate": "2022-09-19T12:23:26.220Z",
          "content": "<p>Thanks for providing these resources. I was able to implement it. Wanted to ask one more question.<br>\nCan I change the aux loss in b/w training? For example, take from some layer for first few epochs and then shift taux loss o other layer?<br>\nIs this logically sound? </p>",
          "rawMarkdown": "Thanks for providing these resources. I was able to implement it. Wanted to ask one more question.\nCan I change the aux loss in b/w training? For example, take from some layer for first few epochs and then shift taux loss o other layer?\nIs this logically sound? "
        }
      ]
    },
    {
      "id": 1913583,
      "postDate": "2022-08-25T11:38:02.543Z",
      "content": "<p>if you are using my code, beware!!!!<br>\n<a href=\"https://ibb.co/PZbZVk7\"><img src=\"https://i.ibb.co/7JTJ0hw/Selection-083.png\" alt=\"Selection-083\"></a></p>\n<p>the simple fusion of the different levels uses upscale of 4x, 8x, 16x, 32x<br>\nit is obvious that it causes the prediction to be blocky.<br>\n(despite the blocky head, LB is still 0.82 after ensemble)</p>\n<p>i need a better decoder head </p>",
      "rawMarkdown": "if you are using my code, beware!!!!\n<a href=\"https://ibb.co/PZbZVk7\"><img src=\"https://i.ibb.co/7JTJ0hw/Selection-083.png\" alt=\"Selection-083\" border=\"0\"></a>\n\nthe simple fusion of the different levels uses upscale of 4x, 8x, 16x, 32x\nit is obvious that it causes the prediction to be blocky.\n(despite the blocky head, LB is still 0.82 after ensemble)\n\ni need a better decoder head ",
      "votes": 1,
      "replies": [
        {
          "id": 1915206,
          "postDate": "2022-08-26T18:36:03.570Z",
          "content": "<p>New record for 768?</p>\n<p>single fold (fold3)</p>\n<p>pvt-v2v-v4 + daformer3x3 (fuse of 4 layer) / 4x upscale : LB 0.79<br>\npvt-v2v-v4 + smp-unet (5 layer decoder) / 1x upscale: LB 0.80</p>\n<hr>\n<p>code: apply smp unet to transformer pvt-v2-b4 and remove 4x upscaling restriction<br>\n<a href=\"https://gist.github.com/hengck23/15e26a84e747f7ddd12cc0ea215e9301\" target=\"_blank\">https://gist.github.com/hengck23/15e26a84e747f7ddd12cc0ea215e9301</a></p>\n<p><a href=\"https://ibb.co/FHrPvWt\"><img src=\"https://i.ibb.co/41qQyfx/Selection-090.png\" alt=\"Selection-090\"></a></p>",
          "rawMarkdown": "New record for 768?\n\nsingle fold (fold3)\n\npvt-v2v-v4 + daformer3x3 (fuse of 4 layer) / 4x upscale : LB 0.79\npvt-v2v-v4 + smp-unet (5 layer decoder) / 1x upscale: LB 0.80\n\n---\n\ncode: apply smp unet to transformer pvt-v2-b4 and remove 4x upscaling restriction\nhttps://gist.github.com/hengck23/15e26a84e747f7ddd12cc0ea215e9301\n\n<a href=\"https://ibb.co/FHrPvWt\"><img src=\"https://i.ibb.co/41qQyfx/Selection-090.png\" alt=\"Selection-090\" border=\"0\"></a>",
          "votes": 2
        },
        {
          "id": 1915239,
          "postDate": "2022-08-26T19:30:35.650Z",
          "content": "<p>i have a feeling that this structure works well. i will use it for another competition.<br>\nhere, transformer block is treated as a \"convolution with super-large nonlinear kernel\".</p>\n<p>add transformer with conv will be a good regulariser </p>\n<p><a href=\"https://ibb.co/9NFNc3P\"><img src=\"https://i.ibb.co/4767Kgk/Selection-091.png\" alt=\"Selection-091\"></a></p>",
          "rawMarkdown": "i have a feeling that this structure works well. i will use it for another competition.\nhere, transformer block is treated as a \"convolution with super-large nonlinear kernel\".\n\nadd transformer with conv will be a good regulariser \n\n\n<a href=\"https://ibb.co/9NFNc3P\"><img src=\"https://i.ibb.co/4767Kgk/Selection-091.png\" alt=\"Selection-091\" border=\"0\"></a>",
          "votes": 2
        },
        {
          "id": 1915524,
          "postDate": "2022-08-27T03:39:38.053Z",
          "content": "<p>i took my previous trained encoder, freeze it and just trained a new unet decoder. training is very fast and get better results.</p>\n<p>old:  <br>\npvt-v2-b4-level5 +  daformer3x3-level5 decoder <a href=\"https://www.kaggle.com/1024\" target=\"_blank\">@1024</a> : LB 0.80 (CV : 0.797)  </p>\n<p>new:  <br>\npvt-v2-b4-level5 + conv + unet-level6 decoder <a href=\"https://www.kaggle.com/1024\" target=\"_blank\">@1024</a> : LB 0.81 (CV : 0.799)</p>\n<hr>\n<p>this also means that by freezing,</p>\n<p>you can in fact combine a couple of your old encoders (e.g. swin + pvtv2) and train a new decoder on combined freezed (or partial breezed) feature.</p>\n<p>you can also combine old trained transformer with new untrained CNN encoder, etc …</p>\n<p>so there is a lot of room for modeling !!!</p>",
          "rawMarkdown": "i took my previous trained encoder, freeze it and just trained a new unet decoder. training is very fast and get better results.\n\nold:  \npvt-v2-b4-level5 +  daformer3x3-level5 decoder @1024 : LB 0.80 (CV : 0.797)  \n\nnew:  \npvt-v2-b4-level5 + conv + unet-level6 decoder @1024 : LB 0.81 (CV : 0.799)\n\n---\n\nthis also means that by freezing,\n\nyou can in fact combine a couple of your old encoders (e.g. swin + pvtv2) and train a new decoder on combined freezed (or partial breezed) feature.\n\nyou can also combine old trained transformer with new untrained CNN encoder, etc ...\n\nso there is a lot of room for modeling !!!\n ",
          "votes": 2
        },
        {
          "id": 1916122,
          "postDate": "2022-08-27T16:42:30.957Z",
          "content": "<p>does your models using stain normalization?</p>",
          "rawMarkdown": "does your models using stain normalization?"
        },
        {
          "id": 1916225,
          "postDate": "2022-08-27T17:54:10.513Z",
          "content": "<p>no. i use stain augmentation only</p>",
          "rawMarkdown": "no. i use stain augmentation only",
          "votes": 1
        },
        {
          "id": 1928606,
          "postDate": "2022-09-06T14:33:45.277Z",
          "content": "<p><a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a> <a href=\"https://www.kaggle.com/kfk42kfk\" target=\"_blank\">@kfk42kfk</a> May I ask what's the meaning of \"stain normalization\" &amp; “stain augmentation”?</p>",
          "rawMarkdown": "@hengck23 @kfk42kfk May I ask what's the meaning of \"stain normalization\" & “stain augmentation”?",
          "votes": 2
        },
        {
          "id": 1934332,
          "postDate": "2022-09-11T10:03:42.077Z",
          "content": "<p>I think, but not necessarily correct, you may change pixel-size or tissue thickness for HPA to Hubmap. You may refer to <a href=\"https://github.com/Peter554/StainTools\" target=\"_blank\">https://github.com/Peter554/StainTools</a>.</p>",
          "rawMarkdown": "I think, but not necessarily correct, you may change pixel-size or tissue thickness for HPA to Hubmap. You may refer to https://github.com/Peter554/StainTools."
        },
        {
          "id": 1956628,
          "postDate": "2022-09-26T14:33:43.570Z",
          "content": "<p>I guess this blocky contour is caused by MixUpSample which chooses nearest as the mode of interpolation.</p>",
          "rawMarkdown": "I guess this blocky contour is caused by MixUpSample which chooses nearest as the mode of interpolation."
        }
      ]
    },
    {
      "id": 1894634,
      "postDate": "2022-08-11T16:15:13.340Z",
      "content": "<p>one possible replacement for segformer<br>\n (they are a few more to come later …)</p>\n<p><img src=\"https://i.ibb.co/3s93QwN/Selection-075.png\" alt=\"https://i.ibb.co/3s93QwN/Selection-075.png\"><br>\nfor model, refer to <a href=\"https://www.kaggle.com/code/hengck23/lb-0-78-coat-and-simple-3x3-conv-fusion\" target=\"_blank\">https://www.kaggle.com/code/hengck23/lb-0-78-coat-and-simple-3x3-conv-fusion</a><br>\nweights/training are not shared</p>",
      "rawMarkdown": "one possible replacement for segformer\n (they are a few more to come later ...)\n\n ![https://i.ibb.co/3s93QwN/Selection-075.png](https://i.ibb.co/3s93QwN/Selection-075.png)\nfor model, refer to https://www.kaggle.com/code/hengck23/lb-0-78-coat-and-simple-3x3-conv-fusion\nweights/training are not shared",
      "votes": 1,
      "replies": [
        {
          "id": 1895039,
          "postDate": "2022-08-11T22:18:50.817Z",
          "content": "<p>PVT v2 also works the same as segformer. i gave smiliar results on local CV</p>\n<p><a href=\"https://ibb.co/582DFzs\"><img src=\"https://i.ibb.co/2t52NLc/Selection-071.png\" alt=\"Selection-071\"></a></p>\n<p><a href=\"https://imgbb.com/\"><img src=\"https://i.ibb.co/L1bDwBP/Selection-072.png\" alt=\"Selection-072\"></a></p>",
          "rawMarkdown": "PVT v2 also works the same as segformer. i gave smiliar results on local CV\n\n<a href=\"https://ibb.co/582DFzs\"><img src=\"https://i.ibb.co/2t52NLc/Selection-071.png\" alt=\"Selection-071\" border=\"0\"></a>\n\n<a href=\"https://imgbb.com/\"><img src=\"https://i.ibb.co/L1bDwBP/Selection-072.png\" alt=\"Selection-072\" border=\"0\"></a>"
        },
        {
          "id": 1895217,
          "postDate": "2022-08-12T02:58:34.540Z",
          "content": "<p>Quite impressive work! Did you pre-train with unsupervised learning on external  data?</p>",
          "rawMarkdown": "Quite impressive work! Did you pre-train with unsupervised learning on external  data?"
        },
        {
          "id": 1895333,
          "postDate": "2022-08-12T04:44:16.117Z",
          "content": "<p>no, not yet</p>",
          "rawMarkdown": "no, not yet"
        },
        {
          "id": 1895557,
          "postDate": "2022-08-12T08:07:21.617Z",
          "content": "<p>list of conv postional embedding vision transformer that works with conv3x3 fusion layer as decoder</p>\n<p>[1] PVT v2: Improved Baselines with Pyramid Vision Transformer  <br>\n[2] Co-Scale Conv-Attentional Image Transformers - ICCV 2021 (oral)<br>\n[3] CvT: Introducing Convolutions to Vision Transformers. (needs aspp as decoder because it only has 3 level output)<br>\n[4] CrossFormer: A Versatile Vision Transformer Based on Cross-scale Attention - ICRL 2022</p>\n<hr>\n<p>I cannot make the below to work.<br>\ni think they stills works but I haven't find the right hyper-parameters or they need stronger decoder or there are some bug in my code ….</p>\n<ul>\n<li>UniFormer: Unified Transformer for Efficient Spatiotemporal Representation Learning- ICRL 2022  </li>\n<li>DaViT: Dual Attention Vision Transformers  </li>\n</ul>\n<hr>\n<p>i done only partial experiment for the below. They should also work.  </p>\n<ul>\n<li>CSWin Transformer: A General Vision Transformer Backbone with Cross-Shaped Windows (this is the only swin variant that works. The other swinv1 and v2 have performer drop when switch from upernet to simple conv3x3 decoder)</li>\n</ul>\n<hr>\n<p>other promising work that i did not try for various reason</p>\n<ul>\n<li><p>CMT: Convolutional Neural Networks Meet Vision Transformers - CVPR 2022 (it uses its own framework and not pytorch)</p></li>\n<li><p>HRViT : Multi-Scale High-Resolution Vision Transformer for Semantic Segmentation (i think the mixed-scale convolutional feedforward<br>\nnetworks (MixCFN) is superior. but the author did not released pretrained model)</p></li>\n<li><p>Learning Patch-to-Cluster Attention in Vision Transformer (no source code yet)</p></li>\n</ul>\n<hr>\n<p>other candidate list</p>\n<ul>\n<li>Contextual Transformer Networks for Visual Recognition</li>\n<li>Local-to-Global Self-Attention in Vision Transformers</li>\n<li>SepViT: Separable Vision Transformer</li>\n<li>MaxViT: Multi-Axis Vision Transformer</li>\n<li>ScalableViT: Rethinking the Context-oriented Generalization of Vision Transformer</li>\n<li>Vision Transformers with Hierarchical Attention</li>\n</ul>\n<p>reference: <a href=\"https://github.com/cmhungsteve/Awesome-Transformer-Attention#conv--transformer\" target=\"_blank\">https://github.com/cmhungsteve/Awesome-Transformer-Attention#conv--transformer</a></p>",
          "rawMarkdown": "list of conv postional embedding vision transformer that works with conv3x3 fusion layer as decoder\n\n[1] PVT v2: Improved Baselines with Pyramid Vision Transformer  \n[2] Co-Scale Conv-Attentional Image Transformers - ICCV 2021 (oral)\n[3] CvT: Introducing Convolutions to Vision Transformers. (needs aspp as decoder because it only has 3 level output)\n[4] CrossFormer: A Versatile Vision Transformer Based on Cross-scale Attention - ICRL 2022\n\n----\n\nI cannot make the below to work.\ni think they stills works but I haven't find the right hyper-parameters or they need stronger decoder or there are some bug in my code ....\n\n- UniFormer: Unified Transformer for Efficient Spatiotemporal Representation Learning- ICRL 2022  \n- DaViT: Dual Attention Vision Transformers  \n\n---\n\ni done only partial experiment for the below. They should also work.  \n\n- CSWin Transformer: A General Vision Transformer Backbone with Cross-Shaped Windows (this is the only swin variant that works. The other swinv1 and v2 have performer drop when switch from upernet to simple conv3x3 decoder)\n\n---\n\nother promising work that i did not try for various reason\n\n- CMT: Convolutional Neural Networks Meet Vision Transformers - CVPR 2022 (it uses its own framework and not pytorch)\n\n- HRViT : Multi-Scale High-Resolution Vision Transformer for Semantic Segmentation (i think the mixed-scale convolutional feedforward\nnetworks (MixCFN) is superior. but the author did not released pretrained model)\n\n- Learning Patch-to-Cluster Attention in Vision Transformer (no source code yet)\n\n---\nother candidate list\n\n- Contextual Transformer Networks for Visual Recognition\n- Local-to-Global Self-Attention in Vision Transformers\n- SepViT: Separable Vision Transformer\n- MaxViT: Multi-Axis Vision Transformer\n- ScalableViT: Rethinking the Context-oriented Generalization of Vision Transformer\n- Vision Transformers with Hierarchical Attention\n\nreference: https://github.com/cmhungsteve/Awesome-Transformer-Attention#conv--transformer",
          "votes": 1
        }
      ]
    },
    {
      "id": 1892293,
      "postDate": "2022-08-10T02:44:40.460Z",
      "content": "<p>oh, interactive segformer!<br>\nSegFormer: Interactive Segmentation via Transformerswith Application to 3D Knee MR Images<br>\npaper: <a href=\"https://arxiv.org/pdf/2112.11325v6.pdf\" target=\"_blank\">https://arxiv.org/pdf/2112.11325v6.pdf</a></p>\n<p>for the use in this competition, refer to<br>\n<a href=\"https://www.kaggle.com/competitions/hubmap-organ-segmentation/discussion/341130#1892285\" target=\"_blank\">https://www.kaggle.com/competitions/hubmap-organ-segmentation/discussion/341130#1892285</a></p>\n<p><img src=\"https://i.ibb.co/HX2JbNq/Selection-094.png\" alt=\"https://i.ibb.co/HX2JbNq/Selection-094.png\"></p>",
      "rawMarkdown": "oh, interactive segformer!\nSegFormer: Interactive Segmentation via Transformerswith Application to 3D Knee MR Images\npaper: https://arxiv.org/pdf/2112.11325v6.pdf\n\nfor the use in this competition, refer to\nhttps://www.kaggle.com/competitions/hubmap-organ-segmentation/discussion/341130#1892285\n\n![https://i.ibb.co/HX2JbNq/Selection-094.png](https://i.ibb.co/HX2JbNq/Selection-094.png)",
      "votes": 1
    },
    {
      "id": 1884297,
      "postDate": "2022-08-04T11:23:29.320Z",
      "content": "<p><img src=\"https://www.cs.toronto.edu/~garyleung/hila/resources/performance_graph.png\" alt=\"https://www.cs.toronto.edu/~garyleung/hila/resources/performance_graph.png\"><br>\n<a href=\"https://www.cs.toronto.edu/~garyleung/hila/\" target=\"_blank\">https://www.cs.toronto.edu/~garyleung/hila/</a><br>\nWe add HILA into SegFormer and the Swin Transformer and show notable improvements in accuracy in semantic segmentation with fewer parameters and FLOPS.</p>",
      "rawMarkdown": " ![https://www.cs.toronto.edu/~garyleung/hila/resources/performance_graph.png](https://www.cs.toronto.edu/~garyleung/hila/resources/performance_graph.png)\nhttps://www.cs.toronto.edu/~garyleung/hila/\n\n We add HILA into SegFormer and the Swin Transformer and show notable improvements in accuracy in semantic segmentation with fewer parameters and FLOPS.",
      "votes": 1
    },
    {
      "id": 1881609,
      "postDate": "2022-08-02T16:55:48.750Z",
      "content": "<p>i am not sure if this would be an issue:<br>\n<img src=\"https://i.ibb.co/VxcJHrM/Selection-140.png\" alt=\"https://i.ibb.co/VxcJHrM/Selection-140.png\"></p>",
      "rawMarkdown": "i am not sure if this would be an issue:\n![https://i.ibb.co/VxcJHrM/Selection-140.png](https://i.ibb.co/VxcJHrM/Selection-140.png)",
      "votes": 1,
      "replies": [
        {
          "id": 1881638,
          "postDate": "2022-08-02T17:14:45.957Z",
          "content": "<p>most slide you see in HPA are ideal . in actual lab, there will be quite some artifacts.<br>\nIt is expected Hubmap slides will have some artifacts?</p>\n<p><img src=\"https://i.ibb.co/JQR2TqS/Selection-151.png\" alt=\"https://i.ibb.co/JQR2TqS/Selection-151.png\"></p>",
          "rawMarkdown": "most slide you see in HPA are ideal . in actual lab, there will be quite some artifacts.\nIt is expected Hubmap slides will have some artifacts?\n\n![https://i.ibb.co/JQR2TqS/Selection-151.png](https://i.ibb.co/JQR2TqS/Selection-151.png)"
        }
      ]
    },
    {
      "id": 1870257,
      "postDate": "2022-07-25T12:18:51.173Z",
      "content": "<p>you probably need this here (since we are dealing with shifted domain private LB data) :</p>\n<p>paper: WHEN VISION TRANSFORMERS OUTPERFORM RESNETS WITHOUT PRE-TRAINING OR STRONG DATA AUGMENTATIONS<br>\n<a href=\"https://arxiv.org/pdf/2106.01548.pdf\" target=\"_blank\">https://arxiv.org/pdf/2106.01548.pdf</a></p>\n<p>\"The resultant ViTs outperform ResNets of similar size and throughput when trained from scratch on ImageNet without large-scale pre-training or strong data augmentations.\"</p>\n<p>do read the section on test on different domain: \"Better robustness. We also evaluate the models’ robustness using ImageNet-R (Hendrycks et al., 2020) and ImageNet-C (Hendrycks &amp; Dietterich, 2019) and find even bigger impacts of the smoothed loss landscapes.\"</p>\n<hr>\n<p>take away message: it is not about early stopping …. it is about flatten your loss landscape</p>",
      "rawMarkdown": "you probably need this here (since we are dealing with shifted domain private LB data) :\n\npaper: WHEN VISION TRANSFORMERS OUTPERFORM RESNETS WITHOUT PRE-TRAINING OR STRONG DATA AUGMENTATIONS\nhttps://arxiv.org/pdf/2106.01548.pdf\n\n\"The resultant ViTs outperform ResNets of similar size and throughput when trained from scratch on ImageNet without large-scale pre-training or strong data augmentations.\"\n\ndo read the section on test on different domain: \"Better robustness. We also evaluate the models’ robustness using ImageNet-R (Hendrycks et al., 2020) and ImageNet-C (Hendrycks & Dietterich, 2019) and find even bigger impacts of the smoothed loss landscapes.\"\n\n---\n\ntake away message: it is not about early stopping .... it is about flatten your loss landscape",
      "votes": 1
    },
    {
      "id": 1869703,
      "postDate": "2022-07-25T01:45:06.240Z",
      "content": "<p>Adversial network perturbation works well for NLP transformer. It improve robustness (e.g. spelling errors) and score. There are many kaggle code for the recent kaggle competitions for the feedback, US-patent for it.</p>\n<p>I wonder if it also work for histology tissue images?</p>\n<p>e.g. [paper] An Adversarial Perturbation Oriented Domain Adaptation Approach for Semantic Segmentation</p>",
      "rawMarkdown": "Adversial network perturbation works well for NLP transformer. It improve robustness (e.g. spelling errors) and score. There are many kaggle code for the recent kaggle competitions for the feedback, US-patent for it.\n\nI wonder if it also work for histology tissue images?\n\ne.g. [paper] An Adversarial Perturbation Oriented Domain Adaptation Approach for Semantic Segmentation",
      "votes": 1
    },
    {
      "id": 1865226,
      "postDate": "2022-07-21T16:32:11.620Z",
      "content": "<p>you can self-supervised CNN (like transformer) too!</p>\n<p>paper: Corrupted Image Modeling for Self-Supervised Visual Pre-Training<br>\n<a href=\"https://arxiv.org/pdf/2202.03382.pdf\" target=\"_blank\">https://arxiv.org/pdf/2202.03382.pdf</a></p>\n<p>\"ResNet-50. We demonstrate that CIM can also pre-train a high-capacity ResNet-50 model with the fewest possible<br>\nmodifications from the ViT pre-training settings that can achieve compelling fine-tuning performances on ImageNet1K.\"</p>",
      "rawMarkdown": "you can self-supervised CNN (like transformer) too!\n\npaper: Corrupted Image Modeling for Self-Supervised Visual Pre-Training\nhttps://arxiv.org/pdf/2202.03382.pdf\n\n\"ResNet-50. We demonstrate that CIM can also pre-train a high-capacity ResNet-50 model with the fewest possible\nmodifications from the ViT pre-training settings that can achieve compelling fine-tuning performances on ImageNet1K.\"",
      "votes": 1
    },
    {
      "id": 1859177,
      "postDate": "2022-07-17T13:07:39.137Z",
      "content": "<p>an interesting cvpr 2022 oral paper:<br>\nSource-Free Object Detection by Learning to Overlook Domain Style</p>\n<p>Source-free object detection (SFOD) needs to adapt a detector pre-trained on a labeled source domain to a target<br>\ndomain, with only unlabeled training data from the target domain. …</p>",
      "rawMarkdown": "an interesting cvpr 2022 oral paper:\nSource-Free Object Detection by Learning to Overlook Domain Style\n\nSource-free object detection (SFOD) needs to adapt a detector pre-trained on a labeled source domain to a target\ndomain, with only unlabeled training data from the target domain. ...\n\n",
      "votes": 1
    },
    {
      "id": 1858588,
      "postDate": "2022-07-17T03:42:11.870Z",
      "content": "<p>learning threshold</p>\n<p>what is show: for 3 fold on validation HPA dataset<br>\n(but what we need is similar graph on Hubmap dataset …. many probes to be made !!!)<br>\n<img src=\"https://i.ibb.co/kS8D8VM/Selection-059.png\" alt=\"https://i.ibb.co/kS8D8VM/Selection-059.png\"></p>",
      "rawMarkdown": "learning threshold\n\nwhat is show: for 3 fold on validation HPA dataset\n(but what we need is similar graph on Hubmap dataset .... many probes to be made !!!)\n![https://i.ibb.co/kS8D8VM/Selection-059.png](https://i.ibb.co/kS8D8VM/Selection-059.png)",
      "votes": 1,
      "replies": [
        {
          "id": 1859753,
          "postDate": "2022-07-17T23:41:53.967Z",
          "content": "<p>rather than cv/lb correlation, measure robustness as well.<br>\nif your lb dice is robust against threshold, you are probably safe ?</p>\n<p><a href=\"https://ibb.co/pwxXZzn\"><img src=\"https://i.ibb.co/6wmsbPN/Selection-076.png\" alt=\"Selection-076\"></a><br>\n<a href=\"https://ibb.co/4KD7f5F\"><img src=\"https://i.ibb.co/Gn10Jbd/Selection-075.png\" alt=\"Selection-075\"></a></p>",
          "rawMarkdown": "rather than cv/lb correlation, measure robustness as well.\nif your lb dice is robust against threshold, you are probably safe ?\n\n<a href=\"https://ibb.co/pwxXZzn\"><img src=\"https://i.ibb.co/6wmsbPN/Selection-076.png\" alt=\"Selection-076\" border=\"0\"></a>\n<a href=\"https://ibb.co/4KD7f5F\"><img src=\"https://i.ibb.co/Gn10Jbd/Selection-075.png\" alt=\"Selection-075\" border=\"0\"></a>",
          "votes": 1
        }
      ]
    },
    {
      "id": 1831210,
      "postDate": "2022-06-24T03:33:15.350Z",
      "content": "<p><img src=\"https://i.ibb.co/74FWk8d/Selection-013.png\" alt=\"https://i.ibb.co/74FWk8d/Selection-013.png\"><br>\n<img src=\"https://miro.medium.com/max/1172/1*kGi3P8DtXWNpSmqBSEbvSA.png\" alt=\"https://miro.medium.com/max/1172/1*kGi3P8DtXWNpSmqBSEbvSA.png\"><br>\nexpected improvement using pretraining transformer<br>\nfrom: [1] BEiT: BERT Pre-Training of Image Transformers</p>",
      "rawMarkdown": "![https://i.ibb.co/74FWk8d/Selection-013.png](https://i.ibb.co/74FWk8d/Selection-013.png)\n![https://miro.medium.com/max/1172/1*kGi3P8DtXWNpSmqBSEbvSA.png](https://miro.medium.com/max/1172/1*kGi3P8DtXWNpSmqBSEbvSA.png)\nexpected improvement using pretraining transformer\nfrom: [1] BEiT: BERT Pre-Training of Image Transformers",
      "votes": 1,
      "replies": [
        {
          "id": 1831220,
          "postDate": "2022-06-24T03:47:45.427Z",
          "content": "<p>other related papers:</p>\n<p>self-learning</p>\n<ul>\n<li>Masked Autoencoders Are Scalable Vision Learners (facebook fair, cvpr 2022)</li>\n<li>SimMIM: a Simple Framework for Masked Image Modeling (microsoft, cvpr 2022)</li>\n<li>IBOT : IMAGE BERT PRE-TRAINING WITH ONLINETOKENIZER (bytedance, iclr 2022)</li>\n<li>Are Large-scale Datasets Necessary for Self-Supervised Pre-training? (meta AI, arvix 2021)</li>\n</ul>\n<p>dealing with large image for WSI</p>\n<ul>\n<li>Self-Supervised Vision Transformers Learn Visual Concepts in Histopathology</li>\n<li>Scaling Vision Transformers to Gigapixel Images via Hierarchical Self-Supervised Learning</li>\n</ul>\n<p>good transformer model</p>\n<ul>\n<li>DS-TransUNet: Dual Swin Transformer U-Net for Medical Image Segmentation</li>\n</ul>",
          "rawMarkdown": "other related papers:\n\nself-learning\n- Masked Autoencoders Are Scalable Vision Learners (facebook fair, cvpr 2022)\n- SimMIM: a Simple Framework for Masked Image Modeling (microsoft, cvpr 2022)\n- IBOT : IMAGE BERT PRE-TRAINING WITH ONLINETOKENIZER (bytedance, iclr 2022)\n- Are Large-scale Datasets Necessary for Self-Supervised Pre-training? (meta AI, arvix 2021)\n\ndealing with large image for WSI\n- Self-Supervised Vision Transformers Learn Visual Concepts in Histopathology\n- Scaling Vision Transformers to Gigapixel Images via Hierarchical Self-Supervised Learning\n\ngood transformer model\n- DS-TransUNet: Dual Swin Transformer U-Net for Medical Image Segmentation",
          "votes": 5
        },
        {
          "id": 1831231,
          "postDate": "2022-06-24T04:15:57.593Z",
          "content": "<p>an interesing paper: comapre CNN (unet, deeplab3, FPN, etc) vs tranformer (transUNet, Swin-Transformer, segmenter, etc) for WSI segmentation</p>\n<p>Evaluating Transformer-based Semantic Segmentation Networks for Pathological Image Segmentation<br>\n<a href=\"https://arxiv.org/pdf/2108.11993.pdf\" target=\"_blank\">https://arxiv.org/pdf/2108.11993.pdf</a></p>",
          "rawMarkdown": "an interesing paper: comapre CNN (unet, deeplab3, FPN, etc) vs tranformer (transUNet, Swin-Transformer, segmenter, etc) for WSI segmentation\n\nEvaluating Transformer-based Semantic Segmentation Networks for Pathological Image Segmentation\nhttps://arxiv.org/pdf/2108.11993.pdf",
          "votes": 5
        },
        {
          "id": 1869407,
          "postDate": "2022-07-24T18:20:56.437Z",
          "content": "<p>I just collected 13k H&amp;E, PAS and DAB/H stained microscopy images. I'll experiment with those self-supervised training techniques.</p>",
          "rawMarkdown": "I just collected 13k H&E, PAS and DAB/H stained microscopy images. I'll experiment with those self-supervised training techniques."
        },
        {
          "id": 1869418,
          "postDate": "2022-07-24T18:30:08.850Z",
          "content": "<p>the first step is to use your validation set (+ training set) as unlabelled image for SSL training.<br>\nthe pretrained SSL model is then fine-tunned on train data.<br>\nthe fine-tuned model is then validated on validation set.</p>\n<p>it should work (since validation set is seen in SSL). i use this method to debug my SSL.<br>\nthe the SSL is OK, then I would proceed with the proper SSL training with the extra unlabelled data downloaded (and remove validation set from SSL train set)</p>\n<p>I expect about +0.02 improvement in local CV and public LB (both Hubmap and HPA)</p>\n<hr>\n<p>another way to verify SSL works correctly is the use the old pesudo-label method as baseline.</p>",
          "rawMarkdown": "the first step is to use your validation set (+ training set) as unlabelled image for SSL training.\nthe pretrained SSL model is then fine-tunned on train data.\nthe fine-tuned model is then validated on validation set.\n\nit should work (since validation set is seen in SSL). i use this method to debug my SSL.\nthe the SSL is OK, then I would proceed with the proper SSL training with the extra unlabelled data downloaded (and remove validation set from SSL train set)\n\nI expect about +0.02 improvement in local CV and public LB (both Hubmap and HPA)\n\n---\n\nanother way to verify SSL works correctly is the use the old pesudo-label method as baseline.\n"
        }
      ]
    },
    {
      "id": 1914582,
      "postDate": "2022-08-26T07:45:52.507Z",
      "content": "<p>Hello folks, I am using transformer-based approach for this task using resized data (768,768). I was wondering how should I find what is the optimal Threshold for my model for each of the organs?<br>\n<a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a> <br>\nadvice would be really helpful.<br>\nThanks! :)</p>",
      "rawMarkdown": "Hello folks, I am using transformer-based approach for this task using resized data (768,768). I was wondering how should I find what is the optimal Threshold for my model for each of the organs?\n@hengck23 \nadvice would be really helpful.\nThanks! :)",
      "votes": 2,
      "replies": [
        {
          "id": 1914866,
          "postDate": "2022-08-26T13:45:04.017Z",
          "content": "<p>click sort by \"newest\" and scroll to the bottom of this page. this is already mentioned before</p>",
          "rawMarkdown": "click sort by \"newest\" and scroll to the bottom of this page. this is already mentioned before",
          "votes": 2
        }
      ]
    },
    {
      "id": 1904239,
      "postDate": "2022-08-18T04:19:16.057Z",
      "content": "<p>in my latest LB score of 0.81 l had LB-hubmap of 0.59.</p>\n<ul>\n<li>no external data was used</li>\n<li>improvement comes from ensemble with large image model (1024x1024 as input)</li>\n</ul>",
      "rawMarkdown": "in my latest LB score of 0.81 l had LB-hubmap of 0.59.\n- no external data was used\n- improvement comes from ensemble with large image model (1024x1024 as input)",
      "votes": 2,
      "replies": [
        {
          "id": 1904774,
          "postDate": "2022-08-18T13:23:27.900Z",
          "content": "<p>i suddenly want to try 2048 ….</p>",
          "rawMarkdown": "i suddenly want to try 2048 ....",
          "votes": 3
        },
        {
          "id": 1906613,
          "postDate": "2022-08-20T04:32:25.883Z",
          "content": "<p>Actually from started with segformer 1024x1024 my score was 0.72 with 768x768 ade whereas 0.76 with 1024x1024.<br>\nlarger images performed better in my case.</p>",
          "rawMarkdown": "Actually from started with segformer 1024x1024 my score was 0.72 with 768x768 ade whereas 0.76 with 1024x1024.\nlarger images performed better in my case."
        },
        {
          "id": 1906622,
          "postDate": "2022-08-20T04:43:13.657Z",
          "content": "<p>performance \"will always\" be better for larger image because of resize error (upscale error) when you up scale the mask to match the size of the image.</p>\n<p>if your modeling is good, you \"may\" gain additional performance from more input pixels information at higher resolution.</p>\n<p>hence the correct way to do is to improve your modeling with smaller size first (e.g. 768) then slowly up scale your model.</p>",
          "rawMarkdown": "performance \"will always\" be better for larger image because of resize error (upscale error) when you up scale the mask to match the size of the image.\n\nif your modeling is good, you \"may\" gain additional performance from more input pixels information at higher resolution.\n\n\nhence the correct way to do is to improve your modeling with smaller size first (e.g. 768) then slowly up scale your model.",
          "votes": 3
        },
        {
          "id": 1911522,
          "postDate": "2022-08-24T06:36:15.187Z",
          "content": "<p>Does <code>no-external data</code> mean hpa data only (excluding hubmap data)?</p>\n<p>Btw, thanks for sharing your ideas and reports. </p>",
          "rawMarkdown": "Does `no-external data` mean hpa data only (excluding hubmap data)?\n\nBtw, thanks for sharing your ideas and reports. "
        },
        {
          "id": 1911770,
          "postDate": "2022-08-24T09:51:08.037Z",
          "content": "<p>no-external data means training with kaggle train data only (i.e. hpa)</p>",
          "rawMarkdown": "no-external data means training with kaggle train data only (i.e. hpa)",
          "votes": 1
        }
      ]
    },
    {
      "id": 1896619,
      "postDate": "2022-08-13T01:46:22.917Z",
      "content": "<p>yet another 0.79 model.</p>\n<p><img src=\"https://i.ibb.co/6FMLfv4/Selection-096.png\" alt=\"https://i.ibb.co/6FMLfv4/Selection-096.png\"></p>",
      "rawMarkdown": "yet another 0.79 model.\n\n\n![https://i.ibb.co/6FMLfv4/Selection-096.png](https://i.ibb.co/6FMLfv4/Selection-096.png)",
      "votes": 2,
      "replies": [
        {
          "id": 1911194,
          "postDate": "2022-08-24T00:59:42.287Z",
          "content": "<p>Hi Heng, I'm wondering if SWA can be applied to CoaT model. Since the PE encoding is shared, will SWA average such learned parameters once more? </p>",
          "rawMarkdown": "Hi Heng, I'm wondering if SWA can be applied to CoaT model. Since the PE encoding is shared, will SWA average such learned parameters once more? ",
          "votes": -1
        },
        {
          "id": 1911354,
          "postDate": "2022-08-24T03:37:08.287Z",
          "content": "<p><a href=\"https://www.kaggle.com/fuckvenkatraman\" target=\"_blank\">@fuckvenkatraman</a>  Just skip them in SWA.<br>\n<code>skip = ['num_batches_tracked','cpe','crpe']\n</code></p>",
          "rawMarkdown": "@fuckvenkatraman  Just skip them in SWA.\n`    skip = ['num_batches_tracked','cpe','crpe']\n`",
          "votes": 1
        },
        {
          "id": 1911368,
          "postDate": "2022-08-24T03:57:35.370Z",
          "content": "<p>\"skip = ['num_batches_tracked','cpe','crpe']\"</p>\n<p>this is no good enough when you use parallel block. \".cpe.\", etc is more correct<br>\nthis is additional sharing in parallel block</p>\n<p>(swa always improve results all the times. if you don't get improvement, likely you do something wrong)</p>\n<hr>\n<p>try this trick</p>\n<p>let selected checkpoints be [x1,x2,x3]  <br>\ncompute swa.</p>\n<p>now if you set x1=x2=x3, if should see swa exactly equal to x1.<br>\nthen you can check abs(swa-x1) for each of the parameters. if they are not the same, they are shared somewhere.</p>\n<pre><code>Note 1:\n\n    because of numerical error, just use 2 checkpoint, i.e. use [x1,x2] =[x1,x1]  \n\n    cross checked with the code of COAT  \n\n    pytorch save shared paramter multiple time. another way to check is load a model pth. \ndelete repeated parameters. save the new pth. now if you load the orginal or new pth, the model should produce the same result. there is yet other way to detect sharing: compare each and every parameter pair, first by shape and then by numerical values. if they are repeated, delete\n</code></pre>",
          "rawMarkdown": "\"skip = ['num_batches_tracked','cpe','crpe']\"\n\nthis is no good enough when you use parallel block. \".cpe.\", etc is more correct\nthis is additional sharing in parallel block\n\n(swa always improve results all the times. if you don't get improvement, likely you do something wrong)\n\n---\ntry this trick\n\nlet selected checkpoints be [x1,x2,x3]  \ncompute swa.\n\nnow if you set x1=x2=x3, if should see swa exactly equal to x1.\nthen you can check abs(swa-x1) for each of the parameters. if they are not the same, they are shared somewhere.\n\n```\nNote 1:\n\n    because of numerical error, just use 2 checkpoint, i.e. use [x1,x2] =[x1,x1]  \n\n    cross checked with the code of COAT  \n\n    pytorch save shared paramter multiple time. another way to check is load a model pth. \ndelete repeated parameters. save the new pth. now if you load the orginal or new pth, the model should produce the same result. there is yet other way to detect sharing: compare each and every parameter pair, first by shape and then by numerical values. if they are repeated, delete\n```",
          "votes": 3
        },
        {
          "id": 1911383,
          "postDate": "2022-08-24T04:14:16.963Z",
          "content": "<p>Thanks for your detailed explanation! I will try it.</p>",
          "rawMarkdown": "Thanks for your detailed explanation! I will try it."
        },
        {
          "id": 1911519,
          "postDate": "2022-08-24T06:33:40.193Z",
          "content": "<p><a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a> Hi Heng, thanks for your explanation. If my understanding is correct, the right SWA should host checkpoint averages for unshared params, but the latest values(not averaged) for shared positional encoding params.</p>",
          "rawMarkdown": "@hengck23 Hi Heng, thanks for your explanation. If my understanding is correct, the right SWA should host checkpoint averages for unshared params, but the latest values(not averaged) for shared positional encoding params."
        },
        {
          "id": 1911521,
          "postDate": "2022-08-24T06:34:20.737Z",
          "content": "<p>Hi <a href=\"https://www.kaggle.com/yingpengchen\" target=\"_blank\">@yingpengchen</a>, thanks for your tips! </p>",
          "rawMarkdown": "Hi @yingpengchen, thanks for your tips! "
        },
        {
          "id": 1911528,
          "postDate": "2022-08-24T06:48:04.060Z",
          "content": "<p>\"but the latest values(not averaged) for shared positional encoding params.\"</p>\n<p>you can delete 'key'  of shared parameters.<br>\nbecause the network will not load these shared parameter from the pth file.<br>\nthey are pointed to the unshared ones.</p>\n<p>let me give you an example</p>\n<pre><code>line.1   class net():\nline.2       self.linear1 = ...\nline.3       self.linear2 = ...\nline.4       self.linear2 = self.linear1  #this is sharing. \n\nwe need swa.pth to save only self.linear1.weight \n</code></pre>\n<p>during loading net.load_state_dict(swa):</p>\n<ul>\n<li>self.linear1 is loaded with self.linear1.weight in swa</li>\n<li>self.linear2 is not loaded, the loading may show error but just ignore</li>\n<li>line.4 of code always point self.linear2 to self.linear1. so even it seems that self.linear2 is not loaded but that is not true</li>\n</ul>\n<p>this also means that swa only needs to average self.linear1.weight  and ignore/skip self.linear2.weight completedly </p>\n<hr>\n<p>another way of saying:<br>\nwhen self.linear1.weight is read from pth file, it is loaded and used by both  self.linear1 and self.linear2.</p>\n<p>also, if there is another self.linear2.weight is read from pth file,  it is loaded and used by both  self.linear1 and self.linear2.</p>\n<p>if you save and read both self.linear1.weight, self.linear2.weight,  self.linear1 and self.linear2 are both read twice with the last read values replacing the previous one (for both linear modules).</p>\n<hr>\n<p>it is also for this reason that if you average self.linear2 in swa, you are average self.linear1 too because they are \"equal\", i.e. they refer to the same module.</p>\n<p>hence we only need to average self.linear1  (and ignore self.linear2)</p>\n<p>if you average self.linear1  once and self.linear2 once, the results is that both self.linear1  and self.linear2 are averaged twice</p>\n<hr>\n<p>coat code:</p>\n<pre><code>class ParallelBlock(nn.Module):\n        self.mlp2 = self.mlp3 = self.mlp4 = self.mlp5 = Mlp(in_features=dims[1], hidden_features=mlp_hidden_dim, act_layer=act_layer, drop=drop)\n\n##you should delete self.mlp2 = self.mlp3 = self.mlp4  and just keep self.mlp5 in swa\n\n\n\nclass FactorAtt_ConvRelPosEnc(nn.Module):\n        # Shared convolutional relative position encoding.\n        self.crpe = shared_crpe\n\n##you should delete self.crpe  and just keep shared_crpe in swa. you will have to trace back what the key of shared_crpe is\n\n\nclass SerialBlock(nn.Module):\n\n        # Conv-Attention.\n        self.cpe = shared_cpe\n\n\n##you should delete self.cpe  and just keep shared_cpe in swa. ....\n</code></pre>\n<hr>\n<p>actually the interesting questions is how did i discover this?</p>\n<p>this is because when i first did swa results actually decreased.</p>\n<p>the next question is, how can i be so sure that swa definitely improved performance and a software bug is intermediately suspected?</p>\n<p>this is because at the end of training, the gradient are very small. so the solutions do not differs greatly. (if you check my code, i even average batch norm/layer norm statistics, include variances. for other model, i average learned pos encoding as well).</p>\n<p>if linear combinations of close solutions lead to performance drop, it means there is a hill in the basin in the loss landscape.</p>",
          "rawMarkdown": "\"but the latest values(not averaged) for shared positional encoding params.\"\n\nyou can delete 'key'  of shared parameters.\nbecause the network will not load these shared parameter from the pth file.\nthey are pointed to the unshared ones.\n\nlet me give you an example\n\n```\nline.1   class net():\nline.2       self.linear1 = ...\nline.3       self.linear2 = ...\nline.4       self.linear2 = self.linear1  #this is sharing. \n\nwe need swa.pth to save only self.linear1.weight \n\n```\n\nduring loading net.load_state_dict(swa):\n- self.linear1 is loaded with self.linear1.weight in swa\n- self.linear2 is not loaded, the loading may show error but just ignore\n- line.4 of code always point self.linear2 to self.linear1. so even it seems that self.linear2 is not loaded but that is not true\n\nthis also means that swa only needs to average self.linear1.weight  and ignore/skip self.linear2.weight completedly \n\n---\n\nanother way of saying:\nwhen self.linear1.weight is read from pth file, it is loaded and used by both  self.linear1 and self.linear2.\n\nalso, if there is another self.linear2.weight is read from pth file,  it is loaded and used by both  self.linear1 and self.linear2.\n\nif you save and read both self.linear1.weight, self.linear2.weight,  self.linear1 and self.linear2 are both read twice with the last read values replacing the previous one (for both linear modules).\n\n---\n\nit is also for this reason that if you average self.linear2 in swa, you are average self.linear1 too because they are \"equal\", i.e. they refer to the same module.\n\nhence we only need to average self.linear1  (and ignore self.linear2)\n\nif you average self.linear1  once and self.linear2 once, the results is that both self.linear1  and self.linear2 are averaged twice\n\n---\ncoat code:\n\n```\nclass ParallelBlock(nn.Module):\n\t\tself.mlp2 = self.mlp3 = self.mlp4 = self.mlp5 = Mlp(in_features=dims[1], hidden_features=mlp_hidden_dim, act_layer=act_layer, drop=drop)\n\t\n##you should delete self.mlp2 = self.mlp3 = self.mlp4  and just keep self.mlp5 in swa\n\n\n\nclass FactorAtt_ConvRelPosEnc(nn.Module):\n\t\t# Shared convolutional relative position encoding.\n\t\tself.crpe = shared_crpe\n\n##you should delete self.crpe  and just keep shared_crpe in swa. you will have to trace back what the key of shared_crpe is\n\n\nclass SerialBlock(nn.Module):\n\n\t\t# Conv-Attention.\n\t\tself.cpe = shared_cpe\n\n\n##you should delete self.cpe  and just keep shared_cpe in swa. ....\n```\n\n\n----\n\n\nactually the interesting questions is how did i discover this?\n\nthis is because when i first did swa results actually decreased.\n\nthe next question is, how can i be so sure that swa definitely improved performance and a software bug is intermediately suspected?\n\nthis is because at the end of training, the gradient are very small. so the solutions do not differs greatly. (if you check my code, i even average batch norm/layer norm statistics, include variances. for other model, i average learned pos encoding as well).\n \nif linear combinations of close solutions lead to performance drop, it means there is a hill in the basin in the loss landscape.",
          "votes": 3
        },
        {
          "id": 1911543,
          "postDate": "2022-08-24T07:02:40.067Z",
          "content": "<p>Thank you for your vivid explanation, now I can grep a better understanding of your point! </p>",
          "rawMarkdown": "Thank you for your vivid explanation, now I can grep a better understanding of your point! "
        },
        {
          "id": 1925954,
          "postDate": "2022-09-04T12:52:45.887Z",
          "content": "<p>I tried this trick for coat-parallel model, but not found all skip parameters.</p>",
          "rawMarkdown": "I tried this trick for coat-parallel model, but not found all skip parameters."
        },
        {
          "id": 1934368,
          "postDate": "2022-09-11T10:25:13.417Z",
          "content": "<p>Thank you very much for sharing the great tips, Sensei <a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a>.  </p>\n<p></p>\n<p></p>\n<p></p>\n<p></p>\n<p></p>\n<p>Please disregard first two questions. I completely misunderstood SWA and your tricks. By the way, there seems a weird error that I haven't figured out. Combining two pths works fine according to CV but, more than two (three or more) doesn't work at all. It shows weird mask area <a href=\"https://raw.githubusercontent.com/cheul0518/Competitions/main/HuBMAP_HPA/e2.png\" target=\"_blank\">here</a><br>\nSWAing two of the three hits cv 0.78 while all of them hit 0.077. Can you enlighten me to solve this problem? </p>\n<p></p>\n<p>Here is the <a href=\"https://raw.githubusercontent.com/cheul0518/Competitions/main/HuBMAP_HPA/error.png\" target=\"_blank\">error_image</a>  with three pth files for SWA, while the <a href=\"https://raw.githubusercontent.com/cheul0518/Competitions/main/HuBMAP_HPA/normal.png\" target=\"_blank\">normal_image</a> with two pth files (just excluded one of the three pth files)</p>",
          "rawMarkdown": "Thank you very much for sharing the great tips, Sensei @hengck23. ~~Mind if I ask three questions?\nFirstly, what's the best way to decide the first input pth for SWA? From your SWA code snippet,~~ \n\n~~checkpoints = [x1.pth, x2.pth, x3.pth]\ndef do_swa(checkpoints):\n     state_dict = torch.load( ~ )\n     if swa is None:\n          swa = state_dict\n     else:\n         # skip if k in skip list\n         # or sum and divide~~\n\n~~For the shared parameters that are skipped,  their values are 100% from the first pth file only. So the order of pth files in checkpoints matters for the shared params. For me, the best way seems to pick up the first pth file for higher cv. I'm curious about your opinion.~~\n\n~~Secondly, I tried your trick: abs(swa(x1 and x1) - x1) != 0.  I'm curious if I'm good to go as long as there is no non-zero values when I did your trick. For example, I used a counting method. ~~\n\n~~The number of all the parameters in my model -> 581\nThe number of abs(swa(x1 and x1) -x1) == 0  -> 276\nThe number of abs(swa(x1 and x1) -x1) != 0  -> 305\nWith a bit of tweak skip list,   \nThe number of abs(swa(x1 and x1) -x1) == 0  -> 581\nThe number of abs(swa(x1 and x1) -x1) != 0  -> 0 ~~\n\n~~I'm curious if it's good enough. I submitted two SWA versions: one increased by 0.01, and the other one unchanged. Each SWA version consists of two pths. I couldn't try more due to the limit of submission a day~~\n\nPlease disregard first two questions. I completely misunderstood SWA and your tricks. By the way, there seems a weird error that I haven't figured out. Combining two pths works fine according to CV but, more than two (three or more) doesn't work at all. It shows weird mask area [here](https://raw.githubusercontent.com/cheul0518/Competitions/main/HuBMAP_HPA/e2.png)\nSWAing two of the three hits cv 0.78 while all of them hit 0.077. Can you enlighten me to solve this problem? \n\n~~Thirdly, when I combine three or more than three pth files for SWA, a weird error happens. Mask in a picture suddenly covers the whole image area with so many dots. It maybe seems due to underflow or overflow I'm not sure. Do you have any idea why it happens and how to solve it?\nThank you for reading my comment and hopefully hear your insight.~~\n\nHere is the [error_image](https://raw.githubusercontent.com/cheul0518/Competitions/main/HuBMAP_HPA/error.png)  with three pth files for SWA, while the [normal_image](https://raw.githubusercontent.com/cheul0518/Competitions/main/HuBMAP_HPA/normal.png) with two pth files (just excluded one of the three pth files)\n\n"
        },
        {
          "id": 1934730,
          "postDate": "2022-09-11T14:52:04.807Z",
          "content": "<p>I am studying swa for the first time.<br>\nDo I have to use sgd opt to use swa?</p>",
          "rawMarkdown": "I am studying swa for the first time.\nDo I have to use sgd opt to use swa?"
        },
        {
          "id": 1935283,
          "postDate": "2022-09-12T02:11:44.317Z",
          "content": "<p><a href=\"https://www.kaggle.com/sompark\" target=\"_blank\">@sompark</a> , you don't have to stick with SGD. Check <a href=\"https://pytorch.org/blog/stochastic-weight-averaging-in-pytorch/#:~:text=can%20be%20SGD%2C%20Adam%2C%20or%20any%20other%20torch.optim.Optimizer\" target=\"_blank\">here</a>.  Excerpt from the link: <code>To run SWA in auto mode you just need to wrap your optimizer base_opt of choice (can be SGD, Adam, or any other torch.optim.Optimizer) with SWA(base_opt, swa_start, swa_freq, swa_lr)</code></p>",
          "rawMarkdown": "@sompark , you don't have to stick with SGD. Check [here](https://pytorch.org/blog/stochastic-weight-averaging-in-pytorch/#:~:text=can%20be%20SGD%2C%20Adam%2C%20or%20any%20other%20torch.optim.Optimizer).  Excerpt from the link: ```To run SWA in auto mode you just need to wrap your optimizer base_opt of choice (can be SGD, Adam, or any other torch.optim.Optimizer) with SWA(base_opt, swa_start, swa_freq, swa_lr)```"
        },
        {
          "id": 1936044,
          "postDate": "2022-09-12T13:30:34.113Z",
          "content": "<p>thank you😆</p>",
          "rawMarkdown": "thank you😆"
        },
        {
          "id": 1939342,
          "postDate": "2022-09-14T16:32:11.783Z",
          "content": "<p>can i ask one more??….<br>\nI tried it and lr is always same<br>\nam I doing all right?…</p>",
          "rawMarkdown": "can i ask one more??....\nI tried it and lr is always same\nam I doing all right?..."
        },
        {
          "id": 1939678,
          "postDate": "2022-09-14T23:03:04.690Z",
          "content": "<p>IMHO, lr can stay if you've set base_optimizer_lr and swa_lr to the same constant number such as SGD(lr=0.1) and SWA(swa_lr=0.1), and didn't use standard decaying schedule.  For example, <a href=\"https://pytorch.org/assets/images/swa/figure2-highres.png\" target=\"_blank\">SWA description</a> explicitly names standard decaying schedule when they showcase lr change in the figure 2. I'm not 100% positive so hopefully someone read your comment and give you the exact, correct answer.</p>",
          "rawMarkdown": "IMHO, lr can stay if you've set base_optimizer_lr and swa_lr to the same constant number such as SGD(lr=0.1) and SWA(swa_lr=0.1), and didn't use standard decaying schedule.  For example, [SWA description] (https://pytorch.org/assets/images/swa/figure2-highres.png) explicitly names standard decaying schedule when they showcase lr change in the figure 2. I'm not 100% positive so hopefully someone read your comment and give you the exact, correct answer."
        },
        {
          "id": 1939729,
          "postDate": "2022-09-15T01:23:29.680Z",
          "content": "<p>\"I tried it and lr is always same\"</p>\n<p>data science is an art not a science. there is no wrong or right answers. there is only experimental results and conclusions.</p>\n<p>when you read a method<br>\n1) understand the steps (what to do)<br>\n2) try to understand why (why to do), but there will always be exceptions that the reasoning wrong/correct. this is because there will be assumptions in the reasoning and everything  is dependent on data<br>\n3) do expect to verify results and how different parameters affect results (just do it)</p>\n<hr>\n<p>here in this competition, if you check my code posted in the public notebook, SWA simply means average of the saved checkpoints (maybe some abuse of terms)</p>",
          "rawMarkdown": "\"I tried it and lr is always same\"\n\ndata science is an art not a science. there is no wrong or right answers. there is only experimental results and conclusions.\n\nwhen you read a method\n1) understand the steps (what to do)\n2) try to understand why (why to do), but there will always be exceptions that the reasoning wrong/correct. this is because there will be assumptions in the reasoning and everything  is dependent on data\n3) do expect to verify results and how different parameters affect results (just do it)\n\n---\n\nhere in this competition, if you check my code posted in the public notebook, SWA simply means average of the saved checkpoints (maybe some abuse of terms)",
          "votes": 1
        },
        {
          "id": 1940119,
          "postDate": "2022-09-15T07:32:30.450Z",
          "content": "<p>Thank you for your insightful comment <a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a>! By the way, I've been long stuck with figuring out my SWA (combining three .pths at validation/test step). May I ask for a hint other than your previous big hint: comparing (swa(x1,x1) - x1)?</p>",
          "rawMarkdown": "Thank you for your insightful comment @hengck23! By the way, I've been long stuck with figuring out my SWA (combining three .pths at validation/test step). May I ask for a hint other than your previous big hint: comparing (swa(x1,x1) - x1)?"
        },
        {
          "id": 1942865,
          "postDate": "2022-09-17T05:41:58.630Z",
          "content": "<p><a href=\"https://www.kaggle.com/Cheul\" target=\"_blank\">@Cheul</a> Can I ask the difference between the lb score of swa and normal?<br>\nI got only 0.01…</p>",
          "rawMarkdown": "@Cheul Can I ask the difference between the lb score of swa and normal?\nI got only 0.01..."
        },
        {
          "id": 1942873,
          "postDate": "2022-09-17T05:51:32.980Z",
          "content": "<p><a href=\"https://www.kaggle.com/gunparksom\" target=\"_blank\">@gunparksom</a> No my Segformer gave 0.67 at the highest a month ago. Maybe it could've given a lot better score if I either utilized 100% of  mmseg mechanics or coded it manually.</p>",
          "rawMarkdown": "@gunparksom No my Segformer gave 0.67 at the highest a month ago. Maybe it could've given a lot better score if I either utilized 100% of  mmseg mechanics or coded it manually."
        },
        {
          "id": 1942877,
          "postDate": "2022-09-17T05:53:28.203Z",
          "content": "<p><a href=\"https://www.kaggle.com/gunparksom\" target=\"_blank\">@gunparksom</a> my SWA improved  0.001~ 0.002 cv for me. I don't know if it could really improve my LB score since my rank and score remained the same. For my case of SWA cv, it reduces lots of false positive cases while reducing true positive a little bit. So I think SWA seems to work but I'm not certain like LB scores still same</p>",
          "rawMarkdown": "@gunparksom my SWA improved  0.001~ 0.002 cv for me. I don't know if it could really improve my LB score since my rank and score remained the same. For my case of SWA cv, it reduces lots of false positive cases while reducing true positive a little bit. So I think SWA seems to work but I'm not certain like LB scores still same"
        },
        {
          "id": 1943582,
          "postDate": "2022-09-17T16:10:53.370Z",
          "content": "<p>wow It makes me feel better that I wasn't the only me <br>\nthank you</p>",
          "rawMarkdown": "wow It makes me feel better that I wasn't the only me \nthank you"
        }
      ]
    },
    {
      "id": 1893249,
      "postDate": "2022-08-10T16:48:48.040Z",
      "content": "<p><img src=\"https://i.ibb.co/2skbhX5/Selection-069.png\" alt=\"https://i.ibb.co/2skbhX5/Selection-069.png\"></p>\n<p>i find a way to annotate spleen images easily.<br>\nuse gimp extract color components (CMKY yellow)</p>",
      "rawMarkdown": "![https://i.ibb.co/2skbhX5/Selection-069.png](https://i.ibb.co/2skbhX5/Selection-069.png)\n\ni find a way to annotate spleen images easily.\nuse gimp extract color components (CMKY yellow)",
      "votes": 2
    },
    {
      "id": 1893007,
      "postDate": "2022-08-10T13:40:23.807Z",
      "content": "<p><img src=\"https://i.ibb.co/djRfckn/Selection-064.png\" alt=\"https://i.ibb.co/djRfckn/Selection-064.png\"></p>",
      "rawMarkdown": "![https://i.ibb.co/djRfckn/Selection-064.png](https://i.ibb.co/djRfckn/Selection-064.png)",
      "votes": 2
    },
    {
      "id": 1891347,
      "postDate": "2022-08-09T11:17:35.940Z",
      "content": "<p><img src=\"https://i.ibb.co/VSvTF1d/Selection-066.png\" alt=\"https://i.ibb.co/VSvTF1d/Selection-066.png\"><br>\ni download random images from the internet to test the robustness of the model.<br>\nit perform better than I thought.</p>\n<p>it is obvious that hand-correction of the prediction on unseen images is a way to go.<br>\nneed to find more images without copyright issues</p>",
      "rawMarkdown": "![https://i.ibb.co/VSvTF1d/Selection-066.png](https://i.ibb.co/VSvTF1d/Selection-066.png)\ni download random images from the internet to test the robustness of the model.\nit perform better than I thought.\n\nit is obvious that hand-correction of the prediction on unseen images is a way to go.\nneed to find more images without copyright issues",
      "votes": 2,
      "replies": [
        {
          "id": 1891374,
          "postDate": "2022-08-09T11:41:55.003Z",
          "content": "<p>more stress test<br>\n<img src=\"https://i.ibb.co/bLspmJQ/Selection-084.png\" alt=\"https://i.ibb.co/bLspmJQ/Selection-084.png\"></p>",
          "rawMarkdown": "more stress test\n![https://i.ibb.co/bLspmJQ/Selection-084.png](https://i.ibb.co/bLspmJQ/Selection-084.png)",
          "votes": 1
        }
      ]
    },
    {
      "id": 1878169,
      "postDate": "2022-07-31T09:32:25.707Z",
      "content": "<p>i just realised besides swin v1,v2, there is a \"version 3\"<br>\n<a href=\"https://github.com/microsoft/CSWin-Transformer\" target=\"_blank\">https://github.com/microsoft/CSWin-Transformer</a></p>",
      "rawMarkdown": "i just realised besides swin v1,v2, there is a \"version 3\"\nhttps://github.com/microsoft/CSWin-Transformer",
      "votes": 2,
      "replies": [
        {
          "id": 1878174,
          "postDate": "2022-07-31T09:42:08.567Z",
          "content": "<p>maybe you don't need so many attention<br>\npaper: HiViT: Hierarchical Vision Transformer Meets Masked Image Modeling<br>\n<img src=\"https://i.ibb.co/VVK2fs3/Selection-122.png\" alt=\"https://i.ibb.co/VVK2fs3/Selection-122.png\"></p>",
          "rawMarkdown": "maybe you don't need so many attention\npaper: HiViT: Hierarchical Vision Transformer Meets Masked Image Modeling\n![https://i.ibb.co/VVK2fs3/Selection-122.png](https://i.ibb.co/VVK2fs3/Selection-122.png)"
        }
      ]
    },
    {
      "id": 1877641,
      "postDate": "2022-07-30T21:33:03.980Z",
      "content": "<p>good reading</p>\n<p>HOW DO VISION TRANSFORMERS WORK?<br>\n<a href=\"https://arxiv.org/pdf/2202.06709.pdf\" target=\"_blank\">https://arxiv.org/pdf/2202.06709.pdf</a><br>\n\"MSAs are low-pass filters, but Convs are high-pass filters. Therefore, MSAs and Convs are complementary\"</p>\n<p>Blurs Behave Like Ensembles: Spatial Smoothings to Improve Accuracy, Uncertainty, and Robustness<br>\n<a href=\"https://arxiv.org/pdf/2105.12639.pdf\" target=\"_blank\">https://arxiv.org/pdf/2105.12639.pdf</a></p>",
      "rawMarkdown": "good reading\n\nHOW DO VISION TRANSFORMERS WORK?\nhttps://arxiv.org/pdf/2202.06709.pdf\n\"MSAs are low-pass filters, but Convs are high-pass filters. Therefore, MSAs and Convs are complementary\"\n\n\nBlurs Behave Like Ensembles: Spatial Smoothings to Improve Accuracy, Uncertainty, and Robustness\nhttps://arxiv.org/pdf/2105.12639.pdf",
      "votes": 2,
      "replies": [
        {
          "id": 1879848,
          "postDate": "2022-08-01T09:49:25.777Z",
          "content": "<p><code>\"MSAs are low-pass filters, but Convs are high-pass filters. Therefore, MSAs and Convs are complementary\"</code></p>\n<p>That could explain why attention-based encoders and convolution-based decoders in UNETR and Swin UNETR work so well.</p>",
          "rawMarkdown": "` \"MSAs are low-pass filters, but Convs are high-pass filters. Therefore, MSAs and Convs are complementary\"`\n\nThat could explain why attention-based encoders and convolution-based decoders in UNETR and Swin UNETR work so well."
        },
        {
          "id": 1879884,
          "postDate": "2022-08-01T10:31:37.917Z",
          "content": "<p>i am thinking to use your current pretrain transformer, you can do something like this<br>\n<img src=\"https://i.ibb.co/LnbbZGY/Selection-128.png\" alt=\"https://i.ibb.co/LnbbZGY/Selection-128.png\"></p>",
          "rawMarkdown": "i am thinking to use your current pretrain transformer, you can do something like this\n![https://i.ibb.co/LnbbZGY/Selection-128.png](https://i.ibb.co/LnbbZGY/Selection-128.png)",
          "votes": 1
        }
      ]
    },
    {
      "id": 1877258,
      "postDate": "2022-07-30T13:09:15.477Z",
      "content": "<p>updated list of masked pretraining method.<br>\nmost opensource  have complete framework code from pertaining transformer backbone and finetunning/inference it for segmentation.</p>\n<p><img src=\"https://i.ibb.co/XCsKpjC/Selection-116.png\" alt=\"https://i.ibb.co/XCsKpjC/Selection-116.png\"><br>\nI missed the important Beit in the table:<br>\n<a href=\"https://github.com/microsoft/unilm/tree/master/beit\" target=\"_blank\">https://github.com/microsoft/unilm/tree/master/beit</a></p>\n<p>see also<br>\n<a href=\"https://github.com/cmhungsteve/Awesome-Transformer-Attention\" target=\"_blank\">https://github.com/cmhungsteve/Awesome-Transformer-Attention</a><br>\nunder \"Training + Transformer\" for more MIM</p>",
      "rawMarkdown": "updated list of masked pretraining method.\nmost opensource  have complete framework code from pertaining transformer backbone and finetunning/inference it for segmentation.\n\n![https://i.ibb.co/XCsKpjC/Selection-116.png](https://i.ibb.co/XCsKpjC/Selection-116.png)\nI missed the important Beit in the table:\nhttps://github.com/microsoft/unilm/tree/master/beit\n\n\nsee also\nhttps://github.com/cmhungsteve/Awesome-Transformer-Attention\nunder \"Training + Transformer\" for more MIM",
      "votes": 2
    },
    {
      "id": 1871615,
      "postDate": "2022-07-26T11:22:52.167Z",
      "content": "<p>how should you select your solution?</p>\n<ul>\n<li><p>which organ actually affects private LB score the most? (due to different/same class distribution probability and domain difference of private data)</p></li>\n<li><p>we usually monitor the validation dice of all organ. but does this select the most important one to private test? or are we selecting the best model for local validation data only? (is all dice correlated to organ dice)</p></li>\n</ul>\n<p><img src=\"https://i.ibb.co/j84YLNm/Selection-083.png\" alt=\"https://i.ibb.co/j84YLNm/Selection-083.png\"></p>",
      "rawMarkdown": "how should you select your solution?\n\n- which organ actually affects private LB score the most? (due to different/same class distribution probability and domain difference of private data)\n\n- we usually monitor the validation dice of all organ. but does this select the most important one to private test? or are we selecting the best model for local validation data only? (is all dice correlated to organ dice)\n\n![https://i.ibb.co/j84YLNm/Selection-083.png](https://i.ibb.co/j84YLNm/Selection-083.png)",
      "votes": 2
    },
    {
      "id": 1861404,
      "postDate": "2022-07-19T02:17:05.947Z",
      "content": "<p>make your own spleen labels:<br>\n<a href=\"https://www.purposegames.com/no/game/spleen-histology-and-red-and-white-pulp\" target=\"_blank\">https://www.purposegames.com/no/game/spleen-histology-and-red-and-white-pulp</a></p>",
      "rawMarkdown": "make your own spleen labels:\nhttps://www.purposegames.com/no/game/spleen-histology-and-red-and-white-pulp",
      "votes": 2
    },
    {
      "id": 1914883,
      "postDate": "2022-08-26T14:04:25.753Z",
      "content": "<p>this comment has not been deleted</p>",
      "rawMarkdown": "this comment has not been deleted",
      "votes": 1
    },
    {
      "id": 1832019,
      "postDate": "2022-06-24T15:45:58.667Z",
      "content": "<p>fyi: <br>\nVirtual histological staining of unlabelled tissue-autofluorescence images via deep learning<br>\n<a href=\"https://openreview.net/pdf?id=S1xANDXRKN\" target=\"_blank\">https://openreview.net/pdf?id=S1xANDXRKN</a><br>\n<a href=\"https://arxiv.org/pdf/1803.11293.pdf\" target=\"_blank\">https://arxiv.org/pdf/1803.11293.pdf</a><br>\n<img src=\"https://i.ibb.co/HFqKxfX/Selection-022.png\" alt=\"https://i.ibb.co/HFqKxfX/Selection-022.png\"></p>\n<hr>\n<p>H&amp;E to PAS conversion<br>\nDeep learning-based transformation of H&amp;E stained tissues into special stains<br>\n<a href=\"https://github.com/kevindehaan/stain-transformation\" target=\"_blank\">https://github.com/kevindehaan/stain-transformation</a></p>\n<p><a href=\"https://www.researchgate.net/publication/353875566_Deep_learning-based_transformation_of_HE_stained_tissues_into_special_stains\" target=\"_blank\">https://www.researchgate.net/publication/353875566_Deep_learning-based_transformation_of_HE_stained_tissues_into_special_stains</a><br>\n<img src=\"https://i.ibb.co/6r8dYNj/Selection-023.png\" alt=\"https://i.ibb.co/6r8dYNj/Selection-023.png\"></p>\n<hr>\n<p>DAB(brown)-H(blue) to H(blue)&amp;E(pink) papers:</p>\n<p>(1) Creating virtual H&amp;E images using samples imaged on a commercial CODEX platform<br>\n(2) FalseColor-Python: a rapid intensity-leveling and digital-staining package for fluorescence-based slide-free digital pathology</p>\n<p>(3) Dual Adaptive Pyramid Network for Cross-Stain Histopathology Image Segmentation<br>\nIn this paper, we propose a dual adaptive pyramid network (DAPNet) for histopathological gland segmentation<br>\nadapting from one stain domain to another (DAB-H and H&amp;E)<br>\n<a href=\"https://arxiv.org/pdf/1909.11524.pdf\" target=\"_blank\">https://arxiv.org/pdf/1909.11524.pdf</a><br>\n<a href=\"https://ibb.co/0997p3R\"><img src=\"https://i.ibb.co/GMM6fj4/Selection-034.png\" alt=\"Selection-034\"></a></p>\n<h2><a href=\"https://ibb.co/Phk2RNB\"><img src=\"https://i.ibb.co/HzZc0Vm/Selection-033.png\" alt=\"Selection-033\"></a></h2>\n<p>Tailoring automated data augmentation to H&amp;E-stained histopathology<br>\n<a href=\"https://github.com/DIAGNijmegen/pathology-he-auto-augment\" target=\"_blank\">https://github.com/DIAGNijmegen/pathology-he-auto-augment</a><br>\n<a href=\"https://openreview.net/pdf?id=JrBfXaoxbA2\" target=\"_blank\">https://openreview.net/pdf?id=JrBfXaoxbA2</a></p>\n<hr>\n<p><a href=\"https://scikit-image.org/docs/stable/auto_examples/color_exposure/plot_ihc_color_separation.html\" target=\"_blank\">https://scikit-image.org/docs/stable/auto_examples/color_exposure/plot_ihc_color_separation.html</a><br>\n<a href=\"https://towardsdatascience.com/stain-estimation-on-microscopy-whole-slide-images-2b5a57062268\" target=\"_blank\">https://towardsdatascience.com/stain-estimation-on-microscopy-whole-slide-images-2b5a57062268</a></p>",
      "rawMarkdown": "fyi: \nVirtual histological staining of unlabelled tissue-autofluorescence images via deep learning\nhttps://openreview.net/pdf?id=S1xANDXRKN\nhttps://arxiv.org/pdf/1803.11293.pdf\n![https://i.ibb.co/HFqKxfX/Selection-022.png](https://i.ibb.co/HFqKxfX/Selection-022.png)\n\n---\nH&E to PAS conversion\nDeep learning-based transformation of H&E stained tissues into special stains\nhttps://github.com/kevindehaan/stain-transformation\n\nhttps://www.researchgate.net/publication/353875566_Deep_learning-based_transformation_of_HE_stained_tissues_into_special_stains\n![https://i.ibb.co/6r8dYNj/Selection-023.png](https://i.ibb.co/6r8dYNj/Selection-023.png)\n\n---\n\nDAB(brown)-H(blue) to H(blue)&E(pink) papers:\n\n(1) Creating virtual H&E images using samples imaged on a commercial CODEX platform\n(2) FalseColor-Python: a rapid intensity-leveling and digital-staining package for fluorescence-based slide-free digital pathology\n\n(3) Dual Adaptive Pyramid Network for Cross-Stain Histopathology Image Segmentation\nIn this paper, we propose a dual adaptive pyramid network (DAPNet) for histopathological gland segmentation\nadapting from one stain domain to another (DAB-H and H&E)\nhttps://arxiv.org/pdf/1909.11524.pdf\n<a href=\"https://ibb.co/0997p3R\"><img src=\"https://i.ibb.co/GMM6fj4/Selection-034.png\" alt=\"Selection-034\" border=\"0\"></a>\n<a href=\"https://ibb.co/Phk2RNB\"><img src=\"https://i.ibb.co/HzZc0Vm/Selection-033.png\" alt=\"Selection-033\" border=\"0\"></a>\n---\n\n\nTailoring automated data augmentation to H&E-stained histopathology\nhttps://github.com/DIAGNijmegen/pathology-he-auto-augment\nhttps://openreview.net/pdf?id=JrBfXaoxbA2\n\n---\n\nhttps://scikit-image.org/docs/stable/auto_examples/color_exposure/plot_ihc_color_separation.html\nhttps://towardsdatascience.com/stain-estimation-on-microscopy-whole-slide-images-2b5a57062268",
      "votes": 2,
      "replies": [
        {
          "id": 1881003,
          "postDate": "2022-08-02T07:21:27.157Z",
          "content": "<p>\"We propose a new deep learning method to segment epithelial tissue in digitised hematoxylin and eosin (H&amp;E) stained prostatectomy slides using immunohistochemistry (IHC) as reference standard.\"</p>\n<p><a href=\"https://www.nature.com/articles/s41598-018-37257-4.pdf\" target=\"_blank\">https://www.nature.com/articles/s41598-018-37257-4.pdf</a></p>",
          "rawMarkdown": "\"We propose a new deep learning method to segment epithelial tissue in digitised hematoxylin and eosin (H&E) stained prostatectomy slides using immunohistochemistry (IHC) as reference standard.\"\n\nhttps://www.nature.com/articles/s41598-018-37257-4.pdf"
        }
      ]
    },
    {
      "id": 1938689,
      "postDate": "2022-09-14T09:46:31.067Z",
      "content": "<p>I notice that the KEY POINT is 2xA6000 GPU cards workstation xD</p>",
      "rawMarkdown": "I notice that the KEY POINT is 2xA6000 GPU cards workstation xD"
    },
    {
      "id": 1872994,
      "postDate": "2022-07-27T11:18:27.407Z",
      "content": "<p>How did you manage to calculate the LB score on HPA and Hubmap?</p>\n<p>I found in the comments the probe you used to calculate how many of each type you had in the test set. But how to get the metrics on each type is out of my understanding 😅</p>",
      "rawMarkdown": "How did you manage to calculate the LB score on HPA and Hubmap?\n\nI found in the comments the probe you used to calculate how many of each type you had in the test set. But how to get the metrics on each type is out of my understanding 😅",
      "votes": 1,
      "replies": [
        {
          "id": 1873014,
          "postDate": "2022-07-27T11:36:55.443Z",
          "content": "<p>your submission code:</p>\n<pre><code>#data_source =['Hubmap', 'HPA']\ndata_source =['HPA']\n\n#organ = ['kidney', 'prostate', 'largeintestine', 'spleen', 'lung']\norgan = ['prostate', ]\n\n    for i,d in test_df.iterrows():\n        id = d['id']\n        if (d['data_source'] in data_source) and (d['organ'] in organ):\n               rle =    ... run you model and compute rle  # this gives your prediction score\n        else:\n                rle = ''  # this gives zero score\n</code></pre>\n<p>e.g if I set <br>\ndata_source =['HPA']<br>\norgan = ['kidney', 'prostate', 'largeintestine', 'spleen', 'lung']</p>\n<p>the score on the submission page is for HPA and all organs only</p>",
          "rawMarkdown": "your submission code:\n\n\n```\n#data_source =['Hubmap', 'HPA']\ndata_source =['HPA']\n\n#organ = ['kidney', 'prostate', 'largeintestine', 'spleen', 'lung']\norgan = ['prostate', ]\n\n    for i,d in test_df.iterrows():\n        id = d['id']\n        if (d['data_source'] in data_source) and (d['organ'] in organ):\n               rle =    ... run you model and compute rle  # this gives your prediction score\n        else:\n                rle = ''  # this gives zero score\n```\n\ne.g if I set \ndata_source =['HPA']\norgan = ['kidney', 'prostate', 'largeintestine', 'spleen', 'lung']\n\nthe score on the submission page is for HPA and all organs only\n",
          "votes": 2
        },
        {
          "id": 1884114,
          "postDate": "2022-08-04T09:53:54.807Z",
          "content": "<p>I used this exact code &amp; submitted for different organs (both datasources). The scores I got are 0.03, 0.08, 0.05, 0.11, 0.07 (all sum up to 0.34) for lung, spleen, kidney, prostate, largeintestine respectively. When I submitted without this code(i.e. all organs &amp; both datasets) the score was 0.37. Why this difference 0.34!=0.37? I expected the individual organs scores to sum up to 0.37 exactly. Any pointers?</p>",
          "rawMarkdown": "I used this exact code & submitted for different organs (both datasources). The scores I got are 0.03, 0.08, 0.05, 0.11, 0.07 (all sum up to 0.34) for lung, spleen, kidney, prostate, largeintestine respectively. When I submitted without this code(i.e. all organs & both datasets) the score was 0.37. Why this difference 0.34!=0.37? I expected the individual organs scores to sum up to 0.37 exactly. Any pointers?"
        },
        {
          "id": 1884158,
          "postDate": "2022-08-04T10:25:07.423Z",
          "content": "<p><a href=\"https://www.kaggle.com/desaijairav\" target=\"_blank\">@desaijairav</a> numerical error.<br>\nthe score dispayed is not round(). it is floor().</p>\n<p>e.g. actual score could be 0.12999. but only only first 2 decimals are displayed : 0.12. it is truncated and not round</p>",
          "rawMarkdown": "@desaijairav numerical error.\nthe score dispayed is not round(). it is floor().\n\ne.g. actual score could be 0.12999. but only only first 2 decimals are displayed : 0.12. it is truncated and not round",
          "votes": 1
        }
      ]
    },
    {
      "id": 1839900,
      "postDate": "2022-07-01T19:37:48.137Z",
      "content": "<p>Hi <a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a> - Wonderful thread like usual.</p>\n<p>If you <strong>do</strong> find any useful external data sources, would you mind commenting on them on <a href=\"https://www.kaggle.com/competitions/hubmap-organ-segmentation/discussion/333886\" target=\"_blank\"><strong>this thread</strong></a>? I will add them to the main body of that post so that they are shared with everyone all in one place.</p>",
      "rawMarkdown": "Hi @hengck23 - Wonderful thread like usual.\n\nIf you **do** find any useful external data sources, would you mind commenting on them on [**this thread**](https://www.kaggle.com/competitions/hubmap-organ-segmentation/discussion/333886)? I will add them to the main body of that post so that they are shared with everyone all in one place.",
      "votes": 1,
      "replies": [
        {
          "id": 1858204,
          "postDate": "2022-07-16T18:29:24.793Z",
          "content": "<p><a href=\"https://www.kaggle.com/dschettler8845\" target=\"_blank\">@dschettler8845</a> </p>\n<p>external data is on this thread: <a href=\"https://www.kaggle.com/competitions/hubmap-organ-segmentation/discussion/332714\" target=\"_blank\">https://www.kaggle.com/competitions/hubmap-organ-segmentation/discussion/332714</a></p>",
          "rawMarkdown": "@dschettler8845 \n\nexternal data is on this thread: https://www.kaggle.com/competitions/hubmap-organ-segmentation/discussion/332714"
        },
        {
          "id": 1859549,
          "postDate": "2022-07-17T17:50:26.980Z",
          "content": "<p>I wonder where did you find H&amp;E and DAB/H stained images. hubmapconsortium only has 46 PAS stained kidney images which are probably previous competition's dataset. There is nothing new on there.</p>",
          "rawMarkdown": "I wonder where did you find H&E and DAB/H stained images. hubmapconsortium only has 46 PAS stained kidney images which are probably previous competition's dataset. There is nothing new on there.",
          "votes": 1
        },
        {
          "id": 1861351,
          "postDate": "2022-07-19T01:32:42.170Z",
          "content": "<p>read my post carefully.<br>\nHBMxxxx are hubmap image id<br>\nthere is hidden colon(large intestine) dataset that has public access</p>\n<p><img src=\"https://i.ibb.co/bFfZn3D/Selection-097.png\" alt=\"https://i.ibb.co/bFfZn3D/Selection-097.png\"></p>",
          "rawMarkdown": "read my post carefully.\nHBMxxxx are hubmap image id\nthere is hidden colon(large intestine) dataset that has public access\n\n![https://i.ibb.co/bFfZn3D/Selection-097.png](https://i.ibb.co/bFfZn3D/Selection-097.png)"
        }
      ]
    },
    {
      "id": 1861671,
      "postDate": "2022-07-19T06:53:10.643Z",
      "content": "<p>a baseline code is needed! current public ones are not good.👀</p>",
      "rawMarkdown": "a baseline code is needed! current public ones are not good.👀",
      "votes": -5,
      "replies": [
        {
          "id": 1862820,
          "postDate": "2022-07-20T03:17:35.183Z",
          "content": "<p>actually when i don't publish code, it means that </p>\n<ul>\n<li>the public code  (or github open source, etc) are good enough … after some optimization</li>\n<li>the \"actual code\" are not the key point to get good results</li>\n</ul>",
          "rawMarkdown": "actually when i don't publish code, it means that \n- the public code  (or github open source, etc) are good enough ... after some optimization\n- the \"actual code\" are not the key point to get good results",
          "votes": 11
        }
      ]
    },
    {
      "id": 1873994,
      "postDate": "2022-07-28T02:23:49.437Z",
      "content": "<p>Great job!   what pretrained model did you use, and what loss function did you use.</p>",
      "rawMarkdown": "Great job!   what pretrained model did you use, and what loss function did you use.",
      "votes": -1
    },
    {
      "id": 1951803,
      "postDate": "2022-09-23T08:53:58.850Z",
      "content": "<p>Could you share a snippet of data parallelism code?  I saw your posted codes and tried to implement it into mine but it didn't go well. <br>\nI used the following code to utilize two gpus:</p>\n<pre><code>with amp.autocast(enabled=is_amp):\n    output = data_parallel(net, batch) \n    probability += F.interpolate(output['probability'], size=(H, W), mode='bilinear', align_corners=False, antialias=True)\n</code></pre>\n<p>The program utilized the only one gpu while training. Though I had added GPU 0,1 environment and checked its counter =2. So I'm curious if I'm missing something important to do data parallelism?</p>",
      "rawMarkdown": "Could you share a snippet of data parallelism code?  I saw your posted codes and tried to implement it into mine but it didn't go well. \nI used the following code to utilize two gpus:\n```\nwith amp.autocast(enabled=is_amp):\n\toutput = data_parallel(net, batch) \n\tprobability += F.interpolate(output['probability'], size=(H, W), mode='bilinear', align_corners=False, antialias=True)\n```\nThe program utilized the only one gpu while training. Though I had added GPU 0,1 environment and checked its counter =2. So I'm curious if I'm missing something important to do data parallelism?",
      "replies": [
        {
          "id": 1951938,
          "postDate": "2022-09-23T10:48:21.650Z",
          "content": "<pre><code>from torch.nn.parallel.data_parallel import data_parallel\n</code></pre>",
          "rawMarkdown": "```\nfrom torch.nn.parallel.data_parallel import data_parallel\n\n\n```"
        },
        {
          "id": 1952901,
          "postDate": "2022-09-24T04:13:19.787Z",
          "content": "<p>Sorry for not being clear on the question. Yes I certainly did import the lib. But the following error always came up:</p>\n<pre><code>RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:1 and cuda:0! (when checking argument for argument weight in method wrapper__cudnn_convolution)\n</code></pre>\n<p>I tried to find the answer by googling but they're all about cuda:0 and cpu, nothing to do with two gpus. Could you enlighten me what I did wrong to make two gpu running?</p>\n<p>PS here is the code that I used to train, and it went well when I trained the model on one gpu:</p>\n<pre><code>        for i, data in enumerate(tqdm.notebook.tqdm(dl_train ,total = len(dl_train))):\n            imgs, masks = data\n\n            imgs = imgs.half().to(DEVICE)\n            masks = masks.half().to(DEVICE)     \n            batch = {'imgs':None, 'masks':None}\n            batch['imgs'] = imgs\n            batch['masks'] = masks            \n\n            # zero the parameter gradients\n            optimizer.zero_grad()            \n\n            with torch.cuda.amp.autocast(enabled=True):\n                # forward + loss\n                outputs = data_parallel(model, batch) \n                loss_bce = outputs['bce_loss'].mean()\n                loss_aux1 = outputs['aux1_loss'].mean()\n                loss_aux2 = outputs['aux2_loss'].mean()\n                loss_aux3 = outputs['aux3_loss'].mean()\n                loss_aux4 = outputs['aux4_loss'].mean()\n                loss_tr = loss_bce + 0.2*loss_aux1 + 0.2*loss_aux2 + 0.2*loss_aux3 + 0.2*loss_aux4\n\n            scaler.scale(loss_tr).backward()            \n            scaler.unscale_(optimizer)\n            scaler.step(optimizer)\n            scaler.update()\n            scheduler.step()\n</code></pre>",
          "rawMarkdown": "Sorry for not being clear on the question. Yes I certainly did import the lib. But the following error always came up:\n```\nRuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:1 and cuda:0! (when checking argument for argument weight in method wrapper__cudnn_convolution)\n```\nI tried to find the answer by googling but they're all about cuda:0 and cpu, nothing to do with two gpus. Could you enlighten me what I did wrong to make two gpu running?\n\nPS here is the code that I used to train, and it went well when I trained the model on one gpu:\n```\n        for i, data in enumerate(tqdm.notebook.tqdm(dl_train ,total = len(dl_train))):\n            imgs, masks = data\n\n            imgs = imgs.half().to(DEVICE)\n            masks = masks.half().to(DEVICE)     \n            batch = {'imgs':None, 'masks':None}\n            batch['imgs'] = imgs\n            batch['masks'] = masks            \n\n            # zero the parameter gradients\n            optimizer.zero_grad()            \n\n            with torch.cuda.amp.autocast(enabled=True):\n                # forward + loss\n                outputs = data_parallel(model, batch) \n                loss_bce = outputs['bce_loss'].mean()\n                loss_aux1 = outputs['aux1_loss'].mean()\n                loss_aux2 = outputs['aux2_loss'].mean()\n                loss_aux3 = outputs['aux3_loss'].mean()\n                loss_aux4 = outputs['aux4_loss'].mean()\n                loss_tr = loss_bce + 0.2*loss_aux1 + 0.2*loss_aux2 + 0.2*loss_aux3 + 0.2*loss_aux4\n                                \n            scaler.scale(loss_tr).backward()            \n            scaler.unscale_(optimizer)\n            scaler.step(optimizer)\n            scaler.update()\n            scheduler.step()\n```"
        },
        {
          "id": 1952903,
          "postDate": "2022-09-24T04:16:22.973Z",
          "content": "<p>some of the opensource model does not support multiple gpu training (because of the way they have written the init and forward function). you will have to debug network module one by one and rewrite their code</p>\n<p>you can debug your code by using a simple model like resnet34 for classification</p>",
          "rawMarkdown": "some of the opensource model does not support multiple gpu training (because of the way they have written the init and forward function). you will have to debug network module one by one and rewrite their code\n\nyou can debug your code by using a simple model like resnet34 for classification",
          "votes": 1
        },
        {
          "id": 1952910,
          "postDate": "2022-09-24T04:23:26.427Z",
          "content": "<p>I see. Thank you for the direction. I guess the post work gonna be a lot more fun. Hope you have a great weekend.</p>",
          "rawMarkdown": "I see. Thank you for the direction. I guess the post work gonna be a lot more fun. Hope you have a great weekend."
        }
      ]
    },
    {
      "id": 1951493,
      "postDate": "2022-09-23T05:21:07.223Z",
      "content": "<p>Hey . . . <a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a> Hengck . . . .  THANKS VERY MUCH ✌️✌️✌️✌️ . . . . MAIDEN MEDAL IN Competition and YOUR COAT MEDIUM + DAFORMER was winner for me, .. . .. . 🔥🔥🔥🔥🔥 . . . . </p>",
      "rawMarkdown": "Hey . . . @hengck23 Hengck . . . .  THANKS VERY MUCH ✌️✌️✌️✌️ . . . . MAIDEN MEDAL IN Competition and YOUR COAT MEDIUM + DAFORMER was winner for me, .. . .. . 🔥🔥🔥🔥🔥 . . . . "
    },
    {
      "id": 1949163,
      "postDate": "2022-09-21T14:45:13.070Z",
      "content": "<p>I've just realised - you are probably going to become a competitions grand master in just over 24 hours :)</p>",
      "rawMarkdown": "I've just realised - you are probably going to become a competitions grand master in just over 24 hours :)"
    },
    {
      "id": 1940951,
      "postDate": "2022-09-15T16:55:15.010Z",
      "content": "<p>Hello!<br>\nI'm currently working with segformer mit b2. I use the same fold for validation and all the scripts as you. But I don't know why I can't get at least 0.75 on validation. Do you have any idea what causes the problem? Thanks a lot for your work - I've learned a lot!</p>\n<p>train_log:rate     iter  epoch | dice   loss   tp     tn     | loss           | time           </p>\n<p>train_log:-------------------------------------------------------------------------------------</p>\n<p>train_log:1.00e-5   00000000*   0.00 | 0.155  0.705  0.0000  0.000   | 0.000  0.000   |  0 hr 00 min</p>\n<p>train_log:1.00e-5   00000138*   3.00 | 0.592  0.251  0.0000  0.000   | 0.372  0.265   |  0 hr 01 min</p>\n<p>train_log:1.00e-5   00000276*   6.00 | 0.594  0.165  0.0000  0.000   | 0.203  0.173   |  0 hr 02 min</p>\n<p>train_log:1.00e-5   00000414*   9.00 | 0.608  0.134  0.0000  0.000   | 0.154  0.126   |  0 hr 04 min</p>\n<p>train_log:1.00e-5   00000552*  12.00 | 0.638  0.133  0.0000  0.000   | 0.130  0.115   |  0 hr 05 min</p>\n<p>train_log:1.00e-5   00000690*  15.00 | 0.644  0.131  0.0000  0.000   | 0.124  0.113   |  0 hr 06 min</p>\n<p>….<br>\ntrain_log:1.00e-5   00003726*  81.00 | 0.715  0.102  0.0000  0.000   | 0.071  0.075   |  0 hr 37 min</p>\n<p>train_log:1.00e-5   00003864*  84.00 | 0.702  0.101  0.0000  0.000   | 0.053  0.059   |  0 hr 39 min</p>\n<p>train_log:1.00e-5   00004002*  87.00 | 0.707  0.094  0.0000  0.000   | 0.054  0.059   |  0 hr 40 min</p>\n<p>train_log:1.00e-5   00004140*  90.00 | 0.700  0.106  0.0000  0.000   | 0.056  0.062   |  0 hr 42 min</p>\n<p>train_log:1.00e-5   00004278*  93.00 | 0.700  0.094  0.0000  0.000   | 0.056  0.061   |  0 hr 43 min</p>\n<p>train_log:1.00e-5   00004416*  96.00 | 0.706  0.099  0.0000  0.000   | 0.054  0.059   |  0 hr 44 min</p>\n<p>train_log:1.00e-5   00004554*  99.00 | 0.708  0.097  0.0000  0.000   | 0.055  0.061   |  0 hr 46 min</p>\n<p>train_log:1.00e-5   00004692* 102.00 | 0.699  0.099  0.0000  0.000   | 0.056  0.061   |  0 hr 47 min<br>\n….<br>\ntrain_log:1.00e-5   00010212* 222.00 | 0.703  0.119  0.0000  0.000   | 0.037  0.045   |  1 hr 48 min</p>\n<p>train_log:1.00e-5   00010350* 225.00 | 0.721  0.117  0.0000  0.000   | 0.035  0.043   |  1 hr 49 min</p>\n<p>train_log:1.00e-5   00010488* 228.00 | 0.710  0.108  0.0000  0.000   | 0.039  0.047   |  1 hr 51 min</p>\n<p>train_log:1.00e-5   00010626* 231.00 | 0.704  0.117  0.0000  0.000   | 0.039  0.046   |  1 hr 53 min</p>\n<p>train_log:1.00e-5   00010764* 234.00 | 0.704  0.113  0.0000  0.000   | 0.039  0.048   |  1 hr 54 min<br>\n….<br>\nAnd the dice goes around 0.71…</p>",
      "rawMarkdown": "Hello!\nI'm currently working with segformer mit b2. I use the same fold for validation and all the scripts as you. But I don't know why I can't get at least 0.75 on validation. Do you have any idea what causes the problem? Thanks a lot for your work - I've learned a lot!\n\n\ntrain_log:rate     iter  epoch | dice   loss   tp     tn     | loss           | time           \n\ntrain_log:-------------------------------------------------------------------------------------\n\ntrain_log:1.00e-5   00000000*   0.00 | 0.155  0.705  0.0000  0.000   | 0.000  0.000   |  0 hr 00 min\n\ntrain_log:1.00e-5   00000138*   3.00 | 0.592  0.251  0.0000  0.000   | 0.372  0.265   |  0 hr 01 min\n\ntrain_log:1.00e-5   00000276*   6.00 | 0.594  0.165  0.0000  0.000   | 0.203  0.173   |  0 hr 02 min\n\ntrain_log:1.00e-5   00000414*   9.00 | 0.608  0.134  0.0000  0.000   | 0.154  0.126   |  0 hr 04 min\n\ntrain_log:1.00e-5   00000552*  12.00 | 0.638  0.133  0.0000  0.000   | 0.130  0.115   |  0 hr 05 min\n\ntrain_log:1.00e-5   00000690*  15.00 | 0.644  0.131  0.0000  0.000   | 0.124  0.113   |  0 hr 06 min\n\n....\ntrain_log:1.00e-5   00003726*  81.00 | 0.715  0.102  0.0000  0.000   | 0.071  0.075   |  0 hr 37 min\n\ntrain_log:1.00e-5   00003864*  84.00 | 0.702  0.101  0.0000  0.000   | 0.053  0.059   |  0 hr 39 min\n\ntrain_log:1.00e-5   00004002*  87.00 | 0.707  0.094  0.0000  0.000   | 0.054  0.059   |  0 hr 40 min\n\ntrain_log:1.00e-5   00004140*  90.00 | 0.700  0.106  0.0000  0.000   | 0.056  0.062   |  0 hr 42 min\n\ntrain_log:1.00e-5   00004278*  93.00 | 0.700  0.094  0.0000  0.000   | 0.056  0.061   |  0 hr 43 min\n\ntrain_log:1.00e-5   00004416*  96.00 | 0.706  0.099  0.0000  0.000   | 0.054  0.059   |  0 hr 44 min\n\ntrain_log:1.00e-5   00004554*  99.00 | 0.708  0.097  0.0000  0.000   | 0.055  0.061   |  0 hr 46 min\n\ntrain_log:1.00e-5   00004692* 102.00 | 0.699  0.099  0.0000  0.000   | 0.056  0.061   |  0 hr 47 min\n....\ntrain_log:1.00e-5   00010212* 222.00 | 0.703  0.119  0.0000  0.000   | 0.037  0.045   |  1 hr 48 min\n\ntrain_log:1.00e-5   00010350* 225.00 | 0.721  0.117  0.0000  0.000   | 0.035  0.043   |  1 hr 49 min\n\ntrain_log:1.00e-5   00010488* 228.00 | 0.710  0.108  0.0000  0.000   | 0.039  0.047   |  1 hr 51 min\n\ntrain_log:1.00e-5   00010626* 231.00 | 0.704  0.117  0.0000  0.000   | 0.039  0.046   |  1 hr 53 min\n\ntrain_log:1.00e-5   00010764* 234.00 | 0.704  0.113  0.0000  0.000   | 0.039  0.048   |  1 hr 54 min\n....\nAnd the dice goes around 0.71...",
      "replies": [
        {
          "id": 1941364,
          "postDate": "2022-09-16T01:51:45.743Z",
          "content": "<p>use fold 3 for best results. if you still cannot get same results try different fold.<br>\ntry different model, aug to debug your pipline</p>",
          "rawMarkdown": "use fold 3 for best results. if you still cannot get same results try different fold.\ntry different model, aug to debug your pipline",
          "votes": 1
        },
        {
          "id": 1941366,
          "postDate": "2022-09-16T01:53:00.580Z",
          "content": "<p>lr of 1e-5 is low. 5e-5 for batch size 8 to 16</p>",
          "rawMarkdown": "lr of 1e-5 is low. 5e-5 for batch size 8 to 16",
          "votes": 1
        },
        {
          "id": 1941937,
          "postDate": "2022-09-16T10:55:37.257Z",
          "content": "<p>Thank you for your reply,<br>\nI achieved approximately the same results as in your logs on fold3 (same fold as your) with b2. Without using SWA this single-fold model gives 0.73 on LB (I use better on valid loss (dice=0.778,  loss=0.085) and better on valid dice (dice = 0.784,  loss=0.103) separately - both have 0.73 LB).<br>\nAm I right with my models and it looks reasonable without SWA (i.e SWA may improve LB to about 0.79)? Looks pretty strange… <br>\nHere is my log file - <a href=\"https://www.kaggle.com/datasets/resourcermixer/mylogsfold3?select=log.train.txt\" target=\"_blank\">https://www.kaggle.com/datasets/resourcermixer/mylogsfold3?select=log.train.txt</a><br>\nBelow plots of valid dice and loss during the training:</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F8349963%2F0bd8ec37ef3a8f9f45491d51a8e3f5e6%2F1.png?generation=1663325368388846&amp;alt=media\" alt=\"\"><br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F8349963%2F2366c846cbeca058f3e9dd1c7cc251d5%2F2.png?generation=1663325383811047&amp;alt=media\" alt=\"\"><br>\n(Looks like I should take models near 200th epoch to avoid overfitting…)<br>\nHere is example of predicting (model with 252 epochs )<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F8349963%2Fd772189e9f4fdd1a50aca9e31ad0b2e9%2Fex.png?generation=1663325550184964&amp;alt=media\" alt=\"\"></p>\n<p>Have you any ideas?</p>",
          "rawMarkdown": "Thank you for your reply,\nI achieved approximately the same results as in your logs on fold3 (same fold as your) with b2. Without using SWA this single-fold model gives 0.73 on LB (I use better on valid loss (dice=0.778,  loss=0.085) and better on valid dice (dice = 0.784,  loss=0.103) separately - both have 0.73 LB).\nAm I right with my models and it looks reasonable without SWA (i.e SWA may improve LB to about 0.79)? Looks pretty strange... \nHere is my log file - https://www.kaggle.com/datasets/resourcermixer/mylogsfold3?select=log.train.txt\nBelow plots of valid dice and loss during the training:\n\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F8349963%2F0bd8ec37ef3a8f9f45491d51a8e3f5e6%2F1.png?generation=1663325368388846&alt=media)\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F8349963%2F2366c846cbeca058f3e9dd1c7cc251d5%2F2.png?generation=1663325383811047&alt=media)\n(Looks like I should take models near 200th epoch to avoid overfitting...)\nHere is example of predicting (model with 252 epochs )\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F8349963%2Fd772189e9f4fdd1a50aca9e31ad0b2e9%2Fex.png?generation=1663325550184964&alt=media)\n\nHave you any ideas?"
        },
        {
          "id": 1943602,
          "postDate": "2022-09-17T16:28:45.890Z",
          "content": "<p>Isn't fold dataset random?<br>\nLooking at the conversation between the two, it looks like a fixed dataset.</p>",
          "rawMarkdown": "Isn't fold dataset random?\nLooking at the conversation between the two, it looks like a fixed dataset."
        },
        {
          "id": 1943682,
          "postDate": "2022-09-17T17:32:34.460Z",
          "content": "<p>yes, It's fixed</p>",
          "rawMarkdown": "yes, It's fixed"
        }
      ]
    },
    {
      "id": 1937356,
      "postDate": "2022-09-13T12:46:09.070Z",
      "content": "<p>an interesting work</p>\n<p>\" We additionally benchmark improvements in domain adaptation and out-of-distribution<br>\ndetection, and demonstrate that semi-supervised learning outperforms supervised learning in both cases.\"</p>\n<p>Improving colonoscopy lesion classification using semi-supervised deep learning<br>\npaper: <a href=\"https://arxiv.org/pdf/2009.03162.pdf\" target=\"_blank\">https://arxiv.org/pdf/2009.03162.pdf</a><br>\n<a href=\"https://durr.jhu.edu/pubs/2020-colossl/\" target=\"_blank\">https://durr.jhu.edu/pubs/2020-colossl/</a></p>\n<p><img src=\"https://durr.jhu.edu/wp-content/uploads/2020/12/2020-SSL-1200x571.png\" alt=\"https://durr.jhu.edu/wp-content/uploads/2020/12/2020-SSL-1200x571.png\"></p>",
      "rawMarkdown": "an interesting work\n\n\" We additionally benchmark improvements in domain adaptation and out-of-distribution\ndetection, and demonstrate that semi-supervised learning outperforms supervised learning in both cases.\"\n\nImproving colonoscopy lesion classification using semi-supervised deep learning\npaper: https://arxiv.org/pdf/2009.03162.pdf\nhttps://durr.jhu.edu/pubs/2020-colossl/\n\n![https://durr.jhu.edu/wp-content/uploads/2020/12/2020-SSL-1200x571.png](https://durr.jhu.edu/wp-content/uploads/2020/12/2020-SSL-1200x571.png)"
    },
    {
      "id": 1935317,
      "postDate": "2022-09-12T03:01:19.697Z",
      "content": "<p><a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a>, may I hear your opinion on my case? The problem is \"higher resolution trained model performed worse on Hubmap data than less res one, while better on HAP\" I have two CoaT_small models: one trained with 768, and the other with 1024. The 1024 model performed on HAP better than the 768 model (0.01~0.02 better) while its performance significantly worse on Hubmap data (0.03 worse). In order to have bigger receptive field for higher resolution, I have added a serial block (2 times repeat) and a parallel block (6 times repeat). However, it didn't go well  for Hubmap data, although they have same lr, bs, and aug. I've assumed three possibilities. 1.  1024 dataset wrong, 2. need more aug, 3. change for loss function (currently for 768, bce + 0.2(aux1~3), for 1024, bce+0.2(aux1~4). Can you enlighten me if I've missed some important part in my experiments? </p>",
      "rawMarkdown": "@hengck23, may I hear your opinion on my case? The problem is \"higher resolution trained model performed worse on Hubmap data than less res one, while better on HAP\" I have two CoaT_small models: one trained with 768, and the other with 1024. The 1024 model performed on HAP better than the 768 model (0.01~0.02 better) while its performance significantly worse on Hubmap data (0.03 worse). In order to have bigger receptive field for higher resolution, I have added a serial block (2 times repeat) and a parallel block (6 times repeat). However, it didn't go well  for Hubmap data, although they have same lr, bs, and aug. I've assumed three possibilities. 1.  1024 dataset wrong, 2. need more aug, 3. change for loss function (currently for 768, bce + 0.2(aux1~3), for 1024, bce+0.2(aux1~4). Can you enlighten me if I've missed some important part in my experiments? ",
      "replies": [
        {
          "id": 1938756,
          "postDate": "2022-09-14T10:49:47.463Z",
          "content": "<p>\"while its performance significantly worse on Hubmap data (0.03 worse). In order to have bigger receptive field for higher resolution, \"</p>\n<p>over fitting and over detecting of smaller object</p>\n<p>i can imagine if your try to draw the results on the test image (singe spleen image), the larger model detecs many more smaller blobs. </p>\n<blockquote>\n  <blockquote>\n    <p>performed on HPA better than the 768 model (0.01~0.02 better) <br>\n    this is better IOU loss (because of resolution)</p>\n    <p>performance significantly worse on Hubmap data (0.03 worse). <br>\n    this is because of many more false positive instance</p>\n  </blockquote>\n</blockquote>\n<hr>\n<p>accuracy is affected by number of true/false positive/negative instance,<br>\nand for each instance, the IOU value</p>",
          "rawMarkdown": "\"while its performance significantly worse on Hubmap data (0.03 worse). In order to have bigger receptive field for higher resolution, \"\n\nover fitting and over detecting of smaller object\n\ni can imagine if your try to draw the results on the test image (singe spleen image), the larger model detecs many more smaller blobs. \n\n>> performed on HPA better than the 768 model (0.01~0.02 better) \nthis is better IOU loss (because of resolution)\n\n>>performance significantly worse on Hubmap data (0.03 worse). \nthis is because of many more false positive instance\n\n\n---\n\naccuracy is affected by number of true/false positive/negative instance,\nand for each instance, the IOU value",
          "votes": 1
        },
        {
          "id": 1939031,
          "postDate": "2022-09-14T13:46:35.703Z",
          "content": "<p>I see. Now I've got the direction to fix. Thank you very much for your advice.</p>",
          "rawMarkdown": "I see. Now I've got the direction to fix. Thank you very much for your advice."
        }
      ]
    },
    {
      "id": 1930925,
      "postDate": "2022-09-08T10:47:44.067Z",
      "content": "<p>Thank you very much for giving away your experiments and knowledge in detail.  Mind if I ask your opinion? Do you think it's safe to use \"data_source, organ, and img_height/width\" in inference? I've been using those information to infer the test images but, if any of those information is null in the other test set, then my program would not complete. So I'm afraid of it. Maybe, it's not going to be a problem because inference program look through both test sets without an issue when we make an infer?  Sorry for the dumb question.</p>",
      "rawMarkdown": "Thank you very much for giving away your experiments and knowledge in detail.  Mind if I ask your opinion? Do you think it's safe to use \"data_source, organ, and img_height/width\" in inference? I've been using those information to infer the test images but, if any of those information is null in the other test set, then my program would not complete. So I'm afraid of it. Maybe, it's not going to be a problem because inference program look through both test sets without an issue when we make an infer?  Sorry for the dumb question.",
      "replies": [
        {
          "id": 1930928,
          "postDate": "2022-09-08T10:53:13.093Z",
          "content": "<p>all  \"data_source, organ, and img_height/width\"  are available in hidden public and private test set.</p>\n<blockquote>\n  <blockquote>\n    <p>if any of those information is null in the other test set, then my program would not complete.<br>\n    you you submit, you are already running  for both  public and private test set.</p>\n  </blockquote>\n</blockquote>\n<p>so there is no problem</p>",
          "rawMarkdown": "all  \"data_source, organ, and img_height/width\"  are available in hidden public and private test set.\n\n>> if any of those information is null in the other test set, then my program would not complete.\nyou you submit, you are already running  for both  public and private test set.\n\nso there is no problem\n",
          "votes": 1
        },
        {
          "id": 1931138,
          "postDate": "2022-09-08T13:23:00.467Z",
          "content": "<p>Thank you very much!</p>",
          "rawMarkdown": "Thank you very much!"
        }
      ]
    },
    {
      "id": 1930900,
      "postDate": "2022-09-08T09:59:41.610Z",
      "content": "<p>when i train coat small(5 levels) at input 1024, i get results  below ,kidney score is too low,can anyone give me some advice? i think it is the reason i only get 0.77 at lb,  not 0.8(single fold3)<br>\nall 0.776699<br>\nkidney 0.882886<br>\nprostate 0.823085<br>\nlargeintestine 0.907251<br>\nspleen 0.854549<br>\nlung 0.265985<br>\n☹️</p>",
      "rawMarkdown": "when i train coat small(5 levels) at input 1024, i get results  below ,kidney score is too low,can anyone give me some advice? i think it is the reason i only get 0.77 at lb,  not 0.8(single fold3)\nall 0.776699\nkidney 0.882886\nprostate 0.823085\nlargeintestine 0.907251\nspleen 0.854549\nlung 0.265985\n☹️",
      "replies": [
        {
          "id": 1930909,
          "postDate": "2022-09-08T10:23:54.210Z",
          "content": "<p>Verify it is not swa bug by disable swa. Just do validation for a single checkpoint first</p>",
          "rawMarkdown": "Verify it is not swa bug by disable swa. Just do validation for a single checkpoint first",
          "votes": 1
        },
        {
          "id": 1930911,
          "postDate": "2022-09-08T10:28:01.167Z",
          "content": "<p>Check augmentation, hyper parameter etc correctness by smaller model. Eg just coat small parallel 4 level or coat medium without parallel or pvt v2 etc at 786. These should be at lb 0.78 or 0.79 at single fold3.</p>",
          "rawMarkdown": "Check augmentation, hyper parameter etc correctness by smaller model. Eg just coat small parallel 4 level or coat medium without parallel or pvt v2 etc at 786. These should be at lb 0.78 or 0.79 at single fold3.",
          "votes": 1
        },
        {
          "id": 1946640,
          "postDate": "2022-09-20T01:37:18.400Z",
          "content": "<p>Is 0.8 lb model normalized by 0.4~ or 0.7~ ??<br>\nI want to try two of them but my gpu 50(4 batch 768)epoch take 12hour</p>",
          "rawMarkdown": "Is 0.8 lb model normalized by 0.4~ or 0.7~ ??\nI want to try two of them but my gpu 50(4 batch 768)epoch take 12hour"
        }
      ]
    },
    {
      "id": 1928953,
      "postDate": "2022-09-06T18:02:28.620Z",
      "content": "<p>Should we use aux0 loss when training?why</p>",
      "rawMarkdown": "Should we use aux0 loss when training?why",
      "replies": [
        {
          "id": 1930133,
          "postDate": "2022-09-07T15:25:32.487Z",
          "content": "<p>I suppose that the feature corresponding to aux0 loss is just downsampled by the final segmentation map, which has been contained in the final loss, so we do not need use aux0 loss.</p>",
          "rawMarkdown": "I suppose that the feature corresponding to aux0 loss is just downsampled by the final segmentation map, which has been contained in the final loss, so we do not need use aux0 loss."
        }
      ]
    },
    {
      "id": 1914865,
      "postDate": "2022-08-26T13:43:35.550Z",
      "content": "<p>Out of interest, could you post your predicted on the single test image of your best model (thresholded, or not, or both!)? I'm interested to know what the current leading solution thinks the test image should be predicted as!</p>",
      "rawMarkdown": "Out of interest, could you post your predicted on the single test image of your best model (thresholded, or not, or both!)? I'm interested to know what the current leading solution thinks the test image should be predicted as!",
      "replies": [
        {
          "id": 1914901,
          "postDate": "2022-08-26T14:18:43.463Z",
          "content": "<p>it is just the average of the below, depending on how i ensemble.</p>\n<p>large model 1536 detects smaller objects<br>\ncswin always detect smaller objects.</p>\n<p>difference models dectes differently.</p>\n<p>technically, the smaller detections are really partial white pulp, but i am not sure if they are annotated in the hidden ground truth.</p>\n<p><a href=\"https://ibb.co/V3bzHq8\"><img src=\"https://i.ibb.co/jHqQVrF/Selection-088.png\" alt=\"Selection-088\"></a> </p>",
          "rawMarkdown": "it is just the average of the below, depending on how i ensemble.\n\nlarge model 1536 detects smaller objects\ncswin always detect smaller objects.\n\ndifference models dectes differently.\n\ntechnically, the smaller detections are really partial white pulp, but i am not sure if they are annotated in the hidden ground truth.\n \n<a href=\"https://ibb.co/V3bzHq8\"><img src=\"https://i.ibb.co/jHqQVrF/Selection-088.png\" alt=\"Selection-088\" border=\"0\"></a> ",
          "votes": 3
        }
      ]
    },
    {
      "id": 1913542,
      "postDate": "2022-08-25T11:03:17.670Z",
      "content": "<p>i realize one important thing: almost all vision transformer starts with 4x4 non-overlapping block (or maybe 8x8)<br>\nthis initial layer causes some similarity in all transformer, and reduces diversity in ensemble?</p>",
      "rawMarkdown": "i realize one important thing: almost all vision transformer starts with 4x4 non-overlapping block (or maybe 8x8)\nthis initial layer causes some similarity in all transformer, and reduces diversity in ensemble?",
      "replies": [
        {
          "id": 1913896,
          "postDate": "2022-08-25T15:06:00.447Z",
          "content": "<p>the same hyper-parameter also make the similarity?</p>",
          "rawMarkdown": "the same hyper-parameter also make the similarity?"
        },
        {
          "id": 1914034,
          "postDate": "2022-08-25T17:09:12.380Z",
          "content": "<p>it depends. same fold from same seed, same augmentation will have similar results</p>",
          "rawMarkdown": "it depends. same fold from same seed, same augmentation will have similar results"
        }
      ]
    },
    {
      "id": 1911581,
      "postDate": "2022-08-24T07:29:00.590Z",
      "content": "<p>the race never ends …. MaxVit seems promising …</p>\n<p>Ross Wightman<br>\n\"I've been working on a large model update over the past month+, incl several imports from research impl and timm originals of CoAtNet (<a href=\"https://arxiv.org/abs/2106.04803\" target=\"_blank\">https://arxiv.org/abs/2106.04803</a>) and MaxVit (<a href=\"https://arxiv.org/abs/2204.01697\" target=\"_blank\">https://arxiv.org/abs/2204.01697</a>) in a combined <code>MaxxVit</code> impl. Soon to be merged w/ a few weights.\"</p>",
      "rawMarkdown": "the race never ends .... MaxVit seems promising ...\n\n\n\nRoss Wightman\n\"I've been working on a large model update over the past month+, incl several imports from research impl and timm originals of CoAtNet (https://arxiv.org/abs/2106.04803) and MaxVit (https://arxiv.org/abs/2204.01697) in a combined `MaxxVit` impl. Soon to be merged w/ a few weights.\""
    },
    {
      "id": 1908381,
      "postDate": "2022-08-21T15:52:43.073Z",
      "content": "<p>maybe useful<br>\nMesa: A Memory-saving Training Framework for Transformers</p>",
      "rawMarkdown": "maybe useful\nMesa: A Memory-saving Training Framework for Transformers"
    },
    {
      "id": 1904622,
      "postDate": "2022-08-18T10:59:54.427Z",
      "content": "<p>48G GPU Mem .. such expensive game. 💔</p>",
      "rawMarkdown": "48G GPU Mem .. such expensive game. 💔",
      "replies": [
        {
          "id": 1904773,
          "postDate": "2022-08-18T13:22:40.550Z",
          "content": "<p>\"48G GPU Mem .. such expensive game\"</p>\n<p>having high memory simplifes my work.<br>\nbut you can achieve the same performance with lower memory system, e.g. using tiling, check gradient, etc.<br>\nit would just take more time and efforts.</p>\n<p>the good news is that I am sharing my results here so that you can do \"less experiments\" to verify if your code is correct or bug</p>",
          "rawMarkdown": "\"48G GPU Mem .. such expensive game\"\n\nhaving high memory simplifes my work.\nbut you can achieve the same performance with lower memory system, e.g. using tiling, check gradient, etc.\nit would just take more time and efforts.\n\nthe good news is that I am sharing my results here so that you can do \"less experiments\" to verify if your code is correct or bug",
          "votes": 3
        },
        {
          "id": 1906156,
          "postDate": "2022-08-19T16:24:53.963Z",
          "content": "<p>Is that using one single GPU or a multiple setup? </p>",
          "rawMarkdown": "Is that using one single GPU or a multiple setup? "
        },
        {
          "id": 1906593,
          "postDate": "2022-08-20T03:19:16.543Z",
          "content": "<p>There is 2 GPUs in the HP Z workstation.<br>\nEach has 48 GB.<br>\nHence total memory is 96 GB.</p>",
          "rawMarkdown": "There is 2 GPUs in the HP Z workstation.\nEach has 48 GB.\nHence total memory is 96 GB."
        }
      ]
    },
    {
      "id": 1904256,
      "postDate": "2022-08-18T04:51:53.503Z",
      "content": "<p>i am in  the progress of running results for [1]</p>\n<p>[1] Dual Vision Transformer<br>\n<a href=\"https://arxiv.org/pdf/2207.04976.pdf\" target=\"_blank\">https://arxiv.org/pdf/2207.04976.pdf</a><br>\n <a href=\"https://github.com/YehLi/ImageNetModel\" target=\"_blank\">https://github.com/YehLi/ImageNetModel</a></p>\n<p>i think it is very promising.<br>\ninitial loss curve and validation loss already surpass that of PVT v2.<br>\n<br>\nthis is another 0.79 model with input=768</p>",
      "rawMarkdown": "i am in  the progress of running results for [1]\n\n[1] Dual Vision Transformer\nhttps://arxiv.org/pdf/2207.04976.pdf\n https://github.com/YehLi/ImageNetModel\n\ni think it is very promising.\ninitial loss curve and validation loss already surpass that of PVT v2.\n~~\nnumerical evaluation will be coming up in the next few days. ... but you can start your experiment first~~\nthis is another 0.79 model with input=768"
    },
    {
      "id": 1903807,
      "postDate": "2022-08-17T17:00:55.527Z",
      "content": "<p>I follow your work of segformer， but i did not get the same result ，the Hubmap score is 0.55 same as yours， but HPA score is only 0.21~</p>",
      "rawMarkdown": "I follow your work of segformer， but i did not get the same result ，the Hubmap score is 0.55 same as yours， but HPA score is only 0.21~",
      "replies": [
        {
          "id": 1903892,
          "postDate": "2022-08-17T18:18:25.457Z",
          "content": "<p>\"HPA score is only 0.21\"</p>\n<p>i think 0.21 is the normal score.<br>\nyou can higher, if you \"inject random noise\" at inference at post-processing. since the method is not stable and seems to only affects HPA (?) so I will not dwell into it. I think some of the prediction are  \"borderline\" because of the labeling noise.</p>\n<p>(e.g. you can add noise to decoder, or last few block of either of the 4 layers, or addn ew blocks (with random initialisation) and observe results. i once mistaken load a mit_b2 trained weights into mit_b3 model and surprised that it still work)</p>\n<p>since segform has license issue, I suggest switching to better models.</p>",
          "rawMarkdown": "\"HPA score is only 0.21\"\n\ni think 0.21 is the normal score.\nyou can higher, if you \"inject random noise\" at inference at post-processing. since the method is not stable and seems to only affects HPA (?) so I will not dwell into it. I think some of the prediction are  \"borderline\" because of the labeling noise.\n\n(e.g. you can add noise to decoder, or last few block of either of the 4 layers, or addn ew blocks (with random initialisation) and observe results. i once mistaken load a mit_b2 trained weights into mit_b3 model and surprised that it still work)\n\nsince segform has license issue, I suggest switching to better models.",
          "votes": 1
        },
        {
          "id": 1904159,
          "postDate": "2022-08-18T02:27:22.807Z",
          "content": "<p>I tried segformer too. b2 can get pb 0.76, but b4 and b5 is better can achieve 0.78(b5 is better)</p>",
          "rawMarkdown": "I tried segformer too. b2 can get pb 0.76, but b4 and b5 is better can achieve 0.78(b5 is better)"
        },
        {
          "id": 1904166,
          "postDate": "2022-08-18T02:36:58.237Z",
          "content": "<p>\"(b5 is better)\"</p>\n<p>the trick is to expand your data (e.g. extreme augmentation, external data, GAN, noise, etc … or greater size) and use a strong transformer. But one has to be careful not to learn \"too much noise\".<br>\ni have a feeling that 0.81 may be possible with one fold, but it is a difficult target to achieve</p>",
          "rawMarkdown": "\"(b5 is better)\"\n\nthe trick is to expand your data (e.g. extreme augmentation, external data, GAN, noise, etc ... or greater size) and use a strong transformer. But one has to be careful not to learn \"too much noise\".\ni have a feeling that 0.81 may be possible with one fold, but it is a difficult target to achieve"
        },
        {
          "id": 1908931,
          "postDate": "2022-08-22T06:39:23.547Z",
          "content": "<p>I thank you for sharing your experiment results. They're very informative and inspirational. By the way, mind if I ask a question about the terminology \"one fold prediction.\" ? Does that mean you do 5-fold cross validation and pick one random fold out of the five folds in order to predict? Sorry about the dumb question though.</p>",
          "rawMarkdown": "I thank you for sharing your experiment results. They're very informative and inspirational. By the way, mind if I ask a question about the terminology \"one fold prediction.\" ? Does that mean you do 5-fold cross validation and pick one random fold out of the five folds in order to predict? Sorry about the dumb question though."
        },
        {
          "id": 1908951,
          "postDate": "2022-08-22T06:53:18.780Z",
          "content": "<p><a href=\"https://www.kaggle.com/Cheul\" target=\"_blank\">@Cheul</a> I think is select the better performing ones previously, not random choose</p>",
          "rawMarkdown": "@Cheul I think is select the better performing ones previously, not random choose",
          "votes": 1
        },
        {
          "id": 1908958,
          "postDate": "2022-08-22T07:00:44.003Z",
          "content": "<p>selecting the one closest to your average of all </p>",
          "rawMarkdown": "selecting the one closest to your average of all ",
          "votes": 1
        },
        {
          "id": 1908991,
          "postDate": "2022-08-22T07:39:34.140Z",
          "content": "<p>I see. Thank you!</p>",
          "rawMarkdown": "I see. Thank you!"
        }
      ]
    },
    {
      "id": 1903376,
      "postDate": "2022-08-17T11:24:13.840Z",
      "content": "<p>Are we segmenting normal glomeruli, sclerosed glomeruli or any type of glomeruli?</p>",
      "rawMarkdown": "Are we segmenting normal glomeruli, sclerosed glomeruli or any type of glomeruli?"
    },
    {
      "id": 1903332,
      "postDate": "2022-08-17T10:15:44.777Z",
      "content": "<p>i now become confused by my results:</p>\n<p>king of king: single fold LB 0.80</p>\n<ul>\n<li>COAT parallel small 5 level (I modified the code to change from 4 to 5 level)</li>\n<li>increase image size from 768 to 1024</li>\n</ul>\n<p><a href=\"https://www.kaggle.com/code/hengck23/lb-0-80-coat-small-parallel-at-1024\" target=\"_blank\">https://www.kaggle.com/code/hengck23/lb-0-80-coat-small-parallel-at-1024</a></p>",
      "rawMarkdown": "i now become confused by my results:\n\nking of king: single fold LB 0.80\n\n- COAT parallel small 5 level (I modified the code to change from 4 to 5 level)\n- increase image size from 768 to 1024\n\nhttps://www.kaggle.com/code/hengck23/lb-0-80-coat-small-parallel-at-1024"
    },
    {
      "id": 1903092,
      "postDate": "2022-08-17T05:15:24.900Z",
      "content": "<p>i came to realise that Beit is the chnapion solution for Visual Domain Adaptation Challenge 2021:</p>\n<p><a href=\"https://ai.bu.edu/visda-2021/assets/pdf/Burhan_Report.pdf\" target=\"_blank\">https://ai.bu.edu/visda-2021/assets/pdf/Burhan_Report.pdf</a><br>\n<a href=\"https://ai.bu.edu/visda-2021/assets/pdf/Burhan_Slides.pdf\" target=\"_blank\">https://ai.bu.edu/visda-2021/assets/pdf/Burhan_Slides.pdf</a></p>",
      "rawMarkdown": "i came to realise that Beit is the chnapion solution for Visual Domain Adaptation Challenge 2021:\n\n\nhttps://ai.bu.edu/visda-2021/assets/pdf/Burhan_Report.pdf\nhttps://ai.bu.edu/visda-2021/assets/pdf/Burhan_Slides.pdf",
      "replies": [
        {
          "id": 1925502,
          "postDate": "2022-09-04T03:04:30.893Z",
          "content": "<p>Was curious <a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a> did you experiment with Beit….  I did not try but was thinking of semi supervised training with best model like noisy student approach</p>",
          "rawMarkdown": "Was curious @hengck23 did you experiment with Beit....  I did not try but was thinking of semi supervised training with best model like noisy student approach"
        },
        {
          "id": 1930377,
          "postDate": "2022-09-07T19:44:32.647Z",
          "content": "<p>i have been waiting for it, <br>\nbeit2 code is out a few days ago !</p>\n<p>i am interested in the Visual Tokenizer (VQ-KD)</p>\n<p><a href=\"https://github.com/microsoft/unilm/tree/master/beit2\" target=\"_blank\">https://github.com/microsoft/unilm/tree/master/beit2</a></p>",
          "rawMarkdown": "i have been waiting for it, \nbeit2 code is out a few days ago !\n\ni am interested in the Visual Tokenizer (VQ-KD)\n\nhttps://github.com/microsoft/unilm/tree/master/beit2\n\n",
          "votes": 1
        }
      ]
    },
    {
      "id": 1897281,
      "postDate": "2022-08-13T16:02:57.457Z",
      "content": "<p>find a paper :</p>\n<p>CROSS-STAINED SEGMENTATION FROM RENAL BIOPSY IMAGES USING MULTI-LEVELADVERSARIAL LEARNING<br>\n<a href=\"https://arxiv.org/pdf/2002.08587.pdf\" target=\"_blank\">https://arxiv.org/pdf/2002.08587.pdf</a></p>\n<p>\" Experimental  results on glomeruli segmentation from renal biopsy images indicate that our network is able to improve segmentation performance on target type of stained images and use unlabeled data to achieve similar accuracy to labeled data\"</p>",
      "rawMarkdown": "find a paper :\n\nCROSS-STAINED SEGMENTATION FROM RENAL BIOPSY IMAGES USING MULTI-LEVELADVERSARIAL LEARNING\nhttps://arxiv.org/pdf/2002.08587.pdf\n\n\" Experimental  results on glomeruli segmentation from renal biopsy images indicate that our network is able to improve segmentation performance on target type of stained images and use unlabeled data to achieve similar accuracy to labeled data\"\n"
    },
    {
      "id": 1896239,
      "postDate": "2022-08-12T17:22:47.380Z",
      "content": "<p>which is more important, backbone or decoder?<br>\n<a href=\"https://ibb.co/V3bzHq8\"><img src=\"https://i.ibb.co/jHqQVrF/Selection-088.png\" alt=\"Selection-088\"></a> </p>",
      "rawMarkdown": "which is more important, backbone or decoder?\n<a href=\"https://ibb.co/V3bzHq8\"><img src=\"https://i.ibb.co/jHqQVrF/Selection-088.png\" alt=\"Selection-088\" border=\"0\"></a> "
    },
    {
      "id": 1894597,
      "postDate": "2022-08-11T15:40:44.293Z",
      "content": "<p>hi, <br>\nFirst, thanks for your sharing. I am new to the kaggle competetion. I studied your shared code. I have a dumb question. What methods can I use to filter out a few relatively well-performing model weights in a fold? like the code in your run_local_cv.py.<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F7991823%2F66a81de04818d64831ef0d95aa27fbfe%2F_20220811234012.png?generation=1660232428007187&amp;alt=media\" alt=\"\"></p>",
      "rawMarkdown": "hi, \nFirst, thanks for your sharing. I am new to the kaggle competetion. I studied your shared code. I have a dumb question. What methods can I use to filter out a few relatively well-performing model weights in a fold? like the code in your run_local_cv.py.![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F7991823%2F66a81de04818d64831ef0d95aa27fbfe%2F_20220811234012.png?generation=1660232428007187&alt=media)\n",
      "replies": [
        {
          "id": 1894624,
          "postDate": "2022-08-11T16:04:46.817Z",
          "content": "<p>i just select from the log file.<br>\nthat is good enough.<br>\nselect some top model that are \"well spaced\" from each other</p>\n<p><img src=\"https://user-images.githubusercontent.com/14368801/37633888-89fdc05a-2bca-11e8-88aa-dd3661a44c3f.png\" alt=\"https://user-images.githubusercontent.com/14368801/37633888-89fdc05a-2bca-11e8-88aa-dd3661a44c3f.png\"></p>\n<p>w1,w2,w3 are the selected model.<br>\nw_swa is the final model combined.</p>\n<p>you need to imagine how the hidden test loss landscape (not the gradient descend train loss landscape) looks like so that  w_swa  is in the center of a flat valley at test</p>\n<hr>\n<p>if you want to automatic, you can do a non max suppression in code:</p>\n<ul>\n<li>order all orders from best score to worse</li>\n<li>select the best</li>\n<li>discard model that are n iterations from the selected best</li>\n<li>repeat unit you have selected K best and not nearby models</li>\n</ul>\n<p>for complicated selection, refer to paper:</p>\n<ul>\n<li><a href=\"https://arxiv.org/abs/2203.05482\" target=\"_blank\">https://arxiv.org/abs/2203.05482</a></li>\n<li>SWA : <a href=\"https://pytorch.org/blog/stochastic-weight-averaging-in-pytorch/\" target=\"_blank\">https://pytorch.org/blog/stochastic-weight-averaging-in-pytorch/</a></li>\n</ul>\n<p>search for papers reference the above</p>\n<hr>\n<p>for loss landscape, refer to:</p>\n<p><a href=\"https://vitalab.github.io/article/2020/05/01/lossLandscape.html\" target=\"_blank\">https://vitalab.github.io/article/2020/05/01/lossLandscape.html</a></p>",
          "rawMarkdown": "i just select from the log file.\nthat is good enough.\nselect some top model that are \"well spaced\" from each other\n\n![https://user-images.githubusercontent.com/14368801/37633888-89fdc05a-2bca-11e8-88aa-dd3661a44c3f.png](https://user-images.githubusercontent.com/14368801/37633888-89fdc05a-2bca-11e8-88aa-dd3661a44c3f.png)\n\nw1,w2,w3 are the selected model.\nw\\_swa is the final model combined.\n\n\nyou need to imagine how the hidden test loss landscape (not the gradient descend train loss landscape) looks like so that  w\\_swa  is in the center of a flat valley at test\n\n\n---\n\nif you want to automatic, you can do a non max suppression in code:\n- order all orders from best score to worse\n- select the best\n- discard model that are n iterations from the selected best\n- repeat unit you have selected K best and not nearby models\n\nfor complicated selection, refer to paper:\n- https://arxiv.org/abs/2203.05482\n- SWA : https://pytorch.org/blog/stochastic-weight-averaging-in-pytorch/\n\nsearch for papers reference the above\n\n---\n\nfor loss landscape, refer to:\n\nhttps://vitalab.github.io/article/2020/05/01/lossLandscape.html",
          "votes": 4
        }
      ]
    },
    {
      "id": 1887778,
      "postDate": "2022-08-07T03:03:38.020Z",
      "content": "<p>i haven't got good results for transformer decoder. another want to share their results?</p>",
      "rawMarkdown": "i haven't got good results for transformer decoder. another want to share their results?"
    },
    {
      "id": 1887743,
      "postDate": "2022-08-07T01:43:55.243Z",
      "content": "<p>maybe a good way to use stain normalisation<br>\n<img src=\"https://i.ibb.co/jGzL6PD/Selection-088.png\" alt=\"https://i.ibb.co/jGzL6PD/Selection-088.png\"></p>",
      "rawMarkdown": "maybe a good way to use stain normalisation\n![https://i.ibb.co/jGzL6PD/Selection-088.png](https://i.ibb.co/jGzL6PD/Selection-088.png)"
    },
    {
      "id": 1887169,
      "postDate": "2022-08-06T13:30:21.753Z",
      "content": "<p>i made some calculation ….</p>\n<p>everyone will be stuck in ~0.80. then one more decimal in LB score will be reveal.</p>\n<p>once it is in 3 decimal, score per image will be revealed. magic may happen as we may be able to \"get/probe more information\" for e.g. the test spleen image.</p>",
      "rawMarkdown": "i made some calculation ....\n\neveryone will be stuck in ~0.80. then one more decimal in LB score will be reveal.\n\nonce it is in 3 decimal, score per image will be revealed. magic may happen as we may be able to \"get/probe more information\" for e.g. the test spleen image.",
      "replies": [
        {
          "id": 1887746,
          "postDate": "2022-08-07T01:57:57.710Z",
          "content": "<p>😲I've made a Hubmap score over 0.58 (normed to 0.803). However, my HPA score is not as good as your segformer's 0.23. I think getting 0.81 or higher is not so difficult.</p>",
          "rawMarkdown": "😲I've made a Hubmap score over 0.58 (normed to 0.803). However, my HPA score is not as good as your segformer's 0.23. I think getting 0.81 or higher is not so difficult."
        },
        {
          "id": 1887767,
          "postDate": "2022-08-07T02:45:14.560Z",
          "content": "<p>maybe this is the reason.</p>\n<p>the experiment compares segformers and daformer and also some of the methods mentioned in the paper (e.g. sampling rare classes, in our case it would be sampling low score images)</p>\n<p><img src=\"https://i.ibb.co/qjJpqfy/Selection-089.png\" alt=\"https://i.ibb.co/qjJpqfy/Selection-089.png\"></p>",
          "rawMarkdown": "maybe this is the reason.\n\nthe experiment compares segformers and daformer and also some of the methods mentioned in the paper (e.g. sampling rare classes, in our case it would be sampling low score images)\n\n![https://i.ibb.co/qjJpqfy/Selection-089.png](https://i.ibb.co/qjJpqfy/Selection-089.png)"
        },
        {
          "id": 1887772,
          "postDate": "2022-08-07T02:51:21.117Z",
          "content": "<p>\"I've made a Hubmap score over 0.58\" </p>\n<p>for my current LB score of 0.80, my LB-Hubmap is also 0.58.<br>\ni believe all kagglers with LB 0.80 have about the same results.</p>\n<p>i think there is strong correlation for LB-Hubmap and LB-HPA.<br>\nBut once you reach near 0.80, dice scores starts to \"fluctuate\"</p>",
          "rawMarkdown": "\"I've made a Hubmap score over 0.58\" \n\nfor my current LB score of 0.80, my LB-Hubmap is also 0.58.\ni believe all kagglers with LB 0.80 have about the same results.\n\ni think there is strong correlation for LB-Hubmap and LB-HPA.\nBut once you reach near 0.80, dice scores starts to \"fluctuate\"\n\n"
        },
        {
          "id": 1887774,
          "postDate": "2022-08-07T02:56:28.790Z",
          "content": "<p>Maybe always checking 5-fold ensemble is good for reducing unstable results. I have made many 0.58 scores with different submission configurations (add/remove/replace models).</p>",
          "rawMarkdown": "Maybe always checking 5-fold ensemble is good for reducing unstable results. I have made many 0.58 scores with different submission configurations (add/remove/replace models)."
        }
      ]
    },
    {
      "id": 1883056,
      "postDate": "2022-08-03T15:03:16.480Z",
      "content": "<p>Hello~ I am quite curious about how can you get your pre-trained mit weights? Did you use mask image modeling? I noted that official implementation of segformer-mit-b2 is in mmseg, however your code is different from the official ones.</p>",
      "rawMarkdown": "Hello~ I am quite curious about how can you get your pre-trained mit weights? Did you use mask image modeling? I noted that official implementation of segformer-mit-b2 is in mmseg, however your code is different from the official ones.",
      "replies": [
        {
          "id": 1883679,
          "postDate": "2022-08-04T02:36:34.280Z",
          "content": "<p><a href=\"https://github.com/NVlabs/SegFormer\" target=\"_blank\">https://github.com/NVlabs/SegFormer</a><br>\nuse imagenet pretrain</p>",
          "rawMarkdown": "https://github.com/NVlabs/SegFormer\nuse imagenet pretrain"
        }
      ]
    },
    {
      "id": 1879784,
      "postDate": "2022-08-01T09:02:54.570Z",
      "content": "<p>Hello, I'm curious about the way categories are handled. Since in the end we only need to submit the rle encoding for each image, we don't need to provide categories. What way your model is trained, multi-classification or binary(organ/not organ)？</p>",
      "rawMarkdown": "Hello, I'm curious about the way categories are handled. Since in the end we only need to submit the rle encoding for each image, we don't need to provide categories. What way your model is trained, multi-classification or binary(organ/not organ)？",
      "replies": [
        {
          "id": 1879847,
          "postDate": "2022-08-01T09:49:06.380Z",
          "content": "<p>you should do experiment to confirm which is better. And better still, to explain why.</p>\n<p>it depends if the different target objects have similarity of not, e.g. different organ FTU have some same basic cells.</p>",
          "rawMarkdown": "you should do experiment to confirm which is better. And better still, to explain why.\n\nit depends if the different target objects have similarity of not, e.g. different organ FTU have some same basic cells."
        }
      ]
    },
    {
      "id": 1879713,
      "postDate": "2022-08-01T08:02:20.883Z",
      "content": "<p>Hey <a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a>! Thank you for sharing all the info. I wanted to ask whether you are training with full size images or tiled ones? Also, how are you dealing with different pixel dimensions of HPA and HubMAP?</p>",
      "rawMarkdown": "Hey @hengck23! Thank you for sharing all the info. I wanted to ask whether you are training with full size images or tiled ones? Also, how are you dealing with different pixel dimensions of HPA and HubMAP?"
    },
    {
      "id": 1877715,
      "postDate": "2022-07-31T00:23:25.383Z",
      "content": "<p>did anyone suceed in training from scratch without image-net pretrain?</p>",
      "rawMarkdown": "did anyone suceed in training from scratch without image-net pretrain?"
    },
    {
      "id": 1877635,
      "postDate": "2022-07-30T21:21:56.853Z",
      "content": "<p>Awesome discussion till now to the competition </p>",
      "rawMarkdown": "Awesome discussion till now to the competition "
    },
    {
      "id": 1875228,
      "postDate": "2022-07-28T19:42:24.417Z",
      "content": "<p>masked auto encoder for SSL<br>\n<img src=\"https://i.ibb.co/vQpDC3j/Selection-099.png\" alt=\"https://i.ibb.co/vQpDC3j/Selection-099.png\"></p>",
      "rawMarkdown": "masked auto encoder for SSL\n![https://i.ibb.co/vQpDC3j/Selection-099.png](https://i.ibb.co/vQpDC3j/Selection-099.png)\n\n\n",
      "replies": [
        {
          "id": 1875237,
          "postDate": "2022-07-28T19:57:28.773Z",
          "content": "<p>there is actually a way to get very good results for hidden private test data.<br>\nIf you can do ONLINE training at submission within 9 hrs.</p>\n<p>SSL reconstruction error is accessible at both train and test time. It is correlated to target dice loss,  accessible only at train time (when we have ground truth segmentation mask)</p>\n<p>Now by monitoring the reconstruction error for SSL at test time, we can estimate the dice score (e.g. and then decide to use online model or offline model prediction)</p>\n<p>online learning:<br>\n<img src=\"https://i.ibb.co/k5RjpPj/Selection-100.png\" alt=\"https://i.ibb.co/k5RjpPj/Selection-100.png\"></p>\n<p>if the hypothesis that SSL and SL loss are correlated is correct, we have a way to detect label noise</p>\n<p>though it may not be possible to implement for this competition, it may be a good idea for exploration for research and paper writing.</p>",
          "rawMarkdown": "there is actually a way to get very good results for hidden private test data.\nIf you can do ONLINE training at submission within 9 hrs.\n\nSSL reconstruction error is accessible at both train and test time. It is correlated to target dice loss,  accessible only at train time (when we have ground truth segmentation mask)\n\nNow by monitoring the reconstruction error for SSL at test time, we can estimate the dice score (e.g. and then decide to use online model or offline model prediction)\n\n\nonline learning:\n![https://i.ibb.co/k5RjpPj/Selection-100.png](https://i.ibb.co/k5RjpPj/Selection-100.png)\n\nif the hypothesis that SSL and SL loss are correlated is correct, we have a way to detect label noise\n\nthough it may not be possible to implement for this competition, it may be a good idea for exploration for research and paper writing.",
          "votes": 2
        },
        {
          "id": 1875809,
          "postDate": "2022-07-29T10:04:01.260Z",
          "content": "<p>there is yet another easier way:</p>\n<p>assue you trained an masked auto encoder.<br>\non local validation set (or external set), you reconstruction error = E1</p>\n<p>now apply masked auto encoder on private+public test set. you can use probing to output the reconstruction error E2.</p>\n<p>by analysing  E1 and E2 you probably can estimate the domain shift of the two dataset. if the auto encoder has seen the test in the training set, reconstruction error would be low.</p>\n<p>not: this is not the same as observing the submission score, which only computes for the public set in public score.<br>\nmy method reveals both private and test set characteristics</p>",
          "rawMarkdown": "there is yet another easier way:\n\nassue you trained an masked auto encoder.\non local validation set (or external set), you reconstruction error = E1\n\nnow apply masked auto encoder on private+public test set. you can use probing to output the reconstruction error E2.\n\nby analysing  E1 and E2 you probably can estimate the domain shift of the two dataset. if the auto encoder has seen the test in the training set, reconstruction error would be low.\n\nnot: this is not the same as observing the submission score, which only computes for the public set in public score.\nmy method reveals both private and test set characteristics"
        },
        {
          "id": 1876954,
          "postDate": "2022-07-30T07:50:31.037Z",
          "content": "<p><img src=\"https://i.ibb.co/xjMtjD8/Selection-114.png\" alt=\"https://i.ibb.co/xjMtjD8/Selection-114.png\"></p>\n<p>i believe this is a good direction to go. The downside is that:<br>\n1) the training batch size needs to be large and many epoches are required.<br>\n2) it is two stage: pretrain and then finetune to segmentation task</p>\n<p>transformer are indeed good autoencoder</p>\n<p>I just read some papers that can directly fine-tune  ecoder-decoder directly  using masked patch in one stage. i will try that next</p>",
          "rawMarkdown": "![https://i.ibb.co/xjMtjD8/Selection-114.png](https://i.ibb.co/xjMtjD8/Selection-114.png)\n\ni believe this is a good direction to go. The downside is that:\n1) the training batch size needs to be large and many epoches are required.\n2) it is two stage: pretrain and then finetune to segmentation task\n\ntransformer are indeed good autoencoder\n\nI just read some papers that can directly fine-tune  ecoder-decoder directly  using masked patch in one stage. i will try that next",
          "votes": 1
        },
        {
          "id": 1886204,
          "postDate": "2022-08-05T16:23:57.310Z",
          "content": "<p>Thanks for your kind share, but i still have a question that during my own experiments, i find that val dice will shake after several epochs, so is that more epochs training necessary? My experiments is based on your segformer-mit-b2 and I send fold0, 160epochs weights get 0.66 lb without any post-process. I see no improvement of validation after 110 epoch.</p>",
          "rawMarkdown": "Thanks for your kind share, but i still have a question that during my own experiments, i find that val dice will shake after several epochs, so is that more epochs training necessary? My experiments is based on your segformer-mit-b2 and I send fold0, 160epochs weights get 0.66 lb without any post-process. I see no improvement of validation after 110 epoch.",
          "votes": 2
        },
        {
          "id": 1886617,
          "postDate": "2022-08-06T03:24:11.167Z",
          "content": "<p>For me, fold 0, 360 epochs, with out SWA, segformer-mit-b2 get 0.63lb, the same parameter as before.  So, I suppose that SWA makes sense to get 0.7+, and I will do experiments to check my ideas.</p>",
          "rawMarkdown": "For me, fold 0, 360 epochs, with out SWA, segformer-mit-b2 get 0.63lb, the same parameter as before.  So, I suppose that SWA makes sense to get 0.7+, and I will do experiments to check my ideas.",
          "votes": 2
        },
        {
          "id": 1886618,
          "postDate": "2022-08-06T03:25:41.360Z",
          "content": "<p>I think simple large training epoch without SWA can easily result in overfitting .</p>",
          "rawMarkdown": "I think simple large training epoch without SWA can easily result in overfitting .",
          "votes": 1
        },
        {
          "id": 1924713,
          "postDate": "2022-09-03T10:20:38.077Z",
          "content": "<p>Thank you for your shared ideas, it's helpful to study new architecture and training ideas.</p>\n<p>I'm currently experimenting with MAE pretraining of CoaT, with training on kaggle data / large intestine+lung patches</p>\n<p>I'm using similar fuse decoder as Daformer (so it uses Serial + Parallel blocks the same way as in segmentation), and tried pixelshuffle/conv decoder, and tried to remove BN from decoder. .</p>\n<p>Token masking is ported from PVT UMMAE.</p>\n<p>These setups keep giving blurry results even after 100+ epochs, so it is still not able to memorize training patches.</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F1590882%2F1b7173f22a684a2603b1a7784a9fe6d1%2Findex.png?generation=1662200102037512&amp;alt=media\" alt=\"\"></p>\n<p>L1 loss, bs = 32, total ~2500 patches</p>\n<p>Is it underfitting? Should I train for more? Maybe there is some other advice where may be problem? Maybe some architecture issues?</p>\n<p>It's okay to skip \"unknown\" regions without any \"signal\", but it is unable to complete \"circles at FTU\" and simple shapes. (But it captures huge white regions)</p>\n<p>It's my first time working with MIM. Thanks!</p>",
          "rawMarkdown": "Thank you for your shared ideas, it's helpful to study new architecture and training ideas.\n\nI'm currently experimenting with MAE pretraining of CoaT, with training on kaggle data / large intestine+lung patches\n\nI'm using similar fuse decoder as Daformer (so it uses Serial + Parallel blocks the same way as in segmentation), and tried pixelshuffle/conv decoder, and tried to remove BN from decoder. .\n\nToken masking is ported from PVT UMMAE.\n\nThese setups keep giving blurry results even after 100+ epochs, so it is still not able to memorize training patches.\n\n\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F1590882%2F1b7173f22a684a2603b1a7784a9fe6d1%2Findex.png?generation=1662200102037512&alt=media)\n\nL1 loss, bs = 32, total ~2500 patches\n\nIs it underfitting? Should I train for more? Maybe there is some other advice where may be problem? Maybe some architecture issues?\n\nIt's okay to skip \"unknown\" regions without any \"signal\", but it is unable to complete \"circles at FTU\" and simple shapes. (But it captures huge white regions)\n\nIt's my first time working with MIM. Thanks!"
        },
        {
          "id": 1924870,
          "postDate": "2022-09-03T13:28:57.753Z",
          "content": "<p>if you reduce the number of patches (e.g. to 100,50, 10), you will find that the network can memories the train samples.</p>\n<p>if it still cannot, something wrong with your optimization or learning rate.<br>\n(i suggest SImMIM, which i find easier to converge)</p>\n<h1>---</h1>\n<p>i think MAE/SImMIM cannot produce sharp images.<br>\n(you can check the reconstruction examples in the paper).</p>\n<p>this also means that given some patch, there are so many possible to reconstruct so that the mean image of this reconstruction is not sharp.</p>\n<p>i suggest:</p>\n<ol>\n<li><p>SimMIM is easier to work with </p></li>\n<li><p>you can increase the num of unmasked patch (i.e. if there is more conditioning, the num possible ground truth is \"less\", i.e. more sharp reconstruction)</p></li>\n<li><p>maybe it is ok the reconstruction is blur. you should check your segmentation results to see if there is improvement</p></li>\n<li><p>maybe we don't predict color per pixel. how about predict block features like HOG, wavelet coefficients, etc … you can make dictionaries of the patch (like image tokenization, reconstruction image basis, etc) … we restrict the prediction space so that only sharp prediction can be made</p></li>\n<li><p>add more conditions for patch to be predicted e.g. instead of input mask token, you can use low resolution, etc</p></li>\n<li><p>forget about prediction appearance. use other target, e.g. <br>\ninput = shuffle location, predict= unshuffle location</p></li>\n</ol>\n<hr>\n<p>\"(But it captures huge white regions)\"<br>\ntransformer are low pass filter. it is good at predicting large structure</p>\n<p>(you can image if you zoom your image 20x, then the prediction will be good. but then you need to build a very deep pyramid and many many more train samples. you inference engine also need to be change)</p>",
          "rawMarkdown": "if you reduce the number of patches (e.g. to 100,50, 10), you will find that the network can memories the train samples.\n\nif it still cannot, something wrong with your optimization or learning rate.\n(i suggest SImMIM, which i find easier to converge)\n\n\n#---\n\n\ni think MAE/SImMIM cannot produce sharp images.\n(you can check the reconstruction examples in the paper).\n\nthis also means that given some patch, there are so many possible to reconstruct so that the mean image of this reconstruction is not sharp.\n\n\ni suggest:\n1. SimMIM is easier to work with \n\n2. you can increase the num of unmasked patch (i.e. if there is more conditioning, the num possible ground truth is \"less\", i.e. more sharp reconstruction)\n\n3. maybe it is ok the reconstruction is blur. you should check your segmentation results to see if there is improvement\n\n4. maybe we don't predict color per pixel. how about predict block features like HOG, wavelet coefficients, etc ... you can make dictionaries of the patch (like image tokenization, reconstruction image basis, etc) ... we restrict the prediction space so that only sharp prediction can be made\n\n5. add more conditions for patch to be predicted e.g. instead of input mask token, you can use low resolution, etc\n\n4. forget about prediction appearance. use other target, e.g. \ninput = shuffle location, predict= unshuffle location\n\n---\n\n\"(But it captures huge white regions)\"\ntransformer are low pass filter. it is good at predicting large structure\n\n(you can image if you zoom your image 20x, then the prediction will be good. but then you need to build a very deep pyramid and many many more train samples. you inference engine also need to be change)",
          "votes": 1
        }
      ]
    },
    {
      "id": 1869213,
      "postDate": "2022-07-24T15:22:39.403Z",
      "content": "<p>masked VAE for pyramid-based Vit like Swin transformer:<br>\n<a href=\"https://github.com/implus/UM-MAE\" target=\"_blank\">https://github.com/implus/UM-MAE</a></p>",
      "rawMarkdown": "masked VAE for pyramid-based Vit like Swin transformer:\nhttps://github.com/implus/UM-MAE"
    },
    {
      "id": 1864524,
      "postDate": "2022-07-21T05:36:38.910Z",
      "content": "<p>update on trasnformer results:</p>\n<p>consider the performance of imagenet, segformer mit-b2 results is ok. but it doesn't scale up when I use more powerful mit-b4</p>\n<p><img src=\"https://i.ibb.co/QJB16HX/Selection-070.png\" alt=\"https://i.ibb.co/QJB16HX/Selection-070.png\"></p>",
      "rawMarkdown": "update on trasnformer results:\n\nconsider the performance of imagenet, segformer mit-b2 results is ok. but it doesn't scale up when I use more powerful mit-b4\n\n![https://i.ibb.co/QJB16HX/Selection-070.png](https://i.ibb.co/QJB16HX/Selection-070.png)",
      "replies": [
        {
          "id": 1866960,
          "postDate": "2022-07-22T22:18:22.180Z",
          "content": "<p>updated transformer results for upernet + swin v1 transformers</p>\n<p>with proper regularization and more augmentation you get very good results if you ran for more iterations!</p>\n<p><img src=\"https://i.ibb.co/0DqmS7F/Selection-072.png\" alt=\"https://i.ibb.co/0DqmS7F/Selection-072.png\"></p>",
          "rawMarkdown": "updated transformer results for upernet + swin v1 transformers\n\nwith proper regularization and more augmentation you get very good results if you ran for more iterations!\n\n![https://i.ibb.co/0DqmS7F/Selection-072.png](https://i.ibb.co/0DqmS7F/Selection-072.png)"
        },
        {
          "id": 1867533,
          "postDate": "2022-07-23T09:56:11.887Z",
          "content": "<p>why not . . . 1024x1024 cityscape one? for segformer . . .   And any specific reason to interpolate to \"nearest\" - I am not pretty much clear \"bilinear\" and \"nearest\" stuff?</p>",
          "rawMarkdown": "why not . . . 1024x1024 cityscape one? for segformer . . .   And any specific reason to interpolate to \"nearest\" - I am not pretty much clear \"bilinear\" and \"nearest\" stuff?"
        },
        {
          "id": 1867540,
          "postDate": "2022-07-23T10:05:40.727Z",
          "content": "<p>'1024x1024 cityscape on' </p>\n<p>each task  has a good scale to work for accuracy and speed/menory. i find that the tissue organ are of different size and resizing 3000 to 768 is the best scale for me.</p>\n<p>' specific reason to interpolate to \"nearest\"'<br>\nit work best for me. nearest has the largest of num of strong activation pixels when upsized, it results in better convergence for this competition. </p>\n<p>also segformer decoder is 1x1 conv. it cannot mix nearby pixel</p>\n<p>the best solution is a learning mixing variable for</p>\n<p>mix * F.interpolate(bilinear) + (1-mix)*F.interpolate(nearest) </p>",
          "rawMarkdown": "'1024x1024 cityscape on' \n\neach task  has a good scale to work for accuracy and speed/menory. i find that the tissue organ are of different size and resizing 3000 to 768 is the best scale for me.\n\n' specific reason to interpolate to \"nearest\"'\nit work best for me. nearest has the largest of num of strong activation pixels when upsized, it results in better convergence for this competition. \n\nalso segformer decoder is 1x1 conv. it cannot mix nearby pixel\n\nthe best solution is a learning mixing variable for\n\nmix * F.interpolate(bilinear) + (1-mix)*F.interpolate(nearest) ",
          "votes": 1
        },
        {
          "id": 1867848,
          "postDate": "2022-07-23T14:46:43.040Z",
          "content": "<p><a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a>  it was great , I was experimenting with \"bilinear\" and \"nearest\" actually in my experiments my CV was more with \"bilinear\" that's why I sticked with it, but when I submitted with mode as \"nearest\" my Cv-LB gap was only <strong>0.02</strong>where earlier gap was like <strong>0.13 - 0.14</strong>.<br>\nthough my training baseline is WIP - - augmentations, staining, and hyperparameters///<br>\nwill surely look into the </p>\n<blockquote>\n  <p>best solution is a learning mixing variable for</p>\n  <ul>\n  <li>mix * F.interpolate(bilinear) + (1-mix)*F.interpolate(nearest)</li>\n  </ul>\n</blockquote>",
          "rawMarkdown": "@hengck23  it was great , I was experimenting with \"bilinear\" and \"nearest\" actually in my experiments my CV was more with \"bilinear\" that's why I sticked with it, but when I submitted with mode as \"nearest\" my Cv-LB gap was only **0.02**where earlier gap was like **0.13 - 0.14**.\nthough my training baseline is WIP - - augmentations, staining, and hyperparameters///\nwill surely look into the \n> best solution is a learning mixing variable for\n- mix * F.interpolate(bilinear) + (1-mix)*F.interpolate(nearest)",
          "votes": 1
        },
        {
          "id": 1870184,
          "postDate": "2022-07-25T10:59:34.343Z",
          "content": "<pre><code>class MixUpSample(nn.Module):\n    def __init__( self, scale_factor=2):\n        super().__init__()\n        self.mixing = nn.Parameter(torch.tensor(0.5))\n        self.scale_factor = scale_factor\n\n    def forward(self, x):\n        x = self.mixing *F.interpolate(x, scale_factor=self.scale_factor, mode='bilinear', align_corners=False) \\\n            + (1-self.mixing )*F.interpolate(x, scale_factor=self.scale_factor, mode='nearest')\n        return x\n</code></pre>",
          "rawMarkdown": "```\nclass MixUpSample(nn.Module):\n\tdef __init__( self, scale_factor=2):\n\t\tsuper().__init__()\n\t\tself.mixing = nn.Parameter(torch.tensor(0.5))\n\t\tself.scale_factor = scale_factor\n\t\n\tdef forward(self, x):\n\t\tx = self.mixing *F.interpolate(x, scale_factor=self.scale_factor, mode='bilinear', align_corners=False) \\\n\t\t    + (1-self.mixing )*F.interpolate(x, scale_factor=self.scale_factor, mode='nearest')\n\t\treturn x\n\t\n\n```",
          "votes": 4
        },
        {
          "id": 1871826,
          "postDate": "2022-07-26T13:56:15.437Z",
          "rawMarkdown": "",
          "isDeleted": true
        },
        {
          "id": 1959908,
          "postDate": "2022-09-28T11:35:55.013Z",
          "content": "<p><a href=\"https://www.youtube.com/watch?v=AqscP7rc8_M\" target=\"_blank\">https://www.youtube.com/watch?v=AqscP7rc8_M</a>  great video by computerphile 👍</p>",
          "rawMarkdown": "https://www.youtube.com/watch?v=AqscP7rc8_M  great video by computerphile 👍"
        }
      ]
    },
    {
      "id": 1863895,
      "postDate": "2022-07-20T15:23:43.003Z",
      "content": "<p>anyone can explin why am i getting patch token artifacts when using transformer segmentation (using segformer)?<br>\nit turns up this is due to F.interpolate using mode='nearest' when i upsample the mit transformer layer results.</p>\n<p><a href=\"https://imgbb.com/\"><img src=\"https://i.ibb.co/BKjDsjL/Selection-067.png\" alt=\"Selection-067\"></a><br>\n<a href=\"https://ibb.co/YW6Pwd3\"><img src=\"https://i.ibb.co/RS1Yd69/Selection-066.png\" alt=\"Selection-066\"></a></p>",
      "rawMarkdown": "anyone can explin why am i getting patch token artifacts when using transformer segmentation (using segformer)?\nit turns up this is due to F.interpolate using mode='nearest' when i upsample the mit transformer layer results.\n\n\n<a href=\"https://imgbb.com/\"><img src=\"https://i.ibb.co/BKjDsjL/Selection-067.png\" alt=\"Selection-067\" border=\"0\"></a>\n<a href=\"https://ibb.co/YW6Pwd3\"><img src=\"https://i.ibb.co/RS1Yd69/Selection-066.png\" alt=\"Selection-066\" border=\"0\"></a>"
    },
    {
      "id": 1945984,
      "postDate": "2022-09-19T14:41:52.717Z",
      "rawMarkdown": "",
      "isDeleted": true,
      "replies": [
        {
          "id": 1946894,
          "postDate": "2022-09-20T06:50:48.333Z",
          "content": "<p>It seems that you've tried to add one additional block while in the code you didn't add any function to control the extra block such as <code>range(4) -&gt; range(5)</code>. </p>",
          "rawMarkdown": "It seems that you've tried to add one additional block while in the code you didn't add any function to control the extra block such as ```range(4) -> range(5)```. "
        },
        {
          "id": 1948423,
          "postDate": "2022-09-21T04:19:31.503Z",
          "rawMarkdown": "",
          "isDeleted": true
        }
      ]
    },
    {
      "id": 1928904,
      "postDate": "2022-09-06T17:20:33.317Z",
      "rawMarkdown": "",
      "isDeleted": true
    },
    {
      "id": 1883718,
      "postDate": "2022-08-04T03:38:32.907Z",
      "rawMarkdown": "",
      "isDeleted": true
    },
    {
      "id": 1879793,
      "postDate": "2022-08-01T09:11:00.603Z",
      "rawMarkdown": "",
      "votes": -1,
      "isDeleted": true
    },
    {
      "id": 1889296,
      "postDate": "2022-08-08T05:55:22.713Z",
      "content": "<p>Thank you for sharing!</p>",
      "rawMarkdown": "Thank you for sharing!"
    },
    {
      "id": 1886151,
      "postDate": "2022-08-05T16:06:35.417Z",
      "content": "<p>Thank you so much for sharing!</p>",
      "rawMarkdown": "Thank you so much for sharing!"
    },
    {
      "id": 1886002,
      "postDate": "2022-08-05T13:57:20.580Z",
      "content": "<p>thanks for the author, very helpful</p>",
      "rawMarkdown": "thanks for the author, very helpful"
    }
  ],
  "comments": [
    {
      "id": 1871062,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "2022-07-26T03:58:40.490000",
      "content": "<p>surprise!!!!</p>\n<p>the winner is 5-fold segformer-mit-b2 with CV=0.787, LB=0.78.<br>\nThe model size is only 99mb.</p>\n<p>I haven't investigate the reasons, but I think it could be:</p>\n<ul>\n<li>use of mix upsample (see discussion below)</li>\n<li>I use many, many iterations for training  … it don't over fit up to 400 epoch</li>\n<li>swa over a larger epoch</li>\n<li>MIT uses no positional encoding at all (no absolute or relative)</li>\n<li>MIT model I used is not complex (see imagenet and ADEK20 performance)</li>\n</ul>",
      "votes": 11,
      "replies": [
        {
          "id": 1871219,
          "author_name": "Roc",
          "author_url": "",
          "post_date": "2022-07-26T06:36:31.403000",
          "content": "<p>Good results, I'm also trying segformer without pretrained weights from imagenet, and fold0 cv=0.76. Did you use pretrained weights?</p>",
          "votes": 2,
          "replies": []
        },
        {
          "id": 1871222,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2022-07-26T06:41:57.667000",
          "content": "<p>i use pretrained weight. <br>\ni just do another probe: Hubmap-LB is an amazing 0.55 (normalised to 0.762142857)</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1872945,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2022-07-27T10:46:31.590000",
          "content": "<p>more surprise!!!<br>\nsingle-fold (fold-3) segformer-mit-b2 alone is already LB 0.79 (not low 0.79+  but a good 0.79+)</p>\n<p>breakdown:</p>\n<ul>\n<li>Hubmap-LB 0.55+(normalised to 0.762142857  to    0.774614286)</li>\n<li>HPA-LB 0.23+ ~0.24+(normalised to 0.826296296to 0.89456)</li>\n</ul>\n<p>local cv HPA = 0.783965</p>\n<p>note that score on submission page is trauncated (?) and not rounded</p>\n<h2><img src=\"https://i.ibb.co/QCVy0yR/Selection-094.png\" alt=\"https://i.ibb.co/QCVy0yR/Selection-094.png\"></h2>\n<p>either:</p>\n<ul>\n<li>segformer-mit-b2 is good at generalising HPA</li>\n<li>HPA fold-3 train dataset has duplicates with kaggle public public test (e.g. tissue slice from same person)</li>\n</ul>",
          "votes": 7,
          "replies": []
        },
        {
          "id": 1873062,
          "author_name": "Ali",
          "author_url": "",
          "post_date": "2022-07-27T12:29:39.310000",
          "content": "<p><a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a> I am trying with segformer, I am not sure that I am training correct, I don't have much time for two weeks to test but I am getting values such as:<br>\nMean_iou: 0.7336344062222001<br>\nMean accuracy: 0.7336344062222001</p>\n<p>in epoch 1 ! using 256 tiles and I am not sure this is normal or not,  I am using a demo starting code which is not complex !! </p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1873065,
          "author_name": "Ali",
          "author_url": "",
          "post_date": "2022-07-27T12:31:51.163000",
          "content": "<p>I smell something wrong, I just modified the basic training code with this competition dataset and rewrote the evaluation process. </p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1873232,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2022-07-27T13:54:23.303000",
          "content": "<p><a href=\"https://www.kaggle.com/asalhi\" target=\"_blank\">@asalhi</a>   I don't have much time for two weeks to test but I am getting values such as:\"</p>\n<p>I am not sure if 256 tile is good enough. i trained with images resized from 3000 to 768.<br>\nthere is a couple of tricks that may be important:</p>\n<ul>\n<li>use of mix upsampling</li>\n<li>the aux loss for regularisation is at the encoder output.</li>\n</ul>\n<p>please see the new added folder at \"segformer-mit-b2\", \"train-log-segformer-mit-b2\"<br>\n<a href=\"https://www.kaggle.com/datasets/hengck23/hubmap-discuss-00\" target=\"_blank\">https://www.kaggle.com/datasets/hengck23/hubmap-discuss-00</a></p>",
          "votes": 4,
          "replies": []
        },
        {
          "id": 1873357,
          "author_name": "Robson",
          "author_url": "",
          "post_date": "2022-07-27T14:42:28.987000",
          "content": "<p>Thanks so much for sharing your knowledge. As always very valuable.</p>\n<p>One question I have is about the license to use your model. On SegFormer's Github it says use is for non-commercial only. Wouldn't that conflict with the competition license (open source) in case of winning?</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1873474,
          "author_name": "ananzeng",
          "author_url": "",
          "post_date": "2022-07-27T16:17:55.387000",
          "content": "<p><a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a> hi I want ask you some question, first congratulations on your good scores!</p>\n<ul>\n<li>I saw your kaggle dataset\"hubmap-discuss-00\" the mean, std are [0.485, 0.456, 0.406] and [0.229, 0.224, 0.225] respectively, how did you decide the normalization value? by statistics the RGB value or what?</li>\n<li>did you do any preprocessing to original images?<br>\nthanks!👍</li>\n</ul>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1873487,
          "author_name": "Furkan K",
          "author_url": "",
          "post_date": "2022-07-27T16:26:37.367000",
          "content": "<p>\"I am not sure if 256 tile is good enough. i trained with images resized from 3000 to 768.\"</p>\n<p>So you didn't use tiles? Just resizing to 768?</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1873772,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2022-07-27T22:32:22.497000",
          "content": "<p><a href=\"https://ibb.co/VvCHv1M\"><img src=\"https://i.ibb.co/YtdDtCf/Selection-090.png\" alt=\"Selection-090\"></a></p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1873790,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2022-07-27T22:51:53.393000",
          "content": "<p><a href=\"https://ibb.co/hZSvg6h\"><img src=\"https://i.ibb.co/vQS8cFg/Selection-093.png\" alt=\"Selection-093\"></a></p>",
          "votes": 2,
          "replies": []
        },
        {
          "id": 1874218,
          "author_name": "huyidao",
          "author_url": "",
          "post_date": "2022-07-28T06:25:10.993000",
          "content": "<p>thanks for sharing. May I ask:<br>\nwhat makes you use 'aux2_loss' alone instead of using 4 'aux[%d]_loss' outputs ?  <br>\nno lr schduler applied?</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1874311,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2022-07-28T07:37:28.713000",
          "content": "<p>by experiment results. it is trial and error</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1874381,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2022-07-28T08:40:46.413000",
          "content": "<p><a href=\"https://www.kaggle.com/robsonsan\" target=\"_blank\">@robsonsan</a> \"Wouldn't that conflict with the competition license (open source) in case of winning?\"</p>\n<p>thanks for pointing that out. i would consider that  a month later (to see if I am still a prize contender).<br>\nperformance is limited by data and not method. so segformer can be easily replaced. i just have to investigate the results for its good performance :)</p>\n<p>on a side note:<br>\n<img src=\"https://i.ibb.co/fSSJx0q/Selection-096.png\" alt=\"https://i.ibb.co/fSSJx0q/Selection-096.png\"></p>",
          "votes": 2,
          "replies": []
        },
        {
          "id": 1874604,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2022-07-28T11:30:49.470000",
          "content": "<p>did another experiment:</p>\n<p>swin-v1-small + segformer (single fold only , fold 3)<br>\nLB (0.76+)<br>\nbreakdown:<br>\nLB-Humap (0.54+)<br>\nLB-HPA (0.76+) - (0.54+) = (0.22+) to (0.23+)</p>\n<p>local cv:<br>\nall    0.787098<br>\nkidney    0.951417<br>\nprostate    0.815064<br>\nlargeintestine    0.903701<br>\nspleen    0.852030<br>\nlung    0.230929</p>",
          "votes": 2,
          "replies": []
        },
        {
          "id": 1874614,
          "author_name": "Robson",
          "author_url": "",
          "post_date": "2022-07-28T11:40:22.837000",
          "content": "<p>Lung segmentation is a challenge …</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1874624,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2022-07-28T11:46:43.687000",
          "content": "<p>\"Lung segmentation\" …</p>\n<p>this one you probably have to use some tricks.</p>\n<p>e.g.</p>\n<ul>\n<li><p>you can check the size of sizes of the FTU from the json files. i suspect maybe you can can use size to filter the results, etc. but I am not sure.</p></li>\n<li><p>you can relabel the train image to include </p></li>\n<li><p>it is mentioned \"there is at least one FTU per image\", I haven't probe the missing rate in LB set</p></li>\n</ul>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1874631,
          "author_name": "Robson",
          "author_url": "",
          "post_date": "2022-07-28T11:57:40.210000",
          "content": "<p>Thanks for the tips. I'm also working on some other hypotheses to see if my models can generalize to lung tissue. For now I'm avoiding using external data</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1894011,
          "author_name": "_CA℟L_",
          "author_url": "",
          "post_date": "2022-08-11T08:10:50.383000",
          "content": "<p><a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a> FYI - I think the license was changed recently <br>\n <img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3641623%2Fbc1eca113e4a5d5db2913330d3028b71%2Fseg_lice.png?generation=1660205517627981&amp;alt=media\" alt=\"\"></p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1894038,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2022-08-11T08:31:21.240000",
          "content": "<p>oops, someone discovered our post</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1894356,
          "author_name": "跟着丞相割麦子",
          "author_url": "",
          "post_date": "2022-08-11T12:43:21.980000",
          "content": "<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F437986%2F15e768421588378942b42f3512631f0d%2FiShot2022-08-11%2020.42.43.jpg?generation=1660221783814291&amp;alt=media\" alt=\"\"></p>\n<p>finally</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1911216,
          "author_name": "豆柴金鯱",
          "author_url": "",
          "post_date": "2022-08-24T01:18:54.190000",
          "content": "<p>Can we use segformer or not? I\"m not an expert in License issues.</p>",
          "votes": 2,
          "replies": []
        },
        {
          "id": 1911580,
          "author_name": "Cheul",
          "author_url": "",
          "post_date": "2022-08-24T07:28:48.237000",
          "content": "<p>I think we can use Segformer unless we claim to the prize. </p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1912166,
          "author_name": "豆柴金鯱",
          "author_url": "",
          "post_date": "2022-08-24T14:53:48.993000",
          "content": "<p><a href=\"https://www.kaggle.com/cheulkay\" target=\"_blank\">@cheulkay</a> Thanks for your clarification</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1934514,
          "author_name": "parkdul",
          "author_url": "",
          "post_date": "2022-09-11T12:20:55.087000",
          "content": "<p>how do I know overffiting in training?</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1832268,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "2022-06-24T22:03:05.767000",
      "content": "<p>how many hubmap images are there in the test set:</p>\n<p><img src=\"https://i.ibb.co/P5hNDrb/Selection-029.png\" alt=\"https://i.ibb.co/P5hNDrb/Selection-029.png\"></p>\n<p>we know:</p>\n<ul>\n<li>public test : 55% of the test data, private test = 45%</li>\n<li>roughly 550 test images </li>\n<li>public test : Hubmap+HPA, private test = Hubmap only</li>\n</ul>\n<pre><code>num_hubmap = len(test_df[test_df.data_source=='Hubmap'])\nnum_hpa = len(test_df[test_df.data_source=='HPA'])\nnum = len(test_df)\n\nif num_hubmap &gt; int(0.90*num):\n    submit_df.to_csv('submission.csv',index=False)\n</code></pre>\n<hr>\n<p>smarter way to probe without wasting submission slot</p>\n<pre><code># some task which you already know the notebook running time\n\nsleep (num_hubmap*10_min)\n\n#you can deduce value of num_hubmap from additional running time\n</code></pre>\n<pre><code># some  monotnic function that you already know\n    if (num&gt;   0) and (num&lt;=545): threshold =-1  #lb 0.3+  (submit all filled rle)\n    if (num&gt;=546) and (num&lt;=546): threshold =0.3 #lb 0.56\n    if (num&gt;=547) and (num&lt;=547): threshold =0.4 #lb 0.54\n    if (num&gt;=548) and (num&lt;=548): threshold =0.5 #lb 0.52\n    if (num&gt;=549) and (num&lt;1000): threshold =100 #lb 0.00 (submit all empty rle)\n\n\n#you can deduce value of num  from lbscore\n</code></pre>",
      "votes": 12,
      "replies": [
        {
          "id": 1838869,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2022-06-30T22:54:51.847000",
          "content": "<p>\"roughly 550 test images \"<br>\nthere are exactly 529 test images, of which Hubmap=448, HPA=81</p>\n<p>public test : 55% of the test data()<br>\n291 --&gt; Hubmap=210,  HPA=81</p>\n<p>private test = 45%<br>\n238--&gt; Hubmap= 238</p>",
          "votes": 8,
          "replies": []
        }
      ]
    },
    {
      "id": 1930370,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "2022-09-07T19:31:14.170000",
      "content": "<p>if you like my work and would like to learn how to apply 3d transformer for 3d ct scan classification, please follow<br>\n<a href=\"https://www.kaggle.com/competitions/rsna-2022-cervical-spine-fracture-detection/discussion/350859\" target=\"_blank\">https://www.kaggle.com/competitions/rsna-2022-cervical-spine-fracture-detection/discussion/350859</a></p>\n<p>i will modify many of the 2d vit used here (e.g. mix-trasnformer, PVTv2,coat) for 3d</p>",
      "votes": 7,
      "replies": [
        {
          "id": 1952891,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2022-09-24T03:59:53.573000",
          "content": "<p>besides the above, here is another competition i am taking part:</p>\n<p><a href=\"https://www.kaggle.com/competitions/novozymes-enzyme-stability-prediction/discussion/354631\" target=\"_blank\">https://www.kaggle.com/competitions/novozymes-enzyme-stability-prediction/discussion/354631</a></p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1894487,
      "author_name": "Givan",
      "author_url": "",
      "post_date": "2022-08-11T14:29:17.767000",
      "content": "<p>Thanks for your wonderful sharing as always 😃.  I have just tried your upernet with swin-tiny and got 0.79 cv, but the lb score is only 0.61. Do I miss anything important? <a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a> </p>",
      "votes": 7,
      "replies": []
    },
    {
      "id": 1869702,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "2022-07-25T01:42:12.997000",
      "content": "<p>i put code for upernet + swin transformer v2 for variable image size input at: <br>\n<a href=\"https://www.kaggle.com/code/hengck23/lb-0-75-variable-size-swin-transformer-v1-and-v2\" target=\"_blank\">https://www.kaggle.com/code/hengck23/lb-0-75-variable-size-swin-transformer-v1-and-v2</a></p>\n<p>this is beta release. using provided upernet+swin v1 (or v2) will get you about LB 0.75 (15 min submission time).<br>\nplan:</p>\n<ul>\n<li> [done]</li>\n<li>modification to use UN-MAE, uniform masked autoencoder, for SSL pertaining with unlabelled data<br>\n(<a href=\"https://github.com/implus/UM-MAE\" target=\"_blank\">https://github.com/implus/UM-MAE</a>)</li>\n</ul>\n<p>it would be faster for me if anyone can upload and share their downloaded images from HPA, etc</p>",
      "votes": 7,
      "replies": [
        {
          "id": 1870350,
          "author_name": "Mail-Suesarn",
          "author_url": "",
          "post_date": "2022-07-25T13:44:39.003000",
          "content": "<p>Do you train with whole images or tiles?</p>",
          "votes": 2,
          "replies": []
        },
        {
          "id": 1877490,
          "author_name": "DiamondH",
          "author_url": "",
          "post_date": "2022-07-30T17:32:41.863000",
          "content": "<p>👋, <a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a> , </p>\n<ul>\n<li>Resize from 3000 to 768. </li>\n<li>Use external data. <br>\nAre these two steps get swin v1/v2 a LB score of 0.75?</li>\n</ul>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1877504,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2022-07-30T17:51:09.310000",
          "content": "<p>no need to use external data. just check the code I posted</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1877513,
          "author_name": "DiamondH",
          "author_url": "",
          "post_date": "2022-07-30T18:11:22.927000",
          "content": "<p>I've tried tiled images with ConvNext, getting a LB score of 0.71 by 5 fold ensemble🙉, but oof is slightly better than your experiments, I'll try whole images later!</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1879826,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2022-08-01T09:38:21.637000",
          "content": "<p>i managed to put everything together, SL, SSL learning, online, offline learning.<br>\nthis will be next software release.</p>\n<p>the consistency feature loss in the middle ensure SSL aligned with SL learning</p>\n<p><img src=\"https://i.ibb.co/vzsSQ1t/Selection-127.png\" alt=\"https://i.ibb.co/vzsSQ1t/Selection-127.png\"></p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1879832,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2022-08-01T09:40:10.173000",
          "content": "<p>\" but oof is slightly better than your experiments, I'll try whole images later!\"<br>\nyour oof must be the same as your lb submission (i.e. you compute only one score for the whole image after the tiles are combined)</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1951249,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "2022-09-23T00:05:53.570000",
      "content": "<p>seems that i select the wrong submission<br>\n<a href=\"https://ibb.co/1Q1wxDb\"><img src=\"https://i.ibb.co/MSr3LY9/Selection-317.png\" alt=\"Selection-317\"></a></p>\n<p>interesting:</p>\n<ul>\n<li>i correctly predicted the highest public LB score</li>\n<li>i correctly predicted the shakeup</li>\n<li>i correctly dreamt of my ranking and medal (just one off the gold medal) just the day before</li>\n</ul>",
      "votes": 5,
      "replies": [
        {
          "id": 1951254,
          "author_name": "ParkSom",
          "author_url": "",
          "post_date": "2022-09-23T00:16:19.233000",
          "content": "<p>oh…<br>\nYou are 1th to my team..<br>\nThank you very much for this competition.</p>",
          "votes": 3,
          "replies": []
        },
        {
          "id": 1951383,
          "author_name": "Ksana",
          "author_url": "",
          "post_date": "2022-09-23T03:13:14.250000",
          "content": "<p>Thanks you, <a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a> , I learned a lot from you thread，i'll never got the order without your  generous share .By the way, I also chose wrong submision.I get 0.83 last two days so chose the new😂.</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1952653,
          "author_name": "Nischay Dhankhar",
          "author_url": "",
          "post_date": "2022-09-23T19:55:16.073000",
          "content": "<p>Thanks for all the sharing in the competition <a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a> and such a strong finish. </p>\n<p><em>I correctly dreamt of my ranking and medal (just one off the gold medal) just the day before</em></p>\n<p>Not going to lie, this has happened to me in few of the previous competitions where I also missed solo gold by marginal ranks 🥲 It's really disheartening haha.</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1833464,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "2022-06-26T03:27:59.327000",
      "content": "<p>my first baseline at public LB 0.56</p>\n<p>one fold only:</p>\n<p>train_dataset : </p>\n<ul>\n<li>len = 280<ul>\n<li>kidney  81 (0.289) </li>\n<li>prostate  72 (0.257) </li>\n<li>largeintestine  47 (0.168) </li>\n<li>spleen  46 (0.164) </li>\n<li>lung  34 (0.121) </li></ul></li>\n</ul>\n<p>valid_dataset : </p>\n<ul>\n<li>len = 71<ul>\n<li>kidney  18 (0.254) </li>\n<li>prostate  21 (0.296) </li>\n<li>largeintestine  11 (0.155) </li>\n<li>spleen   7 (0.099) </li>\n<li>lung  14 (0.197) </li></ul></li>\n</ul>\n<p><img src=\"https://i.ibb.co/sQmXBwB/Selection-047.png\" alt=\"https://i.ibb.co/sQmXBwB/Selection-047.png\"></p>",
      "votes": 7,
      "replies": [
        {
          "id": 1833509,
          "author_name": "shiroe",
          "author_url": "",
          "post_date": "2022-06-26T04:45:39.567000",
          "content": "<p>hello <a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a>,<br>\ndoes your model converge after 18 epochs?</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1833612,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2022-06-26T07:03:13.020000",
          "content": "<p>\"does your model converge after 18 epochs?\"<br>\nyes for the above experiment. (I use little augmentation and the number of output channels in decoder is large)</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1833908,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2022-06-26T12:52:26.313000",
          "content": "<p>update:<br>\nmodel = resnext50 + unet (use ASPP for center block, adjust approriate dilation for different input image size)<br>\ntrain image size = 512x512<br>\ntrain augment = random rotate, random scale, flip<br>\nhyperparameter = 80 epoch, batch_size 16, lookahead+RAMDA opt<br>\nlocal cv:  0.707 (at threshold 0.50)</p>\n<hr>\n<p>train image size = 640x640<br>\nlocal cv:  0.715 (fold-0 at threshold 0.50) / 0.753 (fold-1)</p>",
          "votes": 2,
          "replies": []
        },
        {
          "id": 1843190,
          "author_name": "EnricRovira",
          "author_url": "",
          "post_date": "2022-07-04T16:05:36.517000",
          "content": "<p>why do you rescale it by \"512/3000\" if your model receives images of 480x480??</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1858816,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2022-07-17T08:21:56.507000",
          "content": "<p>By experiment results. Sometimes, but not all times, your can get better results when your inference size is larger than the train size</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1858817,
          "author_name": "Ali",
          "author_url": "",
          "post_date": "2022-07-17T08:25:25.277000",
          "content": "<p>I confirm that, thats the first thing I tried, learned this from starfish competition 🙂<br>\nBut you have to change the std and mean values also for some inference pipelines</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1831307,
      "author_name": "Ali",
      "author_url": "",
      "post_date": "2022-06-24T05:22:07.410000",
      "content": "<p>I love your threads :-) especially the \"my experiment results\" one , It's like a story of how research and experiments should be. <br>\nGreat work :-) </p>",
      "votes": 7,
      "replies": [
        {
          "id": 1837899,
          "author_name": "Old Monk",
          "author_url": "",
          "post_date": "2022-06-30T03:18:10.663000",
          "content": "<p>100% agree with you <a href=\"https://www.kaggle.com/asalhi\" target=\"_blank\">@asalhi</a> , <a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a> threads are very informative and inspirational! Thanks for sharing all this with the wider Kaggle community.</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 1925481,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "2022-09-04T02:19:26.513000",
      "content": "<p>this is a nice paper to read. i think some of the conclusion also applies to this kaggle competition according to my results:<br>\n<a href=\"https://www.arxiv-vanity.com/papers/2201.08683/\" target=\"_blank\">https://www.arxiv-vanity.com/papers/2201.08683/</a><br>\nA Comprehensive Study of Vision Transformers on Dense Prediction Tasks</p>\n<p>We studied different aspects of VTs and CNNs as feature extractors for object detection and semantic segmentation on challenging and real-world data. The main results and key insights derived from our experiments are as follows:</p>\n<ul>\n<li><p>VTs outperform CNNs in in-distribution dataset while having lower inference speed, but less computational complexity. Hence, if the GPUs are optimized for Transformer architectures, they have the potential to become dominant in computer vision.</p></li>\n<li><p>VTs generalize better to OOD datasets. Our loss landscape analysis shows that VTs converge to flatter minima compared to CNNs, which can explain their generalizability.</p></li>\n<li><p>VTs are more robust to natural corruptions and adversarial attacks compared to CNNs. We believe that this could be attributed to the global receptive field as well as the dynamic nature of self-attention.</p></li>\n<li><p>VTs are less-texture biased than CNNs, which can be attributed to their global receptive field, allowing them to focus better on global shape-based cues as opposed to local texture-based cues.</p></li>\n</ul>",
      "votes": 5,
      "replies": []
    },
    {
      "id": 1921312,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "2022-08-31T17:50:22.663000",
      "content": "<p>are you stuck at 0.80?</p>\n<ul>\n<li>build better model, augmentation, etc  </li>\n</ul>\n<p>are you stuck at 0.81?</p>\n<ul>\n<li>build better resolution  </li>\n<li>some fold are better than other (i.e. some training images are better). try different random seeds, weigh more on some fold, etc …  <br>\nsubmit for certain folds …<br>\nWARNING!!!! this may overfit to lb public test and lb private test</li>\n</ul>\n<p>are you stuck at 0.82?</p>\n<ul>\n<li>maybe  the best fold \"changes with score\" </li>\n<li>maybe  the best threshold  \"changes with score\" </li>\n</ul>\n<p>… adjust accordingly</p>\n<hr>\n<p>note:<br>\nlb-HPA is always in 0.21 to 0.22<br>\nlb-Hubmap stops at 0.60 (even at lb 0.83)</p>",
      "votes": 5,
      "replies": [
        {
          "id": 1921314,
          "author_name": "James Howard",
          "author_url": "",
          "post_date": "2022-08-31T17:53:31.153000",
          "content": "<p>Out of interest, what do you think are the HuBMAP-only equivalents are for these values?</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1921658,
          "author_name": "Rock",
          "author_url": "",
          "post_date": "2022-09-01T01:21:44.750000",
          "content": "<p>Same with you, my lb-HuBMAP reached 0.60 when my lb is 0.82, and when I get lb 0.83, lb-HuBMAP is still 0.60😂</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1921674,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2022-09-01T01:35:26.510000",
          "content": "<p>technically, it is:<br>\nlb = 0.830 to 0.839<br>\nlb-HuBMAP= (0.600 to 0.609)/0.7217 = 0.8314 to 0.8438<br>\nlb-HPA= (0.221 to 0.239)/0.2783 = 0.7941 to 0.8588</p>\n<hr>\n<p>local cv (HPA) ~0.82</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1925783,
          "author_name": "Gunes Evitan",
          "author_url": "",
          "post_date": "2022-09-04T09:48:10.267000",
          "content": "<p>Does that mean when I reach 0.6 on HuBMAP, can I finally rest and pray?</p>",
          "votes": 2,
          "replies": []
        },
        {
          "id": 1925860,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2022-09-04T11:48:56.073000",
          "content": "<p>no. you have to check your ranking. it will be 0.82 everywhere after a week</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1926617,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2022-09-05T02:02:44.963000",
          "content": "<p>an example of trying different seeds  <br>\nLB = 0.78,0.80,0.79,0.75,0.80  <br>\nCV = 0.803159,0.764383,0.777201,0.818149,0.791553  </p>\n<p>different fold have different results (due to label noise)</p>\n<p>good public = worse private?<br>\nhow to prevent shake up?</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1926719,
          "author_name": "DiamondH",
          "author_url": "",
          "post_date": "2022-09-05T04:17:59.583000",
          "content": "<p>Have you test the hubmap score of different folds? Kind of curious😋</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1927375,
          "author_name": "豆柴金鯱",
          "author_url": "",
          "post_date": "2022-09-05T15:34:36.630000",
          "content": "<p>Got stuck at 0.80 for quite a long time…</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1928257,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2022-09-06T11:18:09.643000",
          "content": "<p>\"Got stuck at 0.80 for quite a long time…\"</p>\n<p>change/select fold, ensemble resolution, change threshold</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1928603,
          "author_name": "豆柴金鯱",
          "author_url": "",
          "post_date": "2022-09-06T14:32:25.313000",
          "content": "<p>Hi Heng, I've not tried ensembling models, but tried to change the seeds &amp; try new augments. It looks like my CV fluctuates… Is there a good way to reduce the impact of labeling noise? I'm not an expert in the medical domain, so I'm not sure all the FTUs in the HPA images are fully labeled. Maybe pseudo-labeling might help?</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1930129,
          "author_name": "kingjohnson",
          "author_url": "",
          "post_date": "2022-09-07T15:23:40.723000",
          "content": "<p>If we are stuck at 0.78, how can we do?</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1930374,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2022-09-07T19:40:24.757000",
          "content": "<p>\"If we are stuck at 0.78, how can we do?\"</p>\n<p>i assume you are talking about single model solution at 768x768 input resolution.</p>\n<p>then you are still having some issues with augmentation, TTA, training (learning rate/overfitting), ensemble single fold (SWA) or multiple fold for single model, threshold, … etc</p>\n<p>you have two choices:  <br>\n1) you can still finetune you single model solution. but you will be cap to about 0.79 at 768x768</p>\n<p>2) increase resolution,  proceed to train multiple architecture for ensemble. but you will be cap 0.78 + 0.02</p>\n<p>i would do both and (1) and (2). more exploration would means more training results and more information for algorithm debug</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1930522,
          "author_name": "kingjohnson",
          "author_url": "",
          "post_date": "2022-09-08T02:04:06.060000",
          "content": "<p>Thanks a lot for your share, I will keep moving based on your tips! </p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1930529,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2022-09-08T02:15:12.853000",
          "content": "<p>poem : The Road Not Taken by Robert Frost</p>\n<p>Two roads diverged in a wood, and I—<br>\nI took the one less traveled by,<br>\nAnd that has made all the difference.</p>",
          "votes": 7,
          "replies": []
        },
        {
          "id": 1930552,
          "author_name": "Cheul",
          "author_url": "",
          "post_date": "2022-09-08T03:17:14.383000",
          "content": "<p>Thank you very much for sharing your all experiments and tips</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 1907670,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "2022-08-21T00:54:45.903000",
      "content": "<p>this is what every kaggler should know</p>\n<p>\"This a question that comes up all the time in machine learning: How well can we do with the data we have? Even when we have a result, it can be hard to tell if it's a good result. What more could we do with better approaches? Or are we already close to the upper bound?\"</p>\n<p>link:   <br>\n<a href=\"https://drivendata.co/blog/aleatoric-limit1\" target=\"_blank\">https://drivendata.co/blog/aleatoric-limit1</a>  <br>\n<a href=\"https://drivendata.co/blog/aleatoric-limit2\" target=\"_blank\">https://drivendata.co/blog/aleatoric-limit2</a></p>\n<p>i thing kaggle can have a blog to invite kagglers to make post like this.<br>\ngood post will be given free TPU/GPU hours etc.</p>\n<p>this is not the same as notebook as this focus on content rather than code</p>",
      "votes": 5,
      "replies": []
    },
    {
      "id": 1882428,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "2022-08-03T09:15:46.607000",
      "content": "<p>look what i have found<br>\n<img src=\"https://i.ibb.co/0X3dDs4/Selection-171.png\" alt=\"https://i.ibb.co/0X3dDs4/Selection-171.png\"></p>",
      "votes": 6,
      "replies": [
        {
          "id": 1884597,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-08-04T14:17:39.420000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1893184,
          "author_name": "He",
          "author_url": "",
          "post_date": "2022-08-10T15:47:23.177000",
          "content": "<p><a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a> Hi heng, Would you mind share more information about this image, is it from hubmap (<a href=\"https://portal.hubmapconsortium.org/)\" target=\"_blank\">https://portal.hubmapconsortium.org/)</a>? thank you.</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1874042,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "2022-07-28T03:20:45.080000",
      "content": "<p>one free trick for all:</p>\n<p><img src=\"https://i.ibb.co/6mgvGXv/Selection-095.png\" alt=\"https://i.ibb.co/6mgvGXv/Selection-095.png\"></p>\n<p>i haven't tried to add 2021 kaggle train data yet (kidney and large intestine). i also expect some improvement from there</p>\n<hr>\n<p>we now enter phrase 2 of the competition: from 0.80 to ~0.83</p>\n<ul>\n<li>it is now the battle of external data, SSL masked pertaining, unlabelled learning … weak/self/semi-supervised, domain adaption, …</li>\n</ul>",
      "votes": 6,
      "replies": [
        {
          "id": 1874116,
          "author_name": "Ali",
          "author_url": "",
          "post_date": "2022-07-28T05:05:03.740000",
          "content": "<p>Great 0.8 :-)<br>\nMy 0.75 was achived with basline notebook and some new training with larger bone with some size modification I achived 0.7.<br>\nAnd a trick ( or approch) that pushed the score from 0.70 to 0.75 , a boost that I belive you didn’t yet try and I guess with your current solution it might give you a boost of 0.02 or so.  Or maybe not! If segformer is doing great with HuBMap. </p>",
          "votes": -1,
          "replies": []
        },
        {
          "id": 1886147,
          "author_name": "Gunes Evitan",
          "author_url": "",
          "post_date": "2022-08-05T16:01:04.877000",
          "content": "<p>That is very intuitive. It would probably work for all organs.</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1886216,
          "author_name": "kingjohnson",
          "author_url": "",
          "post_date": "2022-08-05T16:27:16.787000",
          "content": "<p>I am curious about which way you choose for training, the whole image(resize) or image tiles.</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1945022,
      "author_name": "James Howard",
      "author_url": "",
      "post_date": "2022-09-18T18:53:39.057000",
      "content": "<p><a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a> - Your experience of coat-small (+- parallel) with 1x1 daformer outperforming the medium model with 3x3 - is this purely because you are able to train the small model at a higher resolution than medium, or do you think the smaller model is genuinely better? I ask because I believe segformer b3 as an encoder outperforms b5 on this dataset even at higher resolutions.</p>",
      "votes": 3,
      "replies": [
        {
          "id": 1946523,
          "author_name": "James Howard",
          "author_url": "",
          "post_date": "2022-09-19T21:10:50.643000",
          "content": "<p>In my experiments, at the same resoluton, CoatMedium(4) + Daformer3x3 works better than CoatSmall(5) + Daformer1x1 - this seems to be different from others' experience. </p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 1952700,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "2022-09-23T20:42:39.293000",
      "content": "<p>with both the private and public score revealed, i discover something interesting.</p>\n<p>i made a bug by loading a mitb6 encoder with a trained mit5 model at submission inference. this means that  only the early layer are loaded and the unloaded weights are randomly initialized. However the performer is better then loading the correct model. at first i thought this is better \"by chance\". but now both private and public scores actually improved, meaning that improvement are not \"by chance\".</p>\n<p>for those that are doing research and writing paper, you may want to investigate on this. it seems possible just to \"perturb from train optimum (esp on just upper layers)\" and get better validation results.</p>\n<p>i also note that transformer is trained with drop path and \"residual add\" in FF and attention block enforces learning to get residual=0</p>",
      "votes": 4,
      "replies": [
        {
          "id": 1956303,
          "author_name": "Jairav Desai",
          "author_url": "",
          "post_date": "2022-09-26T11:39:19.983000",
          "content": "<p><a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a> On Sept23 at ~1AM UTC when the \"Private leaderboard was disclosed\" vs at ~6PM UTC when the \"leaderboard was finalized\" I noticed a change in the Private LB ranks. My team's Private LB rank improved by 30 places. Why so?  Were some of the teams disqualified during this time? If yes why were they disqualified ?</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1956334,
          "author_name": "Cheul",
          "author_url": "",
          "post_date": "2022-09-26T11:55:58.127000",
          "content": "<p><a href=\"https://www.kaggle.com/desaijairav\" target=\"_blank\">@desaijairav</a> I'm not hengck23 but lemme answer. 70 teams were disqualified for cheating: <a href=\"https://www.kaggle.com/competitions/hubmap-organ-segmentation/discussion/354700#:~:text=anti%2Dcheating%20algorithm\" target=\"_blank\">related thread</a>. Probably, they used multiple accounts to submit more than five times a day, in order to either verify modifications on their programs, or to fine-tune the threshold for each organ.</p>\n<p>PS you can check the very first rule of this competition <a href=\"https://www.kaggle.com/competitions/hubmap-organ-segmentation/rules#:~:text=One%20account%20per%20participant\" target=\"_blank\">here</a>: One account per participant</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1956746,
          "author_name": "Jairav Desai",
          "author_url": "",
          "post_date": "2022-09-26T15:27:48.753000",
          "content": "<p>Thanks a lot <a href=\"https://www.kaggle.com/cheulkay\" target=\"_blank\">@cheulkay</a> !! That was a exactly what I was looking for. </p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1958040,
          "author_name": "Jairav Desai",
          "author_url": "",
          "post_date": "2022-09-27T09:00:02.890000",
          "content": "<p>Another quick question- Was Segformer allowed to be used? I could see Segformer in some of the shared notebooks which are medal winners. It had \"Apache 2.0\" license initially &amp; later changed to \"Other\". </p>\n<p>In terms of licensing any insights/links around what is allowed/not allowed? I went through the Kaggle rules &amp; License conditions but the Technical-Legal language often becomes difficult to understand.  </p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1958644,
          "author_name": "opusen",
          "author_url": "",
          "post_date": "2022-09-27T15:05:08.633000",
          "content": "<p>I have  inquired of the question to the competition host.<br>\nAfter their reply, I'll share their opinion with my solution:)</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 1951265,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "2022-09-23T00:32:57.737000",
      "content": "<p>my 13-th place solution: public 0.83, private: 0.81~0.82<br>\n<a href=\"https://www.kaggle.com/code/hengck23/lb0-83-submit/edit/run/104911483\" target=\"_blank\">https://www.kaggle.com/code/hengck23/lb0-83-submit/edit/run/104911483</a></p>\n<pre><code>organ_threshold = { \n    'Hubmap': { \n        'kidney' : 0.28, \n        'prostate' : 0.28, \n        'largeintestine': 0.28, \n        'spleen' : 0.28, \n        'lung' : 0.05, \n    }, \n    'HPA': { \n        'kidney' : 0.50, \n        'prostate' : 0.50, \n        'largeintestine': 0.50, \n        'spleen' : 0.50, \n        'lung' : 0.10, \n    }, \n}\n\nmodel = [ \n    dotdict( #[1]\n        is_use=1,\n        image_size=1024,\n        module='model_pvt_v2_daformer',\n        param={'encoder': pvt_v2_b4_level5, 'decoder': daformer_conv3x3, },\n        checkpoint=[\n            '../input/hubmap-submit-06-weight0/pvt_v2_b4_level5-daformer_conv3x3-aug5b-1024-fold-3-swa.pth',\n            '../input/hubmap-submit-06-weight0/pvt_v2_b4_level5-daformer_conv3x3-aug5b-1024-fold-2-swa.pth', \n            '../input/hubmap-submit-06-weight0/pvt_v2_b4_level5-daformer_conv3x3-aug5b-1024-fold-1-swa.pth',\n\n            #'../input/hubmap-submit-06-weight0/pvt_v2_b4_level5-daformer_conv3x3-aug5b-1024-fold-4-swa.pth',\n\n        ],\n    ),\n    dotdict(#[2]\n        is_use = 1,\n        image_size = 1536,\n        module = 'model_coat_daformer',\n        param={'encoder': coat_parallel_small_level5, 'decoder':daformer_conv1x1},\n        checkpoint = [ \n            '../input/hubmap-submit-06-weight0/coat_parallel_small_level5-daformer_conv1x1-aug8b-1536-fold-3-swa.pth',\n            '../input/hubmap-submit-06-weight0/coat_parallel_small_level5-daformer_conv1x1-aug8b-1536-fold-2-swa.pth', \n            '../input/hubmap-submit-06-weight0/coat_parallel_small_level5-daformer_conv1x1-aug8b-1536-fold-1-swa.pth',\n\n            #'../input/hubmap-submit-06-weight0/coat_parallel_small_level5-daformer_conv1x1-aug8b-1536-fold-4-swa.pth', \n            #'../input/hubmap-submit-06-weight0/coat_parallel_small_level5-daformer_conv1x1-aug8b-1536-fold-0-swa.pth',  \n        ],\n    ),\n\n\n    dotdict( #[3]\n        is_use=1,\n        image_size=1536,\n        module='model_effnet_smp_unet',\n        param={'encoder': tf_efficientnet_b6, 'decoder': smp_unet},  \n        checkpoint=[\n            '../input/hubmap-submit-06-weight0/tf_efficientnet_b6-unet-aug8b-1536-fold-3-swa.pth', \n            '../input/hubmap-submit-06-weight0/tf_efficientnet_b6-unet-aug8b-1536-fold-2-swa.pth',\n            '../input/hubmap-submit-06-weight0/tf_efficientnet_b6-unet-aug8b-1536-fold-1-swa.pth',\n        ],\n    ),\n    dotdict(#[4]\n        is_use = 1,\n        image_size = 768,\n        module = 'model_dualvit_daformer',\n        param={'encoder': dual_vit_b, 'decoder':daformer_conv3x3},\n        checkpoint = [\n             '../input/hubmap-submit-06-weight0/dual_vit_b-daformer_conv3x3-aug8-768-fold-3-swa.pth',\n             '../input/hubmap-submit-06-weight0/dual_vit_b-daformer_conv3x3-aug8-768-fold-2-swa.pth', \n             '../input/hubmap-submit-06-weight0/dual_vit_b-daformer_conv3x3-aug8-768-fold-1-swa.pth',\n\n             #'../input/hubmap-submit-06-weight0/dual_vit_b-daformer_conv3x3-aug8-768-fold-4-swa.pth',\n        ],\n    ), \n\n\n    dotdict(#[5]\n        is_use=1,\n        image_size=1280,\n        module='model_convnext_smp_unet',\n        param={'encoder': convnext_large_384_in22ft1k, 'decoder': smp_unet},   \n        checkpoint=[\n            '../input/hubmap-submit-06-weight0/convnext_large_384_in22ft1k-smp_unet-aug8b-1280-fold-3-swa.pth',\n            '../input/hubmap-submit-06-weight0/convnext_large_384_in22ft1k-smp_unet-aug8b-1280-fold-2-swa.pth',\n            '../input/hubmap-submit-06-weight0/convnext_large_384_in22ft1k-smp_unet-aug8b-1280-fold-1-swa.pth',\n\n            #'../input/hubmap-submit-06-weight0/convnext_large_384_in22ft1k-smp_unet-aug8b-1280-fold-4-swa.pth',\n        ],\n    ), \n\n\n\n      dotdict(\n        is_use=1,\n        image_size=768,\n        module='model_pvt_v2_daformer',\n        param={'encoder': pvt_v2_b4, 'decoder': daformer_conv3x3},   \n        checkpoint=[\n            #'../input/hubmap-submit-06-weight1/pvt_v2_b4-aug8b-768-different-seed-fold-0-swa.pth', #0.78\n            '../input/hubmap-submit-06-weight1/pvt_v2_b4-aug8b-768-different-seed-fold-1-swa.pth', # 0.80\n            #'../input/hubmap-submit-06-weight1/pvt_v2_b4-aug8b-768-different-seed-fold-2-swa.pth', #0.79 \n        ],\n    ),\n</code></pre>\n<p>you will get private score 0.81 to 0.82 depending on how you select the base models (e.g. remove comment #)</p>",
      "votes": 4,
      "replies": []
    },
    {
      "id": 1948830,
      "author_name": "Gunes Evitan",
      "author_url": "",
      "post_date": "2022-09-21T10:34:35.917000",
      "content": "<p>Thanks for everything <a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a>. Learned a lot from this topic. Hope to you see on Mayo Clinic competition…</p>",
      "votes": 4,
      "replies": [
        {
          "id": 1949496,
          "author_name": "Katalip",
          "author_url": "",
          "post_date": "2022-09-21T17:36:28.413000",
          "content": "<p>Many thanks, <a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a>! I also learned quite a lot from this thread.</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1883676,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "2022-08-04T02:27:55.620000",
      "content": "<p>best backbone for segformer<br>\n<a href=\"https://openaccess.thecvf.com/content/CVPR2022/papers/Gu_Multi-Scale_High-Resolution_Vision_Transformer_for_Semantic_Segmentation_CVPR_2022_paper.pdf\" target=\"_blank\">https://openaccess.thecvf.com/content/CVPR2022/papers/Gu_Multi-Scale_High-Resolution_Vision_Transformer_for_Semantic_Segmentation_CVPR_2022_paper.pdf</a></p>\n<p><img src=\"https://i.ibb.co/7XpM0P3/Selection-176.png\" alt=\"https://i.ibb.co/7XpM0P3/Selection-176.png\"></p>",
      "votes": 3,
      "replies": []
    },
    {
      "id": 1880720,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "2022-08-02T02:00:07.140000",
      "content": "<p>another paper improving segformer<br>\n<img src=\"https://i.ibb.co/4jmKVFK/Selection-135.png\" alt=\"https://i.ibb.co/4jmKVFK/Selection-135.png\"></p>",
      "votes": 3,
      "replies": [
        {
          "id": 1881570,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-08-02T16:26:00.603000",
          "content": "",
          "votes": 2,
          "replies": []
        }
      ]
    },
    {
      "id": 1907339,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "2022-08-20T17:22:34.560000",
      "content": "<p>i realize i made a mistake. i have been computing dice validation dice at train size of 3000.<br>\nBut there are image with pixel size less than 0.4 um, i.e. these images are \"much larger\". hence the dice for these hidden test images (largeintestine) are worse than your local results.</p>\n<p>hence size 768 seem to be sufficient for most organ, it may be too small for largeintestine. if you are using 768 for largeintestine, you need a better enlarging mask method (rather than just bilinear upscale)</p>\n<p>it is for this reason, using larger image input like 1024, 1280, 1536 improves LB scores.</p>\n<p>here are the LB scores(single fold):</p>\n<p>LB 0.81</p>\n<ul>\n<li>input = 1536</li>\n<li>augmentation = more + staintool + downsize/upsize for prostate 6 um</li>\n<li>COAT-parallel small (5 level)</li>\n</ul>\n<p>LB 0.80</p>\n<ul>\n<li>input = 1024</li>\n<li>augmentation = more </li>\n<li>COAT-parallel small (5 level)</li>\n</ul>\n<p>LB 0.79</p>\n<ul>\n<li>input = 768</li>\n<li>augmentation = more </li>\n<li>COAT-parallel small (4 level)</li>\n</ul>\n<p>1536 already max out my GPU.  <br>\nto go to 2048, i either need to 4x overlap 1536 tiles or single image using gradient check.</p>\n<p>maybe i need to rewrite the code using<br>\n<a href=\"https://openaccess.thecvf.com/content/CVPR2022/papers/Mangalam_Reversible_Vision_Transformers_CVPR_2022_paper.pdf\" target=\"_blank\">https://openaccess.thecvf.com/content/CVPR2022/papers/Mangalam_Reversible_Vision_Transformers_CVPR_2022_paper.pdf</a></p>\n<p>\"Reversible Vision Transformers achieve a reduced memory<br>\nfootprint of up to 15.5× at identical model complexity, parameters and accuracy,\" </p>",
      "votes": 4,
      "replies": [
        {
          "id": 1907369,
          "author_name": "Givan",
          "author_url": "",
          "post_date": "2022-08-20T17:48:47.923000",
          "content": "<p>What puzzles me is that large image input(1024) gives me worse performance on LB.</p>",
          "votes": 6,
          "replies": []
        },
        {
          "id": 1907377,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2022-08-20T17:56:40.723000",
          "content": "<p>try a few folds?</p>\n<p>the training of large images is not the same as small images.<br>\nfirst your transformer needs to be larger because you need larger receptive field.</p>\n<p>this makes the transformer too powerful and you need more regularization.  <br>\ni use more augmentation and more aux loss.  </p>\n<p>swinv2 paper (which also uses 1536) uses feature distillation as regularization.</p>\n<p>if you do it correctly you will seed you local validation improves greatly for some organs,<br>\nnotably my local cv has 0.915 for largeintestine </p>",
          "votes": 5,
          "replies": []
        },
        {
          "id": 1907526,
          "author_name": "Robson",
          "author_url": "",
          "post_date": "2022-08-20T21:14:34.253000",
          "content": "<p>Let's begin the GPU war</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1907617,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2022-08-21T00:00:00.593000",
          "content": "<p>i wonder if anyone try CNN + large image (e.g. efficient or resnet at 1024, 1028, 1536, 2048)?</p>\n<p>it is not a gpu war but a race towards larger input size.<br>\nusing larger gpu  is only one of the many available methods.</p>",
          "votes": 3,
          "replies": []
        },
        {
          "id": 1907974,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2022-08-21T08:45:49.320000",
          "content": "<p>large image for PVTv2-b4 (single fold)</p>\n<p>LB 0.80  <br>\n    input = 1024<br>\n    augmentation = more + downsize/upsize for prostate 6 um<br>\n    PVTv2-b4 (5 level)</p>\n<p>LB 0.79  <br>\n    input = 768<br>\n    augmentation = more<br>\n    PVTv2-b4 (4 level)</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1909056,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2022-08-22T09:23:04.633000",
          "content": "<p><a href=\"https://ibb.co/g7Mr1yj\"><img src=\"https://i.ibb.co/MhDgTn2/Selection-030.png\" alt=\"Selection-030\"></a></p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1911181,
          "author_name": "豆柴金鯱",
          "author_url": "",
          "post_date": "2022-08-24T00:52:46.453000",
          "content": "<p>Hi Heng, may I ask what's \"PVTv2\" model? I've  been got stuck at 0.8 for quite a while, and have no idea to improve further. Thanks!</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1911378,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2022-08-24T04:08:10.060000",
          "content": "<p>paper: PVT v2: Improved Baselines with Pyramid Vision Transformer<br>\n<a href=\"https://github.com/whai362/PVT\" target=\"_blank\">https://github.com/whai362/PVT</a></p>\n<p>all CVT , PVTv2, MIT (segformer's mix transformer) share almost smiliar structure</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1911382,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2022-08-24T04:12:29.887000",
          "content": "<p>i find a better (?) way to add level to pyramid transformer.<br>\ne.g. given pretrain weights for 4 level depths = [ 3,3,18,3], you can actually do change to 5 level depths = [3,3,15,5,3].</p>\n<p>i.e. you can shorten the third level</p>",
          "votes": 0,
          "replies": [
            {
              "id": 1914599,
              "author_name": "York G",
              "author_url": "",
              "post_date": "2022-08-26T08:01:52.433000",
              "content": "<blockquote>\n  <p>i find a better (?) way to add level to pyramid transformer.<br>\n  e.g. given pretrain weights for 4 level depths = [ 3,3,18,3], you can actually do change to 5 level depths = [3,3,15,5,3].</p>\n  <p>i.e. you can shorten the third level</p>\n</blockquote>\n<p>Hi, <a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a> ,<br>\nThank you for the models sharing, it really helps me on the learning of model structure and arrangement with backbones and decoders.</p>\n<p>I have a few questions about the above-mentioned depths (maybe the questions is so stupid because of my ignorance): </p>\n<ol>\n<li><p>According to the change of depths(from [3,3,18,3] to [3,3,15,5,3]), the relevant 'num_stages' will also change from 4 to 5, so the 'embed_dims / num_heads / mlp_ratios / sr_ratios' also need to be adjusted, is that right?</p></li>\n<li><p>If I used the pre-tained weight (i.e. pvt2_b4), does pre-trained weight still match the new model level?</p></li>\n</ol>\n<p>Thank you again for the selfless sharing. </p>\n<p>Best Regards</p>",
              "votes": 0,
              "replies": []
            }
          ]
        },
        {
          "id": 1911496,
          "author_name": "豆柴金鯱",
          "author_url": "",
          "post_date": "2022-08-24T06:14:37.277000",
          "content": "<p>Hi <a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a>, thanks for your tips. Though having some experience in designing networks, I still struggle to have a god feeling about which direction to modify an existing network. Any rule of thumb according to your work/research experience? <br>\nThank you!</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1911511,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2022-08-24T06:24:10.840000",
          "content": "<p>we already reached the max accurately , which is limited by the label noise.<br>\nsince performance is limited by data, there is no gain in designing better network.</p>\n<p>however,increase of image size can reduce the predicted mask up scaling error, but there is little additional detection of missed FTU i think.</p>\n<p>the next boost will be better data or better network to learned in self-supervsied:</p>\n<ul>\n<li>find a way to use unlablled data (hpa or hubmap), just expand a little of the decision boundary is good</li>\n<li>online learning of hidden test data</li>\n</ul>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1911534,
          "author_name": "豆柴金鯱",
          "author_url": "",
          "post_date": "2022-08-24T06:55:24.380000",
          "content": "<p>Wait, the provided HPA images are not fully labeled? Or you mean external data on the internet? </p>\n<blockquote>\n  <p>the next boost will be better data <br>\n  I noticed you mentioned the idea of \"mixup\" or more augmentations in the thread, this also resorts to \"creating better data\" right?</p>\n</blockquote>\n<p>As for self-supervised learning, I'm not an expert in this domain, need to do some homework to understand how it works.<br>\nThank you, heng!</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1911586,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2022-08-24T07:30:14.180000",
          "content": "<p>external data.<br>\naccording to the papers, all pretraining using external data for transformer would lead to 1 to 2 % improvement.<br>\nbut is still have to goes back to the issue, how bad are our labels, have we reached the best performance?</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1911621,
          "author_name": "Roc",
          "author_url": "",
          "post_date": "2022-08-24T07:49:47.033000",
          "content": "<p>I did some  large size experiments in cnn and transformers.</p>\n<table>\n<thead>\n<tr>\n<th>net</th>\n<th>image size</th>\n<th>cv</th>\n<th>lb</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>efficientnet_b5 + unet</td>\n<td>1536</td>\n<td>0.7966</td>\n<td>0.80</td>\n</tr>\n<tr>\n<td>coat_parallel_small(5 level) + daformer_conv1x1</td>\n<td>1536</td>\n<td>0.8034</td>\n<td>0.77</td>\n</tr>\n</tbody>\n</table>\n<p>Both of lb are 5 folds ensemble results.<br>\nI don't know why my transformer model has such a big gap.</p>",
          "votes": 3,
          "replies": []
        },
        {
          "id": 1911648,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2022-08-24T08:08:17.727000",
          "content": "<p>i think it is over fitting or bug.<br>\nyou should have aux loss for all parallel block output expect the first one. use more augmentation?</p>\n<p>cv dice is not a good indicator.<br>\nhow many iterations/epoch did you train?</p>\n<p>check your cv bce loss.<br>\nat least 1536 cv bce should be better than 1024, which is better than 768.</p>\n<p>better bce indicates  \"better margin\"</p>\n<p>check the train/valid bce of your unet and coat_parallel_small</p>\n<hr>\n<p>you can only add a few new uninitialized serial block layers. we still need pretrain weights for most of the serial block layers/parallel block layers. else i think it will overfit.</p>\n<hr>\n<p>0.77 seems like a bug. how about try 768 first?<br>\nor try without swa first.</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1911665,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2022-08-24T08:17:41.013000",
          "content": "<p>my parallel block. use is skip first = True</p>\n<p><a href=\"https://gist.github.com/hengck23/b2c2bcd8de06248add46097ec55ce578#file-my-parallel-blovk\" target=\"_blank\">https://gist.github.com/hengck23/b2c2bcd8de06248add46097ec55ce578#file-my-parallel-blovk</a></p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1911673,
          "author_name": "Roc",
          "author_url": "",
          "post_date": "2022-08-24T08:28:55.990000",
          "content": "<p><a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a>  Thanks for your advice. I will check them.<br>\nI did more aux and more augmentation and training with 400 epoch.</p>\n<p>More aux:<br>\n`</p>\n<pre><code>    if self.CFG.aux:\n        aux_logits = res['aux_logits']\n        for aux_logit in aux_logits:\n            loss += 0.2*self.criterion_aux_loss(aux_logit, masks)\n</code></pre>\n<p>`</p>\n<p>Basic aug:  flip , rotate, transpose, contrast,hsv, noise, etc.<br>\nMore aug: </p>\n<p><code>\n        ElasticTransform,\n        GridDistortion,\n        RandomGamma,\n        Cutout, etc\n</code></p>\n<p>I will  try  more heavy augmentation.</p>",
          "votes": 3,
          "replies": []
        },
        {
          "id": 1911677,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2022-08-24T08:32:22.637000",
          "content": "<p>what is your batch size? </p>\n<p>\"I did more aux and more augmentation and training with 400 epoch.\"<br>\n\"I will try more heavy augmentation.\"</p>\n<p>i suggest you train and submit a coat small parallel at 768. use this as reference to judge and guide your 1536 training. (the loss curve should be better than 768). you must get 0.78-79 for 768. 1536 will give you +0.02</p>\n<hr>\n<p>note<br>\nswap color channel and gray definitely hurts LB score for my experiemnts</p>",
          "votes": 2,
          "replies": []
        },
        {
          "id": 1911714,
          "author_name": "Roc",
          "author_url": "",
          "post_date": "2022-08-24T08:59:11.183000",
          "content": "<p>total batch size = 8.<br>\nI will try it following your opinion.</p>\n<p><code>\ni suggest you train and submit a coat small parallel at 768. use this as reference to judge and guide your 1536 training. (the loss curve should be better than 768). you must get 0.78-79 for 768. 1536 will give you +0.02\n</code></p>\n<p>Really thanks for your kind answer and always learn a lot from your disscusion. </p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1912170,
          "author_name": "豆柴金鯱",
          "author_url": "",
          "post_date": "2022-08-24T14:55:42.830000",
          "content": "<p><a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a> </p>\n<blockquote>\n  <p>external data.<br>\n  according to the papers, all pretraining using external data for transformer would lead to 1 to 2 % improvement.<br>\n  Understood. </p>\n  <p>but is still have to goes back to the issue, how bad are our labels, have we reached the best performance?<br>\n  You're right. Tha't a good question. </p>\n</blockquote>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1913332,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2022-08-25T09:28:53.363000",
          "content": "<p><a href=\"https://www.kaggle.com/yingpengchen\" target=\"_blank\">@yingpengchen</a> </p>\n<p>my results for tf_efficientnet_b6 smp unet 1536 single fold (fold3)<br>\nLB =0.80</p>\n<p>(i think ensemble will be 0.80~0.81)<br>\nmaybe b6 is better than b5 or maybe my augmentation is better</p>",
          "votes": 2,
          "replies": []
        },
        {
          "id": 1914312,
          "author_name": "Roc",
          "author_url": "",
          "post_date": "2022-08-26T01:44:34.183000",
          "content": "<p><a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a> </p>\n<p>Great job! </p>\n<p><code>\nmaybe b6 is better than b5 or maybe my augmentation is better\n</code></p>\n<p>Maybe augmentation more important, I try tf_efficientnet_b7 smp unet 1536 improve cv but drop lb seriously.</p>\n<p>I guess the lb limit is 0.81 with single model( single fold or ensemble n folds).</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1914324,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2022-08-26T02:12:35.947000",
          "content": "<p>\"Maybe augmentation more important, \"</p>\n<p>too much and too little augmentation is no good.it is easy to obtain CV 0.80.<br>\ni once made a mistake. i load rubbish ground truth mask for external data and train together with kaggle train data.<br>\ni can still obtain CV 0.80 for kaggle validation in that case (but of course LB score is not good)</p>\n<p>it is important to visualize prediction on external data.</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1914859,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2022-08-26T13:37:41.830000",
          "content": "<blockquote>\n  <blockquote>\n    <p>'embed_dims / num_heads / mlp_ratios / sr_ratios' also need to be adjusted, is that right?<br>\n    for the last level i just use previous level values. <br>\n    the last level is not very deep, so i don't think it matters.</p>\n  </blockquote>\n</blockquote>\n<p>from another paper:<br>\n<a href=\"https://ibb.co/HdGkVK0\"><img src=\"https://i.ibb.co/M6P3sgb/Selection-088.png\" alt=\"Selection-088\"></a></p>\n<blockquote>\n  <blockquote>\n    <p>If I used the pre-tained weight (i.e. pvt2_b4), does pre-trained weight still match the new model level?<br>\n    you can only load pretrain model up to old levels. the new level are trained from scratch. hence the new level cannot be very deep because you don't have pretrain weight.</p>\n  </blockquote>\n</blockquote>\n<p>what i am doing is like extending resnet backbone from 4 layers to 5,6 layers (p6,p7) to detect large object in FPN</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1914861,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2022-08-26T13:40:40.460000",
          "content": "<p>since the new layer is small, one can simply use conv instead of trasnformer</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1915442,
          "author_name": "York G",
          "author_url": "",
          "post_date": "2022-08-27T01:43:00.267000",
          "content": "<p>Thank you for the fast reply. The new layer advice helps me a lot. </p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1915512,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2022-08-27T03:07:33.960000",
          "content": "<p>you train a normal network first.<br>\nthen freeze (or partially freeze) the trained network and train only the new layers, etc.</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1918676,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2022-08-29T18:33:12.663000",
          "content": "<p><a href=\"https://www.kaggle.com/yingpengchen\" target=\"_blank\">@yingpengchen</a> </p>\n<blockquote>\n  <blockquote>\n    <p>training with 400 epoch.</p>\n  </blockquote>\n</blockquote>\n<p>it seems to me that 400 is too many.<br>\ni use about 200 to 230 for batch size 4 </p>",
          "votes": 2,
          "replies": []
        },
        {
          "id": 1918901,
          "author_name": "Roc",
          "author_url": "",
          "post_date": "2022-08-30T01:13:21.380000",
          "content": "<p><a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a> <br>\nThanks for your tips. <br>\n I also observed this phenomenon, after epochs greater than 300, the avg_loss is increasing.</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1925499,
          "author_name": "Bibhabasu Mohapatra",
          "author_url": "",
          "post_date": "2022-09-04T02:58:09.690000",
          "content": "<p>The thing about larger image with efficient net or resnet is…   I think it is suggested to use 224 image size with resnet18 and effnet b0 where 240 size with efficient net b1 and goes to 700 image size for efficient net b7. Though CNN  would work with any size of image still we need to create much larger efficient net like b9 Or b10( if exist) </p>\n<p>Don't know if <a href=\"https://www.kaggle.com/yingpengchen\" target=\"_blank\">@yingpengchen</a> if efficient net with 0.80 is most probably overfit<br>\nCorrect me if I am thinking in wrong direction. </p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1926781,
          "author_name": "Roc",
          "author_url": "",
          "post_date": "2022-09-05T05:40:41.230000",
          "content": "<p><a href=\"https://www.kaggle.com/bibhabasumohapatra\" target=\"_blank\">@bibhabasumohapatra</a> it's possible, but currently we don't have such a trained model like b9 or b10.</p>\n<p><code>\nDon't know if @yingpengchen if efficient net with 0.80 is most probably overfit\n</code></p>\n<p>It's hard to say, but compared to the 768 lb+0.02 improvement for me.</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1926789,
          "author_name": "Gunes Evitan",
          "author_url": "",
          "post_date": "2022-09-05T06:04:35.247000",
          "content": "<p>Wait, you guys are training for 300-400 epochs? My models converge after 30 epochs.</p>",
          "votes": 4,
          "replies": []
        },
        {
          "id": 1939399,
          "author_name": "Bibhabasu Mohapatra",
          "author_url": "",
          "post_date": "2022-09-14T17:05:52.030000",
          "content": "<p><a href=\"https://www.kaggle.com/gunesevitan\" target=\"_blank\">@gunesevitan</a> exactly . . . 30 to max 35 is fine almost 45 . . . my model converges. never thought of 300 epochs . .. 😯😯 </p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1944014,
          "author_name": "TheMinimalist",
          "author_url": "",
          "post_date": "2022-09-18T01:48:05.853000",
          "content": "<p>Hi, I am a beginner. I would like to ask what exactly \"augmentation = more\" is. <br>\nThe gap between my cv and lb is huge (0.7 vs 0.43). <br>\nA kind person told me it was because I didn't use data augmentation during training and testing.<br>\nI would like to ask if I can improve my score by applying more data augmentation like these. <br>\nOr do you have any better suggestions to improve this situation? thank you very much🙏🙏</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1870978,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "2022-07-26T01:58:11.867000",
      "content": "<p>as shown in the CV-LB graph at the top, all my CV-HPA, LB-HPA,LB-Hubmap,LB-public has converged!<br>\nI was right that the upper limit is about 0.80 without external data.</p>\n<p>this could be the bronze medal limit after 2 months</p>\n<hr>\n<p>I choose a variety of encoder, decoder, optimizer. These are not chosen at random but target at the root of problems</p>",
      "votes": 3,
      "replies": [
        {
          "id": 1872506,
          "author_name": "datadote",
          "author_url": "",
          "post_date": "2022-07-27T03:32:05.373000",
          "content": "<p>Hi hengck23,</p>\n<p>How did you reach the 0.8 upper limit? Why isn't it 1? I saw your probe post further down with the guess, but I couldn't tell how you reached that conclusion. Is it some out of distribution thing? Thanks</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1872513,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2022-07-27T03:43:19.347000",
          "content": "<p>it cannot be 1 becuase of label noise.<br>\na quick guide is train dice &gt;= local validation dice &gt;=leaderboard dice</p>\n<p>train dice is the upper limit at the point before overfitting. you can train you model for very long iterations to find the point of overfitting (i.e. when your validation dice becomes a V shape.)</p>",
          "votes": 2,
          "replies": []
        },
        {
          "id": 1874056,
          "author_name": "datadote",
          "author_url": "",
          "post_date": "2022-07-28T04:04:48.503000",
          "content": "<p>Thank you for the quick, and helpful reply!</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1867021,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "2022-07-23T01:02:51.697000",
      "content": "<p>what is the normalized size of hidden test images?</p>\n<p>in order to apply transformer segmentation, i need to have a rough ideal of the max and min input size of the test image.<br>\n(i need to decide absolute/relative positional encoding, token patch size ….)<br>\nhence i do a probe.</p>\n<p>the results: all test image are within 0.8 to 1.2 of normalized size.</p>\n<pre><code>    test_df = pd.read_csv('../input/hubmap-organ-segmentation/test.csv')                        \n    test_df.loc[:,'norm_size']= test_df.pixel_size/0.4 * test_df.img_height/3000                         \n                    #assume img_height==img_width       \n    max_norm_size = test_df.norm_size.max()                        \n    min_norm_size = test_df.norm_size.min()                        \n</code></pre>\n<p>below two conditions are probed true:</p>\n<pre><code>if (min_norm_size&gt;=0.8) and (min_norm_size&lt;1.0): \nif (max_norm_size&gt;=1.0) and (max_norm_size&lt;1.2):  \n</code></pre>\n<p>note we can also deuce that smallest 160x160 test images mentioned refer to prostate<br>\nimages with pixel size 6.2630  um. (you should do resize artifacts augmentation for this case in training)</p>\n<p>largest 4500x4500 test image refer to large intestine with pixel size 0.229  um</p>",
      "votes": 3,
      "replies": [
        {
          "id": 1868097,
          "author_name": "_CA℟L_",
          "author_url": "",
          "post_date": "2022-07-23T17:29:41.347000",
          "content": "<p>\"assume img_height==img_width\" <br>\nThis passed:<br>\nif (df['img_width']==df['img_height']).all():</p>\n<p>All images are square</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 1864027,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "2022-07-20T17:14:41.743000",
      "content": "<p>maybe this also works for our problem: labelled kaggle train images + unlabelled download external data</p>\n<p><a href=\"https://www.youtube.com/watch?v=FTmvdARsbnI\" target=\"_blank\">https://www.youtube.com/watch?v=FTmvdARsbnI</a><br>\nMedAI Session 25: Training medical image segmentation models with less labeled data | Sarah Hooper</p>",
      "votes": 3,
      "replies": [
        {
          "id": 1877358,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2022-07-30T14:59:22.810000",
          "content": "<p>this is mentioned in the video. i put it into picture.<br>\nstage1: train normally in supervised to get an initial model (and baseline results)<br>\nstage2: train joint supervised and unsupervised (and see if you get improved results)</p>\n<p><img src=\"https://i.ibb.co/t2mP3Ns/Selection-118.png\" alt=\"https://i.ibb.co/t2mP3Ns/Selection-118.png\"></p>\n<p>there is a final stage 3 which uses pesudo labels</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 1881977,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "2022-08-03T01:42:43.543000",
      "content": "<p>you may think that the results of Hunmap are inferior to that of HPA because of colors of the stains.<br>\nBut this may not be true.</p>\n<p>You can verify this by  changing the color of your validation HPA stains (e.g. HSV shift, convert to gray, stain color transfer) and compare with results of the original colored HPA images. You should see similar relative performance in your Lb-HPA and Lb-Humap score.</p>\n<p>Likewise for other factors like pixel size in um, slice thickness, resolution, etc …</p>\n<hr>\n<p>Hubmap are real lab tissue slides. there are many more issues, see below.<br>\nthis is left as an exercise for you: \"how to prove that if these issues actually exist in the hidden test set?\"</p>\n<p><img src=\"https://i.ibb.co/DgTsVxk/Selection-164.png\" alt=\"https://i.ibb.co/DgTsVxk/Selection-164.png\"></p>\n<hr>\n<p>even if these issues does not exist in the hidden test set, it will still boost your chance in the \"Judges prizes\" if analysis and results are presented to show your robustness of your model against real artifacts.</p>\n<hr>\n<p>on a side note, when i develop commercial computer vision model for by clients, \"black box\" testing is common. We do not see the test set at all. What we know is the feedback of the results (e.g. score against other bidding vendors, competitor products). So we have devised a way to fault find the issues even if we do not see the images. e.g.</p>\n<ul>\n<li>using auto-encoders, etc to measure out-of distributions from your train set</li>\n<li>apply your model on large test set (including out of distributions). train a classifier to classify the type of errors. then you can map error to input image.</li>\n</ul>\n<hr>\n<p>external data may not help you to detect more FTU, but they are definitely of great help to remove false positive and show your model weakness and issues</p>\n<hr>\n<p>the score of LB-hubmap-public and LB-hubmap-private may be closer then what your think (i.e. little shakeup). it is likely that a sample tissues has many cropped slide samples. They are then split between public and private set.</p>",
      "votes": 4,
      "replies": []
    },
    {
      "id": 1875484,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "2022-07-29T04:07:45.280000",
      "content": "<p>beware!!!!</p>\n<p>the distribution of the organ in Hubmap is not what you think</p>\n<p><img src=\"https://i.ibb.co/k9FBv0V/Selection-136.png\" alt=\"https://i.ibb.co/k9FBv0V/Selection-136.png\"></p>",
      "votes": 4,
      "replies": [
        {
          "id": 1875821,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2022-07-29T10:14:44.740000",
          "content": "<p>this confirms with my observation that the recent improvement in my LB score especially from 0.76 to 8.80 actually comes from prostate, lung and spleen.</p>\n<p>it is also noted that segformer is strong in lung.</p>\n<p>further, the FTU object size for spleen is larger then the rest. one have to take cares of scale. if you are using tiling, you need to check if your tile can contain the largest FTU object or not</p>",
          "votes": 3,
          "replies": []
        }
      ]
    },
    {
      "id": 1870646,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "2022-07-25T17:30:06.703000",
      "content": "<p>i realise one very important note:</p>\n<ul>\n<li>you should make post submission to last year competition using your current model to see your domain shift </li>\n</ul>",
      "votes": 4,
      "replies": []
    },
    {
      "id": 1858202,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "2022-07-16T18:28:24.303000",
      "content": "<p>update of results LB 0.72:<br>\n<img src=\"https://i.ibb.co/rmnSNH0/Selection-060.png\" alt=\"https://i.ibb.co/rmnSNH0/Selection-060.png\"></p>",
      "votes": 4,
      "replies": [
        {
          "id": 1860583,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2022-07-18T12:01:17.177000",
          "content": "<p><img src=\"https://i.ibb.co/wrx84gs/Selection-096.png\" alt=\"https://i.ibb.co/wrx84gs/Selection-096.png\"></p>\n<p>surprise! surprise! the probe by organ is not what i would expect …</p>\n<p>i wonder anyone has probed the distribution of the organ and willing to share?</p>\n<p>the domain shift is not as large as expected. this is good news. <br>\nnot reported in the table are training score : ~0.85<br>\ni estimate final leader board at the last day of competition:<br>\npublic LB : 0.80 (HPA=0.81, Hubmap=0.80)<br>\nprivate LB : &gt;=0.79 (Hubmap&gt;=0.79)</p>",
          "votes": 2,
          "replies": []
        },
        {
          "id": 1861332,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2022-07-19T01:15:20.237000",
          "content": "<p>what is the key to improvement?<br>\nreceptive field size, scale?<br>\ndid you interpret results correctly?</p>\n<p>the reason why we try different models is to test if their responses are similar to the same data.<br>\nthis reveal data characteristics … more to come : other segmentation architecture besides unet, etc </p>\n<p><img src=\"https://i.ibb.co/7yVHRcz/Selection-095.png\" alt=\"https://i.ibb.co/7yVHRcz/Selection-095.png\"></p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1861362,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2022-07-19T01:45:15.123000",
          "content": "<p>do compare the results with hubmap paper:<br>\n<a href=\"https://www.biorxiv.org/content/10.1101/2021.11.09.467810v1.full.pdf\" target=\"_blank\">https://www.biorxiv.org/content/10.1101/2021.11.09.467810v1.full.pdf</a></p>\n<p>Supplementary table 5. Algorithm performance. (without domain shift)<br>\nKaggle reproduced (kidney) :0.93~0.97<br>\nTransfer learning (trained on kidney &amp; colon, tested on colon) : ~0.88 </p>\n<p>gives you an idea of effect of domain shift (ours), annotation error, etc</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1861472,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2022-07-19T03:58:49.477000",
          "content": "<p>5-fold unet-efficientb7 (lb=0.75)<br>\nresults on the given public test spleen image</p>\n<p><img src=\"https://i.ibb.co/hBMg88Q/Selection-101.png\" alt=\"https://i.ibb.co/hBMg88Q/Selection-101.png\"></p>",
          "votes": 5,
          "replies": []
        },
        {
          "id": 1861527,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2022-07-19T05:00:26.540000",
          "content": "<p>ccf-research-kaggle-2021 : hubmap CL_HandE_1234_B004_bottomleft.tiff<br>\n(but i don't know what is the um per pixel size for the datset. can anyone advise?)</p>\n<p><img src=\"https://i.ibb.co/YcfHVLD/Selection-102.png\" alt=\"https://i.ibb.co/YcfHVLD/Selection-102.png\"></p>",
          "votes": 2,
          "replies": []
        },
        {
          "id": 1861561,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2022-07-19T05:17:51.683000",
          "content": "<p>kaggle 2021 hubmap kidney image</p>\n<p><img src=\"https://i.ibb.co/r5Y8gbW/Selection-104.png\" alt=\"https://i.ibb.co/r5Y8gbW/Selection-104.png\"></p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1862452,
          "author_name": "Furkan K",
          "author_url": "",
          "post_date": "2022-07-19T17:45:20.037000",
          "content": "<p>how do you ensemble 5 fold seg models? you get average? what is your method?</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1862544,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2022-07-19T19:29:04.253000",
          "content": "<p>just average</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1863905,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2022-07-20T15:30:31.547000",
          "content": "<p>added uper-net-convnext-large to the ensemble</p>\n<p>the very best model<br>\n1) upernet-convnext-large : LB=0.75<br>\n2) unet-efficientb7: LB=0.75<br>\n3) upernet-swin-tx-small: LB=0.75</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1866539,
          "author_name": "Aramis Vesal",
          "author_url": "",
          "post_date": "2022-07-22T15:03:42.510000",
          "content": "<p>Hi <a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a> </p>\n<p>As always, it's a joy to read your analysis and discussion. May I know for the prediction you showed for Spleen what was your threshold strategy? did you learn the threshold on all five fold? or hard-coded one?</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1866959,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2022-07-22T22:16:13.407000",
          "content": "<p>learned my experiments , turns out to be about 0.5 for organ spleen.<br>\nensemble such that the curve is almost flat over the maximum and insensitive to threshold</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1870270,
          "author_name": "Mail-Suesarn",
          "author_url": "",
          "post_date": "2022-07-25T12:36:10.813000",
          "content": "<p>What image size are you using?</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1870275,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2022-07-25T12:42:31.797000",
          "content": "<p>768 ‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1870537,
          "author_name": "Gunes Evitan",
          "author_url": "",
          "post_date": "2022-07-25T16:11:26.737000",
          "content": "<blockquote>\n  <p>ccf-research-kaggle-2021 : hubmap CL_HandE_1234_B004_bottomleft.tiff<br>\n  (but i don't know what is the um per pixel size for the datset. can anyone advise?)</p>\n</blockquote>\n<p>Is that dataset an extension of HuBMAP Kidney Segmentation? Their raw dimensions are very close to upper limit of HuBMAP image dimensions in this competition. I think large intestine images could be very similar.</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1951266,
      "author_name": "Cheul",
      "author_url": "",
      "post_date": "2022-09-23T00:38:31.290000",
      "content": "<p>I've learned a lot things from your post and comments. I deeply thank you very much for sharing your experiments and results that are very insightful and helpful.</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 1937218,
      "author_name": "Saharsh Barve",
      "author_url": "",
      "post_date": "2022-09-13T10:52:24.920000",
      "content": "<p>Hello,<br>\nCould anyone help me understand what aux-loss means? Is it like a supportive loss function for organ type classification? Any notebook/snippet I can refer to?</p>",
      "votes": 1,
      "replies": [
        {
          "id": 1937273,
          "author_name": "Katalip",
          "author_url": "",
          "post_date": "2022-09-13T11:41:22.283000",
          "content": "<p>Hi, it's usually used to stabilize the training and to add more regularization. You compute the loss between intermediate outputs (from encoder stages) and your downsampled (used in the notebooks by OP of this discussion, many thanks, <a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a>) masks. Of course, you can adjust and modify everything based on what kind of constraint you want to put or emphasize more </p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1937338,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2022-09-13T12:30:43.887000",
          "content": "<p>it is an old method introduced by google inception model in the early days ….<br>\n<img src=\"https://drek4537l1klr.cloudfront.net/ferlitsch/Figures/CH06_F03_Ferlitsch.png\" alt=\"https://drek4537l1klr.cloudfront.net/ferlitsch/Figures/CH06_F03_Ferlitsch.png\"> </p>\n<p>you can also google for:<br>\ndeep supervised, auxiliary loss, segmentation, mmseg auxiliary loss</p>\n<hr>\n<p>in the old days, because batchnom were not invented, there is problem of diminishing gradients. Hence you insert auxiliary loss to back-propagates gradients from the middle.</p>\n<p>for today when the model is too strong (like transformer), there is little gradients from the top because you have almost zero loss. in this case you can make the problem more difficult (i,e, larger loss, more gradient) by asking the model to make prediction using only up the intermediate layers</p>\n<p><a href=\"https://discuss.pytorch.org/t/how-to-implement-deeply-supervised-network/6203\" target=\"_blank\">https://discuss.pytorch.org/t/how-to-implement-deeply-supervised-network/6203</a><br>\n <img src=\"https://discuss.pytorch.org/uploads/default/original/2X/f/f3722aaedf882e62f17b316805f8170ddaada1e2.png\" alt=\"https://discuss.pytorch.org/uploads/default/original/2X/f/f3722aaedf882e62f17b316805f8170ddaada1e2.png\">  </p>\n<hr>\n<p>in either case, the results will be a smoother loss landscape and better generalization (less over fitting)</p>",
          "votes": 4,
          "replies": []
        },
        {
          "id": 1945817,
          "author_name": "Saharsh Barve",
          "author_url": "",
          "post_date": "2022-09-19T12:23:26.220000",
          "content": "<p>Thanks for providing these resources. I was able to implement it. Wanted to ask one more question.<br>\nCan I change the aux loss in b/w training? For example, take from some layer for first few epochs and then shift taux loss o other layer?<br>\nIs this logically sound? </p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1913583,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-08-25T11:38:02.543000",
      "content": "",
      "votes": 1,
      "replies": [
        {
          "id": 1915206,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-08-26T18:36:03.570000",
          "content": "",
          "votes": 2,
          "replies": []
        },
        {
          "id": 1915239,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-08-26T19:30:35.650000",
          "content": "",
          "votes": 2,
          "replies": []
        },
        {
          "id": 1915524,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-08-27T03:39:38.053000",
          "content": "",
          "votes": 2,
          "replies": []
        },
        {
          "id": 1916122,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-08-27T16:42:30.957000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1916225,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-08-27T17:54:10.513000",
          "content": "",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1928606,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-09-06T14:33:45.277000",
          "content": "",
          "votes": 2,
          "replies": []
        },
        {
          "id": 1934332,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-09-11T10:03:42.077000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1956628,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-09-26T14:33:43.570000",
          "content": "",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1894634,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-08-11T16:15:13.340000",
      "content": "",
      "votes": 1,
      "replies": [
        {
          "id": 1895039,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-08-11T22:18:50.817000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1895217,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-08-12T02:58:34.540000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1895333,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-08-12T04:44:16.117000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1895557,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-08-12T08:07:21.617000",
          "content": "",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 1892293,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-08-10T02:44:40.460000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 1884297,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-08-04T11:23:29.320000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 1881609,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-08-02T16:55:48.750000",
      "content": "",
      "votes": 1,
      "replies": [
        {
          "id": 1881638,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-08-02T17:14:45.957000",
          "content": "",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1870257,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-07-25T12:18:51.173000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 1869703,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-07-25T01:45:06.240000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 1865226,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-07-21T16:32:11.620000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 1859177,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-07-17T13:07:39.137000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 1858588,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-07-17T03:42:11.870000",
      "content": "",
      "votes": 1,
      "replies": [
        {
          "id": 1859753,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-07-17T23:41:53.967000",
          "content": "",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 1831210,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-06-24T03:33:15.350000",
      "content": "",
      "votes": 1,
      "replies": [
        {
          "id": 1831220,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-06-24T03:47:45.427000",
          "content": "",
          "votes": 5,
          "replies": []
        },
        {
          "id": 1831231,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-06-24T04:15:57.593000",
          "content": "",
          "votes": 5,
          "replies": []
        },
        {
          "id": 1869407,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-07-24T18:20:56.437000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1869418,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-07-24T18:30:08.850000",
          "content": "",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1914582,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-08-26T07:45:52.507000",
      "content": "",
      "votes": 2,
      "replies": [
        {
          "id": 1914866,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-08-26T13:45:04.017000",
          "content": "",
          "votes": 2,
          "replies": []
        }
      ]
    },
    {
      "id": 1904239,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-08-18T04:19:16.057000",
      "content": "",
      "votes": 2,
      "replies": [
        {
          "id": 1904774,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-08-18T13:23:27.900000",
          "content": "",
          "votes": 3,
          "replies": []
        },
        {
          "id": 1906613,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-08-20T04:32:25.883000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1906622,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-08-20T04:43:13.657000",
          "content": "",
          "votes": 3,
          "replies": []
        },
        {
          "id": 1911522,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-08-24T06:36:15.187000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1911770,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-08-24T09:51:08.037000",
          "content": "",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 1896619,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-08-13T01:46:22.917000",
      "content": "",
      "votes": 2,
      "replies": [
        {
          "id": 1911194,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-08-24T00:59:42.287000",
          "content": "",
          "votes": -1,
          "replies": []
        },
        {
          "id": 1911354,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-08-24T03:37:08.287000",
          "content": "",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1911368,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-08-24T03:57:35.370000",
          "content": "",
          "votes": 3,
          "replies": []
        },
        {
          "id": 1911383,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-08-24T04:14:16.963000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1911519,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-08-24T06:33:40.193000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1911521,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-08-24T06:34:20.737000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1911528,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-08-24T06:48:04.060000",
          "content": "",
          "votes": 3,
          "replies": []
        },
        {
          "id": 1911543,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-08-24T07:02:40.067000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1925954,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-09-04T12:52:45.887000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1934368,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-09-11T10:25:13.417000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1934730,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-09-11T14:52:04.807000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1935283,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-09-12T02:11:44.317000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1936044,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-09-12T13:30:34.113000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1939342,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-09-14T16:32:11.783000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1939678,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-09-14T23:03:04.690000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1939729,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-09-15T01:23:29.680000",
          "content": "",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1940119,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-09-15T07:32:30.450000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1942865,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-09-17T05:41:58.630000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1942873,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-09-17T05:51:32.980000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1942877,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-09-17T05:53:28.203000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1943582,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-09-17T16:10:53.370000",
          "content": "",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1893249,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-08-10T16:48:48.040000",
      "content": "",
      "votes": 2,
      "replies": []
    },
    {
      "id": 1893007,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-08-10T13:40:23.807000",
      "content": "",
      "votes": 2,
      "replies": []
    },
    {
      "id": 1891347,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-08-09T11:17:35.940000",
      "content": "",
      "votes": 2,
      "replies": [
        {
          "id": 1891374,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-08-09T11:41:55.003000",
          "content": "",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 1878169,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-07-31T09:32:25.707000",
      "content": "",
      "votes": 2,
      "replies": [
        {
          "id": 1878174,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-07-31T09:42:08.567000",
          "content": "",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1877641,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-07-30T21:33:03.980000",
      "content": "",
      "votes": 2,
      "replies": [
        {
          "id": 1879848,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-08-01T09:49:25.777000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1879884,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-08-01T10:31:37.917000",
          "content": "",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 1877258,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-07-30T13:09:15.477000",
      "content": "",
      "votes": 2,
      "replies": []
    },
    {
      "id": 1871615,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-07-26T11:22:52.167000",
      "content": "",
      "votes": 2,
      "replies": []
    },
    {
      "id": 1861404,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-07-19T02:17:05.947000",
      "content": "",
      "votes": 2,
      "replies": []
    },
    {
      "id": 1914883,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-08-26T14:04:25.753000",
      "content": "",
      "votes": 1,
      "replies": []
    },
    {
      "id": 1832019,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-06-24T15:45:58.667000",
      "content": "",
      "votes": 2,
      "replies": [
        {
          "id": 1881003,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-08-02T07:21:27.157000",
          "content": "",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1938689,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-09-14T09:46:31.067000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1872994,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-07-27T11:18:27.407000",
      "content": "",
      "votes": 1,
      "replies": [
        {
          "id": 1873014,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-07-27T11:36:55.443000",
          "content": "",
          "votes": 2,
          "replies": []
        },
        {
          "id": 1884114,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-08-04T09:53:54.807000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1884158,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-08-04T10:25:07.423000",
          "content": "",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 1839900,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-07-01T19:37:48.137000",
      "content": "",
      "votes": 1,
      "replies": [
        {
          "id": 1858204,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-07-16T18:29:24.793000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1859549,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-07-17T17:50:26.980000",
          "content": "",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1861351,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-07-19T01:32:42.170000",
          "content": "",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1861671,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-07-19T06:53:10.643000",
      "content": "",
      "votes": -5,
      "replies": [
        {
          "id": 1862820,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-07-20T03:17:35.183000",
          "content": "",
          "votes": 11,
          "replies": []
        }
      ]
    },
    {
      "id": 1873994,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-07-28T02:23:49.437000",
      "content": "",
      "votes": -1,
      "replies": []
    },
    {
      "id": 1951803,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-09-23T08:53:58.850000",
      "content": "",
      "votes": 0,
      "replies": [
        {
          "id": 1951938,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-09-23T10:48:21.650000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1952901,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-09-24T04:13:19.787000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1952903,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-09-24T04:16:22.973000",
          "content": "",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1952910,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-09-24T04:23:26.427000",
          "content": "",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1951493,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-09-23T05:21:07.223000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1949163,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-09-21T14:45:13.070000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1940951,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-09-15T16:55:15.010000",
      "content": "",
      "votes": 0,
      "replies": [
        {
          "id": 1941364,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-09-16T01:51:45.743000",
          "content": "",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1941366,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-09-16T01:53:00.580000",
          "content": "",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1941937,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-09-16T10:55:37.257000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1943602,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-09-17T16:28:45.890000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1943682,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-09-17T17:32:34.460000",
          "content": "",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1937356,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-09-13T12:46:09.070000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1935317,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-09-12T03:01:19.697000",
      "content": "",
      "votes": 0,
      "replies": [
        {
          "id": 1938756,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-09-14T10:49:47.463000",
          "content": "",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1939031,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-09-14T13:46:35.703000",
          "content": "",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1930925,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-09-08T10:47:44.067000",
      "content": "",
      "votes": 0,
      "replies": [
        {
          "id": 1930928,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-09-08T10:53:13.093000",
          "content": "",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1931138,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-09-08T13:23:00.467000",
          "content": "",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1930900,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-09-08T09:59:41.610000",
      "content": "",
      "votes": 0,
      "replies": [
        {
          "id": 1930909,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-09-08T10:23:54.210000",
          "content": "",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1930911,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-09-08T10:28:01.167000",
          "content": "",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1946640,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-09-20T01:37:18.400000",
          "content": "",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1928953,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-09-06T18:02:28.620000",
      "content": "",
      "votes": 0,
      "replies": [
        {
          "id": 1930133,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-09-07T15:25:32.487000",
          "content": "",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1914865,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-08-26T13:43:35.550000",
      "content": "",
      "votes": 0,
      "replies": [
        {
          "id": 1914901,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-08-26T14:18:43.463000",
          "content": "",
          "votes": 3,
          "replies": []
        }
      ]
    },
    {
      "id": 1913542,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-08-25T11:03:17.670000",
      "content": "",
      "votes": 0,
      "replies": [
        {
          "id": 1913896,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-08-25T15:06:00.447000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1914034,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-08-25T17:09:12.380000",
          "content": "",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1911581,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-08-24T07:29:00.590000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1908381,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-08-21T15:52:43.073000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1904622,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-08-18T10:59:54.427000",
      "content": "",
      "votes": 0,
      "replies": [
        {
          "id": 1904773,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-08-18T13:22:40.550000",
          "content": "",
          "votes": 3,
          "replies": []
        },
        {
          "id": 1906156,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-08-19T16:24:53.963000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1906593,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-08-20T03:19:16.543000",
          "content": "",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1904256,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-08-18T04:51:53.503000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1903807,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-08-17T17:00:55.527000",
      "content": "",
      "votes": 0,
      "replies": [
        {
          "id": 1903892,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-08-17T18:18:25.457000",
          "content": "",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1904159,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-08-18T02:27:22.807000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1904166,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-08-18T02:36:58.237000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1908931,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-08-22T06:39:23.547000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1908951,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-08-22T06:53:18.780000",
          "content": "",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1908958,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-08-22T07:00:44.003000",
          "content": "",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1908991,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-08-22T07:39:34.140000",
          "content": "",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1903376,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-08-17T11:24:13.840000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1903332,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-08-17T10:15:44.777000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1903092,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-08-17T05:15:24.900000",
      "content": "",
      "votes": 0,
      "replies": [
        {
          "id": 1925502,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-09-04T03:04:30.893000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1930377,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-09-07T19:44:32.647000",
          "content": "",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 1897281,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-08-13T16:02:57.457000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1896239,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-08-12T17:22:47.380000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1894597,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-08-11T15:40:44.293000",
      "content": "",
      "votes": 0,
      "replies": [
        {
          "id": 1894624,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-08-11T16:04:46.817000",
          "content": "",
          "votes": 4,
          "replies": []
        }
      ]
    },
    {
      "id": 1887778,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-08-07T03:03:38.020000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1887743,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-08-07T01:43:55.243000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1887169,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-08-06T13:30:21.753000",
      "content": "",
      "votes": 0,
      "replies": [
        {
          "id": 1887746,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-08-07T01:57:57.710000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1887767,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-08-07T02:45:14.560000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1887772,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-08-07T02:51:21.117000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1887774,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-08-07T02:56:28.790000",
          "content": "",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1883056,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-08-03T15:03:16.480000",
      "content": "",
      "votes": 0,
      "replies": [
        {
          "id": 1883679,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-08-04T02:36:34.280000",
          "content": "",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1879784,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-08-01T09:02:54.570000",
      "content": "",
      "votes": 0,
      "replies": [
        {
          "id": 1879847,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-08-01T09:49:06.380000",
          "content": "",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1879713,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-08-01T08:02:20.883000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1877715,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-07-31T00:23:25.383000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1877635,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-07-30T21:21:56.853000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1875228,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-07-28T19:42:24.417000",
      "content": "",
      "votes": 0,
      "replies": [
        {
          "id": 1875237,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-07-28T19:57:28.773000",
          "content": "",
          "votes": 2,
          "replies": []
        },
        {
          "id": 1875809,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-07-29T10:04:01.260000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1876954,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-07-30T07:50:31.037000",
          "content": "",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1886204,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-08-05T16:23:57.310000",
          "content": "",
          "votes": 2,
          "replies": []
        },
        {
          "id": 1886617,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-08-06T03:24:11.167000",
          "content": "",
          "votes": 2,
          "replies": []
        },
        {
          "id": 1886618,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-08-06T03:25:41.360000",
          "content": "",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1924713,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-09-03T10:20:38.077000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1924870,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-09-03T13:28:57.753000",
          "content": "",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 1869213,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-07-24T15:22:39.403000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1864524,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-07-21T05:36:38.910000",
      "content": "",
      "votes": 0,
      "replies": [
        {
          "id": 1866960,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-07-22T22:18:22.180000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1867533,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-07-23T09:56:11.887000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1867540,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-07-23T10:05:40.727000",
          "content": "",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1867848,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-07-23T14:46:43.040000",
          "content": "",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1870184,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-07-25T10:59:34.343000",
          "content": "",
          "votes": 4,
          "replies": []
        },
        {
          "id": 1871826,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-07-26T13:56:15.437000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1959908,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-09-28T11:35:55.013000",
          "content": "",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1863895,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-07-20T15:23:43.003000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1945984,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-09-19T14:41:52.717000",
      "content": "",
      "votes": 0,
      "replies": [
        {
          "id": 1946894,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-09-20T06:50:48.333000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1948423,
          "author_name": "",
          "author_url": "",
          "post_date": "2022-09-21T04:19:31.503000",
          "content": "",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1928904,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-09-06T17:20:33.317000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1883718,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-08-04T03:38:32.907000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1879793,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-08-01T09:11:00.603000",
      "content": "",
      "votes": -1,
      "replies": []
    },
    {
      "id": 1889296,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-08-08T05:55:22.713000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1886151,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-08-05T16:06:35.417000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1886002,
      "author_name": "",
      "author_url": "",
      "post_date": "2022-08-05T13:57:20.580000",
      "content": "",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1831209": "\n\"All experiment results are only made possible by the Z8 by HP workstation with 2x A6000 48GB Nvidia GPU cards. With fast and large GPU cards, you can enjoy designing models and sleep early without worrying about out-of-memory errors :) \"\n\nㅤ ㅤ\n-------\n\nㅤ ㅤ\n\nThis is work in progress.  results will be updated as and when experiments  complete !!! \nIt has two parts:\n\n**1) benchmaking current solutions**\n\n![https://i.ibb.co/6nf8dDD/Picture1.png](https://i.ibb.co/6nf8dDD/Picture1.png)\n![https://i.ibb.co/JHdsCw0/Selection-081.png](https://i.ibb.co/JHdsCw0/Selection-081.png)\n\nㅤ ㅤ\n\n**2) progress report of my method (which hopefully will work)**\nㅤ ㅤ\n\n\n\nmy approach follows the NLP method:\n1. collect many stains of PAS, H&E, DAB/H of the target organs (external data)\n2. select a image transformer model for segmentation\n3. pretrain with unsupervised learning (e.g. masked patch prediction, aka 2d image token)\n4. finetune with few-shot supervised learning (kaggle train data + some hand-label data (mainly for  DAB/H  stain) )\nㅤ ㅤ\n5. lower priority:\n\nif I got time, maybe I can explore using pretrain transformer + GAN/diffusion model to generate more data.\nㅤ ㅤ\n\n---\n\n\nreference paper:\n\n[1] BEiT: BERT Pre-Training of Image Transformers\nhttps://openreview.net/pdf?id=p-BhZSz59o4\nhttps://www.bilibili.com/video/BV1PF411z7mf/\n ㅤ\n\n[2] Self-Supervised Pre-Training of Swin Transformers for 3D Medical Image Analysis\nhttps://arxiv.org/pdf/2111.14791.pdf\n\n\n",
    "1871062": "surprise!!!!\n\nthe winner is 5-fold segformer-mit-b2 with CV=0.787, LB=0.78.\nThe model size is only 99mb.\n\nI haven't investigate the reasons, but I think it could be:\n- use of mix upsample (see discussion below)\n- I use many, many iterations for training  ... it don't over fit up to 400 epoch\n- swa over a larger epoch\n- MIT uses no positional encoding at all (no absolute or relative)\n- MIT model I used is not complex (see imagenet and ADEK20 performance)",
    "1832268": "how many hubmap images are there in the test set:\n\n![https://i.ibb.co/P5hNDrb/Selection-029.png](https://i.ibb.co/P5hNDrb/Selection-029.png)\n\n\nwe know:\n - public test : 55% of the test data, private test = 45%\n - roughly 550 test images \n - public test : Hubmap+HPA, private test = Hubmap only\n\n```\n\nnum_hubmap = len(test_df[test_df.data_source=='Hubmap'])\nnum_hpa = len(test_df[test_df.data_source=='HPA'])\nnum = len(test_df)\n\nif num_hubmap > int(0.90*num):\n    submit_df.to_csv('submission.csv',index=False)\n\n```\n\n---\n\nsmarter way to probe without wasting submission slot\n\n```\n# some task which you already know the notebook running time\n\nsleep (num_hubmap*10_min)\n\n#you can deduce value of num_hubmap from additional running time\n```\n\n```\n# some  monotnic function that you already know\n    if (num>   0) and (num<=545): threshold =-1  #lb 0.3+  (submit all filled rle)\n    if (num>=546) and (num<=546): threshold =0.3 #lb 0.56\n    if (num>=547) and (num<=547): threshold =0.4 #lb 0.54\n    if (num>=548) and (num<=548): threshold =0.5 #lb 0.52\n    if (num>=549) and (num<1000): threshold =100 #lb 0.00 (submit all empty rle)\n\n \n#you can deduce value of num  from lbscore\n```",
    "1930370": "if you like my work and would like to learn how to apply 3d transformer for 3d ct scan classification, please follow\nhttps://www.kaggle.com/competitions/rsna-2022-cervical-spine-fracture-detection/discussion/350859\n\ni will modify many of the 2d vit used here (e.g. mix-trasnformer, PVTv2,coat) for 3d",
    "1894487": "Thanks for your wonderful sharing as always 😃.  I have just tried your upernet with swin-tiny and got 0.79 cv, but the lb score is only 0.61. Do I miss anything important? @hengck23 ",
    "1869702": "i put code for upernet + swin transformer v2 for variable image size input at: \nhttps://www.kaggle.com/code/hengck23/lb-0-75-variable-size-swin-transformer-v1-and-v2\n\nthis is beta release. using provided upernet+swin v1 (or v2) will get you about LB 0.75 (15 min submission time).\nplan:\n- ~~ release of my training log, hyperprameters, experimental results~~ [done]\n- modification to use UN-MAE, uniform masked autoencoder, for SSL pertaining with unlabelled data\n(https://github.com/implus/UM-MAE)\n\nit would be faster for me if anyone can upload and share their downloaded images from HPA, etc",
    "1951249": "seems that i select the wrong submission\n<a href=\"https://ibb.co/1Q1wxDb\"><img src=\"https://i.ibb.co/MSr3LY9/Selection-317.png\" alt=\"Selection-317\" border=\"0\"></a>\n\ninteresting:\n- i correctly predicted the highest public LB score\n- i correctly predicted the shakeup\n- i correctly dreamt of my ranking and medal (just one off the gold medal) just the day before\n",
    "1833464": "my first baseline at public LB 0.56\n\none fold only:\n\ntrain_dataset : \n- len = 280\n -  kidney  81 (0.289) \n -  prostate  72 (0.257) \n -  largeintestine  47 (0.168) \n -  spleen  46 (0.164) \n -  lung  34 (0.121) \n\nvalid_dataset : \n- len = 71\n -  kidney  18 (0.254) \n -  prostate  21 (0.296) \n -  largeintestine  11 (0.155) \n -  spleen   7 (0.099) \n -  lung  14 (0.197) \n\n![https://i.ibb.co/sQmXBwB/Selection-047.png](https://i.ibb.co/sQmXBwB/Selection-047.png)",
    "1831307": "I love your threads :-) especially the \"my experiment results\" one , It's like a story of how research and experiments should be. \nGreat work :-) \n",
    "1925481": "this is a nice paper to read. i think some of the conclusion also applies to this kaggle competition according to my results:\nhttps://www.arxiv-vanity.com/papers/2201.08683/\nA Comprehensive Study of Vision Transformers on Dense Prediction Tasks\n\n\n\nWe studied different aspects of VTs and CNNs as feature extractors for object detection and semantic segmentation on challenging and real-world data. The main results and key insights derived from our experiments are as follows:\n\n-  VTs outperform CNNs in in-distribution dataset while having lower inference speed, but less computational complexity. Hence, if the GPUs are optimized for Transformer architectures, they have the potential to become dominant in computer vision.\n\n-  VTs generalize better to OOD datasets. Our loss landscape analysis shows that VTs converge to flatter minima compared to CNNs, which can explain their generalizability.\n\n\n-  VTs are more robust to natural corruptions and adversarial attacks compared to CNNs. We believe that this could be attributed to the global receptive field as well as the dynamic nature of self-attention.\n\n-  VTs are less-texture biased than CNNs, which can be attributed to their global receptive field, allowing them to focus better on global shape-based cues as opposed to local texture-based cues.\n",
    "1921312": "are you stuck at 0.80?\n- build better model, augmentation, etc  \n\nare you stuck at 0.81?\n- build better resolution  \n- some fold are better than other (i.e. some training images are better). try different random seeds, weigh more on some fold, etc ...  \nsubmit for certain folds ...\nWARNING!!!! this may overfit to lb public test and lb private test\n\n\nare you stuck at 0.82?\n- maybe  the best fold \"changes with score\" \n- maybe  the best threshold  \"changes with score\" \n\n... adjust accordingly\n\n---\n\nnote:\nlb-HPA is always in 0.21 to 0.22\nlb-Hubmap stops at 0.60 (even at lb 0.83)",
    "1907670": "this is what every kaggler should know\n\n\"This a question that comes up all the time in machine learning: How well can we do with the data we have? Even when we have a result, it can be hard to tell if it's a good result. What more could we do with better approaches? Or are we already close to the upper bound?\"\n\nlink:   \nhttps://drivendata.co/blog/aleatoric-limit1  \nhttps://drivendata.co/blog/aleatoric-limit2\n\n\ni thing kaggle can have a blog to invite kagglers to make post like this.\ngood post will be given free TPU/GPU hours etc.\n\nthis is not the same as notebook as this focus on content rather than code",
    "1882428": "look what i have found\n![https://i.ibb.co/0X3dDs4/Selection-171.png](https://i.ibb.co/0X3dDs4/Selection-171.png)",
    "1874042": "one free trick for all:\n\n![https://i.ibb.co/6mgvGXv/Selection-095.png](https://i.ibb.co/6mgvGXv/Selection-095.png)\n\ni haven't tried to add 2021 kaggle train data yet (kidney and large intestine). i also expect some improvement from there\n\n---\n\nwe now enter phrase 2 of the competition: from 0.80 to ~0.83\n\n- it is now the battle of external data, SSL masked pertaining, unlabelled learning ... weak/self/semi-supervised, domain adaption, ...",
    "1945022": "@hengck23 - Your experience of coat-small (+- parallel) with 1x1 daformer outperforming the medium model with 3x3 - is this purely because you are able to train the small model at a higher resolution than medium, or do you think the smaller model is genuinely better? I ask because I believe segformer b3 as an encoder outperforms b5 on this dataset even at higher resolutions.",
    "1952700": "with both the private and public score revealed, i discover something interesting.\n\ni made a bug by loading a mitb6 encoder with a trained mit5 model at submission inference. this means that  only the early layer are loaded and the unloaded weights are randomly initialized. However the performer is better then loading the correct model. at first i thought this is better \"by chance\". but now both private and public scores actually improved, meaning that improvement are not \"by chance\".\n\nfor those that are doing research and writing paper, you may want to investigate on this. it seems possible just to \"perturb from train optimum (esp on just upper layers)\" and get better validation results.\n\ni also note that transformer is trained with drop path and \"residual add\" in FF and attention block enforces learning to get residual=0",
    "1951265": "my 13-th place solution: public 0.83, private: 0.81~0.82\nhttps://www.kaggle.com/code/hengck23/lb0-83-submit/edit/run/104911483\n```\norgan_threshold = { \n    'Hubmap': { \n        'kidney' : 0.28, \n        'prostate' : 0.28, \n        'largeintestine': 0.28, \n        'spleen' : 0.28, \n        'lung' : 0.05, \n    }, \n    'HPA': { \n        'kidney' : 0.50, \n        'prostate' : 0.50, \n        'largeintestine': 0.50, \n        'spleen' : 0.50, \n        'lung' : 0.10, \n    }, \n}\n\nmodel = [ \n    dotdict( #[1]\n        is_use=1,\n        image_size=1024,\n        module='model_pvt_v2_daformer',\n        param={'encoder': pvt_v2_b4_level5, 'decoder': daformer_conv3x3, },\n        checkpoint=[\n            '../input/hubmap-submit-06-weight0/pvt_v2_b4_level5-daformer_conv3x3-aug5b-1024-fold-3-swa.pth',\n            '../input/hubmap-submit-06-weight0/pvt_v2_b4_level5-daformer_conv3x3-aug5b-1024-fold-2-swa.pth', \n            '../input/hubmap-submit-06-weight0/pvt_v2_b4_level5-daformer_conv3x3-aug5b-1024-fold-1-swa.pth',\n            \n            #'../input/hubmap-submit-06-weight0/pvt_v2_b4_level5-daformer_conv3x3-aug5b-1024-fold-4-swa.pth',\n             \n        ],\n    ),\n    dotdict(#[2]\n        is_use = 1,\n        image_size = 1536,\n        module = 'model_coat_daformer',\n        param={'encoder': coat_parallel_small_level5, 'decoder':daformer_conv1x1},\n        checkpoint = [ \n            '../input/hubmap-submit-06-weight0/coat_parallel_small_level5-daformer_conv1x1-aug8b-1536-fold-3-swa.pth',\n            '../input/hubmap-submit-06-weight0/coat_parallel_small_level5-daformer_conv1x1-aug8b-1536-fold-2-swa.pth', \n            '../input/hubmap-submit-06-weight0/coat_parallel_small_level5-daformer_conv1x1-aug8b-1536-fold-1-swa.pth',\n            \n            #'../input/hubmap-submit-06-weight0/coat_parallel_small_level5-daformer_conv1x1-aug8b-1536-fold-4-swa.pth', \n            #'../input/hubmap-submit-06-weight0/coat_parallel_small_level5-daformer_conv1x1-aug8b-1536-fold-0-swa.pth',  \n        ],\n    ),\n \n    \n    dotdict( #[3]\n        is_use=1,\n        image_size=1536,\n        module='model_effnet_smp_unet',\n        param={'encoder': tf_efficientnet_b6, 'decoder': smp_unet},  \n        checkpoint=[\n            '../input/hubmap-submit-06-weight0/tf_efficientnet_b6-unet-aug8b-1536-fold-3-swa.pth', \n            '../input/hubmap-submit-06-weight0/tf_efficientnet_b6-unet-aug8b-1536-fold-2-swa.pth',\n            '../input/hubmap-submit-06-weight0/tf_efficientnet_b6-unet-aug8b-1536-fold-1-swa.pth',\n        ],\n    ),\n    dotdict(#[4]\n        is_use = 1,\n        image_size = 768,\n        module = 'model_dualvit_daformer',\n        param={'encoder': dual_vit_b, 'decoder':daformer_conv3x3},\n        checkpoint = [\n             '../input/hubmap-submit-06-weight0/dual_vit_b-daformer_conv3x3-aug8-768-fold-3-swa.pth',\n             '../input/hubmap-submit-06-weight0/dual_vit_b-daformer_conv3x3-aug8-768-fold-2-swa.pth', \n             '../input/hubmap-submit-06-weight0/dual_vit_b-daformer_conv3x3-aug8-768-fold-1-swa.pth',\n             \n             #'../input/hubmap-submit-06-weight0/dual_vit_b-daformer_conv3x3-aug8-768-fold-4-swa.pth',\n        ],\n    ), \n\n    \n    dotdict(#[5]\n        is_use=1,\n        image_size=1280,\n        module='model_convnext_smp_unet',\n        param={'encoder': convnext_large_384_in22ft1k, 'decoder': smp_unet},   \n        checkpoint=[\n            '../input/hubmap-submit-06-weight0/convnext_large_384_in22ft1k-smp_unet-aug8b-1280-fold-3-swa.pth',\n            '../input/hubmap-submit-06-weight0/convnext_large_384_in22ft1k-smp_unet-aug8b-1280-fold-2-swa.pth',\n            '../input/hubmap-submit-06-weight0/convnext_large_384_in22ft1k-smp_unet-aug8b-1280-fold-1-swa.pth',\n            \n            #'../input/hubmap-submit-06-weight0/convnext_large_384_in22ft1k-smp_unet-aug8b-1280-fold-4-swa.pth',\n        ],\n    ), \n    \n \n \n      dotdict(\n        is_use=1,\n        image_size=768,\n        module='model_pvt_v2_daformer',\n        param={'encoder': pvt_v2_b4, 'decoder': daformer_conv3x3},   \n        checkpoint=[\n            #'../input/hubmap-submit-06-weight1/pvt_v2_b4-aug8b-768-different-seed-fold-0-swa.pth', #0.78\n            '../input/hubmap-submit-06-weight1/pvt_v2_b4-aug8b-768-different-seed-fold-1-swa.pth', # 0.80\n            #'../input/hubmap-submit-06-weight1/pvt_v2_b4-aug8b-768-different-seed-fold-2-swa.pth', #0.79 \n        ],\n    ),\n\n```\n\nyou will get private score 0.81 to 0.82 depending on how you select the base models (e.g. remove comment #)",
    "1948830": "Thanks for everything @hengck23. Learned a lot from this topic. Hope to you see on Mayo Clinic competition...",
    "1883676": "best backbone for segformer\nhttps://openaccess.thecvf.com/content/CVPR2022/papers/Gu_Multi-Scale_High-Resolution_Vision_Transformer_for_Semantic_Segmentation_CVPR_2022_paper.pdf\n\n![https://i.ibb.co/7XpM0P3/Selection-176.png](https://i.ibb.co/7XpM0P3/Selection-176.png)",
    "1880720": "another paper improving segformer\n![https://i.ibb.co/4jmKVFK/Selection-135.png](https://i.ibb.co/4jmKVFK/Selection-135.png)",
    "1907339": "i realize i made a mistake. i have been computing dice validation dice at train size of 3000.\nBut there are image with pixel size less than 0.4 um, i.e. these images are \"much larger\". hence the dice for these hidden test images (largeintestine) are worse than your local results.\n\nhence size 768 seem to be sufficient for most organ, it may be too small for largeintestine. if you are using 768 for largeintestine, you need a better enlarging mask method (rather than just bilinear upscale)\n\nit is for this reason, using larger image input like 1024, 1280, 1536 improves LB scores.\n\nhere are the LB scores(single fold):\n\nLB 0.81\n- input = 1536\n- augmentation = more + staintool + downsize/upsize for prostate 6 um\n- COAT-parallel small (5 level)\n\nLB 0.80\n- input = 1024\n- augmentation = more \n- COAT-parallel small (5 level)\n\nLB 0.79\n- input = 768\n- augmentation = more \n- COAT-parallel small (4 level)\n\n1536 already max out my GPU.  \nto go to 2048, i either need to 4x overlap 1536 tiles or single image using gradient check.\n\nmaybe i need to rewrite the code using\nhttps://openaccess.thecvf.com/content/CVPR2022/papers/Mangalam_Reversible_Vision_Transformers_CVPR_2022_paper.pdf\n\n\"Reversible Vision Transformers achieve a reduced memory\nfootprint of up to 15.5× at identical model complexity, parameters and accuracy,\" ",
    "1870978": "as shown in the CV-LB graph at the top, all my CV-HPA, LB-HPA,LB-Hubmap,LB-public has converged!\nI was right that the upper limit is about 0.80 without external data.\n\nthis could be the bronze medal limit after 2 months\n\n---\n\nI choose a variety of encoder, decoder, optimizer. These are not chosen at random but target at the root of problems",
    "1867021": "what is the normalized size of hidden test images?\n\nin order to apply transformer segmentation, i need to have a rough ideal of the max and min input size of the test image.\n(i need to decide absolute/relative positional encoding, token patch size ....)\nhence i do a probe.\n\nthe results: all test image are within 0.8 to 1.2 of normalized size.\n\n```\n    test_df = pd.read_csv('../input/hubmap-organ-segmentation/test.csv')\t\t\t\t\t\t\n    test_df.loc[:,'norm_size']= test_df.pixel_size/0.4 * test_df.img_height/3000 \t\t\t\t\t\t\n    \t\t\t\t#assume img_height==img_width\t\t\n    max_norm_size = test_df.norm_size.max()\t\t\t\t\t\t\n    min_norm_size = test_df.norm_size.min()\t\t\t\t\t\t\n\n```\n\nbelow two conditions are probed true:\n\n```    \nif (min_norm_size>=0.8) and (min_norm_size<1.0): \nif (max_norm_size>=1.0) and (max_norm_size<1.2):  \n```\n\nnote we can also deuce that smallest 160x160 test images mentioned refer to prostate\nimages with pixel size 6.2630  um. (you should do resize artifacts augmentation for this case in training)\n\nlargest 4500x4500 test image refer to large intestine with pixel size 0.229  um",
    "1864027": "maybe this also works for our problem: labelled kaggle train images + unlabelled download external data\n\nhttps://www.youtube.com/watch?v=FTmvdARsbnI\nMedAI Session 25: Training medical image segmentation models with less labeled data | Sarah Hooper",
    "1881977": "you may think that the results of Hunmap are inferior to that of HPA because of colors of the stains.\nBut this may not be true.\n\nYou can verify this by  changing the color of your validation HPA stains (e.g. HSV shift, convert to gray, stain color transfer) and compare with results of the original colored HPA images. You should see similar relative performance in your Lb-HPA and Lb-Humap score.\n\nLikewise for other factors like pixel size in um, slice thickness, resolution, etc ...\n\n---\n\nHubmap are real lab tissue slides. there are many more issues, see below.\nthis is left as an exercise for you: \"how to prove that if these issues actually exist in the hidden test set?\"\n\n\n![https://i.ibb.co/DgTsVxk/Selection-164.png](https://i.ibb.co/DgTsVxk/Selection-164.png)\n\n---\n\neven if these issues does not exist in the hidden test set, it will still boost your chance in the \"Judges prizes\" if analysis and results are presented to show your robustness of your model against real artifacts.\n\n---\n\non a side note, when i develop commercial computer vision model for by clients, \"black box\" testing is common. We do not see the test set at all. What we know is the feedback of the results (e.g. score against other bidding vendors, competitor products). So we have devised a way to fault find the issues even if we do not see the images. e.g.\n\n- using auto-encoders, etc to measure out-of distributions from your train set\n- apply your model on large test set (including out of distributions). train a classifier to classify the type of errors. then you can map error to input image.\n\n---\n\nexternal data may not help you to detect more FTU, but they are definitely of great help to remove false positive and show your model weakness and issues\n\n---\n\nthe score of LB-hubmap-public and LB-hubmap-private may be closer then what your think (i.e. little shakeup). it is likely that a sample tissues has many cropped slide samples. They are then split between public and private set.",
    "1875484": "beware!!!!\n\nthe distribution of the organ in Hubmap is not what you think\n\n![https://i.ibb.co/k9FBv0V/Selection-136.png](https://i.ibb.co/k9FBv0V/Selection-136.png)\n ",
    "1870646": "i realise one very important note:\n- you should make post submission to last year competition using your current model to see your domain shift ",
    "1858202": "update of results LB 0.72:\n![https://i.ibb.co/rmnSNH0/Selection-060.png](https://i.ibb.co/rmnSNH0/Selection-060.png)",
    "1951266": "I've learned a lot things from your post and comments. I deeply thank you very much for sharing your experiments and results that are very insightful and helpful.",
    "1937218": "Hello,\nCould anyone help me understand what aux-loss means? Is it like a supportive loss function for organ type classification? Any notebook/snippet I can refer to?\n",
    "1913583": "if you are using my code, beware!!!!\n<a href=\"https://ibb.co/PZbZVk7\"><img src=\"https://i.ibb.co/7JTJ0hw/Selection-083.png\" alt=\"Selection-083\" border=\"0\"></a>\n\nthe simple fusion of the different levels uses upscale of 4x, 8x, 16x, 32x\nit is obvious that it causes the prediction to be blocky.\n(despite the blocky head, LB is still 0.82 after ensemble)\n\ni need a better decoder head ",
    "1894634": "one possible replacement for segformer\n (they are a few more to come later ...)\n\n ![https://i.ibb.co/3s93QwN/Selection-075.png](https://i.ibb.co/3s93QwN/Selection-075.png)\nfor model, refer to https://www.kaggle.com/code/hengck23/lb-0-78-coat-and-simple-3x3-conv-fusion\nweights/training are not shared",
    "1892293": "oh, interactive segformer!\nSegFormer: Interactive Segmentation via Transformerswith Application to 3D Knee MR Images\npaper: https://arxiv.org/pdf/2112.11325v6.pdf\n\nfor the use in this competition, refer to\nhttps://www.kaggle.com/competitions/hubmap-organ-segmentation/discussion/341130#1892285\n\n![https://i.ibb.co/HX2JbNq/Selection-094.png](https://i.ibb.co/HX2JbNq/Selection-094.png)",
    "1884297": " ![https://www.cs.toronto.edu/~garyleung/hila/resources/performance_graph.png](https://www.cs.toronto.edu/~garyleung/hila/resources/performance_graph.png)\nhttps://www.cs.toronto.edu/~garyleung/hila/\n\n We add HILA into SegFormer and the Swin Transformer and show notable improvements in accuracy in semantic segmentation with fewer parameters and FLOPS.",
    "1881609": "i am not sure if this would be an issue:\n![https://i.ibb.co/VxcJHrM/Selection-140.png](https://i.ibb.co/VxcJHrM/Selection-140.png)",
    "1870257": "you probably need this here (since we are dealing with shifted domain private LB data) :\n\npaper: WHEN VISION TRANSFORMERS OUTPERFORM RESNETS WITHOUT PRE-TRAINING OR STRONG DATA AUGMENTATIONS\nhttps://arxiv.org/pdf/2106.01548.pdf\n\n\"The resultant ViTs outperform ResNets of similar size and throughput when trained from scratch on ImageNet without large-scale pre-training or strong data augmentations.\"\n\ndo read the section on test on different domain: \"Better robustness. We also evaluate the models’ robustness using ImageNet-R (Hendrycks et al., 2020) and ImageNet-C (Hendrycks & Dietterich, 2019) and find even bigger impacts of the smoothed loss landscapes.\"\n\n---\n\ntake away message: it is not about early stopping .... it is about flatten your loss landscape",
    "1869703": "Adversial network perturbation works well for NLP transformer. It improve robustness (e.g. spelling errors) and score. There are many kaggle code for the recent kaggle competitions for the feedback, US-patent for it.\n\nI wonder if it also work for histology tissue images?\n\ne.g. [paper] An Adversarial Perturbation Oriented Domain Adaptation Approach for Semantic Segmentation",
    "1865226": "you can self-supervised CNN (like transformer) too!\n\npaper: Corrupted Image Modeling for Self-Supervised Visual Pre-Training\nhttps://arxiv.org/pdf/2202.03382.pdf\n\n\"ResNet-50. We demonstrate that CIM can also pre-train a high-capacity ResNet-50 model with the fewest possible\nmodifications from the ViT pre-training settings that can achieve compelling fine-tuning performances on ImageNet1K.\"",
    "1859177": "an interesting cvpr 2022 oral paper:\nSource-Free Object Detection by Learning to Overlook Domain Style\n\nSource-free object detection (SFOD) needs to adapt a detector pre-trained on a labeled source domain to a target\ndomain, with only unlabeled training data from the target domain. ...\n\n",
    "1858588": "learning threshold\n\nwhat is show: for 3 fold on validation HPA dataset\n(but what we need is similar graph on Hubmap dataset .... many probes to be made !!!)\n![https://i.ibb.co/kS8D8VM/Selection-059.png](https://i.ibb.co/kS8D8VM/Selection-059.png)",
    "1831210": "![https://i.ibb.co/74FWk8d/Selection-013.png](https://i.ibb.co/74FWk8d/Selection-013.png)\n![https://miro.medium.com/max/1172/1*kGi3P8DtXWNpSmqBSEbvSA.png](https://miro.medium.com/max/1172/1*kGi3P8DtXWNpSmqBSEbvSA.png)\nexpected improvement using pretraining transformer\nfrom: [1] BEiT: BERT Pre-Training of Image Transformers",
    "1914582": "Hello folks, I am using transformer-based approach for this task using resized data (768,768). I was wondering how should I find what is the optimal Threshold for my model for each of the organs?\n@hengck23 \nadvice would be really helpful.\nThanks! :)",
    "1904239": "in my latest LB score of 0.81 l had LB-hubmap of 0.59.\n- no external data was used\n- improvement comes from ensemble with large image model (1024x1024 as input)",
    "1896619": "yet another 0.79 model.\n\n\n![https://i.ibb.co/6FMLfv4/Selection-096.png](https://i.ibb.co/6FMLfv4/Selection-096.png)",
    "1893249": "![https://i.ibb.co/2skbhX5/Selection-069.png](https://i.ibb.co/2skbhX5/Selection-069.png)\n\ni find a way to annotate spleen images easily.\nuse gimp extract color components (CMKY yellow)",
    "1893007": "![https://i.ibb.co/djRfckn/Selection-064.png](https://i.ibb.co/djRfckn/Selection-064.png)",
    "1891347": "![https://i.ibb.co/VSvTF1d/Selection-066.png](https://i.ibb.co/VSvTF1d/Selection-066.png)\ni download random images from the internet to test the robustness of the model.\nit perform better than I thought.\n\nit is obvious that hand-correction of the prediction on unseen images is a way to go.\nneed to find more images without copyright issues",
    "1878169": "i just realised besides swin v1,v2, there is a \"version 3\"\nhttps://github.com/microsoft/CSWin-Transformer",
    "1877641": "good reading\n\nHOW DO VISION TRANSFORMERS WORK?\nhttps://arxiv.org/pdf/2202.06709.pdf\n\"MSAs are low-pass filters, but Convs are high-pass filters. Therefore, MSAs and Convs are complementary\"\n\n\nBlurs Behave Like Ensembles: Spatial Smoothings to Improve Accuracy, Uncertainty, and Robustness\nhttps://arxiv.org/pdf/2105.12639.pdf",
    "1877258": "updated list of masked pretraining method.\nmost opensource  have complete framework code from pertaining transformer backbone and finetunning/inference it for segmentation.\n\n![https://i.ibb.co/XCsKpjC/Selection-116.png](https://i.ibb.co/XCsKpjC/Selection-116.png)\nI missed the important Beit in the table:\nhttps://github.com/microsoft/unilm/tree/master/beit\n\n\nsee also\nhttps://github.com/cmhungsteve/Awesome-Transformer-Attention\nunder \"Training + Transformer\" for more MIM",
    "1871615": "how should you select your solution?\n\n- which organ actually affects private LB score the most? (due to different/same class distribution probability and domain difference of private data)\n\n- we usually monitor the validation dice of all organ. but does this select the most important one to private test? or are we selecting the best model for local validation data only? (is all dice correlated to organ dice)\n\n![https://i.ibb.co/j84YLNm/Selection-083.png](https://i.ibb.co/j84YLNm/Selection-083.png)",
    "1861404": "make your own spleen labels:\nhttps://www.purposegames.com/no/game/spleen-histology-and-red-and-white-pulp",
    "1914883": "this comment has not been deleted",
    "1832019": "fyi: \nVirtual histological staining of unlabelled tissue-autofluorescence images via deep learning\nhttps://openreview.net/pdf?id=S1xANDXRKN\nhttps://arxiv.org/pdf/1803.11293.pdf\n![https://i.ibb.co/HFqKxfX/Selection-022.png](https://i.ibb.co/HFqKxfX/Selection-022.png)\n\n---\nH&E to PAS conversion\nDeep learning-based transformation of H&E stained tissues into special stains\nhttps://github.com/kevindehaan/stain-transformation\n\nhttps://www.researchgate.net/publication/353875566_Deep_learning-based_transformation_of_HE_stained_tissues_into_special_stains\n![https://i.ibb.co/6r8dYNj/Selection-023.png](https://i.ibb.co/6r8dYNj/Selection-023.png)\n\n---\n\nDAB(brown)-H(blue) to H(blue)&E(pink) papers:\n\n(1) Creating virtual H&E images using samples imaged on a commercial CODEX platform\n(2) FalseColor-Python: a rapid intensity-leveling and digital-staining package for fluorescence-based slide-free digital pathology\n\n(3) Dual Adaptive Pyramid Network for Cross-Stain Histopathology Image Segmentation\nIn this paper, we propose a dual adaptive pyramid network (DAPNet) for histopathological gland segmentation\nadapting from one stain domain to another (DAB-H and H&E)\nhttps://arxiv.org/pdf/1909.11524.pdf\n<a href=\"https://ibb.co/0997p3R\"><img src=\"https://i.ibb.co/GMM6fj4/Selection-034.png\" alt=\"Selection-034\" border=\"0\"></a>\n<a href=\"https://ibb.co/Phk2RNB\"><img src=\"https://i.ibb.co/HzZc0Vm/Selection-033.png\" alt=\"Selection-033\" border=\"0\"></a>\n---\n\n\nTailoring automated data augmentation to H&E-stained histopathology\nhttps://github.com/DIAGNijmegen/pathology-he-auto-augment\nhttps://openreview.net/pdf?id=JrBfXaoxbA2\n\n---\n\nhttps://scikit-image.org/docs/stable/auto_examples/color_exposure/plot_ihc_color_separation.html\nhttps://towardsdatascience.com/stain-estimation-on-microscopy-whole-slide-images-2b5a57062268",
    "1938689": "I notice that the KEY POINT is 2xA6000 GPU cards workstation xD",
    "1872994": "How did you manage to calculate the LB score on HPA and Hubmap?\n\nI found in the comments the probe you used to calculate how many of each type you had in the test set. But how to get the metrics on each type is out of my understanding 😅",
    "1839900": "Hi @hengck23 - Wonderful thread like usual.\n\nIf you **do** find any useful external data sources, would you mind commenting on them on [**this thread**](https://www.kaggle.com/competitions/hubmap-organ-segmentation/discussion/333886)? I will add them to the main body of that post so that they are shared with everyone all in one place.",
    "1861671": "a baseline code is needed! current public ones are not good.👀",
    "1873994": "Great job!   what pretrained model did you use, and what loss function did you use.",
    "1951803": "Could you share a snippet of data parallelism code?  I saw your posted codes and tried to implement it into mine but it didn't go well. \nI used the following code to utilize two gpus:\n```\nwith amp.autocast(enabled=is_amp):\n\toutput = data_parallel(net, batch) \n\tprobability += F.interpolate(output['probability'], size=(H, W), mode='bilinear', align_corners=False, antialias=True)\n```\nThe program utilized the only one gpu while training. Though I had added GPU 0,1 environment and checked its counter =2. So I'm curious if I'm missing something important to do data parallelism?",
    "1951493": "Hey . . . @hengck23 Hengck . . . .  THANKS VERY MUCH ✌️✌️✌️✌️ . . . . MAIDEN MEDAL IN Competition and YOUR COAT MEDIUM + DAFORMER was winner for me, .. . .. . 🔥🔥🔥🔥🔥 . . . . ",
    "1949163": "I've just realised - you are probably going to become a competitions grand master in just over 24 hours :)",
    "1940951": "Hello!\nI'm currently working with segformer mit b2. I use the same fold for validation and all the scripts as you. But I don't know why I can't get at least 0.75 on validation. Do you have any idea what causes the problem? Thanks a lot for your work - I've learned a lot!\n\n\ntrain_log:rate     iter  epoch | dice   loss   tp     tn     | loss           | time           \n\ntrain_log:-------------------------------------------------------------------------------------\n\ntrain_log:1.00e-5   00000000*   0.00 | 0.155  0.705  0.0000  0.000   | 0.000  0.000   |  0 hr 00 min\n\ntrain_log:1.00e-5   00000138*   3.00 | 0.592  0.251  0.0000  0.000   | 0.372  0.265   |  0 hr 01 min\n\ntrain_log:1.00e-5   00000276*   6.00 | 0.594  0.165  0.0000  0.000   | 0.203  0.173   |  0 hr 02 min\n\ntrain_log:1.00e-5   00000414*   9.00 | 0.608  0.134  0.0000  0.000   | 0.154  0.126   |  0 hr 04 min\n\ntrain_log:1.00e-5   00000552*  12.00 | 0.638  0.133  0.0000  0.000   | 0.130  0.115   |  0 hr 05 min\n\ntrain_log:1.00e-5   00000690*  15.00 | 0.644  0.131  0.0000  0.000   | 0.124  0.113   |  0 hr 06 min\n\n....\ntrain_log:1.00e-5   00003726*  81.00 | 0.715  0.102  0.0000  0.000   | 0.071  0.075   |  0 hr 37 min\n\ntrain_log:1.00e-5   00003864*  84.00 | 0.702  0.101  0.0000  0.000   | 0.053  0.059   |  0 hr 39 min\n\ntrain_log:1.00e-5   00004002*  87.00 | 0.707  0.094  0.0000  0.000   | 0.054  0.059   |  0 hr 40 min\n\ntrain_log:1.00e-5   00004140*  90.00 | 0.700  0.106  0.0000  0.000   | 0.056  0.062   |  0 hr 42 min\n\ntrain_log:1.00e-5   00004278*  93.00 | 0.700  0.094  0.0000  0.000   | 0.056  0.061   |  0 hr 43 min\n\ntrain_log:1.00e-5   00004416*  96.00 | 0.706  0.099  0.0000  0.000   | 0.054  0.059   |  0 hr 44 min\n\ntrain_log:1.00e-5   00004554*  99.00 | 0.708  0.097  0.0000  0.000   | 0.055  0.061   |  0 hr 46 min\n\ntrain_log:1.00e-5   00004692* 102.00 | 0.699  0.099  0.0000  0.000   | 0.056  0.061   |  0 hr 47 min\n....\ntrain_log:1.00e-5   00010212* 222.00 | 0.703  0.119  0.0000  0.000   | 0.037  0.045   |  1 hr 48 min\n\ntrain_log:1.00e-5   00010350* 225.00 | 0.721  0.117  0.0000  0.000   | 0.035  0.043   |  1 hr 49 min\n\ntrain_log:1.00e-5   00010488* 228.00 | 0.710  0.108  0.0000  0.000   | 0.039  0.047   |  1 hr 51 min\n\ntrain_log:1.00e-5   00010626* 231.00 | 0.704  0.117  0.0000  0.000   | 0.039  0.046   |  1 hr 53 min\n\ntrain_log:1.00e-5   00010764* 234.00 | 0.704  0.113  0.0000  0.000   | 0.039  0.048   |  1 hr 54 min\n....\nAnd the dice goes around 0.71...",
    "1937356": "an interesting work\n\n\" We additionally benchmark improvements in domain adaptation and out-of-distribution\ndetection, and demonstrate that semi-supervised learning outperforms supervised learning in both cases.\"\n\nImproving colonoscopy lesion classification using semi-supervised deep learning\npaper: https://arxiv.org/pdf/2009.03162.pdf\nhttps://durr.jhu.edu/pubs/2020-colossl/\n\n![https://durr.jhu.edu/wp-content/uploads/2020/12/2020-SSL-1200x571.png](https://durr.jhu.edu/wp-content/uploads/2020/12/2020-SSL-1200x571.png)",
    "1935317": "@hengck23, may I hear your opinion on my case? The problem is \"higher resolution trained model performed worse on Hubmap data than less res one, while better on HAP\" I have two CoaT_small models: one trained with 768, and the other with 1024. The 1024 model performed on HAP better than the 768 model (0.01~0.02 better) while its performance significantly worse on Hubmap data (0.03 worse). In order to have bigger receptive field for higher resolution, I have added a serial block (2 times repeat) and a parallel block (6 times repeat). However, it didn't go well  for Hubmap data, although they have same lr, bs, and aug. I've assumed three possibilities. 1.  1024 dataset wrong, 2. need more aug, 3. change for loss function (currently for 768, bce + 0.2(aux1~3), for 1024, bce+0.2(aux1~4). Can you enlighten me if I've missed some important part in my experiments? ",
    "1930925": "Thank you very much for giving away your experiments and knowledge in detail.  Mind if I ask your opinion? Do you think it's safe to use \"data_source, organ, and img_height/width\" in inference? I've been using those information to infer the test images but, if any of those information is null in the other test set, then my program would not complete. So I'm afraid of it. Maybe, it's not going to be a problem because inference program look through both test sets without an issue when we make an infer?  Sorry for the dumb question.",
    "1930900": "when i train coat small(5 levels) at input 1024, i get results  below ,kidney score is too low,can anyone give me some advice? i think it is the reason i only get 0.77 at lb,  not 0.8(single fold3)\nall 0.776699\nkidney 0.882886\nprostate 0.823085\nlargeintestine 0.907251\nspleen 0.854549\nlung 0.265985\n☹️",
    "1928953": "Should we use aux0 loss when training?why",
    "1914865": "Out of interest, could you post your predicted on the single test image of your best model (thresholded, or not, or both!)? I'm interested to know what the current leading solution thinks the test image should be predicted as!",
    "1913542": "i realize one important thing: almost all vision transformer starts with 4x4 non-overlapping block (or maybe 8x8)\nthis initial layer causes some similarity in all transformer, and reduces diversity in ensemble?",
    "1911581": "the race never ends .... MaxVit seems promising ...\n\n\n\nRoss Wightman\n\"I've been working on a large model update over the past month+, incl several imports from research impl and timm originals of CoAtNet (https://arxiv.org/abs/2106.04803) and MaxVit (https://arxiv.org/abs/2204.01697) in a combined `MaxxVit` impl. Soon to be merged w/ a few weights.\"",
    "1908381": "maybe useful\nMesa: A Memory-saving Training Framework for Transformers",
    "1904622": "48G GPU Mem .. such expensive game. 💔",
    "1904256": "i am in  the progress of running results for [1]\n\n[1] Dual Vision Transformer\nhttps://arxiv.org/pdf/2207.04976.pdf\n https://github.com/YehLi/ImageNetModel\n\ni think it is very promising.\ninitial loss curve and validation loss already surpass that of PVT v2.\n~~\nnumerical evaluation will be coming up in the next few days. ... but you can start your experiment first~~\nthis is another 0.79 model with input=768",
    "1903807": "I follow your work of segformer， but i did not get the same result ，the Hubmap score is 0.55 same as yours， but HPA score is only 0.21~",
    "1903376": "Are we segmenting normal glomeruli, sclerosed glomeruli or any type of glomeruli?",
    "1903332": "i now become confused by my results:\n\nking of king: single fold LB 0.80\n\n- COAT parallel small 5 level (I modified the code to change from 4 to 5 level)\n- increase image size from 768 to 1024\n\nhttps://www.kaggle.com/code/hengck23/lb-0-80-coat-small-parallel-at-1024",
    "1903092": "i came to realise that Beit is the chnapion solution for Visual Domain Adaptation Challenge 2021:\n\n\nhttps://ai.bu.edu/visda-2021/assets/pdf/Burhan_Report.pdf\nhttps://ai.bu.edu/visda-2021/assets/pdf/Burhan_Slides.pdf",
    "1897281": "find a paper :\n\nCROSS-STAINED SEGMENTATION FROM RENAL BIOPSY IMAGES USING MULTI-LEVELADVERSARIAL LEARNING\nhttps://arxiv.org/pdf/2002.08587.pdf\n\n\" Experimental  results on glomeruli segmentation from renal biopsy images indicate that our network is able to improve segmentation performance on target type of stained images and use unlabeled data to achieve similar accuracy to labeled data\"\n",
    "1896239": "which is more important, backbone or decoder?\n<a href=\"https://ibb.co/V3bzHq8\"><img src=\"https://i.ibb.co/jHqQVrF/Selection-088.png\" alt=\"Selection-088\" border=\"0\"></a> ",
    "1894597": "hi, \nFirst, thanks for your sharing. I am new to the kaggle competetion. I studied your shared code. I have a dumb question. What methods can I use to filter out a few relatively well-performing model weights in a fold? like the code in your run_local_cv.py.![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F7991823%2F66a81de04818d64831ef0d95aa27fbfe%2F_20220811234012.png?generation=1660232428007187&alt=media)\n",
    "1887778": "i haven't got good results for transformer decoder. another want to share their results?",
    "1887743": "maybe a good way to use stain normalisation\n![https://i.ibb.co/jGzL6PD/Selection-088.png](https://i.ibb.co/jGzL6PD/Selection-088.png)",
    "1887169": "i made some calculation ....\n\neveryone will be stuck in ~0.80. then one more decimal in LB score will be reveal.\n\nonce it is in 3 decimal, score per image will be revealed. magic may happen as we may be able to \"get/probe more information\" for e.g. the test spleen image.",
    "1883056": "Hello~ I am quite curious about how can you get your pre-trained mit weights? Did you use mask image modeling? I noted that official implementation of segformer-mit-b2 is in mmseg, however your code is different from the official ones.",
    "1879784": "Hello, I'm curious about the way categories are handled. Since in the end we only need to submit the rle encoding for each image, we don't need to provide categories. What way your model is trained, multi-classification or binary(organ/not organ)？",
    "1879713": "Hey @hengck23! Thank you for sharing all the info. I wanted to ask whether you are training with full size images or tiled ones? Also, how are you dealing with different pixel dimensions of HPA and HubMAP?",
    "1877715": "did anyone suceed in training from scratch without image-net pretrain?",
    "1877635": "Awesome discussion till now to the competition ",
    "1875228": "masked auto encoder for SSL\n![https://i.ibb.co/vQpDC3j/Selection-099.png](https://i.ibb.co/vQpDC3j/Selection-099.png)\n\n\n",
    "1869213": "masked VAE for pyramid-based Vit like Swin transformer:\nhttps://github.com/implus/UM-MAE",
    "1864524": "update on trasnformer results:\n\nconsider the performance of imagenet, segformer mit-b2 results is ok. but it doesn't scale up when I use more powerful mit-b4\n\n![https://i.ibb.co/QJB16HX/Selection-070.png](https://i.ibb.co/QJB16HX/Selection-070.png)",
    "1863895": "anyone can explin why am i getting patch token artifacts when using transformer segmentation (using segformer)?\nit turns up this is due to F.interpolate using mode='nearest' when i upsample the mit transformer layer results.\n\n\n<a href=\"https://imgbb.com/\"><img src=\"https://i.ibb.co/BKjDsjL/Selection-067.png\" alt=\"Selection-067\" border=\"0\"></a>\n<a href=\"https://ibb.co/YW6Pwd3\"><img src=\"https://i.ibb.co/RS1Yd69/Selection-066.png\" alt=\"Selection-066\" border=\"0\"></a>",
    "1945984": "",
    "1928904": "",
    "1883718": "",
    "1879793": "",
    "1889296": "Thank you for sharing!",
    "1886151": "Thank you so much for sharing!",
    "1886002": "thanks for the author, very helpful"
  }
}