{
  "id": 206393,
  "title": "What is my model seeing? Class Activation Mapping",
  "url": "/competitions/rfcx-species-audio-detection/discussion/206393",
  "author_name": "",
  "post_date": "2020-12-24T11:56:39.304405400Z",
  "votes": 21,
  "comment_count": 1,
  "views": 0,
  "content": "<p>Hi everyone,</p>\n<p>In this <a href=\"https://www.kaggle.com/guglielmocamporese/what-is-my-model-seeing-class-activation-mapping\" target=\"_blank\">notebook</a> I implemented the paper that introduced Class Action Map (CAM) <a href=\"https://arxiv.org/pdf/1512.04150.pdf\" target=\"_blank\">https://arxiv.org/pdf/1512.04150.pdf</a>. <br>\nThis is a simple method that computes the heatmap, at the pixel level, where the network in paying attention in order to make the prediction. I think it can be useful for this challenge, since most of the solutions I'm seeing here use the spectrogram (and variants such as mel-spectrograms) that can be considered as images. In particular this tool can be helpful for understanding the data and debugging the model.</p>\n<p>Here an example of such a method:</p>\n<table>\n<thead>\n<tr>\n<th><strong>Input Image</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F758632%2Fd08cd691870d047969885ba577d14fd6%2FScreenshot%202020-12-24%20at%2012.52.21%20PM.png?generation=1608810886426390&amp;alt=media\" alt=\"\"></td>\n</tr>\n</tbody>\n</table>\n<table>\n<thead>\n<tr>\n<th><strong>Class Activation Map on the Image</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F758632%2Fb581111ac8e17b17c0774b0155bf7d53%2FScreenshot%202020-12-24%20at%2012.52.15%20PM.png?generation=1608810904944035&amp;alt=media\" alt=\"\"></td>\n</tr>\n</tbody>\n</table>\n<p>Hope this can help!</p>\n<p>Best,</p>\n<p>Guglielmo</p>",
  "messages": [
    {
      "id": "1125121",
      "postDate": "12/24/2020 11:56:39",
      "content": "<p>Hi everyone,</p>\n<p>In this <a href=\"https://www.kaggle.com/guglielmocamporese/what-is-my-model-seeing-class-activation-mapping\" target=\"_blank\">notebook</a> I implemented the paper that introduced Class Action Map (CAM) <a href=\"https://arxiv.org/pdf/1512.04150.pdf\" target=\"_blank\">https://arxiv.org/pdf/1512.04150.pdf</a>. <br>\nThis is a simple method that computes the heatmap, at the pixel level, where the network in paying attention in order to make the prediction. I think it can be useful for this challenge, since most of the solutions I'm seeing here use the spectrogram (and variants such as mel-spectrograms) that can be considered as images. In particular this tool can be helpful for understanding the data and debugging the model.</p>\n<p>Here an example of such a method:</p>\n<table>\n<thead>\n<tr>\n<th><strong>Input Image</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F758632%2Fd08cd691870d047969885ba577d14fd6%2FScreenshot%202020-12-24%20at%2012.52.21%20PM.png?generation=1608810886426390&amp;alt=media\" alt=\"\"></td>\n</tr>\n</tbody>\n</table>\n<table>\n<thead>\n<tr>\n<th><strong>Class Activation Map on the Image</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F758632%2Fb581111ac8e17b17c0774b0155bf7d53%2FScreenshot%202020-12-24%20at%2012.52.15%20PM.png?generation=1608810904944035&amp;alt=media\" alt=\"\"></td>\n</tr>\n</tbody>\n</table>\n<p>Hope this can help!</p>\n<p>Best,</p>\n<p>Guglielmo</p>",
      "rawMarkdown": "Hi everyone,\n\nIn this [notebook](https://www.kaggle.com/guglielmocamporese/what-is-my-model-seeing-class-activation-mapping) I implemented the paper that introduced Class Action Map (CAM) https://arxiv.org/pdf/1512.04150.pdf. \nThis is a simple method that computes the heatmap, at the pixel level, where the network in paying attention in order to make the prediction. I think it can be useful for this challenge, since most of the solutions I'm seeing here use the spectrogram (and variants such as mel-spectrograms) that can be considered as images. In particular this tool can be helpful for understanding the data and debugging the model.\n\nHere an example of such a method:\n\n| **Input Image** | \n| --- |\n|![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F758632%2Fd08cd691870d047969885ba577d14fd6%2FScreenshot%202020-12-24%20at%2012.52.21%20PM.png?generation=1608810886426390&alt=media)|\n\n| **Class Activation Map on the Image** |\n| --- |\n|![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F758632%2Fb581111ac8e17b17c0774b0155bf7d53%2FScreenshot%202020-12-24%20at%2012.52.15%20PM.png?generation=1608810904944035&alt=media)|\n\nHope this can help!\n\nBest,\n\nGuglielmo",
      "votes": null
    },
    {
      "id": "1125249",
      "postDate": "12/24/2020 14:37:17",
      "content": "<p>Here an example of such a method applied to my model:</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F758632%2F2e70ef66ee76cc5856062da1e02d9130%2FScreenshot%202020-12-24%20at%203.32.40%20PM.png?generation=1608820628585837&amp;alt=media\" alt=\"\"></p>",
      "rawMarkdown": "Here an example of such a method applied to my model:\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F758632%2F2e70ef66ee76cc5856062da1e02d9130%2FScreenshot%202020-12-24%20at%203.32.40%20PM.png?generation=1608820628585837&alt=media)",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1125249,
      "author_name": "guglielmocamporese",
      "author_url": "",
      "post_date": "12/24/2020 14:37:17",
      "content": "<p>Here an example of such a method applied to my model:</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F758632%2F2e70ef66ee76cc5856062da1e02d9130%2FScreenshot%202020-12-24%20at%203.32.40%20PM.png?generation=1608820628585837&amp;alt=media\" alt=\"\"></p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1125121": "Hi everyone,\n\nIn this [notebook](https://www.kaggle.com/guglielmocamporese/what-is-my-model-seeing-class-activation-mapping) I implemented the paper that introduced Class Action Map (CAM) https://arxiv.org/pdf/1512.04150.pdf. \nThis is a simple method that computes the heatmap, at the pixel level, where the network in paying attention in order to make the prediction. I think it can be useful for this challenge, since most of the solutions I'm seeing here use the spectrogram (and variants such as mel-spectrograms) that can be considered as images. In particular this tool can be helpful for understanding the data and debugging the model.\n\nHere an example of such a method:\n\n| **Input Image** | \n| --- |\n|![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F758632%2Fd08cd691870d047969885ba577d14fd6%2FScreenshot%202020-12-24%20at%2012.52.21%20PM.png?generation=1608810886426390&alt=media)|\n\n| **Class Activation Map on the Image** |\n| --- |\n|![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F758632%2Fb581111ac8e17b17c0774b0155bf7d53%2FScreenshot%202020-12-24%20at%2012.52.15%20PM.png?generation=1608810904944035&alt=media)|\n\nHope this can help!\n\nBest,\n\nGuglielmo",
    "1125249": "Here an example of such a method applied to my model:\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F758632%2F2e70ef66ee76cc5856062da1e02d9130%2FScreenshot%202020-12-24%20at%203.32.40%20PM.png?generation=1608820628585837&alt=media)"
  },
  "source": "meta"
}