{
  "id": 110763,
  "title": "[FastAi starter pack addition] a CAM model",
  "url": "/competitions/rsna-intracranial-hemorrhage-detection/discussion/110763",
  "author_name": "Radek Osmulski",
  "post_date": "2019-09-30T21:51:07.042000",
  "votes": 24,
  "comment_count": 5,
  "views": 0,
  "content": "<p>CAM models are a popular family of models that allow you to peer inside your neural net and learn about how it makes its predictions.</p>\n\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F83267%2F0b3b980a1fcb15982e63f14902526fc7%2FCAM.png?generation=1569878834542764&amp;alt=media\" alt=\"\"></p>\n\n<p>They are not only fun to look at, but often times are very informative. Is the model making predictions based on relevant fragments of the image or maybe it picked up on some leakage? </p>\n\n<p>For instance, if we had a dataset of cats and dogs but cat pictures were only taken outside and dog pictures were only taken indoors, what would be the simplest thing a model could learn to perform very well? Would detecting large swathes of green do the trick? Could be. Chances are they would be much easier for the model to learn than to actually tell cats and dogs apart. </p>\n\n<p>Anyhow, this is an exaggerated scenario, nonetheless there are many much more subtle issues along these lines that the CAM model can help pinpoint.</p>\n\n<p>The fun part here is that the notebook uses fastai... <a href=\"https://github.com/fastai/fastai_dev\">v2</a>! I am extremely appreciative of the amount of hard work that went into bringing the library to its current state. It is a complete rewrite of v1 and from what I can already tell, it is going to be a developer heaven. This notebook is very simple but I think you can already see some of the flexibility of v2 bleeding into it.</p>\n\n<p>As a side note, this is an example of a fully convolutional network - they have interesting characteristics and often behave differently to their cousins with fully connected classifiers sitting on top of convolutional features. There is a high chance that models of this type might make a good addition to your ensemble!</p>\n\n<p><a href=\"https://github.com/radekosmulski/rsna-intracranial/blob/master/08_CAM_binary_classifier.ipynb\">Link to the notebook</a></p>",
  "messages": [
    {
      "id": 637300,
      "postDate": "2019-09-30T21:51:07.043Z",
      "content": "<p>CAM models are a popular family of models that allow you to peer inside your neural net and learn about how it makes its predictions.</p>\n\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F83267%2F0b3b980a1fcb15982e63f14902526fc7%2FCAM.png?generation=1569878834542764&amp;alt=media\" alt=\"\"></p>\n\n<p>They are not only fun to look at, but often times are very informative. Is the model making predictions based on relevant fragments of the image or maybe it picked up on some leakage? </p>\n\n<p>For instance, if we had a dataset of cats and dogs but cat pictures were only taken outside and dog pictures were only taken indoors, what would be the simplest thing a model could learn to perform very well? Would detecting large swathes of green do the trick? Could be. Chances are they would be much easier for the model to learn than to actually tell cats and dogs apart. </p>\n\n<p>Anyhow, this is an exaggerated scenario, nonetheless there are many much more subtle issues along these lines that the CAM model can help pinpoint.</p>\n\n<p>The fun part here is that the notebook uses fastai... <a href=\"https://github.com/fastai/fastai_dev\">v2</a>! I am extremely appreciative of the amount of hard work that went into bringing the library to its current state. It is a complete rewrite of v1 and from what I can already tell, it is going to be a developer heaven. This notebook is very simple but I think you can already see some of the flexibility of v2 bleeding into it.</p>\n\n<p>As a side note, this is an example of a fully convolutional network - they have interesting characteristics and often behave differently to their cousins with fully connected classifiers sitting on top of convolutional features. There is a high chance that models of this type might make a good addition to your ensemble!</p>\n\n<p><a href=\"https://github.com/radekosmulski/rsna-intracranial/blob/master/08_CAM_binary_classifier.ipynb\">Link to the notebook</a></p>",
      "rawMarkdown": "CAM models are a popular family of models that allow you to peer inside your neural net and learn about how it makes its predictions.\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F83267%2F0b3b980a1fcb15982e63f14902526fc7%2FCAM.png?generation=1569878834542764&amp;alt=media)\n\nThey are not only fun to look at, but often times are very informative. Is the model making predictions based on relevant fragments of the image or maybe it picked up on some leakage? \n\nFor instance, if we had a dataset of cats and dogs but cat pictures were only taken outside and dog pictures were only taken indoors, what would be the simplest thing a model could learn to perform very well? Would detecting large swathes of green do the trick? Could be. Chances are they would be much easier for the model to learn than to actually tell cats and dogs apart. \n\nAnyhow, this is an exaggerated scenario, nonetheless there are many much more subtle issues along these lines that the CAM model can help pinpoint.\n\nThe fun part here is that the notebook uses fastai... [v2](https://github.com/fastai/fastai_dev)! I am extremely appreciative of the amount of hard work that went into bringing the library to its current state. It is a complete rewrite of v1 and from what I can already tell, it is going to be a developer heaven. This notebook is very simple but I think you can already see some of the flexibility of v2 bleeding into it.\n\nAs a side note, this is an example of a fully convolutional network - they have interesting characteristics and often behave differently to their cousins with fully connected classifiers sitting on top of convolutional features. There is a high chance that models of this type might make a good addition to your ensemble!\n\n[Link to the notebook](https://github.com/radekosmulski/rsna-intracranial/blob/master/08_CAM_binary_classifier.ipynb)",
      "votes": 24
    },
    {
      "id": 637502,
      "postDate": "2019-10-01T04:51:05.553Z",
      "content": "<p>Very Informative &amp; Helpful... Thanks <a href=\"/radek1\">@radek1</a> </p>",
      "rawMarkdown": "Very Informative &amp; Helpful... Thanks @radek1 ",
      "votes": 1
    },
    {
      "id": 637884,
      "postDate": "2019-10-01T10:42:25.660Z",
      "content": "<p>Is it similar to <a href=\"http://gradcam.cloudcv.org\">http://gradcam.cloudcv.org</a>?</p>",
      "rawMarkdown": "Is it similar to [http://gradcam.cloudcv.org](http://gradcam.cloudcv.org)?",
      "replies": [
        {
          "id": 637919,
          "postDate": "2019-10-01T11:20:32.090Z",
          "content": "<p>yes, the paper you linked builds up on the initial approach that was shared in the paper I based my model on</p>",
          "rawMarkdown": "yes, the paper you linked builds up on the initial approach that was shared in the paper I based my model on"
        },
        {
          "id": 637922,
          "postDate": "2019-10-01T11:21:15.060Z",
          "content": "<p>Here is the <a href=\"https://arxiv.org/abs/1512.04150\">original paper</a> that introduced the CAM architecture AFAIK</p>",
          "rawMarkdown": "Here is the [original paper](https://arxiv.org/abs/1512.04150) that introduced the CAM architecture AFAIK",
          "votes": 1
        },
        {
          "id": 638044,
          "postDate": "2019-10-01T13:33:21.783Z",
          "content": "<p>Great, thanks!! <a href=\"/radek1\">@radek1</a>.</p>",
          "rawMarkdown": "Great, thanks!! @radek1.",
          "votes": 1
        }
      ]
    }
  ],
  "comments": [
    {
      "id": 637502,
      "author_name": "Ailurophile",
      "author_url": "",
      "post_date": "2019-10-01T04:51:05.553000",
      "content": "<p>Very Informative &amp; Helpful... Thanks <a href=\"/radek1\">@radek1</a> </p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 637884,
      "author_name": "Rohit Gupta",
      "author_url": "",
      "post_date": "2019-10-01T10:42:25.660000",
      "content": "<p>Is it similar to <a href=\"http://gradcam.cloudcv.org\">http://gradcam.cloudcv.org</a>?</p>",
      "votes": 0,
      "replies": [
        {
          "id": 637919,
          "author_name": "Radek Osmulski",
          "author_url": "",
          "post_date": "2019-10-01T11:20:32.090000",
          "content": "<p>yes, the paper you linked builds up on the initial approach that was shared in the paper I based my model on</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 637922,
          "author_name": "Radek Osmulski",
          "author_url": "",
          "post_date": "2019-10-01T11:21:15.060000",
          "content": "<p>Here is the <a href=\"https://arxiv.org/abs/1512.04150\">original paper</a> that introduced the CAM architecture AFAIK</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 638044,
          "author_name": "Rohit Gupta",
          "author_url": "",
          "post_date": "2019-10-01T13:33:21.783000",
          "content": "<p>Great, thanks!! <a href=\"/radek1\">@radek1</a>.</p>",
          "votes": 1,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "637300": "CAM models are a popular family of models that allow you to peer inside your neural net and learn about how it makes its predictions.\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-user-content/o/inbox%2F83267%2F0b3b980a1fcb15982e63f14902526fc7%2FCAM.png?generation=1569878834542764&amp;alt=media)\n\nThey are not only fun to look at, but often times are very informative. Is the model making predictions based on relevant fragments of the image or maybe it picked up on some leakage? \n\nFor instance, if we had a dataset of cats and dogs but cat pictures were only taken outside and dog pictures were only taken indoors, what would be the simplest thing a model could learn to perform very well? Would detecting large swathes of green do the trick? Could be. Chances are they would be much easier for the model to learn than to actually tell cats and dogs apart. \n\nAnyhow, this is an exaggerated scenario, nonetheless there are many much more subtle issues along these lines that the CAM model can help pinpoint.\n\nThe fun part here is that the notebook uses fastai... [v2](https://github.com/fastai/fastai_dev)! I am extremely appreciative of the amount of hard work that went into bringing the library to its current state. It is a complete rewrite of v1 and from what I can already tell, it is going to be a developer heaven. This notebook is very simple but I think you can already see some of the flexibility of v2 bleeding into it.\n\nAs a side note, this is an example of a fully convolutional network - they have interesting characteristics and often behave differently to their cousins with fully connected classifiers sitting on top of convolutional features. There is a high chance that models of this type might make a good addition to your ensemble!\n\n[Link to the notebook](https://github.com/radekosmulski/rsna-intracranial/blob/master/08_CAM_binary_classifier.ipynb)",
    "637502": "Very Informative &amp; Helpful... Thanks @radek1 ",
    "637884": "Is it similar to [http://gradcam.cloudcv.org](http://gradcam.cloudcv.org)?"
  }
}