{
  "id": 155924,
  "title": "Beginner in CNN",
  "url": "/competitions/siim-isic-melanoma-classification/discussion/155924",
  "author_name": "",
  "post_date": "2020-06-03T15:02:28.432853Z",
  "votes": 7,
  "comment_count": 12,
  "views": 0,
  "content": "<p>Hello Everyone,</p>\n\n<p>I am total beginner to applying CNN for medical imaging .</p>\n\n<p>I have learned small bit of CNN using the MNIST dataset .</p>\n\n<p>I just came to know that there are several standard CNN architecture to start with before diving\ndeep. Can anyone help to understand different CNN architecture which can be applied for \nmedical imaging.</p>\n\n<p>Thanks,\nAnthony</p>",
  "messages": [
    {
      "id": "872854",
      "postDate": "06/03/2020 15:02:28",
      "content": "<p>Hello Everyone,</p>\n\n<p>I am total beginner to applying CNN for medical imaging .</p>\n\n<p>I have learned small bit of CNN using the MNIST dataset .</p>\n\n<p>I just came to know that there are several standard CNN architecture to start with before diving\ndeep. Can anyone help to understand different CNN architecture which can be applied for \nmedical imaging.</p>\n\n<p>Thanks,\nAnthony</p>",
      "rawMarkdown": "Hello Everyone,\n\nI am total beginner to applying CNN for medical imaging .\n\nI have learned small bit of CNN using the MNIST dataset .\n\nI just came to know that there are several standard CNN architecture to start with before diving\ndeep. Can anyone help to understand different CNN architecture which can be applied for \nmedical imaging.\n\nThanks,\nAnthony",
      "votes": null
    },
    {
      "id": "873292",
      "postDate": "06/04/2020 02:19:47",
      "content": "<p>All the famous pretrained CNN are good. You need to try each with a reliable CV (cross validation) to see which performs the best here. Once you create a CV, it is easy to swap in a different model.</p>\n\n<p>Popular CNN are EfficientNet, SeResNext, SeNet, Xception, DenseNet, Inception, ResNet, VGG. This list is basically ordered from most accurate to least accurate on ImageNet dataset.</p>\n\n<p>My current LB 0.933 is only using image data, with a simple head, and these CNN</p>",
      "rawMarkdown": "All the famous pretrained CNN are good. You need to try each with a reliable CV (cross validation) to see which performs the best here. Once you create a CV, it is easy to swap in a different model.\n\nPopular CNN are EfficientNet, SeResNext, SeNet, Xception, DenseNet, Inception, ResNet, VGG. This list is basically ordered from most accurate to least accurate on ImageNet dataset.\n\nMy current LB 0.933 is only using image data, with a simple head, and these CNN",
      "votes": null
    },
    {
      "id": "873666",
      "postDate": "06/04/2020 10:37:54",
      "content": "<p>Thanks Chris for detailed comment.\nWhat library do you recomend for pre-trained CNN .\nI was looking at <a href=\"https://keras.io/api/applications/\">https://keras.io/api/applications/</a> but it has only subset of the model you listed .</p>",
      "rawMarkdown": "Thanks Chris for detailed comment.\nWhat library do you recomend for pre-trained CNN .\nI was looking at https://keras.io/api/applications/ but it has only subset of the model you listed .",
      "votes": null
    },
    {
      "id": "873778",
      "postDate": "06/04/2020 12:22:38",
      "content": "<p>Chris -  You are amazing .. Just reading your replies can increase one's knowledge ... </p>",
      "rawMarkdown": "Chris -  You are amazing .. Just reading your replies can increase one's knowledge ...",
      "votes": null
    },
    {
      "id": "873784",
      "postDate": "06/04/2020 12:26:53",
      "content": "<p>Good</p>",
      "rawMarkdown": "Good",
      "votes": null
    },
    {
      "id": "874002",
      "postDate": "06/04/2020 15:14:14",
      "content": "<p>For Keras, you can use Keras' library <a href=\"https://keras.io/api/applications/\">here</a>. Or you can use Qubvel's GitHub repository which contains all the Keras models I listed <a href=\"https://github.com/qubvel/classification_models\">here</a> and <a href=\"https://github.com/qubvel/efficientnet\">here</a>. Note that Qubvel's EfficientNet models give you a choice:</p>\n\n<pre><code>        weights='noisy-student'\n        OR weights='imagenet'\n</code></pre>\n\n<p>Also note that different models allow you to use different maximum batch sizes. Because the maximum batch size is determined by your (1) GPU/TPU VRAM (2) size of input images (3) number of parameters in model (4) number of activations in model. Using larger batch sizes is helpful so that each batch contains at least some malignant cases.</p>\n\n<p>As a general rule, when you double batch size, try doubling your learning rate too.</p>",
      "rawMarkdown": "For Keras, you can use Keras' library [here][1]. Or you can use Qubvel's GitHub repository which contains all the Keras models I listed [here][2] and [here][3]. Note that Qubvel's EfficientNet models give you a choice:\n\n            weights='noisy-student'\n            OR weights='imagenet'\n\nAlso note that different models allow you to use different maximum batch sizes. Because the maximum batch size is determined by your (1) GPU/TPU VRAM (2) size of input images (3) number of parameters in model (4) number of activations in model. Using larger batch sizes is helpful so that each batch contains at least some malignant cases.\n\nAs a general rule, when you double batch size, try doubling your learning rate too.\n\n[1]: https://keras.io/api/applications/  \n[2]: https://github.com/qubvel/classification_models\n[3]: https://github.com/qubvel/efficientnet",
      "votes": null
    },
    {
      "id": "874011",
      "postDate": "06/04/2020 15:22:42",
      "content": "<p>Here are the accuracy and size of different models performing on imagenet. Images taken from Qubvel's GitHub <a href=\"https://github.com/qubvel/classification_models\">here</a> and <a href=\"https://github.com/qubvel/efficientnet\">here</a>. Note that bigger isn't always better. Because bigger can overfit easily and bigger are slower and don't allow experimentation as quickly and bigger have smaller maximum batch size. </p>\n\n<p>Also note that you don't need to input the entire image at once, your model can classifier different crops of the image and combines the results. And note that you can try different input sizes like 128x128 vs. 256x256 vs 512x512 vs 1024x1024 etc and you can ensemble results from different sizes because different sizes provide different information to pretrained nets.</p>\n\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1723677%2F771db819ce81c0f8e878e0d76aa5f66e%2FScreen%20Shot%202020-06-04%20at%208.18.43%20AM.png?generation=1591283946233970&amp;alt=media\" alt=\"\"></p>\n\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1723677%2Fc2e3a7555be92f251aff785a44bc1a66%2FScreen%20Shot%202020-06-04%20at%208.16.22%20AM.png?generation=1591283835162222&amp;alt=media\" alt=\"\">\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1723677%2F08737b16f2ae6906afb5fdb8f8558624%2FScreen%20Shot%202020-06-04%20at%208.16.38%20AM.png?generation=1591283842155458&amp;alt=media\" alt=\"\"></p>",
      "rawMarkdown": "Here are the accuracy and size of different models performing on imagenet. Images taken from Qubvel's GitHub [here][1] and [here][2]. Note that bigger isn't always better. Because bigger can overfit easily and bigger are slower and don't allow experimentation as quickly and bigger have smaller maximum batch size. \n\nAlso note that you don't need to input the entire image at once, your model can classifier different crops of the image and combines the results. And note that you can try different input sizes like 128x128 vs. 256x256 vs 512x512 vs 1024x1024 etc and you can ensemble results from different sizes because different sizes provide different information to pretrained nets.\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1723677%2F771db819ce81c0f8e878e0d76aa5f66e%2FScreen%20Shot%202020-06-04%20at%208.18.43%20AM.png?generation=1591283946233970&amp;alt=media)\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1723677%2Fc2e3a7555be92f251aff785a44bc1a66%2FScreen%20Shot%202020-06-04%20at%208.16.22%20AM.png?generation=1591283835162222&amp;alt=media)\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1723677%2F08737b16f2ae6906afb5fdb8f8558624%2FScreen%20Shot%202020-06-04%20at%208.16.38%20AM.png?generation=1591283842155458&amp;alt=media)\n\n[1]: https://github.com/qubvel/classification_models\n[2]: https://github.com/qubvel/efficientnet",
      "votes": null
    },
    {
      "id": "874487",
      "postDate": "06/05/2020 03:29:35",
      "content": "<p>This blog has a nice timeline of the different models. It's missing DenseNet which came out in Jan 2018 and EffientNet which came out in Nov 2019. Generally, the newer the model the more accurate.\n<a href=\"https://towardsdatascience.com/illustrated-10-cnn-architectures-95d78ace614d\">https://towardsdatascience.com/illustrated-10-cnn-architectures-95d78ace614d</a></p>",
      "rawMarkdown": "This blog has a nice timeline of the different models. It's missing DenseNet which came out in Jan 2018 and EffientNet which came out in Nov 2019. Generally, the newer the model the more accurate.\nhttps://towardsdatascience.com/illustrated-10-cnn-architectures-95d78ace614d",
      "votes": null
    },
    {
      "id": "874735",
      "postDate": "06/05/2020 09:05:06",
      "content": "<p>Thanks Chris for detailed explanation. Really appreciate your help.</p>",
      "rawMarkdown": "Thanks Chris for detailed explanation. Really appreciate your help.",
      "votes": null
    },
    {
      "id": "874738",
      "postDate": "06/05/2020 09:07:51",
      "content": "<p>Hi Chris,</p>\n\n<p>I don't have powerful system at Home . </p>\n\n<p>Do you recommend google co-lab or Azure Notebook ?</p>\n\n<p>Please comment.</p>",
      "rawMarkdown": "Hi Chris,\n\nI don't have powerful system at Home . \n\nDo you recommend google co-lab or Azure Notebook ?\n\nPlease comment.",
      "votes": null
    },
    {
      "id": "875521",
      "postDate": "06/05/2020 21:44:39",
      "content": "<p>This article has elaborated on various CNN architectures. There's Python code in there too, so you could copy and try it out. <a href=\"https://towardsdatascience.com/cnn-architectures-a-deep-dive-a99441d18049\">CNN Architectures, a Deep Dive - Towards Data Science</a></p>",
      "rawMarkdown": "This article has elaborated on various CNN architectures. There's Python code in there too, so you could copy and try it out. [CNN Architectures, a Deep Dive - Towards Data Science](https://towardsdatascience.com/cnn-architectures-a-deep-dive-a99441d18049)",
      "votes": null
    },
    {
      "id": "875524",
      "postDate": "06/05/2020 21:46:03",
      "content": "<p>I'm not familiar with Azure Notebook. I have used Google CoLab and Kaggle notebooks (to compete in Kaggle competitions). Both of those are good.</p>",
      "rawMarkdown": "I'm not familiar with Azure Notebook. I have used Google CoLab and Kaggle notebooks (to compete in Kaggle competitions). Both of those are good.",
      "votes": null
    },
    {
      "id": "875940",
      "postDate": "06/06/2020 09:50:52",
      "content": "<p>Chris, Is there a way to choose the one of EfficientNet among the several architectures in it based on the dataset? Or which EfficientNet among B1 to B7 is good here why? </p>",
      "rawMarkdown": "Chris, Is there a way to choose the one of EfficientNet among the several architectures in it based on the dataset? Or which EfficientNet among B1 to B7 is good here why?",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 873292,
      "author_name": "cdeotte",
      "author_url": "",
      "post_date": "06/04/2020 02:19:47",
      "content": "<p>All the famous pretrained CNN are good. You need to try each with a reliable CV (cross validation) to see which performs the best here. Once you create a CV, it is easy to swap in a different model.</p>\n\n<p>Popular CNN are EfficientNet, SeResNext, SeNet, Xception, DenseNet, Inception, ResNet, VGG. This list is basically ordered from most accurate to least accurate on ImageNet dataset.</p>\n\n<p>My current LB 0.933 is only using image data, with a simple head, and these CNN</p>",
      "votes": null,
      "replies": [
        {
          "id": 873666,
          "author_name": "anthonyleo86",
          "author_url": "",
          "post_date": "06/04/2020 10:37:54",
          "content": "<p>Thanks Chris for detailed comment.\nWhat library do you recomend for pre-trained CNN .\nI was looking at <a href=\"https://keras.io/api/applications/\">https://keras.io/api/applications/</a> but it has only subset of the model you listed .</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 873778,
          "author_name": "pulkitmehtawork1985",
          "author_url": "",
          "post_date": "06/04/2020 12:22:38",
          "content": "<p>Chris -  You are amazing .. Just reading your replies can increase one's knowledge ... </p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 873784,
          "author_name": "maximofn",
          "author_url": "",
          "post_date": "06/04/2020 12:26:53",
          "content": "<p>Good</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 874002,
          "author_name": "cdeotte",
          "author_url": "",
          "post_date": "06/04/2020 15:14:14",
          "content": "<p>For Keras, you can use Keras' library <a href=\"https://keras.io/api/applications/\">here</a>. Or you can use Qubvel's GitHub repository which contains all the Keras models I listed <a href=\"https://github.com/qubvel/classification_models\">here</a> and <a href=\"https://github.com/qubvel/efficientnet\">here</a>. Note that Qubvel's EfficientNet models give you a choice:</p>\n\n<pre><code>        weights='noisy-student'\n        OR weights='imagenet'\n</code></pre>\n\n<p>Also note that different models allow you to use different maximum batch sizes. Because the maximum batch size is determined by your (1) GPU/TPU VRAM (2) size of input images (3) number of parameters in model (4) number of activations in model. Using larger batch sizes is helpful so that each batch contains at least some malignant cases.</p>\n\n<p>As a general rule, when you double batch size, try doubling your learning rate too.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 874738,
          "author_name": "anthonyleo86",
          "author_url": "",
          "post_date": "06/05/2020 09:07:51",
          "content": "<p>Hi Chris,</p>\n\n<p>I don't have powerful system at Home . </p>\n\n<p>Do you recommend google co-lab or Azure Notebook ?</p>\n\n<p>Please comment.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 875524,
          "author_name": "cdeotte",
          "author_url": "",
          "post_date": "06/05/2020 21:46:03",
          "content": "<p>I'm not familiar with Azure Notebook. I have used Google CoLab and Kaggle notebooks (to compete in Kaggle competitions). Both of those are good.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 874011,
      "author_name": "cdeotte",
      "author_url": "",
      "post_date": "06/04/2020 15:22:42",
      "content": "<p>Here are the accuracy and size of different models performing on imagenet. Images taken from Qubvel's GitHub <a href=\"https://github.com/qubvel/classification_models\">here</a> and <a href=\"https://github.com/qubvel/efficientnet\">here</a>. Note that bigger isn't always better. Because bigger can overfit easily and bigger are slower and don't allow experimentation as quickly and bigger have smaller maximum batch size. </p>\n\n<p>Also note that you don't need to input the entire image at once, your model can classifier different crops of the image and combines the results. And note that you can try different input sizes like 128x128 vs. 256x256 vs 512x512 vs 1024x1024 etc and you can ensemble results from different sizes because different sizes provide different information to pretrained nets.</p>\n\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1723677%2F771db819ce81c0f8e878e0d76aa5f66e%2FScreen%20Shot%202020-06-04%20at%208.18.43%20AM.png?generation=1591283946233970&amp;alt=media\" alt=\"\"></p>\n\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1723677%2Fc2e3a7555be92f251aff785a44bc1a66%2FScreen%20Shot%202020-06-04%20at%208.16.22%20AM.png?generation=1591283835162222&amp;alt=media\" alt=\"\">\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1723677%2F08737b16f2ae6906afb5fdb8f8558624%2FScreen%20Shot%202020-06-04%20at%208.16.38%20AM.png?generation=1591283842155458&amp;alt=media\" alt=\"\"></p>",
      "votes": null,
      "replies": [
        {
          "id": 874735,
          "author_name": "anthonyleo86",
          "author_url": "",
          "post_date": "06/05/2020 09:05:06",
          "content": "<p>Thanks Chris for detailed explanation. Really appreciate your help.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 874487,
      "author_name": "cdeotte",
      "author_url": "",
      "post_date": "06/05/2020 03:29:35",
      "content": "<p>This blog has a nice timeline of the different models. It's missing DenseNet which came out in Jan 2018 and EffientNet which came out in Nov 2019. Generally, the newer the model the more accurate.\n<a href=\"https://towardsdatascience.com/illustrated-10-cnn-architectures-95d78ace614d\">https://towardsdatascience.com/illustrated-10-cnn-architectures-95d78ace614d</a></p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 875521,
      "author_name": "danoozy44",
      "author_url": "",
      "post_date": "06/05/2020 21:44:39",
      "content": "<p>This article has elaborated on various CNN architectures. There's Python code in there too, so you could copy and try it out. <a href=\"https://towardsdatascience.com/cnn-architectures-a-deep-dive-a99441d18049\">CNN Architectures, a Deep Dive - Towards Data Science</a></p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 875940,
      "author_name": "aakashveera",
      "author_url": "",
      "post_date": "06/06/2020 09:50:52",
      "content": "<p>Chris, Is there a way to choose the one of EfficientNet among the several architectures in it based on the dataset? Or which EfficientNet among B1 to B7 is good here why? </p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "872854": "Hello Everyone,\n\nI am total beginner to applying CNN for medical imaging .\n\nI have learned small bit of CNN using the MNIST dataset .\n\nI just came to know that there are several standard CNN architecture to start with before diving\ndeep. Can anyone help to understand different CNN architecture which can be applied for \nmedical imaging.\n\nThanks,\nAnthony",
    "873292": "All the famous pretrained CNN are good. You need to try each with a reliable CV (cross validation) to see which performs the best here. Once you create a CV, it is easy to swap in a different model.\n\nPopular CNN are EfficientNet, SeResNext, SeNet, Xception, DenseNet, Inception, ResNet, VGG. This list is basically ordered from most accurate to least accurate on ImageNet dataset.\n\nMy current LB 0.933 is only using image data, with a simple head, and these CNN",
    "873666": "Thanks Chris for detailed comment.\nWhat library do you recomend for pre-trained CNN .\nI was looking at https://keras.io/api/applications/ but it has only subset of the model you listed .",
    "873778": "Chris -  You are amazing .. Just reading your replies can increase one's knowledge ...",
    "873784": "Good",
    "874002": "For Keras, you can use Keras' library [here][1]. Or you can use Qubvel's GitHub repository which contains all the Keras models I listed [here][2] and [here][3]. Note that Qubvel's EfficientNet models give you a choice:\n\n            weights='noisy-student'\n            OR weights='imagenet'\n\nAlso note that different models allow you to use different maximum batch sizes. Because the maximum batch size is determined by your (1) GPU/TPU VRAM (2) size of input images (3) number of parameters in model (4) number of activations in model. Using larger batch sizes is helpful so that each batch contains at least some malignant cases.\n\nAs a general rule, when you double batch size, try doubling your learning rate too.\n\n[1]: https://keras.io/api/applications/  \n[2]: https://github.com/qubvel/classification_models\n[3]: https://github.com/qubvel/efficientnet",
    "874011": "Here are the accuracy and size of different models performing on imagenet. Images taken from Qubvel's GitHub [here][1] and [here][2]. Note that bigger isn't always better. Because bigger can overfit easily and bigger are slower and don't allow experimentation as quickly and bigger have smaller maximum batch size. \n\nAlso note that you don't need to input the entire image at once, your model can classifier different crops of the image and combines the results. And note that you can try different input sizes like 128x128 vs. 256x256 vs 512x512 vs 1024x1024 etc and you can ensemble results from different sizes because different sizes provide different information to pretrained nets.\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1723677%2F771db819ce81c0f8e878e0d76aa5f66e%2FScreen%20Shot%202020-06-04%20at%208.18.43%20AM.png?generation=1591283946233970&amp;alt=media)\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1723677%2Fc2e3a7555be92f251aff785a44bc1a66%2FScreen%20Shot%202020-06-04%20at%208.16.22%20AM.png?generation=1591283835162222&amp;alt=media)\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F1723677%2F08737b16f2ae6906afb5fdb8f8558624%2FScreen%20Shot%202020-06-04%20at%208.16.38%20AM.png?generation=1591283842155458&amp;alt=media)\n\n[1]: https://github.com/qubvel/classification_models\n[2]: https://github.com/qubvel/efficientnet",
    "874487": "This blog has a nice timeline of the different models. It's missing DenseNet which came out in Jan 2018 and EffientNet which came out in Nov 2019. Generally, the newer the model the more accurate.\nhttps://towardsdatascience.com/illustrated-10-cnn-architectures-95d78ace614d",
    "874735": "Thanks Chris for detailed explanation. Really appreciate your help.",
    "874738": "Hi Chris,\n\nI don't have powerful system at Home . \n\nDo you recommend google co-lab or Azure Notebook ?\n\nPlease comment.",
    "875521": "This article has elaborated on various CNN architectures. There's Python code in there too, so you could copy and try it out. [CNN Architectures, a Deep Dive - Towards Data Science](https://towardsdatascience.com/cnn-architectures-a-deep-dive-a99441d18049)",
    "875524": "I'm not familiar with Azure Notebook. I have used Google CoLab and Kaggle notebooks (to compete in Kaggle competitions). Both of those are good.",
    "875940": "Chris, Is there a way to choose the one of EfficientNet among the several architectures in it based on the dataset? Or which EfficientNet among B1 to B7 is good here why?"
  },
  "source": "meta"
}