{
  "id": 225449,
  "title": "3 techniques that might help in this competition",
  "url": "/competitions/hpa-single-cell-image-classification/discussion/225449",
  "author_name": "Darek Kłeczek",
  "post_date": "2021-03-12T10:25:25.078000",
  "votes": 22,
  "comment_count": 4,
  "views": 0,
  "content": "<p>I was testing various techniques to address the problems in this competition: weakly labels and imbalanced data. I prepared a short explainer notebook for each of them. I haven't achieved any breakthrough so far. Are there other techniques you're using or consider using? </p>\n<ol>\n<li><a href=\"https://www.kaggle.com/thedrcat/cam-class-activation-map-explained-in-pytorch\" target=\"_blank\">Class Activation Map</a> - this is one of a family of approaches to check which area of an image contributed to a particular label prediction. </li>\n<li><a href=\"https://www.kaggle.com/thedrcat/focal-multilabel-loss-in-pytorch-explained\" target=\"_blank\">Focal Loss</a> - this apparently helped a lot in the previous HPA challenge. </li>\n<li><a href=\"https://www.kaggle.com/thedrcat/oversampling-for-multi-label-classification\" target=\"_blank\">Oversampling</a> - another approach to address class imbalance. </li>\n</ol>",
  "messages": [
    {
      "id": 1235635,
      "postDate": "2021-03-12T10:25:25.080Z",
      "content": "<p>I was testing various techniques to address the problems in this competition: weakly labels and imbalanced data. I prepared a short explainer notebook for each of them. I haven't achieved any breakthrough so far. Are there other techniques you're using or consider using? </p>\n<ol>\n<li><a href=\"https://www.kaggle.com/thedrcat/cam-class-activation-map-explained-in-pytorch\" target=\"_blank\">Class Activation Map</a> - this is one of a family of approaches to check which area of an image contributed to a particular label prediction. </li>\n<li><a href=\"https://www.kaggle.com/thedrcat/focal-multilabel-loss-in-pytorch-explained\" target=\"_blank\">Focal Loss</a> - this apparently helped a lot in the previous HPA challenge. </li>\n<li><a href=\"https://www.kaggle.com/thedrcat/oversampling-for-multi-label-classification\" target=\"_blank\">Oversampling</a> - another approach to address class imbalance. </li>\n</ol>",
      "rawMarkdown": "I was testing various techniques to address the problems in this competition: weakly labels and imbalanced data. I prepared a short explainer notebook for each of them. I haven't achieved any breakthrough so far. Are there other techniques you're using or consider using? \n1. [Class Activation Map](https://www.kaggle.com/thedrcat/cam-class-activation-map-explained-in-pytorch) - this is one of a family of approaches to check which area of an image contributed to a particular label prediction. \n2. [Focal Loss](https://www.kaggle.com/thedrcat/focal-multilabel-loss-in-pytorch-explained) - this apparently helped a lot in the previous HPA challenge. \n3. [Oversampling](https://www.kaggle.com/thedrcat/oversampling-for-multi-label-classification) - another approach to address class imbalance. ",
      "votes": 21
    },
    {
      "id": 1236991,
      "postDate": "2021-03-13T16:16:19.743Z",
      "content": "<p>How exactly are you thinking of using CAM? Class activations are particularly useful if we have a strong classifier specific to that dataset. It can be used to localize the portion of the image contributing to the final output. This can be overlapped with segmentation mask to label those cells only. </p>\n<p>By the way here's a kernel that I made explaining GradCAM - a superior class activation technique: <a href=\"https://www.kaggle.com/ayuraj/gradcam-implementation-visualization-in-tf-w-b\" target=\"_blank\">https://www.kaggle.com/ayuraj/gradcam-implementation-visualization-in-tf-w-b</a></p>",
      "rawMarkdown": "How exactly are you thinking of using CAM? Class activations are particularly useful if we have a strong classifier specific to that dataset. It can be used to localize the portion of the image contributing to the final output. This can be overlapped with segmentation mask to label those cells only. \n\nBy the way here's a kernel that I made explaining GradCAM - a superior class activation technique: https://www.kaggle.com/ayuraj/gradcam-implementation-visualization-in-tf-w-b",
      "votes": 1,
      "replies": [
        {
          "id": 1237372,
          "postDate": "2021-03-14T04:50:46.863Z",
          "content": "<p>Hi <a href=\"https://www.kaggle.com/ayuraj\" target=\"_blank\">@ayuraj</a> - CAM can be used in a similar way to <a href=\"https://www.kaggle.com/c/hpa-single-cell-image-classification/discussion/217395\" target=\"_blank\">PuzzleCAM approach shared by phalanx</a>. PuzzleCAM should be better, but it is based on CAM, so understanding it should help :) It would be interesting to compare these with GradCAM, I think 'superiority' is usually context-specific and should be validated experimentally. Thanks for the question!</p>",
          "rawMarkdown": "Hi @ayuraj - CAM can be used in a similar way to [PuzzleCAM approach shared by phalanx](https://www.kaggle.com/c/hpa-single-cell-image-classification/discussion/217395). PuzzleCAM should be better, but it is based on CAM, so understanding it should help :) It would be interesting to compare these with GradCAM, I think 'superiority' is usually context-specific and should be validated experimentally. Thanks for the question!",
          "votes": 1
        }
      ]
    },
    {
      "id": 1246202,
      "postDate": "2021-03-20T14:37:04.243Z",
      "content": "<p>Today I tried focal loss, but unfortunately it decreased the LB score.</p>",
      "rawMarkdown": "Today I tried focal loss, but unfortunately it decreased the LB score.",
      "votes": 2,
      "replies": [
        {
          "id": 1247448,
          "postDate": "2021-03-21T18:18:59.670Z",
          "content": "<p>same for me . </p>",
          "rawMarkdown": "same for me . "
        }
      ]
    }
  ],
  "comments": [
    {
      "id": 1236991,
      "author_name": "Ayush Thakur",
      "author_url": "",
      "post_date": "2021-03-13T16:16:19.743000",
      "content": "<p>How exactly are you thinking of using CAM? Class activations are particularly useful if we have a strong classifier specific to that dataset. It can be used to localize the portion of the image contributing to the final output. This can be overlapped with segmentation mask to label those cells only. </p>\n<p>By the way here's a kernel that I made explaining GradCAM - a superior class activation technique: <a href=\"https://www.kaggle.com/ayuraj/gradcam-implementation-visualization-in-tf-w-b\" target=\"_blank\">https://www.kaggle.com/ayuraj/gradcam-implementation-visualization-in-tf-w-b</a></p>",
      "votes": 1,
      "replies": [
        {
          "id": 1237372,
          "author_name": "Darek Kłeczek",
          "author_url": "",
          "post_date": "2021-03-14T04:50:46.863000",
          "content": "<p>Hi <a href=\"https://www.kaggle.com/ayuraj\" target=\"_blank\">@ayuraj</a> - CAM can be used in a similar way to <a href=\"https://www.kaggle.com/c/hpa-single-cell-image-classification/discussion/217395\" target=\"_blank\">PuzzleCAM approach shared by phalanx</a>. PuzzleCAM should be better, but it is based on CAM, so understanding it should help :) It would be interesting to compare these with GradCAM, I think 'superiority' is usually context-specific and should be validated experimentally. Thanks for the question!</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 1246202,
      "author_name": "cool_rabbit",
      "author_url": "",
      "post_date": "2021-03-20T14:37:04.243000",
      "content": "<p>Today I tried focal loss, but unfortunately it decreased the LB score.</p>",
      "votes": 2,
      "replies": [
        {
          "id": 1247448,
          "author_name": "yuvaramsingh",
          "author_url": "",
          "post_date": "2021-03-21T18:18:59.670000",
          "content": "<p>same for me . </p>",
          "votes": 0,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1235635": "I was testing various techniques to address the problems in this competition: weakly labels and imbalanced data. I prepared a short explainer notebook for each of them. I haven't achieved any breakthrough so far. Are there other techniques you're using or consider using? \n1. [Class Activation Map](https://www.kaggle.com/thedrcat/cam-class-activation-map-explained-in-pytorch) - this is one of a family of approaches to check which area of an image contributed to a particular label prediction. \n2. [Focal Loss](https://www.kaggle.com/thedrcat/focal-multilabel-loss-in-pytorch-explained) - this apparently helped a lot in the previous HPA challenge. \n3. [Oversampling](https://www.kaggle.com/thedrcat/oversampling-for-multi-label-classification) - another approach to address class imbalance. ",
    "1236991": "How exactly are you thinking of using CAM? Class activations are particularly useful if we have a strong classifier specific to that dataset. It can be used to localize the portion of the image contributing to the final output. This can be overlapped with segmentation mask to label those cells only. \n\nBy the way here's a kernel that I made explaining GradCAM - a superior class activation technique: https://www.kaggle.com/ayuraj/gradcam-implementation-visualization-in-tf-w-b",
    "1246202": "Today I tried focal loss, but unfortunately it decreased the LB score."
  }
}