{
  "id": 377654,
  "title": "Yet another working backbone",
  "url": "/competitions/rsna-breast-cancer-detection/discussion/377654",
  "author_name": "Chenglu",
  "post_date": "2023-01-12T08:00:07.868000",
  "votes": 19,
  "comment_count": 51,
  "views": 0,
  "content": "<p>FAIR just released ConvNeXt V2 about a week ago. I have done some experiments with it and the CV score is about the same as efficientnet. I will have some LB tests i in the coming days.</p>\n<p>Installing it from the official release is a little bit hard since it will do some compilation, luckily <code>timm</code> already has it, just install <code>timm</code> from the source then we can use it.</p>\n<p>Another related discussion: <a href=\"https://www.kaggle.com/competitions/rsna-breast-cancer-detection/discussion/375791\" target=\"_blank\">https://www.kaggle.com/competitions/rsna-breast-cancer-detection/discussion/375791</a></p>\n<p>paper: <a href=\"https://arxiv.org/abs/2301.00808\" target=\"_blank\">https://arxiv.org/abs/2301.00808</a><br>\nofficial source: <a href=\"https://github.com/facebookresearch/ConvNeXt-V2\" target=\"_blank\">https://github.com/facebookresearch/ConvNeXt-V2</a><br>\ntimm: <a href=\"https://github.com/rwightman/pytorch-image-models/blob/main/timm/models/convnext.py#L580\" target=\"_blank\">https://github.com/rwightman/pytorch-image-models/blob/main/timm/models/convnext.py#L580</a></p>",
  "messages": [
    {
      "id": 2096684,
      "postDate": "2023-01-12T08:00:07.870Z",
      "content": "<p>FAIR just released ConvNeXt V2 about a week ago. I have done some experiments with it and the CV score is about the same as efficientnet. I will have some LB tests i in the coming days.</p>\n<p>Installing it from the official release is a little bit hard since it will do some compilation, luckily <code>timm</code> already has it, just install <code>timm</code> from the source then we can use it.</p>\n<p>Another related discussion: <a href=\"https://www.kaggle.com/competitions/rsna-breast-cancer-detection/discussion/375791\" target=\"_blank\">https://www.kaggle.com/competitions/rsna-breast-cancer-detection/discussion/375791</a></p>\n<p>paper: <a href=\"https://arxiv.org/abs/2301.00808\" target=\"_blank\">https://arxiv.org/abs/2301.00808</a><br>\nofficial source: <a href=\"https://github.com/facebookresearch/ConvNeXt-V2\" target=\"_blank\">https://github.com/facebookresearch/ConvNeXt-V2</a><br>\ntimm: <a href=\"https://github.com/rwightman/pytorch-image-models/blob/main/timm/models/convnext.py#L580\" target=\"_blank\">https://github.com/rwightman/pytorch-image-models/blob/main/timm/models/convnext.py#L580</a></p>",
      "rawMarkdown": "FAIR just released ConvNeXt V2 about a week ago. I have done some experiments with it and the CV score is about the same as efficientnet. I will have some LB tests i in the coming days.\n\nInstalling it from the official release is a little bit hard since it will do some compilation, luckily `timm` already has it, just install `timm` from the source then we can use it.\n\nAnother related discussion: https://www.kaggle.com/competitions/rsna-breast-cancer-detection/discussion/375791\n\npaper: https://arxiv.org/abs/2301.00808\nofficial source: https://github.com/facebookresearch/ConvNeXt-V2\ntimm: https://github.com/rwightman/pytorch-image-models/blob/main/timm/models/convnext.py#L580",
      "votes": 19
    },
    {
      "id": 2112342,
      "postDate": "2023-01-23T14:59:33.367Z",
      "content": "<p><a href=\"https://github.com/rwightman/pytorch-image-models\" target=\"_blank\">https://github.com/rwightman/pytorch-image-models</a></p>\n<p>rwightman retrained convnext v1  and they become as good as v2.<br>\nv1 can be used for commerical. (but v2 cannot)</p>\n<p>i tested some models, they are good<br>\nconvnext_tiny.in12k_ft_in1k_384 - 85.1 @ 384<br>\nconvnext_small.in12k_ft_in1k_384 - 86.2 @ 384</p>",
      "rawMarkdown": "https://github.com/rwightman/pytorch-image-models\n\nrwightman retrained convnext v1  and they become as good as v2.\nv1 can be used for commerical. (but v2 cannot)\n\ni tested some models, they are good\nconvnext_tiny.in12k_ft_in1k_384 - 85.1 @ 384\nconvnext_small.in12k_ft_in1k_384 - 86.2 @ 384",
      "votes": 3,
      "replies": [
        {
          "id": 2112488,
          "postDate": "2023-01-23T16:52:54.160Z",
          "content": "<p>I tested convnext_v1 and compared it to maxvit. Still have problem with site=1 score. Probably this is why my single model is unable to jump over 0.5 (have not tried blend so far - still looking for better single model).</p>\n<p><img src=\"https://i.ibb.co/KmkbVk1/001-max.jpg\" alt=\"\"></p>\n<p><img src=\"https://i.ibb.co/WvnBnBk/001-conv.jpg\" alt=\"\"></p>",
          "rawMarkdown": "I tested convnext_v1 and compared it to maxvit. Still have problem with site=1 score. Probably this is why my single model is unable to jump over 0.5 (have not tried blend so far - still looking for better single model).\n\n![](https://i.ibb.co/KmkbVk1/001-max.jpg)\n\n![](https://i.ibb.co/WvnBnBk/001-conv.jpg)",
          "votes": 3,
          "replies": [
            {
              "id": 2112682,
              "postDate": "2023-01-23T18:49:02.933Z",
              "content": "<p>What image size did you use for these archs? I am having a lot of trouble getting a stable training on bigger architectures (especially transformers) even with a 3090 without lowering image size significantly</p>",
              "rawMarkdown": "What image size did you use for these archs? I am having a lot of trouble getting a stable training on bigger architectures (especially transformers) even with a 3090 without lowering image size significantly"
            },
            {
              "id": 2112696,
              "postDate": "2023-01-23T18:58:53.973Z",
              "content": "<p>(4 * 384, 2 * 384) - I use A100 (80GB RAM GPU) or A6000 - bs=16 no matter what machine I use </p>",
              "rawMarkdown": "(4 * 384, 2 * 384) - I use A100 (80GB RAM GPU) or A6000 - bs=16 no matter what machine I use ",
              "votes": 2
            },
            {
              "id": 2112699,
              "postDate": "2023-01-23T19:07:07.577Z",
              "content": "<p>😨😲😲😲😲</p>",
              "rawMarkdown": "😨😲😲😲😲"
            },
            {
              "id": 2112702,
              "postDate": "2023-01-23T19:11:29.593Z",
              "content": "<p>But do not worry - I am sure people have less resources and certainly better results 😂</p>",
              "rawMarkdown": "But do not worry - I am sure people have less resources and certainly better results 😂",
              "votes": 1
            },
            {
              "id": 2113151,
              "postDate": "2023-01-24T05:37:18.260Z",
              "content": "<p>this is for base<br>\n<img src=\"https://i.ibb.co/wNkZgx4/Selection-673.png\" alt=\"https://i.ibb.co/wNkZgx4/Selection-673.png\"><br>\nonly half an epoch<br>\n(training in progress)</p>\n<p>this is for small<br>\n<img src=\"https://i.ibb.co/sg78K60/Selection-674.png\" alt=\"https://i.ibb.co/sg78K60/Selection-674.png\"></p>\n<p>yes i need to think of how to improve site1 performance</p>",
              "rawMarkdown": "this is for base\n![https://i.ibb.co/wNkZgx4/Selection-673.png](https://i.ibb.co/wNkZgx4/Selection-673.png)\nonly half an epoch\n(training in progress)\n\nthis is for small\n![https://i.ibb.co/sg78K60/Selection-674.png](https://i.ibb.co/sg78K60/Selection-674.png)\n\nyes i need to think of how to improve site1 performance",
              "votes": 1
            },
            {
              "id": 2113271,
              "postDate": "2023-01-24T07:19:11.980Z",
              "content": "<p>Here is another example:</p>\n<ul>\n<li>site2 - probf1 - 0.72 / prec/recall: 0.84/0.62</li>\n<li>site1 - probf1 only 0.29 and low prec/recall</li>\n</ul>\n<p><img src=\"https://i.ibb.co/MPbdG4z/s001.jpg\" alt=\"\"></p>",
              "rawMarkdown": "Here is another example:\n- site2 - probf1 - 0.72 / prec/recall: 0.84/0.62\n- site1 - probf1 only 0.29 and low prec/recall\n\n![](https://i.ibb.co/MPbdG4z/s001.jpg)"
            },
            {
              "id": 2113309,
              "postDate": "2023-01-24T08:01:21.413Z",
              "content": "<p>site2 results is very good</p>\n<p>i am trying the following:</p>\n<ol>\n<li>try different seed</li>\n<li>try to weigh site1 or to limit the loss of site2 (site aware margin or focal loss), if the model cannot lower the loss of site2 then it must try to lower the loss of other sample</li>\n<li>try to make site2 samples temporarily invisible (e.g. sampling)</li>\n<li>distill site1 prediction from another model (eg nextvit) as aux loss</li>\n</ol>",
              "rawMarkdown": "site2 results is very good\n\ni am trying the following:\n1. try different seed\n2. try to weigh site1 or to limit the loss of site2 (site aware margin or focal loss), if the model cannot lower the loss of site2 then it must try to lower the loss of other sample\n3. try to make site2 samples temporarily invisible (e.g. sampling)\n4. distill site1 prediction from another model (eg nextvit) as aux loss",
              "votes": 2
            },
            {
              "id": 2113413,
              "postDate": "2023-01-24T09:19:00.200Z",
              "content": "<p>Thank you very much for prompts. I will report changes when they appear. </p>",
              "rawMarkdown": "Thank you very much for prompts. I will report changes when they appear. "
            },
            {
              "id": 2113462,
              "postDate": "2023-01-24T09:44:54.013Z",
              "content": "<p>I thnink that model could be good as well for site_1 but … </p>\n<ul>\n<li>the best threshold for my model is 0.5</li>\n<li>I see many good predictions for patient - I assume that cancer is present on one image and then rest of images are annotated as positive as well (but model can't \"see\" cancer o it). This is my assumption only.</li>\n<li>all prediction presented below are positive but solution (mean / max) see it as negative (below th).</li>\n</ul>\n<p><img src=\"https://i.ibb.co/0QmdXgr/si-001.jpg\" alt=\"\"></p>",
              "rawMarkdown": "I thnink that model could be good as well for site_1 but ... \n- the best threshold for my model is 0.5\n- I see many good predictions for patient - I assume that cancer is present on one image and then rest of images are annotated as positive as well (but model can't \"see\" cancer o it). This is my assumption only.\n- all prediction presented below are positive but solution (mean / max) see it as negative (below th).\n\n![](https://i.ibb.co/0QmdXgr/si-001.jpg)",
              "votes": 2
            },
            {
              "id": 2113482,
              "postDate": "2023-01-24T09:58:35.960Z",
              "content": "<p>you can do the following:</p>\n<ol>\n<li>show the class activation map for all images of the same one case. There are a few possibility<br>\na. the lower score is due the lesion being visible in the top score view and occluded other low score view<br>\nb. actually the high score is due to \"noise\", e.g letters, corners … so the results is wrong </li>\n</ol>\n<p>if the case is a, then the best way is replace mean() to learned function to combine results , e.g. attention pooling over multiple images, multiple instance, e.g …</p>\n<p>if the lesion is actually visible in many views but the score is only one view, you should enforce score consistency. (e.g. consistency loss, feature consistency, or better augmentation to move from one view to another, … mixup, etc)</p>\n<hr>\n<p>but you only show results for positive case. you should also analyze results for negative image or false positive. It is not known that poor  site 1 results is due to difficult pos images or   difficult neg images</p>",
              "rawMarkdown": "you can do the following:\n1. show the class activation map for all images of the same one case. There are a few possibility\na. the lower score is due the lesion being visible in the top score view and occluded other low score view\nb. actually the high score is due to \"noise\", e.g letters, corners ... so the results is wrong \n\nif the case is a, then the best way is replace mean() to learned function to combine results , e.g. attention pooling over multiple images, multiple instance, e.g ...\n\nif the lesion is actually visible in many views but the score is only one view, you should enforce score consistency. (e.g. consistency loss, feature consistency, or better augmentation to move from one view to another, ... mixup, etc)\n\n---\n\nbut you only show results for positive case. you should also analyze results for negative image or false positive. It is not known that poor  site 1 results is due to difficult pos images or   difficult neg images",
              "votes": 1
            },
            {
              "id": 2113491,
              "postDate": "2023-01-24T10:01:03.973Z",
              "content": "<p>\"I thnink that model could be good as well for site_1 but \"</p>\n<p>check why site 2 don't have this problem. i think site 2 pos images have higher score (hence averaging, the score is still high)  or site 2 has less number of images and hence higher score</p>\n<p>maybe we need number aware averaging, aka attention pool …</p>",
              "rawMarkdown": "\"I thnink that model could be good as well for site_1 but \"\n\ncheck why site 2 don't have this problem. i think site 2 pos images have higher score (hence averaging, the score is still high)  or site 2 has less number of images and hence higher score\n\nmaybe we need number aware averaging, aka attention pool ...",
              "votes": 1
            },
            {
              "id": 2113511,
              "postDate": "2023-01-24T10:19:12.540Z",
              "content": "<p><a href=\"https://www.kaggle.com/remekkinas\" target=\"_blank\">@remekkinas</a> </p>\n<p>maybe you have discovered some magic</p>\n<p><img src=\"https://i.ibb.co/276Wxq9/Selection-676.png\" alt=\"https://i.ibb.co/276Wxq9/Selection-676.png\"></p>\n<p>a quick test of attention pooling</p>\n<p><a href=\"https://stackoverflow.com/questions/20069009/pandas-get-topmost-n-records-within-each-group\" target=\"_blank\">https://stackoverflow.com/questions/20069009/pandas-get-topmost-n-records-within-each-group</a></p>\n<pre><code>        # group by mean of top3\n        gb = site_df[['site_id', 'patient_id', 'laterality', 'cancer_t', 'cancer_p']].groupby(\n            ['patient_id', 'laterality']).head(3).reset_index(drop=True)\n        gb = gb[['site_id', 'patient_id', 'laterality', 'cancer_t', 'cancer_p']].groupby(\n            ['patient_id', 'laterality']).mean()\n\n        gb.loc[:, 'cancer_t'] = gb.cancer_t.astype(int)\n        m = compute_metric(gb.cancer_p, gb.cancer_t)\n        text = f'{\"top3   mean()\": &lt;16} [{site_id}]'\n        text += f'\\t{m[\"auc\"]:0.5f}'\n</code></pre>\n<p>mean is wrong!!!!<br>\nmean = numerator/ denominator = sum/num of images</p>\n<p>the more images, the greater is the denominator<br>\nthe better score for occluded lesion (i.e. should have more negative score), the smaller is the numerator</p>",
              "rawMarkdown": "@remekkinas \n\nmaybe you have discovered some magic\n\n![https://i.ibb.co/276Wxq9/Selection-676.png](https://i.ibb.co/276Wxq9/Selection-676.png)\n\na quick test of attention pooling\n\nhttps://stackoverflow.com/questions/20069009/pandas-get-topmost-n-records-within-each-group\n```\n\t\t# group by mean of top3\n\t\tgb = site_df[['site_id', 'patient_id', 'laterality', 'cancer_t', 'cancer_p']].groupby(\n\t\t\t['patient_id', 'laterality']).head(3).reset_index(drop=True)\n\t\tgb = gb[['site_id', 'patient_id', 'laterality', 'cancer_t', 'cancer_p']].groupby(\n\t\t\t['patient_id', 'laterality']).mean()\n\n\t\tgb.loc[:, 'cancer_t'] = gb.cancer_t.astype(int)\n\t\tm = compute_metric(gb.cancer_p, gb.cancer_t)\n\t\ttext = f'{\"top3   mean()\": <16} [{site_id}]'\n\t\ttext += f'\\t{m[\"auc\"]:0.5f}'\n\n```\n\nmean is wrong!!!!\nmean = numerator/ denominator = sum/num of images\n\nthe more images, the greater is the denominator\nthe better score for occluded lesion (i.e. should have more negative score), the smaller is the numerator",
              "votes": 2
            },
            {
              "id": 2113554,
              "postDate": "2023-01-24T10:41:15.113Z",
              "content": "<pre><code>    d1 = train_df[train_df.site_id == 1]\n    d2 = train_df[train_df.site_id == 2]\n\n    gb = d1.groupby(['patient_id', 'laterality'])['image_id'].count()\n    gb.value_counts()\n    gb = d2.groupby(['patient_id', 'laterality'])['image_id'].count()\n    gb.value_counts()\n\n\n    '''\n    site1\n    2    6990\n    3    3442\n    4     893\n    5     239\n    6      60\n    7      10\n    8       2\n\n\n    site2\n    2    11394\n    3      785\n    4       11\n\n    '''\n</code></pre>",
              "rawMarkdown": "```\n\td1 = train_df[train_df.site_id == 1]\n\td2 = train_df[train_df.site_id == 2]\n\t\n\tgb = d1.groupby(['patient_id', 'laterality'])['image_id'].count()\n\tgb.value_counts()\n\tgb = d2.groupby(['patient_id', 'laterality'])['image_id'].count()\n\tgb.value_counts()\n\t\n\t\n\t'''\n\tsite1\n\t2    6990\n\t3    3442\n\t4     893\n\t5     239\n\t6      60\n\t7      10\n\t8       2\n\t\n\t\n\tsite2\n\t2    11394\n\t3      785\n\t4       11\n\n\t'''\n\n\n\n```",
              "votes": 1
            },
            {
              "id": 2113575,
              "postDate": "2023-01-24T10:49:55.713Z",
              "content": "<p>yes, exactly … in my tests in case of more images per patient I tried to take two largest proba but did not work.  </p>\n<pre><code>df.groupby(['patient_id','laterality']).apply(lambda x: x.nlargest(2,'cancer_p'))\n</code></pre>",
              "rawMarkdown": "yes, exactly ... in my tests in case of more images per patient I tried to take two largest proba but did not work.  \n\n```\ndf.groupby(['patient_id','laterality']).apply(lambda x: x.nlargest(2,'cancer_p'))\n```\n"
            },
            {
              "id": 2113585,
              "postDate": "2023-01-24T10:53:28.813Z",
              "content": "<p>largest 2 does not work for me.<br>\ni need 3.</p>\n<p>but the correct method is to learn a pooling function.<br>\nnow i am doing experiments and searching for paper.</p>\n<p>i think there are some kaggle competition that try to classify product for e-commerce based on a set of images (rather than single image)</p>",
              "rawMarkdown": "largest 2 does not work for me.\ni need 3.\n\nbut the correct method is to learn a pooling function.\nnow i am doing experiments and searching for paper.\n\ni think there are some kaggle competition that try to classify product for e-commerce based on a set of images (rather than single image)",
              "votes": 2
            },
            {
              "id": 2113638,
              "postDate": "2023-01-24T11:33:40.533Z",
              "content": "<p>For me it works as well. Some small gain.</p>\n<p><img src=\"https://i.ibb.co/2FDq7W2/si009.jpg\" alt=\"\"></p>",
              "rawMarkdown": "For me it works as well. Some small gain.\n\n![](https://i.ibb.co/2FDq7W2/si009.jpg)"
            },
            {
              "id": 2113839,
              "postDate": "2023-01-24T14:37:21.247Z",
              "content": "<p>\"some small gain.\"</p>\n<p>this is true gain (both recall and precision improve). i am making a submission now and have to wait for results.</p>\n<p>if LB also improves, it would means that not all  images are useful for site1. correctly removing some images may improve results or we should train as bags?</p>\n<p>you can submit single site only to see if LB score for site2 is better than site1.<br>\nand also if the instability in LB is due to site1</p>",
              "rawMarkdown": "\"some small gain.\"\n\nthis is true gain (both recall and precision improve). i am making a submission now and have to wait for results.\n\nif LB also improves, it would means that not all  images are useful for site1. correctly removing some images may improve results or we should train as bags?\n\nyou can submit single site only to see if LB score for site2 is better than site1.\nand also if the instability in LB is due to site1"
            },
            {
              "id": 2113856,
              "postDate": "2023-01-24T14:47:11.400Z",
              "content": "<p>I submitted with top3 and waiting for results. <br>\nRest tests in progress - let you know if find something.</p>\n<p>BTW: this model (single model) gave me 0.51 LB (without top3)</p>",
              "rawMarkdown": "I submitted with top3 and waiting for results. \nRest tests in progress - let you know if find something.\n\nBTW: this model (single model) gave me 0.51 LB (without top3)"
            },
            {
              "id": 2114328,
              "postDate": "2023-01-24T22:09:34.157Z",
              "content": "<p><a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a> - for me head(3) on LB did not increase score. For sure thinking about multiple images per side should be investigated.</p>",
              "rawMarkdown": "@hengck23 - for me head(3) on LB did not increase score. For sure thinking about multiple images per side should be investigated.",
              "votes": 1
            },
            {
              "id": 2114386,
              "postDate": "2023-01-25T00:13:12.733Z",
              "content": "<p>for me , it results in the same score</p>\n<p>this is a possibility that the public test has more site2 images that is why LB score is (much) higher than CV?</p>\n<p>maybe some kaggler will probe and report?</p>",
              "rawMarkdown": "for me , it results in the same score\n\nthis is a possibility that the public test has more site2 images that is why LB score is (much) higher than CV?\n\nmaybe some kaggler will probe and report?",
              "votes": 1
            },
            {
              "id": 2114650,
              "postDate": "2023-01-25T06:34:43.840Z",
              "content": "<p>Look here: <a href=\"https://www.kaggle.com/code/tomooinubushi/some-lb-probing-results-to-share/notebook\" target=\"_blank\">https://www.kaggle.com/code/tomooinubushi/some-lb-probing-results-to-share/notebook</a></p>\n<blockquote>\n  <p>There are no new site ID in test dataset. <br>\n  No. of images in site ID 1 &gt; No. of images in site ID 2. (by <a href=\"https://www.kaggle.com/yujiariyasu\" target=\"_blank\">@yujiariyasu</a>)</p>\n</blockquote>\n<p>Most of my false alarms and misses come from machine_id = 49</p>\n<blockquote>\n  <p>ore than 40% of images are from machine ID 49 (43% for train dataset) (by <a href=\"https://www.kaggle.com/kaggleqrdl\" target=\"_blank\">@kaggleqrdl</a>)</p>\n</blockquote>",
              "rawMarkdown": "Look here: https://www.kaggle.com/code/tomooinubushi/some-lb-probing-results-to-share/notebook\n\n>There are no new site ID in test dataset. \n>No. of images in site ID 1 > No. of images in site ID 2. (by @yujiariyasu)\n\nMost of my false alarms and misses come from machine_id = 49\n\n>ore than 40% of images are from machine ID 49 (43% for train dataset) (by @kaggleqrdl)"
            },
            {
              "id": 2120468,
              "postDate": "2023-01-29T16:08:29.167Z",
              "content": "<p><a href=\"https://www.kaggle.com/remekkinas\" target=\"_blank\">@remekkinas</a> </p>\n<p>here is a good method to do multiple image prediction.<br>\n<a href=\"https://www.kaggle.com/competitions/rsna-breast-cancer-detection/discussion/370333#2120459\" target=\"_blank\">https://www.kaggle.com/competitions/rsna-breast-cancer-detection/discussion/370333#2120459</a></p>",
              "rawMarkdown": "@remekkinas \n\nhere is a good method to do multiple image prediction.\nhttps://www.kaggle.com/competitions/rsna-breast-cancer-detection/discussion/370333#2120459",
              "votes": 2
            },
            {
              "id": 2120476,
              "postDate": "2023-01-29T16:13:58.897Z",
              "content": "<p>Thank you! I am reading.</p>\n<p>I still working using single model (no blend) - now it is LB 0.57 but today made some changes (I had some bug in inference part) and I think in two days should be over 0.6 (I hope).</p>\n<p>I am afraid … shakeup in this competition is really possible. Score is very sensitive on th. Still looking for some postprocessing ideas.</p>\n<p>Now changes I made:</p>\n<ul>\n<li>new way of dicom processing - now I am sure in 100% that all are processed consistently</li>\n<li>some discoveries during submission</li>\n</ul>",
              "rawMarkdown": "Thank you! I am reading.\n\nI still working using single model (no blend) - now it is LB 0.57 but today made some changes (I had some bug in inference part) and I think in two days should be over 0.6 (I hope).\n\nI am afraid ... shakeup in this competition is really possible. Score is very sensitive on th. Still looking for some postprocessing ideas.\n\nNow changes I made:\n- new way of dicom processing - now I am sure in 100% that all are processed consistently\n- some discoveries during submission"
            },
            {
              "id": 2120508,
              "postDate": "2023-01-29T16:43:20.583Z",
              "content": "<p>\"shakeup in this competition is really possible.\"<br>\nthat is very true, but you should be able to compute the range of shakeup</p>\n<p>\"Still looking for some postprocessing ideas.\"<br>\nspend some time to think how to use probing to produce a more stable results too.<br>\n(there aren't many +ve cases in the hidden test and i think the top kagglers have a way to make the best guess)</p>",
              "rawMarkdown": "\"shakeup in this competition is really possible.\"\nthat is very true, but you should be able to compute the range of shakeup\n\n\"Still looking for some postprocessing ideas.\"\nspend some time to think how to use probing to produce a more stable results too.\n(there aren't many +ve cases in the hidden test and i think the top kagglers have a way to make the best guess)",
              "votes": 1
            }
          ]
        }
      ]
    },
    {
      "id": 2102253,
      "postDate": "2023-01-16T13:42:43.800Z",
      "content": "<p>ignore the issue of license aside, i think ConvNeXt-V2 is ggod.<br>\nMy training is still in porgress but training/validation log looks good.<br>\nI am working on ConvNeXt-V2-small </p>\n<p>it seems that large model (imagenet top-1 0.86 and above) of vision transformer and 2nd geration of cnn (like ConvNeXt-V2) uses low initial learning rate and just need few epoches. This is very much like transfer learning of large language model BERT given a few ten thousands of text train samples.</p>",
      "rawMarkdown": "ignore the issue of license aside, i think ConvNeXt-V2 is ggod.\nMy training is still in porgress but training/validation log looks good.\nI am working on ConvNeXt-V2-small \n\nit seems that large model (imagenet top-1 0.86 and above) of vision transformer and 2nd geration of cnn (like ConvNeXt-V2) uses low initial learning rate and just need few epoches. This is very much like transfer learning of large language model BERT given a few ten thousands of text train samples.\n\n ",
      "votes": 4,
      "replies": [
        {
          "id": 2102261,
          "postDate": "2023-01-16T13:45:51.303Z",
          "content": "<p>I have the same observation with the low initial learning rate.</p>",
          "rawMarkdown": "I have the same observation with the low initial learning rate.",
          "replies": [
            {
              "id": 2102272,
              "postDate": "2023-01-16T13:53:09.553Z",
              "content": "<p>so the good results come from low learning rate of transfer learning.<br>\nthis is the same case for NextVIT.</p>\n<p>but i am surprise that imagenet/natural image  can represent mammography images.</p>\n<p>i though this can be a new research area: <a href=\"https://hirokatsukataoka16.github.io/Pretraining-without-Natural-Images/\" target=\"_blank\">https://hirokatsukataoka16.github.io/Pretraining-without-Natural-Images/</a><br>\nsome synthetic images gneration for medical images if you understand how the medical devices woprk</p>",
              "rawMarkdown": "so the good results come from low learning rate of transfer learning.\nthis is the same case for NextVIT.\n\nbut i am surprise that imagenet/natural image  can represent mammography images.\n\ni though this can be a new research area: https://hirokatsukataoka16.github.io/Pretraining-without-Natural-Images/\nsome synthetic images gneration for medical images if you understand how the medical devices woprk"
            },
            {
              "id": 2102275,
              "postDate": "2023-01-16T13:55:24.683Z",
              "content": "<p>any kaggler want to try transfer learning for giant VIT:</p>\n<p><a href=\"https://github.com/rwightman/pytorch-image-models/blob/main/results/results-imagenet.csv\" target=\"_blank\">https://github.com/rwightman/pytorch-image-models/blob/main/results/results-imagenet.csv</a><br>\neva_giant_patch14_560.m30m_ft_in22k_in1k    <br>\ntop1=89.796    <br>\nparams=1,014.45</p>",
              "rawMarkdown": "any kaggler want to try transfer learning for giant VIT:\n\nhttps://github.com/rwightman/pytorch-image-models/blob/main/results/results-imagenet.csv\neva_giant_patch14_560.m30m_ft_in22k_in1k\t\ntop1=89.796\t\nparams=1,014.45\n",
              "votes": 1
            }
          ]
        }
      ]
    },
    {
      "id": 2096691,
      "postDate": "2023-01-12T08:08:27.973Z",
      "content": "<p>thanks! the paper seems to suggest it is on par with vision trasnformer</p>\n<p>which of the variant did you try?<br>\ne.g. huge, base, tiny …</p>\n<p>i am more concern about the speed. what is the speed of  ConvNeXt V2 compared to efficientnet?<br>\n(i got a few good results with vision transformer, but their speed are slower than efficient especially for large ersolution beyond 1024)</p>\n<p>e.g. 1x single fold transformer nextVIT-B for 1536x960 has LB 0.56 but takes 9hrs (local cv 0.50, imagenet top1 83.2 at 224x224).it uses up all my time.</p>",
      "rawMarkdown": "thanks! the paper seems to suggest it is on par with vision trasnformer\n\nwhich of the variant did you try?\ne.g. huge, base, tiny ...\n\ni am more concern about the speed. what is the speed of  ConvNeXt V2 compared to efficientnet?\n(i got a few good results with vision transformer, but their speed are slower than efficient especially for large ersolution beyond 1024)\n\ne.g. 1x single fold transformer nextVIT-B for 1536x960 has LB 0.56 but takes 9hrs (local cv 0.50, imagenet top1 83.2 at 224x224).it uses up all my time.",
      "votes": 4,
      "replies": [
        {
          "id": 2096732,
          "postDate": "2023-01-12T08:25:52.150Z",
          "content": "<p>I used nano and 1024 input, it's faster than efficientnetv2_s, which is the main model I've been used so far. And CV score is 0.05 better than efficientnetv2_s with the same input.</p>\n<p>I'll have more experiments on this and update the results.</p>",
          "rawMarkdown": "I used nano and 1024 input, it's faster than efficientnetv2_s, which is the main model I've been used so far. And CV score is 0.05 better than efficientnetv2_s with the same input.\n\nI'll have more experiments on this and update the results.",
          "votes": 5,
          "replies": [
            {
              "id": 2096764,
              "postDate": "2023-01-12T08:48:06.080Z",
              "content": "<p>\"I used nano and 1024 input\"</p>\n<p>thanks! <br>\nit is interesting that i never get good results for 1024. <br>\n1024 never give LB greater than 0.50 for me (for small or big models)<br>\nthis is different from other kagglers.</p>\n<p>maybe i need to think more about it</p>",
              "rawMarkdown": "\"I used nano and 1024 input\"\n\nthanks! \nit is interesting that i never get good results for 1024. \n1024 never give LB greater than 0.50 for me (for small or big models)\nthis is different from other kagglers.\n\nmaybe i need to think more about it\n\n"
            }
          ]
        },
        {
          "id": 2096758,
          "postDate": "2023-01-12T08:39:42.617Z",
          "content": "<p>My experience with ConvNext has been very bad in the past in terms of speed, especially inference. Maybe there have been some improvements recently, interesting that nano is faster for you there.</p>",
          "rawMarkdown": "My experience with ConvNext has been very bad in the past in terms of speed, especially inference. Maybe there have been some improvements recently, interesting that nano is faster for you there.",
          "votes": 4
        },
        {
          "id": 2097854,
          "postDate": "2023-01-13T02:08:24.750Z",
          "content": "<p><a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a> Did you use something similar to this paper (<a href=\"https://arxiv.org/pdf/2111.11429.pdf\" target=\"_blank\">https://arxiv.org/pdf/2111.11429.pdf</a>) aka windowed attention + few global attention blocks ? Otherwise, I guess it's impossible to train and infer ViT-B at 1536x960.</p>",
          "rawMarkdown": "@hengck23 Did you use something similar to this paper (https://arxiv.org/pdf/2111.11429.pdf) aka windowed attention + few global attention blocks ? Otherwise, I guess it's impossible to train and infer ViT-B at 1536x960.",
          "replies": [
            {
              "id": 2097900,
              "postDate": "2023-01-13T03:36:08.590Z",
              "content": "<p>Nope. I was using  Z8 by HP workstation with 2x A6000 48GB Nvidia GPU cards</p>",
              "rawMarkdown": "Nope. I was using  Z8 by HP workstation with 2x A6000 48GB Nvidia GPU cards",
              "votes": 2
            },
            {
              "id": 2097901,
              "postDate": "2023-01-13T03:38:27.170Z",
              "content": "<p>maybe you can try gradient checkpointing … a bit slower</p>",
              "rawMarkdown": "maybe you can try gradient checkpointing ... a bit slower",
              "votes": 1
            }
          ]
        }
      ]
    },
    {
      "id": 2096756,
      "postDate": "2023-01-12T08:38:34.373Z",
      "content": "<p>Was already discussed here: <a href=\"https://www.kaggle.com/competitions/rsna-breast-cancer-detection/discussion/375791\" target=\"_blank\">https://www.kaggle.com/competitions/rsna-breast-cancer-detection/discussion/375791</a></p>\n<p>And keep an eye out on the license (it has same license in timm)</p>",
      "rawMarkdown": "Was already discussed here: https://www.kaggle.com/competitions/rsna-breast-cancer-detection/discussion/375791\n\nAnd keep an eye out on the license (it has same license in timm)",
      "votes": 2,
      "replies": [
        {
          "id": 2096761,
          "postDate": "2023-01-12T08:44:03.377Z",
          "content": "<p>Oh I missed that, I'll add the link in the post. Good to know the license issue.</p>",
          "rawMarkdown": "Oh I missed that, I'll add the link in the post. Good to know the license issue.",
          "replies": [
            {
              "id": 2096798,
              "postDate": "2023-01-12T09:11:06.633Z",
              "rawMarkdown": "",
              "isDeleted": true
            }
          ]
        },
        {
          "id": 2096799,
          "postDate": "2023-01-12T09:11:21.573Z",
          "content": "<p>so according to the license, can we use convnextv2 at last?</p>",
          "rawMarkdown": "so according to the license, can we use convnextv2 at last?"
        }
      ]
    },
    {
      "id": 2121220,
      "postDate": "2023-01-30T06:15:01.150Z",
      "content": "<p>I switched to ConvNextv2, but it seems to be slower than eff-net-v2.</p>",
      "rawMarkdown": "I switched to ConvNextv2, but it seems to be slower than eff-net-v2.\n"
    },
    {
      "id": 2099747,
      "postDate": "2023-01-14T17:13:51.200Z",
      "content": "<p>Any news about LB score?</p>\n<p>Thank you for sharing this BTW</p>\n<p>The Devastator.</p>",
      "rawMarkdown": "Any news about LB score?\n\nThank you for sharing this BTW\n\nThe Devastator.\n",
      "replies": [
        {
          "id": 2101485,
          "postDate": "2023-01-16T00:25:17.830Z",
          "content": "<p>It's not stable, but I already saw 0.01 boost on LB than <code>efficientnetv2_s</code></p>",
          "rawMarkdown": "It's not stable, but I already saw 0.01 boost on LB than `efficientnetv2_s`"
        }
      ]
    },
    {
      "id": 2098389,
      "postDate": "2023-01-13T13:51:12.287Z",
      "content": "<p></p>\n<p></p>\n<p>My mistake, the differences are not coming from the version of <code>timm</code>.</p>",
      "rawMarkdown": "~~Be careful that after installing `timm` from source (`0.8.6.dev` version), my efficientnet can not reproduce the previous experiments with `0.6.12` version, CV fp1 drops a little bit.~~\n\n~~There has been a lot of changes between the two version and I'm not sure why is this hapenning.~~\n\nMy mistake, the differences are not coming from the version of `timm`.",
      "replies": [
        {
          "id": 2098397,
          "postDate": "2023-01-13T14:06:39.603Z",
          "content": "<p>this is a common fact (for efficientnet)<br>\nyou need to retrain or finetune with the new version timm.</p>\n<p>alternatively you can:</p>\n<ol>\n<li>create one py file call use_old_timm.py. import the the old timm and define your efficientnet model there</li>\n<li>create another py file call use_new_timm.py. import the new timm here.</li>\n</ol>\n<hr>\n<p>or</p>\n<pre><code>def function_one():\n      import xxx  #old version\n\ndef function_two():\n      import xxx  #new version\n</code></pre>\n<p>you your notebook import  use_old_timm.py and use_new_timm.py</p>\n<hr>\n<p>or you can use torch jit to save the model and load (the model definition is saved in jit model)</p>",
          "rawMarkdown": "this is a common fact (for efficientnet)\nyou need to retrain or finetune with the new version timm.\n\nalternatively you can:\n1. create one py file call use_old_timm.py. import the the old timm and define your efficientnet model there\n2. create another py file call use_new_timm.py. import the new timm here.\n\n---\n\nor\n\n```\ndef function_one():\n      import xxx  #old version\n\ndef function_two():\n      import xxx  #new version\n```\n\nyou your notebook import  use_old_timm.py and use_new_timm.py\n\n---\n\nor you can use torch jit to save the model and load (the model definition is saved in jit model)\n",
          "votes": 1,
          "replies": [
            {
              "id": 2098454,
              "postDate": "2023-01-13T15:17:49.020Z",
              "content": "<p>Thanks <a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a> , haven't been thought about using <code>jit</code> but it's truly a brilliant way to handle the version issue here.</p>",
              "rawMarkdown": "Thanks @hengck23 , haven't been thought about using `jit` but it's truly a brilliant way to handle the version issue here."
            }
          ]
        },
        {
          "id": 2098552,
          "postDate": "2023-01-13T16:42:53.330Z",
          "content": "<p>why I pip install the  --pre timm,  using the create_model(), error that \"the model name\" is not found?</p>\n<p>though they are listed:<br>\n 'convnextv2_atto.fcmae',<br>\n 'convnextv2_atto.fcmae_ft_in1k',<br>\n 'convnextv2_base.fcmae',<br>\n 'convnextv2_base.fcmae_ft_in1k',<br>\n 'convnextv2_base.fcmae_ft_in22k_in1k',<br>\n 'convnextv2_base.fcmae_ft_in22k_in1k_384',<br>\n 'convnextv2_femto.fcmae',<br>\n 'convnextv2_femto.fcmae_ft_in1k',<br>\n 'convnextv2_huge.fcmae',<br>\n 'convnextv2_huge.fcmae_ft_in1k',<br>\n 'convnextv2_huge.fcmae_ft_in22k_in1k_384',<br>\n 'convnextv2_huge.fcmae_ft_in22k_in1k_512',<br>\n 'convnextv2_large.fcmae',<br>\n 'convnextv2_large.fcmae_ft_in1k',<br>\n 'convnextv2_large.fcmae_ft_in22k_in1k',<br>\n 'convnextv2_large.fcmae_ft_in22k_in1k_384',<br>\n 'convnextv2_nano.fcmae',<br>\n 'convnextv2_nano.fcmae_ft_in1k',<br>\n 'convnextv2_nano.fcmae_ft_in22k_in1k',<br>\n 'convnextv2_nano.fcmae_ft_in22k_in1k_384',<br>\n 'convnextv2_pico.fcmae',<br>\n 'convnextv2_pico.fcmae_ft_in1k',<br>\n 'convnextv2_tiny.fcmae',<br>\n 'convnextv2_tiny.fcmae_ft_in1k',<br>\n 'convnextv2_tiny.fcmae_ft_in22k_in1k',<br>\n 'convnextv2_tiny.fcmae_ft_in22k_in1k_384',</p>",
          "rawMarkdown": "why I pip install the  --pre timm,  using the create_model(), error that \"the model name\" is not found?\n\nthough they are listed:\n 'convnextv2_atto.fcmae',\n 'convnextv2_atto.fcmae_ft_in1k',\n 'convnextv2_base.fcmae',\n 'convnextv2_base.fcmae_ft_in1k',\n 'convnextv2_base.fcmae_ft_in22k_in1k',\n 'convnextv2_base.fcmae_ft_in22k_in1k_384',\n 'convnextv2_femto.fcmae',\n 'convnextv2_femto.fcmae_ft_in1k',\n 'convnextv2_huge.fcmae',\n 'convnextv2_huge.fcmae_ft_in1k',\n 'convnextv2_huge.fcmae_ft_in22k_in1k_384',\n 'convnextv2_huge.fcmae_ft_in22k_in1k_512',\n 'convnextv2_large.fcmae',\n 'convnextv2_large.fcmae_ft_in1k',\n 'convnextv2_large.fcmae_ft_in22k_in1k',\n 'convnextv2_large.fcmae_ft_in22k_in1k_384',\n 'convnextv2_nano.fcmae',\n 'convnextv2_nano.fcmae_ft_in1k',\n 'convnextv2_nano.fcmae_ft_in22k_in1k',\n 'convnextv2_nano.fcmae_ft_in22k_in1k_384',\n 'convnextv2_pico.fcmae',\n 'convnextv2_pico.fcmae_ft_in1k',\n 'convnextv2_tiny.fcmae',\n 'convnextv2_tiny.fcmae_ft_in1k',\n 'convnextv2_tiny.fcmae_ft_in22k_in1k',\n 'convnextv2_tiny.fcmae_ft_in22k_in1k_384',\n\n\n",
          "replies": [
            {
              "id": 2098678,
              "postDate": "2023-01-13T18:19:59.073Z",
              "content": "<p>this worked <code>pip install git+https://github.com/rwightman/pytorch-image-models.git</code></p>",
              "rawMarkdown": "this worked `pip install git+https://github.com/rwightman/pytorch-image-models.git`",
              "votes": 4
            },
            {
              "id": 2099061,
              "postDate": "2023-01-14T06:07:56.810Z",
              "content": "<p>Thanks. I may try it later.</p>",
              "rawMarkdown": "Thanks. I may try it later.",
              "votes": 1
            }
          ]
        }
      ]
    },
    {
      "id": 2099204,
      "postDate": "2023-01-14T08:47:26.767Z",
      "rawMarkdown": "",
      "votes": -1,
      "isDeleted": true
    }
  ],
  "comments": [
    {
      "id": 2112342,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "2023-01-23T14:59:33.367000",
      "content": "<p><a href=\"https://github.com/rwightman/pytorch-image-models\" target=\"_blank\">https://github.com/rwightman/pytorch-image-models</a></p>\n<p>rwightman retrained convnext v1  and they become as good as v2.<br>\nv1 can be used for commerical. (but v2 cannot)</p>\n<p>i tested some models, they are good<br>\nconvnext_tiny.in12k_ft_in1k_384 - 85.1 @ 384<br>\nconvnext_small.in12k_ft_in1k_384 - 86.2 @ 384</p>",
      "votes": 3,
      "replies": [
        {
          "id": 2112488,
          "author_name": "Remek Kinas",
          "author_url": "",
          "post_date": "2023-01-23T16:52:54.160000",
          "content": "<p>I tested convnext_v1 and compared it to maxvit. Still have problem with site=1 score. Probably this is why my single model is unable to jump over 0.5 (have not tried blend so far - still looking for better single model).</p>\n<p><img src=\"https://i.ibb.co/KmkbVk1/001-max.jpg\" alt=\"\"></p>\n<p><img src=\"https://i.ibb.co/WvnBnBk/001-conv.jpg\" alt=\"\"></p>",
          "votes": 3,
          "replies": [
            {
              "id": 2112682,
              "author_name": "outwrest",
              "author_url": "",
              "post_date": "2023-01-23T18:49:02.933000",
              "content": "<p>What image size did you use for these archs? I am having a lot of trouble getting a stable training on bigger architectures (especially transformers) even with a 3090 without lowering image size significantly</p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 2112696,
              "author_name": "Remek Kinas",
              "author_url": "",
              "post_date": "2023-01-23T18:58:53.973000",
              "content": "<p>(4 * 384, 2 * 384) - I use A100 (80GB RAM GPU) or A6000 - bs=16 no matter what machine I use </p>",
              "votes": 2,
              "replies": []
            },
            {
              "id": 2112699,
              "author_name": "outwrest",
              "author_url": "",
              "post_date": "2023-01-23T19:07:07.577000",
              "content": "<p>😨😲😲😲😲</p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 2112702,
              "author_name": "Remek Kinas",
              "author_url": "",
              "post_date": "2023-01-23T19:11:29.593000",
              "content": "<p>But do not worry - I am sure people have less resources and certainly better results 😂</p>",
              "votes": 1,
              "replies": []
            },
            {
              "id": 2113151,
              "author_name": "hengck23",
              "author_url": "",
              "post_date": "2023-01-24T05:37:18.260000",
              "content": "<p>this is for base<br>\n<img src=\"https://i.ibb.co/wNkZgx4/Selection-673.png\" alt=\"https://i.ibb.co/wNkZgx4/Selection-673.png\"><br>\nonly half an epoch<br>\n(training in progress)</p>\n<p>this is for small<br>\n<img src=\"https://i.ibb.co/sg78K60/Selection-674.png\" alt=\"https://i.ibb.co/sg78K60/Selection-674.png\"></p>\n<p>yes i need to think of how to improve site1 performance</p>",
              "votes": 1,
              "replies": []
            },
            {
              "id": 2113271,
              "author_name": "Remek Kinas",
              "author_url": "",
              "post_date": "2023-01-24T07:19:11.980000",
              "content": "<p>Here is another example:</p>\n<ul>\n<li>site2 - probf1 - 0.72 / prec/recall: 0.84/0.62</li>\n<li>site1 - probf1 only 0.29 and low prec/recall</li>\n</ul>\n<p><img src=\"https://i.ibb.co/MPbdG4z/s001.jpg\" alt=\"\"></p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 2113309,
              "author_name": "hengck23",
              "author_url": "",
              "post_date": "2023-01-24T08:01:21.413000",
              "content": "<p>site2 results is very good</p>\n<p>i am trying the following:</p>\n<ol>\n<li>try different seed</li>\n<li>try to weigh site1 or to limit the loss of site2 (site aware margin or focal loss), if the model cannot lower the loss of site2 then it must try to lower the loss of other sample</li>\n<li>try to make site2 samples temporarily invisible (e.g. sampling)</li>\n<li>distill site1 prediction from another model (eg nextvit) as aux loss</li>\n</ol>",
              "votes": 2,
              "replies": []
            },
            {
              "id": 2113413,
              "author_name": "Remek Kinas",
              "author_url": "",
              "post_date": "2023-01-24T09:19:00.200000",
              "content": "<p>Thank you very much for prompts. I will report changes when they appear. </p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 2113462,
              "author_name": "Remek Kinas",
              "author_url": "",
              "post_date": "2023-01-24T09:44:54.013000",
              "content": "<p>I thnink that model could be good as well for site_1 but … </p>\n<ul>\n<li>the best threshold for my model is 0.5</li>\n<li>I see many good predictions for patient - I assume that cancer is present on one image and then rest of images are annotated as positive as well (but model can't \"see\" cancer o it). This is my assumption only.</li>\n<li>all prediction presented below are positive but solution (mean / max) see it as negative (below th).</li>\n</ul>\n<p><img src=\"https://i.ibb.co/0QmdXgr/si-001.jpg\" alt=\"\"></p>",
              "votes": 2,
              "replies": []
            },
            {
              "id": 2113482,
              "author_name": "hengck23",
              "author_url": "",
              "post_date": "2023-01-24T09:58:35.960000",
              "content": "<p>you can do the following:</p>\n<ol>\n<li>show the class activation map for all images of the same one case. There are a few possibility<br>\na. the lower score is due the lesion being visible in the top score view and occluded other low score view<br>\nb. actually the high score is due to \"noise\", e.g letters, corners … so the results is wrong </li>\n</ol>\n<p>if the case is a, then the best way is replace mean() to learned function to combine results , e.g. attention pooling over multiple images, multiple instance, e.g …</p>\n<p>if the lesion is actually visible in many views but the score is only one view, you should enforce score consistency. (e.g. consistency loss, feature consistency, or better augmentation to move from one view to another, … mixup, etc)</p>\n<hr>\n<p>but you only show results for positive case. you should also analyze results for negative image or false positive. It is not known that poor  site 1 results is due to difficult pos images or   difficult neg images</p>",
              "votes": 1,
              "replies": []
            },
            {
              "id": 2113491,
              "author_name": "hengck23",
              "author_url": "",
              "post_date": "2023-01-24T10:01:03.973000",
              "content": "<p>\"I thnink that model could be good as well for site_1 but \"</p>\n<p>check why site 2 don't have this problem. i think site 2 pos images have higher score (hence averaging, the score is still high)  or site 2 has less number of images and hence higher score</p>\n<p>maybe we need number aware averaging, aka attention pool …</p>",
              "votes": 1,
              "replies": []
            },
            {
              "id": 2113511,
              "author_name": "hengck23",
              "author_url": "",
              "post_date": "2023-01-24T10:19:12.540000",
              "content": "<p><a href=\"https://www.kaggle.com/remekkinas\" target=\"_blank\">@remekkinas</a> </p>\n<p>maybe you have discovered some magic</p>\n<p><img src=\"https://i.ibb.co/276Wxq9/Selection-676.png\" alt=\"https://i.ibb.co/276Wxq9/Selection-676.png\"></p>\n<p>a quick test of attention pooling</p>\n<p><a href=\"https://stackoverflow.com/questions/20069009/pandas-get-topmost-n-records-within-each-group\" target=\"_blank\">https://stackoverflow.com/questions/20069009/pandas-get-topmost-n-records-within-each-group</a></p>\n<pre><code>        # group by mean of top3\n        gb = site_df[['site_id', 'patient_id', 'laterality', 'cancer_t', 'cancer_p']].groupby(\n            ['patient_id', 'laterality']).head(3).reset_index(drop=True)\n        gb = gb[['site_id', 'patient_id', 'laterality', 'cancer_t', 'cancer_p']].groupby(\n            ['patient_id', 'laterality']).mean()\n\n        gb.loc[:, 'cancer_t'] = gb.cancer_t.astype(int)\n        m = compute_metric(gb.cancer_p, gb.cancer_t)\n        text = f'{\"top3   mean()\": &lt;16} [{site_id}]'\n        text += f'\\t{m[\"auc\"]:0.5f}'\n</code></pre>\n<p>mean is wrong!!!!<br>\nmean = numerator/ denominator = sum/num of images</p>\n<p>the more images, the greater is the denominator<br>\nthe better score for occluded lesion (i.e. should have more negative score), the smaller is the numerator</p>",
              "votes": 2,
              "replies": []
            },
            {
              "id": 2113554,
              "author_name": "hengck23",
              "author_url": "",
              "post_date": "2023-01-24T10:41:15.113000",
              "content": "<pre><code>    d1 = train_df[train_df.site_id == 1]\n    d2 = train_df[train_df.site_id == 2]\n\n    gb = d1.groupby(['patient_id', 'laterality'])['image_id'].count()\n    gb.value_counts()\n    gb = d2.groupby(['patient_id', 'laterality'])['image_id'].count()\n    gb.value_counts()\n\n\n    '''\n    site1\n    2    6990\n    3    3442\n    4     893\n    5     239\n    6      60\n    7      10\n    8       2\n\n\n    site2\n    2    11394\n    3      785\n    4       11\n\n    '''\n</code></pre>",
              "votes": 1,
              "replies": []
            },
            {
              "id": 2113575,
              "author_name": "Remek Kinas",
              "author_url": "",
              "post_date": "2023-01-24T10:49:55.713000",
              "content": "<p>yes, exactly … in my tests in case of more images per patient I tried to take two largest proba but did not work.  </p>\n<pre><code>df.groupby(['patient_id','laterality']).apply(lambda x: x.nlargest(2,'cancer_p'))\n</code></pre>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 2113585,
              "author_name": "hengck23",
              "author_url": "",
              "post_date": "2023-01-24T10:53:28.813000",
              "content": "<p>largest 2 does not work for me.<br>\ni need 3.</p>\n<p>but the correct method is to learn a pooling function.<br>\nnow i am doing experiments and searching for paper.</p>\n<p>i think there are some kaggle competition that try to classify product for e-commerce based on a set of images (rather than single image)</p>",
              "votes": 2,
              "replies": []
            },
            {
              "id": 2113638,
              "author_name": "Remek Kinas",
              "author_url": "",
              "post_date": "2023-01-24T11:33:40.533000",
              "content": "<p>For me it works as well. Some small gain.</p>\n<p><img src=\"https://i.ibb.co/2FDq7W2/si009.jpg\" alt=\"\"></p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 2113839,
              "author_name": "hengck23",
              "author_url": "",
              "post_date": "2023-01-24T14:37:21.247000",
              "content": "<p>\"some small gain.\"</p>\n<p>this is true gain (both recall and precision improve). i am making a submission now and have to wait for results.</p>\n<p>if LB also improves, it would means that not all  images are useful for site1. correctly removing some images may improve results or we should train as bags?</p>\n<p>you can submit single site only to see if LB score for site2 is better than site1.<br>\nand also if the instability in LB is due to site1</p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 2113856,
              "author_name": "Remek Kinas",
              "author_url": "",
              "post_date": "2023-01-24T14:47:11.400000",
              "content": "<p>I submitted with top3 and waiting for results. <br>\nRest tests in progress - let you know if find something.</p>\n<p>BTW: this model (single model) gave me 0.51 LB (without top3)</p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 2114328,
              "author_name": "Remek Kinas",
              "author_url": "",
              "post_date": "2023-01-24T22:09:34.157000",
              "content": "<p><a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a> - for me head(3) on LB did not increase score. For sure thinking about multiple images per side should be investigated.</p>",
              "votes": 1,
              "replies": []
            },
            {
              "id": 2114386,
              "author_name": "hengck23",
              "author_url": "",
              "post_date": "2023-01-25T00:13:12.733000",
              "content": "<p>for me , it results in the same score</p>\n<p>this is a possibility that the public test has more site2 images that is why LB score is (much) higher than CV?</p>\n<p>maybe some kaggler will probe and report?</p>",
              "votes": 1,
              "replies": []
            },
            {
              "id": 2114650,
              "author_name": "Remek Kinas",
              "author_url": "",
              "post_date": "2023-01-25T06:34:43.840000",
              "content": "<p>Look here: <a href=\"https://www.kaggle.com/code/tomooinubushi/some-lb-probing-results-to-share/notebook\" target=\"_blank\">https://www.kaggle.com/code/tomooinubushi/some-lb-probing-results-to-share/notebook</a></p>\n<blockquote>\n  <p>There are no new site ID in test dataset. <br>\n  No. of images in site ID 1 &gt; No. of images in site ID 2. (by <a href=\"https://www.kaggle.com/yujiariyasu\" target=\"_blank\">@yujiariyasu</a>)</p>\n</blockquote>\n<p>Most of my false alarms and misses come from machine_id = 49</p>\n<blockquote>\n  <p>ore than 40% of images are from machine ID 49 (43% for train dataset) (by <a href=\"https://www.kaggle.com/kaggleqrdl\" target=\"_blank\">@kaggleqrdl</a>)</p>\n</blockquote>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 2120468,
              "author_name": "hengck23",
              "author_url": "",
              "post_date": "2023-01-29T16:08:29.167000",
              "content": "<p><a href=\"https://www.kaggle.com/remekkinas\" target=\"_blank\">@remekkinas</a> </p>\n<p>here is a good method to do multiple image prediction.<br>\n<a href=\"https://www.kaggle.com/competitions/rsna-breast-cancer-detection/discussion/370333#2120459\" target=\"_blank\">https://www.kaggle.com/competitions/rsna-breast-cancer-detection/discussion/370333#2120459</a></p>",
              "votes": 2,
              "replies": []
            },
            {
              "id": 2120476,
              "author_name": "Remek Kinas",
              "author_url": "",
              "post_date": "2023-01-29T16:13:58.897000",
              "content": "<p>Thank you! I am reading.</p>\n<p>I still working using single model (no blend) - now it is LB 0.57 but today made some changes (I had some bug in inference part) and I think in two days should be over 0.6 (I hope).</p>\n<p>I am afraid … shakeup in this competition is really possible. Score is very sensitive on th. Still looking for some postprocessing ideas.</p>\n<p>Now changes I made:</p>\n<ul>\n<li>new way of dicom processing - now I am sure in 100% that all are processed consistently</li>\n<li>some discoveries during submission</li>\n</ul>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 2120508,
              "author_name": "hengck23",
              "author_url": "",
              "post_date": "2023-01-29T16:43:20.583000",
              "content": "<p>\"shakeup in this competition is really possible.\"<br>\nthat is very true, but you should be able to compute the range of shakeup</p>\n<p>\"Still looking for some postprocessing ideas.\"<br>\nspend some time to think how to use probing to produce a more stable results too.<br>\n(there aren't many +ve cases in the hidden test and i think the top kagglers have a way to make the best guess)</p>",
              "votes": 1,
              "replies": []
            }
          ]
        }
      ]
    },
    {
      "id": 2102253,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "2023-01-16T13:42:43.800000",
      "content": "<p>ignore the issue of license aside, i think ConvNeXt-V2 is ggod.<br>\nMy training is still in porgress but training/validation log looks good.<br>\nI am working on ConvNeXt-V2-small </p>\n<p>it seems that large model (imagenet top-1 0.86 and above) of vision transformer and 2nd geration of cnn (like ConvNeXt-V2) uses low initial learning rate and just need few epoches. This is very much like transfer learning of large language model BERT given a few ten thousands of text train samples.</p>",
      "votes": 4,
      "replies": [
        {
          "id": 2102261,
          "author_name": "Chenglu",
          "author_url": "",
          "post_date": "2023-01-16T13:45:51.303000",
          "content": "<p>I have the same observation with the low initial learning rate.</p>",
          "votes": 0,
          "replies": [
            {
              "id": 2102272,
              "author_name": "hengck23",
              "author_url": "",
              "post_date": "2023-01-16T13:53:09.553000",
              "content": "<p>so the good results come from low learning rate of transfer learning.<br>\nthis is the same case for NextVIT.</p>\n<p>but i am surprise that imagenet/natural image  can represent mammography images.</p>\n<p>i though this can be a new research area: <a href=\"https://hirokatsukataoka16.github.io/Pretraining-without-Natural-Images/\" target=\"_blank\">https://hirokatsukataoka16.github.io/Pretraining-without-Natural-Images/</a><br>\nsome synthetic images gneration for medical images if you understand how the medical devices woprk</p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 2102275,
              "author_name": "hengck23",
              "author_url": "",
              "post_date": "2023-01-16T13:55:24.683000",
              "content": "<p>any kaggler want to try transfer learning for giant VIT:</p>\n<p><a href=\"https://github.com/rwightman/pytorch-image-models/blob/main/results/results-imagenet.csv\" target=\"_blank\">https://github.com/rwightman/pytorch-image-models/blob/main/results/results-imagenet.csv</a><br>\neva_giant_patch14_560.m30m_ft_in22k_in1k    <br>\ntop1=89.796    <br>\nparams=1,014.45</p>",
              "votes": 1,
              "replies": []
            }
          ]
        }
      ]
    },
    {
      "id": 2096691,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "2023-01-12T08:08:27.973000",
      "content": "<p>thanks! the paper seems to suggest it is on par with vision trasnformer</p>\n<p>which of the variant did you try?<br>\ne.g. huge, base, tiny …</p>\n<p>i am more concern about the speed. what is the speed of  ConvNeXt V2 compared to efficientnet?<br>\n(i got a few good results with vision transformer, but their speed are slower than efficient especially for large ersolution beyond 1024)</p>\n<p>e.g. 1x single fold transformer nextVIT-B for 1536x960 has LB 0.56 but takes 9hrs (local cv 0.50, imagenet top1 83.2 at 224x224).it uses up all my time.</p>",
      "votes": 4,
      "replies": [
        {
          "id": 2096732,
          "author_name": "Chenglu",
          "author_url": "",
          "post_date": "2023-01-12T08:25:52.150000",
          "content": "<p>I used nano and 1024 input, it's faster than efficientnetv2_s, which is the main model I've been used so far. And CV score is 0.05 better than efficientnetv2_s with the same input.</p>\n<p>I'll have more experiments on this and update the results.</p>",
          "votes": 5,
          "replies": [
            {
              "id": 2096764,
              "author_name": "hengck23",
              "author_url": "",
              "post_date": "2023-01-12T08:48:06.080000",
              "content": "<p>\"I used nano and 1024 input\"</p>\n<p>thanks! <br>\nit is interesting that i never get good results for 1024. <br>\n1024 never give LB greater than 0.50 for me (for small or big models)<br>\nthis is different from other kagglers.</p>\n<p>maybe i need to think more about it</p>",
              "votes": 0,
              "replies": []
            }
          ]
        },
        {
          "id": 2096758,
          "author_name": "Psi",
          "author_url": "",
          "post_date": "2023-01-12T08:39:42.617000",
          "content": "<p>My experience with ConvNext has been very bad in the past in terms of speed, especially inference. Maybe there have been some improvements recently, interesting that nano is faster for you there.</p>",
          "votes": 4,
          "replies": []
        },
        {
          "id": 2097854,
          "author_name": "NguyenThanhNhan",
          "author_url": "",
          "post_date": "2023-01-13T02:08:24.750000",
          "content": "<p><a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a> Did you use something similar to this paper (<a href=\"https://arxiv.org/pdf/2111.11429.pdf\" target=\"_blank\">https://arxiv.org/pdf/2111.11429.pdf</a>) aka windowed attention + few global attention blocks ? Otherwise, I guess it's impossible to train and infer ViT-B at 1536x960.</p>",
          "votes": 0,
          "replies": [
            {
              "id": 2097900,
              "author_name": "hengck23",
              "author_url": "",
              "post_date": "2023-01-13T03:36:08.590000",
              "content": "<p>Nope. I was using  Z8 by HP workstation with 2x A6000 48GB Nvidia GPU cards</p>",
              "votes": 2,
              "replies": []
            },
            {
              "id": 2097901,
              "author_name": "hengck23",
              "author_url": "",
              "post_date": "2023-01-13T03:38:27.170000",
              "content": "<p>maybe you can try gradient checkpointing … a bit slower</p>",
              "votes": 1,
              "replies": []
            }
          ]
        }
      ]
    },
    {
      "id": 2096756,
      "author_name": "Psi",
      "author_url": "",
      "post_date": "2023-01-12T08:38:34.373000",
      "content": "<p>Was already discussed here: <a href=\"https://www.kaggle.com/competitions/rsna-breast-cancer-detection/discussion/375791\" target=\"_blank\">https://www.kaggle.com/competitions/rsna-breast-cancer-detection/discussion/375791</a></p>\n<p>And keep an eye out on the license (it has same license in timm)</p>",
      "votes": 2,
      "replies": [
        {
          "id": 2096761,
          "author_name": "Chenglu",
          "author_url": "",
          "post_date": "2023-01-12T08:44:03.377000",
          "content": "<p>Oh I missed that, I'll add the link in the post. Good to know the license issue.</p>",
          "votes": 0,
          "replies": [
            {
              "id": 2096798,
              "author_name": "",
              "author_url": "",
              "post_date": "2023-01-12T09:11:06.633000",
              "content": "",
              "votes": 0,
              "replies": []
            }
          ]
        },
        {
          "id": 2096799,
          "author_name": "Mr.Fire",
          "author_url": "",
          "post_date": "2023-01-12T09:11:21.573000",
          "content": "<p>so according to the license, can we use convnextv2 at last?</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 2121220,
      "author_name": "ECO",
      "author_url": "",
      "post_date": "2023-01-30T06:15:01.150000",
      "content": "<p>I switched to ConvNextv2, but it seems to be slower than eff-net-v2.</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 2099747,
      "author_name": "The Devastator",
      "author_url": "",
      "post_date": "2023-01-14T17:13:51.200000",
      "content": "<p>Any news about LB score?</p>\n<p>Thank you for sharing this BTW</p>\n<p>The Devastator.</p>",
      "votes": 0,
      "replies": [
        {
          "id": 2101485,
          "author_name": "Chenglu",
          "author_url": "",
          "post_date": "2023-01-16T00:25:17.830000",
          "content": "<p>It's not stable, but I already saw 0.01 boost on LB than <code>efficientnetv2_s</code></p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 2098389,
      "author_name": "Chenglu",
      "author_url": "",
      "post_date": "2023-01-13T13:51:12.287000",
      "content": "<p></p>\n<p></p>\n<p>My mistake, the differences are not coming from the version of <code>timm</code>.</p>",
      "votes": 0,
      "replies": [
        {
          "id": 2098397,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2023-01-13T14:06:39.603000",
          "content": "<p>this is a common fact (for efficientnet)<br>\nyou need to retrain or finetune with the new version timm.</p>\n<p>alternatively you can:</p>\n<ol>\n<li>create one py file call use_old_timm.py. import the the old timm and define your efficientnet model there</li>\n<li>create another py file call use_new_timm.py. import the new timm here.</li>\n</ol>\n<hr>\n<p>or</p>\n<pre><code>def function_one():\n      import xxx  #old version\n\ndef function_two():\n      import xxx  #new version\n</code></pre>\n<p>you your notebook import  use_old_timm.py and use_new_timm.py</p>\n<hr>\n<p>or you can use torch jit to save the model and load (the model definition is saved in jit model)</p>",
          "votes": 1,
          "replies": [
            {
              "id": 2098454,
              "author_name": "Chenglu",
              "author_url": "",
              "post_date": "2023-01-13T15:17:49.020000",
              "content": "<p>Thanks <a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a> , haven't been thought about using <code>jit</code> but it's truly a brilliant way to handle the version issue here.</p>",
              "votes": 0,
              "replies": []
            }
          ]
        },
        {
          "id": 2098552,
          "author_name": "dragon zhang",
          "author_url": "",
          "post_date": "2023-01-13T16:42:53.330000",
          "content": "<p>why I pip install the  --pre timm,  using the create_model(), error that \"the model name\" is not found?</p>\n<p>though they are listed:<br>\n 'convnextv2_atto.fcmae',<br>\n 'convnextv2_atto.fcmae_ft_in1k',<br>\n 'convnextv2_base.fcmae',<br>\n 'convnextv2_base.fcmae_ft_in1k',<br>\n 'convnextv2_base.fcmae_ft_in22k_in1k',<br>\n 'convnextv2_base.fcmae_ft_in22k_in1k_384',<br>\n 'convnextv2_femto.fcmae',<br>\n 'convnextv2_femto.fcmae_ft_in1k',<br>\n 'convnextv2_huge.fcmae',<br>\n 'convnextv2_huge.fcmae_ft_in1k',<br>\n 'convnextv2_huge.fcmae_ft_in22k_in1k_384',<br>\n 'convnextv2_huge.fcmae_ft_in22k_in1k_512',<br>\n 'convnextv2_large.fcmae',<br>\n 'convnextv2_large.fcmae_ft_in1k',<br>\n 'convnextv2_large.fcmae_ft_in22k_in1k',<br>\n 'convnextv2_large.fcmae_ft_in22k_in1k_384',<br>\n 'convnextv2_nano.fcmae',<br>\n 'convnextv2_nano.fcmae_ft_in1k',<br>\n 'convnextv2_nano.fcmae_ft_in22k_in1k',<br>\n 'convnextv2_nano.fcmae_ft_in22k_in1k_384',<br>\n 'convnextv2_pico.fcmae',<br>\n 'convnextv2_pico.fcmae_ft_in1k',<br>\n 'convnextv2_tiny.fcmae',<br>\n 'convnextv2_tiny.fcmae_ft_in1k',<br>\n 'convnextv2_tiny.fcmae_ft_in22k_in1k',<br>\n 'convnextv2_tiny.fcmae_ft_in22k_in1k_384',</p>",
          "votes": 0,
          "replies": [
            {
              "id": 2098678,
              "author_name": "RB",
              "author_url": "",
              "post_date": "2023-01-13T18:19:59.073000",
              "content": "<p>this worked <code>pip install git+https://github.com/rwightman/pytorch-image-models.git</code></p>",
              "votes": 4,
              "replies": []
            },
            {
              "id": 2099061,
              "author_name": "dragon zhang",
              "author_url": "",
              "post_date": "2023-01-14T06:07:56.810000",
              "content": "<p>Thanks. I may try it later.</p>",
              "votes": 1,
              "replies": []
            }
          ]
        }
      ]
    },
    {
      "id": 2099204,
      "author_name": "",
      "author_url": "",
      "post_date": "2023-01-14T08:47:26.767000",
      "content": "",
      "votes": -1,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "2096684": "FAIR just released ConvNeXt V2 about a week ago. I have done some experiments with it and the CV score is about the same as efficientnet. I will have some LB tests i in the coming days.\n\nInstalling it from the official release is a little bit hard since it will do some compilation, luckily `timm` already has it, just install `timm` from the source then we can use it.\n\nAnother related discussion: https://www.kaggle.com/competitions/rsna-breast-cancer-detection/discussion/375791\n\npaper: https://arxiv.org/abs/2301.00808\nofficial source: https://github.com/facebookresearch/ConvNeXt-V2\ntimm: https://github.com/rwightman/pytorch-image-models/blob/main/timm/models/convnext.py#L580",
    "2112342": "https://github.com/rwightman/pytorch-image-models\n\nrwightman retrained convnext v1  and they become as good as v2.\nv1 can be used for commerical. (but v2 cannot)\n\ni tested some models, they are good\nconvnext_tiny.in12k_ft_in1k_384 - 85.1 @ 384\nconvnext_small.in12k_ft_in1k_384 - 86.2 @ 384",
    "2102253": "ignore the issue of license aside, i think ConvNeXt-V2 is ggod.\nMy training is still in porgress but training/validation log looks good.\nI am working on ConvNeXt-V2-small \n\nit seems that large model (imagenet top-1 0.86 and above) of vision transformer and 2nd geration of cnn (like ConvNeXt-V2) uses low initial learning rate and just need few epoches. This is very much like transfer learning of large language model BERT given a few ten thousands of text train samples.\n\n ",
    "2096691": "thanks! the paper seems to suggest it is on par with vision trasnformer\n\nwhich of the variant did you try?\ne.g. huge, base, tiny ...\n\ni am more concern about the speed. what is the speed of  ConvNeXt V2 compared to efficientnet?\n(i got a few good results with vision transformer, but their speed are slower than efficient especially for large ersolution beyond 1024)\n\ne.g. 1x single fold transformer nextVIT-B for 1536x960 has LB 0.56 but takes 9hrs (local cv 0.50, imagenet top1 83.2 at 224x224).it uses up all my time.",
    "2096756": "Was already discussed here: https://www.kaggle.com/competitions/rsna-breast-cancer-detection/discussion/375791\n\nAnd keep an eye out on the license (it has same license in timm)",
    "2121220": "I switched to ConvNextv2, but it seems to be slower than eff-net-v2.\n",
    "2099747": "Any news about LB score?\n\nThank you for sharing this BTW\n\nThe Devastator.\n",
    "2098389": "~~Be careful that after installing `timm` from source (`0.8.6.dev` version), my efficientnet can not reproduce the previous experiments with `0.6.12` version, CV fp1 drops a little bit.~~\n\n~~There has been a lot of changes between the two version and I'm not sure why is this hapenning.~~\n\nMy mistake, the differences are not coming from the version of `timm`.",
    "2099204": ""
  }
}