{
  "id": 369769,
  "title": "Some Remarks & Achieving LB 0.24  (Updated)",
  "url": "/competitions/rsna-breast-cancer-detection/discussion/369769",
  "author_name": "Theo Viel",
  "post_date": "2022-12-01T10:38:52.685000",
  "votes": 47,
  "comment_count": 9,
  "views": 0,
  "content": "<p>Very happy to see a lot of sharing happening in this competition.</p>\n<p>I will contribute a bit more and share a few remarks after a short day of training models :</p>\n<ul>\n<li>The problem is tough, but there seems to be signal in the data. 0.15 LB scores are already good models.</li>\n<li>The metric is hard to increase. A 0.75 AUC model will score about 0.08 pF1.</li>\n<li>Inferring the test set is super long, because dicom processing takes 6+ hours. Time to look into GPU accelerated dicom readers ?</li>\n<li>512x512 (<a href=\"https://www.kaggle.com/datasets/theoviel/rsna-breast-cancer-512-pngs\" target=\"_blank\">link</a>) scores better than 256x256 but you can experiment with 256px. Use Breast ROI cropping if you want to save training time though.</li>\n</ul>\n<p>Also, my inference code is here : <a href=\"https://www.kaggle.com/code/theoviel/rsna-breast-baseline-inference\" target=\"_blank\">https://www.kaggle.com/code/theoviel/rsna-breast-baseline-inference</a></p>\n<p><strong>Update :</strong></p>\n<ul>\n<li>First two points are no longer accurate because of the metric change, add 0.04 to both pF1 scores.</li>\n<li>The jump from 0.09 to 0.24 is explained by two things :<ul>\n<li>Metric change 0.09 -&gt; 0.13 LB</li>\n<li><a href=\"https://www.kaggle.com/competitions/rsna-breast-cancer-detection/discussion/369886\" target=\"_blank\">Tricking the metric</a>, I use hard thresholding and it works (+0.11 LB)</li></ul></li>\n<li>No model or pipeline change !</li>\n</ul>\n<p>Notebook is currently #1 but people who were in front of me before the post-processing trick was disclosed should quickly reclaim their spot. </p>",
  "messages": [
    {
      "id": 2051317,
      "postDate": "2022-12-01T10:38:52.687Z",
      "content": "<p>Very happy to see a lot of sharing happening in this competition.</p>\n<p>I will contribute a bit more and share a few remarks after a short day of training models :</p>\n<ul>\n<li>The problem is tough, but there seems to be signal in the data. 0.15 LB scores are already good models.</li>\n<li>The metric is hard to increase. A 0.75 AUC model will score about 0.08 pF1.</li>\n<li>Inferring the test set is super long, because dicom processing takes 6+ hours. Time to look into GPU accelerated dicom readers ?</li>\n<li>512x512 (<a href=\"https://www.kaggle.com/datasets/theoviel/rsna-breast-cancer-512-pngs\" target=\"_blank\">link</a>) scores better than 256x256 but you can experiment with 256px. Use Breast ROI cropping if you want to save training time though.</li>\n</ul>\n<p>Also, my inference code is here : <a href=\"https://www.kaggle.com/code/theoviel/rsna-breast-baseline-inference\" target=\"_blank\">https://www.kaggle.com/code/theoviel/rsna-breast-baseline-inference</a></p>\n<p><strong>Update :</strong></p>\n<ul>\n<li>First two points are no longer accurate because of the metric change, add 0.04 to both pF1 scores.</li>\n<li>The jump from 0.09 to 0.24 is explained by two things :<ul>\n<li>Metric change 0.09 -&gt; 0.13 LB</li>\n<li><a href=\"https://www.kaggle.com/competitions/rsna-breast-cancer-detection/discussion/369886\" target=\"_blank\">Tricking the metric</a>, I use hard thresholding and it works (+0.11 LB)</li></ul></li>\n<li>No model or pipeline change !</li>\n</ul>\n<p>Notebook is currently #1 but people who were in front of me before the post-processing trick was disclosed should quickly reclaim their spot. </p>",
      "rawMarkdown": "Very happy to see a lot of sharing happening in this competition.\n\nI will contribute a bit more and share a few remarks after a short day of training models :\n- The problem is tough, but there seems to be signal in the data. 0.15 LB scores are already good models.\n- The metric is hard to increase. A 0.75 AUC model will score about 0.08 pF1.\n- Inferring the test set is super long, because dicom processing takes 6+ hours. Time to look into GPU accelerated dicom readers ?\n- 512x512 ([link](https://www.kaggle.com/datasets/theoviel/rsna-breast-cancer-512-pngs)) scores better than 256x256 but you can experiment with 256px. Use Breast ROI cropping if you want to save training time though.\n\nAlso, my inference code is here : https://www.kaggle.com/code/theoviel/rsna-breast-baseline-inference\n\n**Update :**\n- First two points are no longer accurate because of the metric change, add 0.04 to both pF1 scores.\n- The jump from 0.09 to 0.24 is explained by two things :\n  - Metric change 0.09 -> 0.13 LB\n  - [Tricking the metric](https://www.kaggle.com/competitions/rsna-breast-cancer-detection/discussion/369886), I use hard thresholding and it works (+0.11 LB)\n- No model or pipeline change !\n\nNotebook is currently #1 but people who were in front of me before the post-processing trick was disclosed should quickly reclaim their spot. ",
      "votes": 47
    },
    {
      "id": 2053035,
      "postDate": "2022-12-02T18:43:36.260Z",
      "content": "<p>I used cpu instead of gpu ( 4 vs 2 cpus ) it reduced the inference from 7h to 5h  but that with a small effnetb0 and 256 dim, LB .09 with half the ds in training.</p>",
      "rawMarkdown": "I used cpu instead of gpu ( 4 vs 2 cpus ) it reduced the inference from 7h to 5h  but that with a small effnetb0 and 256 dim, LB .09 with half the ds in training.",
      "votes": 5,
      "replies": [
        {
          "id": 2053063,
          "postDate": "2022-12-02T19:09:51.700Z",
          "content": "<p>Interesting, nevertheless my best guess is that we want to use GPU for faster predictions and big image size for better score</p>",
          "rawMarkdown": "Interesting, nevertheless my best guess is that we want to use GPU for faster predictions and big image size for better score",
          "votes": 1
        },
        {
          "id": 2053082,
          "postDate": "2022-12-02T19:56:27.483Z",
          "content": "<p>Yes, smallest model and dim, I always tune with a sample ds set and smaller models. A remark on the way. Final version will be different :)</p>",
          "rawMarkdown": "Yes, smallest model and dim, I always tune with a sample ds set and smaller models. A remark on the way. Final version will be different :)",
          "votes": 1
        },
        {
          "id": 2053265,
          "postDate": "2022-12-03T03:40:54.957Z",
          "content": "<p>You should check whether there are 4 CPUs. Kaggle changed the CPU which now has 30GB RAM. When i checked, both the GPU and CPU Kaggle notebooks have 2 CPUs now. Can you check and confirm?</p>",
          "rawMarkdown": "You should check whether there are 4 CPUs. Kaggle changed the CPU which now has 30GB RAM. When i checked, both the GPU and CPU Kaggle notebooks have 2 CPUs now. Can you check and confirm?"
        },
        {
          "id": 2053393,
          "postDate": "2022-12-03T08:08:45.210Z",
          "content": "<p>Specifications<br>\nKaggle Notebooks run in a remote computational environment. We provide the hardware—you need only worry about the code.</p>\n<p>At time of writing, each Notebook editing session is provided with the following resources:</p>\n<p>12 hours execution time for CPU and GPU notebook sessions and 9 hours for TPU notebook sessions</p>\n<p>20 Gigabytes of auto-saved disk space (/kaggle/working)</p>\n<p>Additional scratchpad disk space (outside /kaggle/working) that will not be saved outside of the current session</p>\n<p>CPU Specifications</p>\n<p>4 CPU cores</p>\n<p>30 Gigabytes of RAM</p>\n<p>P100 GPU Specifications</p>\n<p>1 Nvidia Telsa P100 GPU</p>\n<p>2 CPU cores</p>\n<p>13 Gigabytes of RAM</p>\n<p>T4 x2 GPU Specifications</p>\n<p>2 Nvidia Telsa T4 GPUs</p>\n<p>2 CPU cores</p>\n<p>13 Gigabytes of RAM</p>",
          "rawMarkdown": "Specifications\nKaggle Notebooks run in a remote computational environment. We provide the hardware—you need only worry about the code.\n\nAt time of writing, each Notebook editing session is provided with the following resources:\n\n12 hours execution time for CPU and GPU notebook sessions and 9 hours for TPU notebook sessions\n\n20 Gigabytes of auto-saved disk space (/kaggle/working)\n\nAdditional scratchpad disk space (outside /kaggle/working) that will not be saved outside of the current session\n\nCPU Specifications\n\n4 CPU cores\n\n30 Gigabytes of RAM\n\nP100 GPU Specifications\n\n1 Nvidia Telsa P100 GPU\n\n2 CPU cores\n\n13 Gigabytes of RAM\n\nT4 x2 GPU Specifications\n\n2 Nvidia Telsa T4 GPUs\n\n2 CPU cores\n\n13 Gigabytes of RAM\n"
        },
        {
          "id": 2053413,
          "postDate": "2022-12-03T08:43:15.557Z",
          "content": "<p>Ok, yes. I just loaded two notebooks and ran <code>import os; os.cpu_count()</code>. And yes, the CPU notebook has 4 CPUs and the GPU notebook has 2 CPUs. This is strange because i thought i checked last week and they were both 2. But i guess not. Ignore my comments, sorry for confusion.</p>",
          "rawMarkdown": "Ok, yes. I just loaded two notebooks and ran `import os; os.cpu_count()`. And yes, the CPU notebook has 4 CPUs and the GPU notebook has 2 CPUs. This is strange because i thought i checked last week and they were both 2. But i guess not. Ignore my comments, sorry for confusion."
        },
        {
          "id": 2053914,
          "postDate": "2022-12-03T18:04:26.633Z",
          "content": "<p>Try max instead of mean, it gave higher score for my model.</p>",
          "rawMarkdown": "Try max instead of mean, it gave higher score for my model."
        }
      ]
    },
    {
      "id": 2051416,
      "postDate": "2022-12-01T11:56:34.883Z",
      "content": "<p><a href=\"https://blog.google/technology/ai/icad-partnership-breast-cancer-screening/\" target=\"_blank\">https://blog.google/technology/ai/icad-partnership-breast-cancer-screening/</a></p>\n<p>google AI just blogs about their successful and commercialized mammography breast cancer screening system using deep learning.<br>\nyou can read their papers for a reasonable AUC that has been achieved.</p>\n<p>Fig. 2 | Performance of the AI system and clinical readers in breast cancer prediction. a, The ROC curve of the AI system on the UK screening data. The AUC is 0.889 (95% CI 0.871, 0.907; n=25,856 patients).</p>\n<hr>\n<p><a href=\"https://www.nature.com/articles/s41586-019-1799-6#data-availability\" target=\"_blank\">https://www.nature.com/articles/s41586-019-1799-6#data-availability</a><br>\ni think they have data with annotated boxes for the cancer lesion. you can applied for it but it is not public (unfortunately)<br>\n<a href=\"https://static-content.springer.com/esm/art%3A10.1038%2Fs41586-019-1799-6/MediaObjects/41586_2019_1799_MOESM1_ESM.pdf\" target=\"_blank\">https://static-content.springer.com/esm/art%3A10.1038%2Fs41586-019-1799-6/MediaObjects/41586_2019_1799_MOESM1_ESM.pdf</a></p>",
      "rawMarkdown": "https://blog.google/technology/ai/icad-partnership-breast-cancer-screening/\n\ngoogle AI just blogs about their successful and commercialized mammography breast cancer screening system using deep learning.\nyou can read their papers for a reasonable AUC that has been achieved.\n\nFig. 2 | Performance of the AI system and clinical readers in breast cancer prediction. a, The ROC curve of the AI system on the UK screening data. The AUC is 0.889 (95% CI 0.871, 0.907; n=25,856 patients).\n\n---\n\nhttps://www.nature.com/articles/s41586-019-1799-6#data-availability\ni think they have data with annotated boxes for the cancer lesion. you can applied for it but it is not public (unfortunately)\nhttps://static-content.springer.com/esm/art%3A10.1038%2Fs41586-019-1799-6/MediaObjects/41586_2019_1799_MOESM1_ESM.pdf",
      "votes": 6
    },
    {
      "id": 2051464,
      "postDate": "2022-12-01T12:52:09.463Z",
      "content": "<p>Do not worry <a href=\"https://www.kaggle.com/theoviel\" target=\"_blank\">@theoviel</a>. As I can see this is starter training. We can improve score a lot using some tricks:</p>\n<ul>\n<li>augumentation</li>\n<li>better model </li>\n<li>maybe not pure classification but anomaly detection with AE/GAN</li>\n</ul>",
      "rawMarkdown": "Do not worry @theoviel. As I can see this is starter training. We can improve score a lot using some tricks:\n- augumentation\n- better model \n- maybe not pure classification but anomaly detection with AE/GAN",
      "votes": 2
    }
  ],
  "comments": [
    {
      "id": 2053035,
      "author_name": "Kirderf",
      "author_url": "",
      "post_date": "2022-12-02T18:43:36.260000",
      "content": "<p>I used cpu instead of gpu ( 4 vs 2 cpus ) it reduced the inference from 7h to 5h  but that with a small effnetb0 and 256 dim, LB .09 with half the ds in training.</p>",
      "votes": 5,
      "replies": [
        {
          "id": 2053063,
          "author_name": "Martin Kovacevic Buvinic",
          "author_url": "",
          "post_date": "2022-12-02T19:09:51.700000",
          "content": "<p>Interesting, nevertheless my best guess is that we want to use GPU for faster predictions and big image size for better score</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 2053082,
          "author_name": "Kirderf",
          "author_url": "",
          "post_date": "2022-12-02T19:56:27.483000",
          "content": "<p>Yes, smallest model and dim, I always tune with a sample ds set and smaller models. A remark on the way. Final version will be different :)</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 2053265,
          "author_name": "Chris Deotte",
          "author_url": "",
          "post_date": "2022-12-03T03:40:54.957000",
          "content": "<p>You should check whether there are 4 CPUs. Kaggle changed the CPU which now has 30GB RAM. When i checked, both the GPU and CPU Kaggle notebooks have 2 CPUs now. Can you check and confirm?</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 2053393,
          "author_name": "Kirderf",
          "author_url": "",
          "post_date": "2022-12-03T08:08:45.210000",
          "content": "<p>Specifications<br>\nKaggle Notebooks run in a remote computational environment. We provide the hardware—you need only worry about the code.</p>\n<p>At time of writing, each Notebook editing session is provided with the following resources:</p>\n<p>12 hours execution time for CPU and GPU notebook sessions and 9 hours for TPU notebook sessions</p>\n<p>20 Gigabytes of auto-saved disk space (/kaggle/working)</p>\n<p>Additional scratchpad disk space (outside /kaggle/working) that will not be saved outside of the current session</p>\n<p>CPU Specifications</p>\n<p>4 CPU cores</p>\n<p>30 Gigabytes of RAM</p>\n<p>P100 GPU Specifications</p>\n<p>1 Nvidia Telsa P100 GPU</p>\n<p>2 CPU cores</p>\n<p>13 Gigabytes of RAM</p>\n<p>T4 x2 GPU Specifications</p>\n<p>2 Nvidia Telsa T4 GPUs</p>\n<p>2 CPU cores</p>\n<p>13 Gigabytes of RAM</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 2053413,
          "author_name": "Chris Deotte",
          "author_url": "",
          "post_date": "2022-12-03T08:43:15.557000",
          "content": "<p>Ok, yes. I just loaded two notebooks and ran <code>import os; os.cpu_count()</code>. And yes, the CPU notebook has 4 CPUs and the GPU notebook has 2 CPUs. This is strange because i thought i checked last week and they were both 2. But i guess not. Ignore my comments, sorry for confusion.</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 2053914,
          "author_name": "Kirderf",
          "author_url": "",
          "post_date": "2022-12-03T18:04:26.633000",
          "content": "<p>Try max instead of mean, it gave higher score for my model.</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 2051416,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "2022-12-01T11:56:34.883000",
      "content": "<p><a href=\"https://blog.google/technology/ai/icad-partnership-breast-cancer-screening/\" target=\"_blank\">https://blog.google/technology/ai/icad-partnership-breast-cancer-screening/</a></p>\n<p>google AI just blogs about their successful and commercialized mammography breast cancer screening system using deep learning.<br>\nyou can read their papers for a reasonable AUC that has been achieved.</p>\n<p>Fig. 2 | Performance of the AI system and clinical readers in breast cancer prediction. a, The ROC curve of the AI system on the UK screening data. The AUC is 0.889 (95% CI 0.871, 0.907; n=25,856 patients).</p>\n<hr>\n<p><a href=\"https://www.nature.com/articles/s41586-019-1799-6#data-availability\" target=\"_blank\">https://www.nature.com/articles/s41586-019-1799-6#data-availability</a><br>\ni think they have data with annotated boxes for the cancer lesion. you can applied for it but it is not public (unfortunately)<br>\n<a href=\"https://static-content.springer.com/esm/art%3A10.1038%2Fs41586-019-1799-6/MediaObjects/41586_2019_1799_MOESM1_ESM.pdf\" target=\"_blank\">https://static-content.springer.com/esm/art%3A10.1038%2Fs41586-019-1799-6/MediaObjects/41586_2019_1799_MOESM1_ESM.pdf</a></p>",
      "votes": 6,
      "replies": []
    },
    {
      "id": 2051464,
      "author_name": "Remek Kinas",
      "author_url": "",
      "post_date": "2022-12-01T12:52:09.463000",
      "content": "<p>Do not worry <a href=\"https://www.kaggle.com/theoviel\" target=\"_blank\">@theoviel</a>. As I can see this is starter training. We can improve score a lot using some tricks:</p>\n<ul>\n<li>augumentation</li>\n<li>better model </li>\n<li>maybe not pure classification but anomaly detection with AE/GAN</li>\n</ul>",
      "votes": 2,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "2051317": "Very happy to see a lot of sharing happening in this competition.\n\nI will contribute a bit more and share a few remarks after a short day of training models :\n- The problem is tough, but there seems to be signal in the data. 0.15 LB scores are already good models.\n- The metric is hard to increase. A 0.75 AUC model will score about 0.08 pF1.\n- Inferring the test set is super long, because dicom processing takes 6+ hours. Time to look into GPU accelerated dicom readers ?\n- 512x512 ([link](https://www.kaggle.com/datasets/theoviel/rsna-breast-cancer-512-pngs)) scores better than 256x256 but you can experiment with 256px. Use Breast ROI cropping if you want to save training time though.\n\nAlso, my inference code is here : https://www.kaggle.com/code/theoviel/rsna-breast-baseline-inference\n\n**Update :**\n- First two points are no longer accurate because of the metric change, add 0.04 to both pF1 scores.\n- The jump from 0.09 to 0.24 is explained by two things :\n  - Metric change 0.09 -> 0.13 LB\n  - [Tricking the metric](https://www.kaggle.com/competitions/rsna-breast-cancer-detection/discussion/369886), I use hard thresholding and it works (+0.11 LB)\n- No model or pipeline change !\n\nNotebook is currently #1 but people who were in front of me before the post-processing trick was disclosed should quickly reclaim their spot. ",
    "2053035": "I used cpu instead of gpu ( 4 vs 2 cpus ) it reduced the inference from 7h to 5h  but that with a small effnetb0 and 256 dim, LB .09 with half the ds in training.",
    "2051416": "https://blog.google/technology/ai/icad-partnership-breast-cancer-screening/\n\ngoogle AI just blogs about their successful and commercialized mammography breast cancer screening system using deep learning.\nyou can read their papers for a reasonable AUC that has been achieved.\n\nFig. 2 | Performance of the AI system and clinical readers in breast cancer prediction. a, The ROC curve of the AI system on the UK screening data. The AUC is 0.889 (95% CI 0.871, 0.907; n=25,856 patients).\n\n---\n\nhttps://www.nature.com/articles/s41586-019-1799-6#data-availability\ni think they have data with annotated boxes for the cancer lesion. you can applied for it but it is not public (unfortunately)\nhttps://static-content.springer.com/esm/art%3A10.1038%2Fs41586-019-1799-6/MediaObjects/41586_2019_1799_MOESM1_ESM.pdf",
    "2051464": "Do not worry @theoviel. As I can see this is starter training. We can improve score a lot using some tricks:\n- augumentation\n- better model \n- maybe not pure classification but anomaly detection with AE/GAN"
  }
}