{
  "id": 253736,
  "title": "Pretrained 3D-CNNs and other resources",
  "url": "/competitions/rsna-miccai-brain-tumor-radiogenomic-classification/discussion/253736",
  "author_name": "",
  "post_date": "2021-07-18T10:42:49.379825300Z",
  "votes": 67,
  "comment_count": 13,
  "views": 0,
  "content": "<h2>Resources</h2>\n<p><a href=\"https://github.com/black0017/MedicalZooPytorch\" target=\"_blank\">PyTorch Medical Model Zoo</a></p>\n<p><a href=\"https://paperswithcode.com/paper/med3d-transfer-learning-for-3d-medical-image\" target=\"_blank\">Med3D: Transfer Learning for 3D Medical Image Analysis</a></p>\n<p><a href=\"https://github.com/Tencent/MedicalNet\" target=\"_blank\">The MedicalNet project</a></p>\n<p><a href=\"https://github.com/tbuikr/3D-SkipDenseSeg\" target=\"_blank\">3D SkipDense MRI Segmentation</a></p>\n<p><a href=\"https://ngc.nvidia.com/catalog/models/nvidia:med:clara_pt_brain_mri_segmentation_t1c\" target=\"_blank\">NVIDIA: a volumetric segmentation model from multimodal (T1c, T1, T2, FLAIR) MRI images (tx </a><a href=\"https://www.kaggle.com/felixpeters\" target=\"_blank\">@felixpeters</a>)</p>\n<p><a href=\"https://ngc.nvidia.com/catalog/models/nvidia:med:clara_pt_brain_mri_segmentation_t1c\" target=\"_blank\">NVIDA: pre-trained model for volumetric (3D) segmentation of brain tumors from MRIs (tx </a><a href=\"https://www.kaggle.com/felixpeters\" target=\"_blank\">@felixpeters</a>)</p>\n<p><a href=\"https://github.com/kenshohara/3D-ResNets-PyTorch\" target=\"_blank\">ResNets for Action Recognition (CVPR 2018)</a></p>\n<p><a href=\"https://github.com/okankop/Efficient-3DCNNs\" target=\"_blank\">Resource Efficient 3D Convolutional Neural Networks</a></p>\n<p><a href=\"https://github.com/pytorch/vision/tree/master/torchvision/models/video\" target=\"_blank\">PyTorch: TorchVision Video classification models</a></p>\n<p><a href=\"https://github.com/facebookresearch/VMZ\" target=\"_blank\">Facebook VMZ: Model Zoo for Video Modeling</a></p>\n<p><a href=\"https://github.com/deepmind/kinetics-i3d\" target=\"_blank\">DeepMind: Convolutional neural network model for video classification trained on the Kinetics dataset</a></p>\n<p><a href=\"https://paperswithcode.com/paper/mri-tumor-segmentation-with-densely-connected\" target=\"_blank\">MRI Tumor Segmentation with Densely Connected 3D CNN</a></p>\n<p><a href=\"https://github.com/xyj77/MCF-3D-CNN\" target=\"_blank\">Temporal-spatial Feature Learning of DCE-MR Images via 3DCNN</a></p>\n<p><a href=\"https://blog.tensorflow.org/2018/07/an-introduction-to-biomedical-image-analysis-tensorflow-dltk.html\" target=\"_blank\">Biomedical Analysis with DLTK (thanks </a><a href=\"https://www.kaggle.com/LucaMTB\" target=\"_blank\">@LucaMTB</a>)</p>\n<h2>Why this thread</h2>\n<p>The dataset for this competition contains two-dimensional images stacked along a temporal axis to form a video, and we need to label the video as 0/1.</p>\n<p>Since 3D CNN can be so slow to train, it is unrealistic to train one from scratch, so fine-tuning with a few epochs would be more feasible.</p>\n<p>So let's make a 3D CNN thread linking to resources and pretrained models.</p>\n<p>As other Kagglers comment on the thread, I will be updating the OP.</p>\n<p>Happy research and happy Kaggling!</p>",
  "messages": [
    {
      "id": "1392058",
      "postDate": "07/18/2021 10:42:49",
      "content": "<h2>Resources</h2>\n<p><a href=\"https://github.com/black0017/MedicalZooPytorch\" target=\"_blank\">PyTorch Medical Model Zoo</a></p>\n<p><a href=\"https://paperswithcode.com/paper/med3d-transfer-learning-for-3d-medical-image\" target=\"_blank\">Med3D: Transfer Learning for 3D Medical Image Analysis</a></p>\n<p><a href=\"https://github.com/Tencent/MedicalNet\" target=\"_blank\">The MedicalNet project</a></p>\n<p><a href=\"https://github.com/tbuikr/3D-SkipDenseSeg\" target=\"_blank\">3D SkipDense MRI Segmentation</a></p>\n<p><a href=\"https://ngc.nvidia.com/catalog/models/nvidia:med:clara_pt_brain_mri_segmentation_t1c\" target=\"_blank\">NVIDIA: a volumetric segmentation model from multimodal (T1c, T1, T2, FLAIR) MRI images (tx </a><a href=\"https://www.kaggle.com/felixpeters\" target=\"_blank\">@felixpeters</a>)</p>\n<p><a href=\"https://ngc.nvidia.com/catalog/models/nvidia:med:clara_pt_brain_mri_segmentation_t1c\" target=\"_blank\">NVIDA: pre-trained model for volumetric (3D) segmentation of brain tumors from MRIs (tx </a><a href=\"https://www.kaggle.com/felixpeters\" target=\"_blank\">@felixpeters</a>)</p>\n<p><a href=\"https://github.com/kenshohara/3D-ResNets-PyTorch\" target=\"_blank\">ResNets for Action Recognition (CVPR 2018)</a></p>\n<p><a href=\"https://github.com/okankop/Efficient-3DCNNs\" target=\"_blank\">Resource Efficient 3D Convolutional Neural Networks</a></p>\n<p><a href=\"https://github.com/pytorch/vision/tree/master/torchvision/models/video\" target=\"_blank\">PyTorch: TorchVision Video classification models</a></p>\n<p><a href=\"https://github.com/facebookresearch/VMZ\" target=\"_blank\">Facebook VMZ: Model Zoo for Video Modeling</a></p>\n<p><a href=\"https://github.com/deepmind/kinetics-i3d\" target=\"_blank\">DeepMind: Convolutional neural network model for video classification trained on the Kinetics dataset</a></p>\n<p><a href=\"https://paperswithcode.com/paper/mri-tumor-segmentation-with-densely-connected\" target=\"_blank\">MRI Tumor Segmentation with Densely Connected 3D CNN</a></p>\n<p><a href=\"https://github.com/xyj77/MCF-3D-CNN\" target=\"_blank\">Temporal-spatial Feature Learning of DCE-MR Images via 3DCNN</a></p>\n<p><a href=\"https://blog.tensorflow.org/2018/07/an-introduction-to-biomedical-image-analysis-tensorflow-dltk.html\" target=\"_blank\">Biomedical Analysis with DLTK (thanks </a><a href=\"https://www.kaggle.com/LucaMTB\" target=\"_blank\">@LucaMTB</a>)</p>\n<h2>Why this thread</h2>\n<p>The dataset for this competition contains two-dimensional images stacked along a temporal axis to form a video, and we need to label the video as 0/1.</p>\n<p>Since 3D CNN can be so slow to train, it is unrealistic to train one from scratch, so fine-tuning with a few epochs would be more feasible.</p>\n<p>So let's make a 3D CNN thread linking to resources and pretrained models.</p>\n<p>As other Kagglers comment on the thread, I will be updating the OP.</p>\n<p>Happy research and happy Kaggling!</p>",
      "rawMarkdown": "## Resources\n\n[PyTorch Medical Model Zoo](https://github.com/black0017/MedicalZooPytorch)\n\n[Med3D: Transfer Learning for 3D Medical Image Analysis](https://paperswithcode.com/paper/med3d-transfer-learning-for-3d-medical-image)\n\n[The MedicalNet project](https://github.com/Tencent/MedicalNet)\n\n[3D SkipDense MRI Segmentation](https://github.com/tbuikr/3D-SkipDenseSeg)\n\n[NVIDIA: a volumetric segmentation model from multimodal (T1c, T1, T2, FLAIR) MRI images (tx @felixpeters)](https://ngc.nvidia.com/catalog/models/nvidia:med:clara_pt_brain_mri_segmentation_t1c)\n\n[NVIDA: pre-trained model for volumetric (3D) segmentation of brain tumors from MRIs (tx @felixpeters)](https://ngc.nvidia.com/catalog/models/nvidia:med:clara_pt_brain_mri_segmentation_t1c)\n\n[ResNets for Action Recognition (CVPR 2018)](https://github.com/kenshohara/3D-ResNets-PyTorch)\n\n[Resource Efficient 3D Convolutional Neural Networks](https://github.com/okankop/Efficient-3DCNNs)\n\n[PyTorch: TorchVision Video classification models](https://github.com/pytorch/vision/tree/master/torchvision/models/video)\n\n[Facebook VMZ: Model Zoo for Video Modeling](https://github.com/facebookresearch/VMZ)\n\n[DeepMind: Convolutional neural network model for video classification trained on the Kinetics dataset](https://github.com/deepmind/kinetics-i3d)\n\n[MRI Tumor Segmentation with Densely Connected 3D CNN](https://paperswithcode.com/paper/mri-tumor-segmentation-with-densely-connected)\n\n[Temporal-spatial Feature Learning of DCE-MR Images via 3DCNN](https://github.com/xyj77/MCF-3D-CNN)\n\n[Biomedical Analysis with DLTK (thanks @LucaMTB)](https://blog.tensorflow.org/2018/07/an-introduction-to-biomedical-image-analysis-tensorflow-dltk.html)\n\n## Why this thread\nThe dataset for this competition contains two-dimensional images stacked along a temporal axis to form a video, and we need to label the video as 0/1.\n\nSince 3D CNN can be so slow to train, it is unrealistic to train one from scratch, so fine-tuning with a few epochs would be more feasible.\n\nSo let's make a 3D CNN thread linking to resources and pretrained models.\n\nAs other Kagglers comment on the thread, I will be updating the OP.\n\n\n\nHappy research and happy Kaggling!",
      "votes": null
    },
    {
      "id": "1392593",
      "postDate": "07/18/2021 21:07:26",
      "content": "<p>Great set of resources!! Thanks</p>",
      "rawMarkdown": "Great set of resources!! Thanks",
      "votes": null
    },
    {
      "id": "1394373",
      "postDate": "07/20/2021 10:20:26",
      "content": "<p>Hi, </p>\n<p>I found this resource. It may help:</p>\n<p><a href=\"https://blog.tensorflow.org/2018/07/an-introduction-to-biomedical-image-analysis-tensorflow-dltk.html\" target=\"_blank\">https://blog.tensorflow.org/2018/07/an-introduction-to-biomedical-image-analysis-tensorflow-dltk.html</a></p>",
      "rawMarkdown": "Hi, \n\nI found this resource. It may help:\n\nhttps://blog.tensorflow.org/2018/07/an-introduction-to-biomedical-image-analysis-tensorflow-dltk.html",
      "votes": null
    },
    {
      "id": "1395968",
      "postDate": "07/21/2021 16:54:22",
      "content": "<p>Thanks, just added it</p>",
      "rawMarkdown": "Thanks, just added it",
      "votes": null
    },
    {
      "id": "1401410",
      "postDate": "07/27/2021 09:54:21",
      "content": "<p>Very useful, thanks! </p>",
      "rawMarkdown": "Very useful, thanks!",
      "votes": null
    },
    {
      "id": "1403018",
      "postDate": "07/28/2021 18:00:36",
      "content": "<p>NVIDIA has some pre-trained models in the <a href=\"https://ngc.nvidia.com/catalog/models?orderBy=scoreDESC&amp;pageNumber=0&amp;query=clara_pt&amp;quickFilter=&amp;filters=\" target=\"_blank\">NGC</a>. Of particular interest for this task might be these two models:</p>\n<ul>\n<li><a href=\"https://ngc.nvidia.com/catalog/models/nvidia:med:clara_pt_brain_mri_segmentation\" target=\"_blank\">Brain tumor segmentation from multimodal MRIs</a></li>\n<li><a href=\"https://ngc.nvidia.com/catalog/models/nvidia:med:clara_pt_brain_mri_segmentation_t1c\" target=\"_blank\">Brain tumor segmentation from T1c MRIs</a></li>\n</ul>\n<p>The models can be loaded using the <a href=\"https://docs.monai.io/en/latest/apps.html#clara-mmars\" target=\"_blank\">monai</a> library.</p>",
      "rawMarkdown": "NVIDIA has some pre-trained models in the [NGC](https://ngc.nvidia.com/catalog/models?orderBy=scoreDESC&pageNumber=0&query=clara_pt&quickFilter=&filters=). Of particular interest for this task might be these two models:\n- [Brain tumor segmentation from multimodal MRIs](https://ngc.nvidia.com/catalog/models/nvidia:med:clara_pt_brain_mri_segmentation)\n- [Brain tumor segmentation from T1c MRIs](https://ngc.nvidia.com/catalog/models/nvidia:med:clara_pt_brain_mri_segmentation_t1c)\n\nThe models can be loaded using the [monai](https://docs.monai.io/en/latest/apps.html#clara-mmars) library.",
      "votes": null
    },
    {
      "id": "1403508",
      "postDate": "07/29/2021 07:20:07",
      "content": "<p>The first link is actually very applicable to our task. The only drawback I see is that it assumes the input scans (T1c, T1, T2, FLAIR) are aligned, which is not the case in our data. Perhaps we can try rescaling the inputs to have the same depth?<br>\nThe second link is a bit less related, as it assumes the input contains extreme points. What this model does is annotate the tumor based on its extreme points.<br>\nThanks for this!</p>",
      "rawMarkdown": "The first link is actually very applicable to our task. The only drawback I see is that it assumes the input scans (T1c, T1, T2, FLAIR) are aligned, which is not the case in our data. Perhaps we can try rescaling the inputs to have the same depth?\nThe second link is a bit less related, as it assumes the input contains extreme points. What this model does is annotate the tumor based on its extreme points.\nThanks for this!",
      "votes": null
    },
    {
      "id": "1405455",
      "postDate": "07/30/2021 21:35:12",
      "content": "<p>But those are image segmentation models, how can we use these models for an image classification problem? They have different labels.</p>",
      "rawMarkdown": "But those are image segmentation models, how can we use these models for an image classification problem? They have different labels.",
      "votes": null
    },
    {
      "id": "1405603",
      "postDate": "07/31/2021 04:51:36",
      "content": "<p>Two ideas that come to mind:</p>\n<ul>\n<li>Segment the tumor core using the pretrained model and use it as an input to a classification model. This should speed up training time as the input is much smaller.</li>\n<li>Replace the segmentation head of the pretrained model (or just use the encoder) with a classification head and fine tune for the classification task.</li>\n</ul>",
      "rawMarkdown": "Two ideas that come to mind:\n- Segment the tumor core using the pretrained model and use it as an input to a classification model. This should speed up training time as the input is much smaller.\n- Replace the segmentation head of the pretrained model (or just use the encoder) with a classification head and fine tune for the classification task.",
      "votes": null
    },
    {
      "id": "1405607",
      "postDate": "07/31/2021 04:57:41",
      "content": "<blockquote>\n  <p>The second link is a bit less related, as it assumes the input contains extreme points. What this model does is annotate the tumor based on its extreme points.</p>\n</blockquote>\n<p>Where does it say that? I only see the required <code>Input: 1 channel MRI (T1c at 1x1x1 mm)</code> and some preprocessing steps.</p>\n<blockquote>\n  <p>The only drawback I see is that it assumes the input scans (T1c, T1, T2, FLAIR) are aligned, which is not the case in our data.</p>\n</blockquote>\n<p>Yeah, this does not seem to be a trivial problem. I guess co-registration is the correct medical term. The challenge authors had to complete this step for task 1 of Brats 2021. But the challenge paper is pretty vague at this point.</p>",
      "rawMarkdown": "> The second link is a bit less related, as it assumes the input contains extreme points. What this model does is annotate the tumor based on its extreme points.\n\nWhere does it say that? I only see the required `Input: 1 channel MRI (T1c at 1x1x1 mm)` and some preprocessing steps.\n\n> The only drawback I see is that it assumes the input scans (T1c, T1, T2, FLAIR) are aligned, which is not the case in our data.\n\nYeah, this does not seem to be a trivial problem. I guess co-registration is the correct medical term. The challenge authors had to complete this step for task 1 of Brats 2021. But the challenge paper is pretty vague at this point.",
      "votes": null
    },
    {
      "id": "1406027",
      "postDate": "07/31/2021 12:19:58",
      "content": "<p>Fantastic collection!!  Thanks so much for sharing!<br>\nI had to look up what you meant by \"fine-tuning with 1-3 epochs\" - found a decent link [here]<a href=\"https://towardsdatascience.com/harnessing-the-power-of-transfer-learning-for-medical-image-classification-fd772054fdc7\" target=\"_blank\">https://towardsdatascience.com/harnessing-the-power-of-transfer-learning-for-medical-image-classification-fd772054fdc7</a>)  However, I wonder why you choose to call out \"1 to 3 epochs\", is this something you've found useful for this competition in particular, or that's just what would be optimally efficient to use?  Might epochs higher than 3  also be reasonable (or better)?  Please share any insight you might have on this. </p>\n<p>Thanks so much! </p>",
      "rawMarkdown": "Fantastic collection!!  Thanks so much for sharing!\nI had to look up what you meant by \"fine-tuning with 1-3 epochs\" - found a decent link [here]https://towardsdatascience.com/harnessing-the-power-of-transfer-learning-for-medical-image-classification-fd772054fdc7)  However, I wonder why you choose to call out \"1 to 3 epochs\", is this something you've found useful for this competition in particular, or that's just what would be optimally efficient to use?  Might epochs higher than 3  also be reasonable (or better)?  Please share any insight you might have on this. \n\nThanks so much!",
      "votes": null
    },
    {
      "id": "1406435",
      "postDate": "07/31/2021 19:02:46",
      "content": "<p>Sorry, I revisited the link and it does not need any extreme points as input so both models are quite related to our task. I probably confused your link with another one.</p>",
      "rawMarkdown": "Sorry, I revisited the link and it does not need any extreme points as input so both models are quite related to our task. I probably confused your link with another one.",
      "votes": null
    },
    {
      "id": "1406451",
      "postDate": "07/31/2021 19:35:06",
      "content": "<p>Sorry, 1-3 epochs is what it took for my first 3D pretrained model attempt to start overfitting. This number depends on my setup and is not necessarily applicable to others' so I will edit my post from \"1-3 epochs\" to \"a few epochs\".</p>\n<p>The guide you provided looks good and it makes the point that feature extraction and fine-tuning a model are not the same tasks. There isn't much consensus about what approach is better when applying transfer learning so try different configurations and see what works best. <br>\nAs a rule of thumb, the bigger your target dataset is, and the more different the source and target datasets are, the more you should be fine-tuning (unfreezing more layers); and the smaller your target dataset and the more similar the source and target datasets are, the more you should use feature extraction (unfreezing fewer layers).<br>\nAlso, when fine-tuning it is common to use a smaller learning rate for the more shallow layers, and a bigger one for the deeper ones (closer to the final MLP classifier).</p>",
      "rawMarkdown": "Sorry, 1-3 epochs is what it took for my first 3D pretrained model attempt to start overfitting. This number depends on my setup and is not necessarily applicable to others' so I will edit my post from \"1-3 epochs\" to \"a few epochs\".\n\nThe guide you provided looks good and it makes the point that feature extraction and fine-tuning a model are not the same tasks. There isn't much consensus about what approach is better when applying transfer learning so try different configurations and see what works best. \nAs a rule of thumb, the bigger your target dataset is, and the more different the source and target datasets are, the more you should be fine-tuning (unfreezing more layers); and the smaller your target dataset and the more similar the source and target datasets are, the more you should use feature extraction (unfreezing fewer layers).\nAlso, when fine-tuning it is common to use a smaller learning rate for the more shallow layers, and a bigger one for the deeper ones (closer to the final MLP classifier).",
      "votes": null
    },
    {
      "id": "1407664",
      "postDate": "08/02/2021 04:51:28",
      "content": "<p>All these pre-trained models that we find have different kinds of licenses,<br>\nCan anyone or the host <a href=\"https://www.kaggle.com/cdcarr\" target=\"_blank\">@cdcarr</a> <a href=\"https://www.kaggle.com/sbakas\" target=\"_blank\">@sbakas</a> tell if there are any restrictions to any type of license?</p>",
      "rawMarkdown": "All these pre-trained models that we find have different kinds of licenses,\nCan anyone or the host @cdcarr @sbakas tell if there are any restrictions to any type of license?",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1392593,
      "author_name": "mrinath",
      "author_url": "",
      "post_date": "07/18/2021 21:07:26",
      "content": "<p>Great set of resources!! Thanks</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1394373,
      "author_name": "lucamtb",
      "author_url": "",
      "post_date": "07/20/2021 10:20:26",
      "content": "<p>Hi, </p>\n<p>I found this resource. It may help:</p>\n<p><a href=\"https://blog.tensorflow.org/2018/07/an-introduction-to-biomedical-image-analysis-tensorflow-dltk.html\" target=\"_blank\">https://blog.tensorflow.org/2018/07/an-introduction-to-biomedical-image-analysis-tensorflow-dltk.html</a></p>",
      "votes": null,
      "replies": [
        {
          "id": 1395968,
          "author_name": "alvarofbudria",
          "author_url": "",
          "post_date": "07/21/2021 16:54:22",
          "content": "<p>Thanks, just added it</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1401410,
      "author_name": "jairogurdiel",
      "author_url": "",
      "post_date": "07/27/2021 09:54:21",
      "content": "<p>Very useful, thanks! </p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1403018,
      "author_name": "felixpeters",
      "author_url": "",
      "post_date": "07/28/2021 18:00:36",
      "content": "<p>NVIDIA has some pre-trained models in the <a href=\"https://ngc.nvidia.com/catalog/models?orderBy=scoreDESC&amp;pageNumber=0&amp;query=clara_pt&amp;quickFilter=&amp;filters=\" target=\"_blank\">NGC</a>. Of particular interest for this task might be these two models:</p>\n<ul>\n<li><a href=\"https://ngc.nvidia.com/catalog/models/nvidia:med:clara_pt_brain_mri_segmentation\" target=\"_blank\">Brain tumor segmentation from multimodal MRIs</a></li>\n<li><a href=\"https://ngc.nvidia.com/catalog/models/nvidia:med:clara_pt_brain_mri_segmentation_t1c\" target=\"_blank\">Brain tumor segmentation from T1c MRIs</a></li>\n</ul>\n<p>The models can be loaded using the <a href=\"https://docs.monai.io/en/latest/apps.html#clara-mmars\" target=\"_blank\">monai</a> library.</p>",
      "votes": null,
      "replies": [
        {
          "id": 1403508,
          "author_name": "alvarofbudria",
          "author_url": "",
          "post_date": "07/29/2021 07:20:07",
          "content": "<p>The first link is actually very applicable to our task. The only drawback I see is that it assumes the input scans (T1c, T1, T2, FLAIR) are aligned, which is not the case in our data. Perhaps we can try rescaling the inputs to have the same depth?<br>\nThe second link is a bit less related, as it assumes the input contains extreme points. What this model does is annotate the tumor based on its extreme points.<br>\nThanks for this!</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1405455,
          "author_name": "bcghost",
          "author_url": "",
          "post_date": "07/30/2021 21:35:12",
          "content": "<p>But those are image segmentation models, how can we use these models for an image classification problem? They have different labels.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1405603,
          "author_name": "felixpeters",
          "author_url": "",
          "post_date": "07/31/2021 04:51:36",
          "content": "<p>Two ideas that come to mind:</p>\n<ul>\n<li>Segment the tumor core using the pretrained model and use it as an input to a classification model. This should speed up training time as the input is much smaller.</li>\n<li>Replace the segmentation head of the pretrained model (or just use the encoder) with a classification head and fine tune for the classification task.</li>\n</ul>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1405607,
          "author_name": "felixpeters",
          "author_url": "",
          "post_date": "07/31/2021 04:57:41",
          "content": "<blockquote>\n  <p>The second link is a bit less related, as it assumes the input contains extreme points. What this model does is annotate the tumor based on its extreme points.</p>\n</blockquote>\n<p>Where does it say that? I only see the required <code>Input: 1 channel MRI (T1c at 1x1x1 mm)</code> and some preprocessing steps.</p>\n<blockquote>\n  <p>The only drawback I see is that it assumes the input scans (T1c, T1, T2, FLAIR) are aligned, which is not the case in our data.</p>\n</blockquote>\n<p>Yeah, this does not seem to be a trivial problem. I guess co-registration is the correct medical term. The challenge authors had to complete this step for task 1 of Brats 2021. But the challenge paper is pretty vague at this point.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1406435,
          "author_name": "alvarofbudria",
          "author_url": "",
          "post_date": "07/31/2021 19:02:46",
          "content": "<p>Sorry, I revisited the link and it does not need any extreme points as input so both models are quite related to our task. I probably confused your link with another one.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1406027,
      "author_name": "elenaeb",
      "author_url": "",
      "post_date": "07/31/2021 12:19:58",
      "content": "<p>Fantastic collection!!  Thanks so much for sharing!<br>\nI had to look up what you meant by \"fine-tuning with 1-3 epochs\" - found a decent link [here]<a href=\"https://towardsdatascience.com/harnessing-the-power-of-transfer-learning-for-medical-image-classification-fd772054fdc7\" target=\"_blank\">https://towardsdatascience.com/harnessing-the-power-of-transfer-learning-for-medical-image-classification-fd772054fdc7</a>)  However, I wonder why you choose to call out \"1 to 3 epochs\", is this something you've found useful for this competition in particular, or that's just what would be optimally efficient to use?  Might epochs higher than 3  also be reasonable (or better)?  Please share any insight you might have on this. </p>\n<p>Thanks so much! </p>",
      "votes": null,
      "replies": [
        {
          "id": 1406451,
          "author_name": "alvarofbudria",
          "author_url": "",
          "post_date": "07/31/2021 19:35:06",
          "content": "<p>Sorry, 1-3 epochs is what it took for my first 3D pretrained model attempt to start overfitting. This number depends on my setup and is not necessarily applicable to others' so I will edit my post from \"1-3 epochs\" to \"a few epochs\".</p>\n<p>The guide you provided looks good and it makes the point that feature extraction and fine-tuning a model are not the same tasks. There isn't much consensus about what approach is better when applying transfer learning so try different configurations and see what works best. <br>\nAs a rule of thumb, the bigger your target dataset is, and the more different the source and target datasets are, the more you should be fine-tuning (unfreezing more layers); and the smaller your target dataset and the more similar the source and target datasets are, the more you should use feature extraction (unfreezing fewer layers).<br>\nAlso, when fine-tuning it is common to use a smaller learning rate for the more shallow layers, and a bigger one for the deeper ones (closer to the final MLP classifier).</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1407664,
      "author_name": "mrinath",
      "author_url": "",
      "post_date": "08/02/2021 04:51:28",
      "content": "<p>All these pre-trained models that we find have different kinds of licenses,<br>\nCan anyone or the host <a href=\"https://www.kaggle.com/cdcarr\" target=\"_blank\">@cdcarr</a> <a href=\"https://www.kaggle.com/sbakas\" target=\"_blank\">@sbakas</a> tell if there are any restrictions to any type of license?</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1392058": "## Resources\n\n[PyTorch Medical Model Zoo](https://github.com/black0017/MedicalZooPytorch)\n\n[Med3D: Transfer Learning for 3D Medical Image Analysis](https://paperswithcode.com/paper/med3d-transfer-learning-for-3d-medical-image)\n\n[The MedicalNet project](https://github.com/Tencent/MedicalNet)\n\n[3D SkipDense MRI Segmentation](https://github.com/tbuikr/3D-SkipDenseSeg)\n\n[NVIDIA: a volumetric segmentation model from multimodal (T1c, T1, T2, FLAIR) MRI images (tx @felixpeters)](https://ngc.nvidia.com/catalog/models/nvidia:med:clara_pt_brain_mri_segmentation_t1c)\n\n[NVIDA: pre-trained model for volumetric (3D) segmentation of brain tumors from MRIs (tx @felixpeters)](https://ngc.nvidia.com/catalog/models/nvidia:med:clara_pt_brain_mri_segmentation_t1c)\n\n[ResNets for Action Recognition (CVPR 2018)](https://github.com/kenshohara/3D-ResNets-PyTorch)\n\n[Resource Efficient 3D Convolutional Neural Networks](https://github.com/okankop/Efficient-3DCNNs)\n\n[PyTorch: TorchVision Video classification models](https://github.com/pytorch/vision/tree/master/torchvision/models/video)\n\n[Facebook VMZ: Model Zoo for Video Modeling](https://github.com/facebookresearch/VMZ)\n\n[DeepMind: Convolutional neural network model for video classification trained on the Kinetics dataset](https://github.com/deepmind/kinetics-i3d)\n\n[MRI Tumor Segmentation with Densely Connected 3D CNN](https://paperswithcode.com/paper/mri-tumor-segmentation-with-densely-connected)\n\n[Temporal-spatial Feature Learning of DCE-MR Images via 3DCNN](https://github.com/xyj77/MCF-3D-CNN)\n\n[Biomedical Analysis with DLTK (thanks @LucaMTB)](https://blog.tensorflow.org/2018/07/an-introduction-to-biomedical-image-analysis-tensorflow-dltk.html)\n\n## Why this thread\nThe dataset for this competition contains two-dimensional images stacked along a temporal axis to form a video, and we need to label the video as 0/1.\n\nSince 3D CNN can be so slow to train, it is unrealistic to train one from scratch, so fine-tuning with a few epochs would be more feasible.\n\nSo let's make a 3D CNN thread linking to resources and pretrained models.\n\nAs other Kagglers comment on the thread, I will be updating the OP.\n\n\n\nHappy research and happy Kaggling!",
    "1392593": "Great set of resources!! Thanks",
    "1394373": "Hi, \n\nI found this resource. It may help:\n\nhttps://blog.tensorflow.org/2018/07/an-introduction-to-biomedical-image-analysis-tensorflow-dltk.html",
    "1395968": "Thanks, just added it",
    "1401410": "Very useful, thanks!",
    "1403018": "NVIDIA has some pre-trained models in the [NGC](https://ngc.nvidia.com/catalog/models?orderBy=scoreDESC&pageNumber=0&query=clara_pt&quickFilter=&filters=). Of particular interest for this task might be these two models:\n- [Brain tumor segmentation from multimodal MRIs](https://ngc.nvidia.com/catalog/models/nvidia:med:clara_pt_brain_mri_segmentation)\n- [Brain tumor segmentation from T1c MRIs](https://ngc.nvidia.com/catalog/models/nvidia:med:clara_pt_brain_mri_segmentation_t1c)\n\nThe models can be loaded using the [monai](https://docs.monai.io/en/latest/apps.html#clara-mmars) library.",
    "1403508": "The first link is actually very applicable to our task. The only drawback I see is that it assumes the input scans (T1c, T1, T2, FLAIR) are aligned, which is not the case in our data. Perhaps we can try rescaling the inputs to have the same depth?\nThe second link is a bit less related, as it assumes the input contains extreme points. What this model does is annotate the tumor based on its extreme points.\nThanks for this!",
    "1405455": "But those are image segmentation models, how can we use these models for an image classification problem? They have different labels.",
    "1405603": "Two ideas that come to mind:\n- Segment the tumor core using the pretrained model and use it as an input to a classification model. This should speed up training time as the input is much smaller.\n- Replace the segmentation head of the pretrained model (or just use the encoder) with a classification head and fine tune for the classification task.",
    "1405607": "> The second link is a bit less related, as it assumes the input contains extreme points. What this model does is annotate the tumor based on its extreme points.\n\nWhere does it say that? I only see the required `Input: 1 channel MRI (T1c at 1x1x1 mm)` and some preprocessing steps.\n\n> The only drawback I see is that it assumes the input scans (T1c, T1, T2, FLAIR) are aligned, which is not the case in our data.\n\nYeah, this does not seem to be a trivial problem. I guess co-registration is the correct medical term. The challenge authors had to complete this step for task 1 of Brats 2021. But the challenge paper is pretty vague at this point.",
    "1406027": "Fantastic collection!!  Thanks so much for sharing!\nI had to look up what you meant by \"fine-tuning with 1-3 epochs\" - found a decent link [here]https://towardsdatascience.com/harnessing-the-power-of-transfer-learning-for-medical-image-classification-fd772054fdc7)  However, I wonder why you choose to call out \"1 to 3 epochs\", is this something you've found useful for this competition in particular, or that's just what would be optimally efficient to use?  Might epochs higher than 3  also be reasonable (or better)?  Please share any insight you might have on this. \n\nThanks so much!",
    "1406435": "Sorry, I revisited the link and it does not need any extreme points as input so both models are quite related to our task. I probably confused your link with another one.",
    "1406451": "Sorry, 1-3 epochs is what it took for my first 3D pretrained model attempt to start overfitting. This number depends on my setup and is not necessarily applicable to others' so I will edit my post from \"1-3 epochs\" to \"a few epochs\".\n\nThe guide you provided looks good and it makes the point that feature extraction and fine-tuning a model are not the same tasks. There isn't much consensus about what approach is better when applying transfer learning so try different configurations and see what works best. \nAs a rule of thumb, the bigger your target dataset is, and the more different the source and target datasets are, the more you should be fine-tuning (unfreezing more layers); and the smaller your target dataset and the more similar the source and target datasets are, the more you should use feature extraction (unfreezing fewer layers).\nAlso, when fine-tuning it is common to use a smaller learning rate for the more shallow layers, and a bigger one for the deeper ones (closer to the final MLP classifier).",
    "1407664": "All these pre-trained models that we find have different kinds of licenses,\nCan anyone or the host @cdcarr @sbakas tell if there are any restrictions to any type of license?"
  },
  "source": "meta"
}