{
  "id": 201213,
  "title": "Augmentation only on the minority class.",
  "url": "/competitions/cassava-leaf-disease-classification/discussion/201213",
  "author_name": "",
  "post_date": "2020-12-03T17:56:42.693475500Z",
  "votes": 5,
  "comment_count": 4,
  "views": 0,
  "content": "<p>I was thinking to augment only the minority class but then came across this <a href=\"https://www.kaggle.com/c/siim-isic-melanoma-classification/discussion/156403\" target=\"_blank\">post</a>.</p>\n<p>According to this augmenting only the minority class can lead to overfitting. Anyone experienced the same?</p>",
  "messages": [
    {
      "id": "1101202",
      "postDate": "12/03/2020 17:56:42",
      "content": "<p>I was thinking to augment only the minority class but then came across this <a href=\"https://www.kaggle.com/c/siim-isic-melanoma-classification/discussion/156403\" target=\"_blank\">post</a>.</p>\n<p>According to this augmenting only the minority class can lead to overfitting. Anyone experienced the same?</p>",
      "rawMarkdown": "I was thinking to augment only the minority class but then came across this [post](https://www.kaggle.com/c/siim-isic-melanoma-classification/discussion/156403).\n\nAccording to this augmenting only the minority class can lead to overfitting. Anyone experienced the same?",
      "votes": null
    },
    {
      "id": "1101213",
      "postDate": "12/03/2020 18:01:07",
      "content": "<p>The first thing you should experiment and compare your CV scores; though in another image problem I did use augmentation on the minority data which was giving me a decent result, though I don't remember it was overfitting or not.</p>",
      "rawMarkdown": "The first thing you should experiment and compare your CV scores; though in another image problem I did use augmentation on the minority data which was giving me a decent result, though I don't remember it was overfitting or not.",
      "votes": null
    },
    {
      "id": "1101330",
      "postDate": "12/03/2020 20:04:42",
      "content": "<p>It might depend on the augmentation. If your augmentation leaves some visual artifacts (like, for example, the messed up corners of the image left after rotational augmentation) and if they are present only in the minority class then your learning algorithm will most probably notice these artifacts and overfit to them. As a result, you will get a glowing CV score and very poor LB performance. </p>",
      "rawMarkdown": "It might depend on the augmentation. If your augmentation leaves some visual artifacts (like, for example, the messed up corners of the image left after rotational augmentation) and if they are present only in the minority class then your learning algorithm will most probably notice these artifacts and overfit to them. As a result, you will get a glowing CV score and very poor LB performance.",
      "votes": null
    },
    {
      "id": "1101758",
      "postDate": "12/04/2020 08:00:35",
      "content": "<p>I think that is a very valid point. So basically we can try and implement the following scheme:</p>\n<ol>\n<li>Perform random cropping on minority class.</li>\n<li>Perform horizontal flipping and vertical flipping on minority class.</li>\n<li>Random zoom in augmentation on minority class.</li>\n</ol>\n<p>Once we have the dataset balanced now perform augmentations on the entire dataset like:</p>\n<ol>\n<li>Random crop out </li>\n<li>Color variations</li>\n<li>Random rotations</li>\n<li>Random shear </li>\n</ol>",
      "rawMarkdown": "I think that is a very valid point. So basically we can try and implement the following scheme:\n\n1. Perform random cropping on minority class.\n2. Perform horizontal flipping and vertical flipping on minority class.\n3. Random zoom in augmentation on minority class.\n\nOnce we have the dataset balanced now perform augmentations on the entire dataset like:\n\n1. Random crop out \n2. Color variations\n3. Random rotations\n4. Random shear",
      "votes": null
    },
    {
      "id": "1101860",
      "postDate": "12/04/2020 10:42:04",
      "content": "<p>Our thinking is similar</p>",
      "rawMarkdown": "Our thinking is similar",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1101213,
      "author_name": "mrinath",
      "author_url": "",
      "post_date": "12/03/2020 18:01:07",
      "content": "<p>The first thing you should experiment and compare your CV scores; though in another image problem I did use augmentation on the minority data which was giving me a decent result, though I don't remember it was overfitting or not.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1101330,
      "author_name": "graf10a",
      "author_url": "",
      "post_date": "12/03/2020 20:04:42",
      "content": "<p>It might depend on the augmentation. If your augmentation leaves some visual artifacts (like, for example, the messed up corners of the image left after rotational augmentation) and if they are present only in the minority class then your learning algorithm will most probably notice these artifacts and overfit to them. As a result, you will get a glowing CV score and very poor LB performance. </p>",
      "votes": null,
      "replies": [
        {
          "id": 1101758,
          "author_name": "harveenchadha",
          "author_url": "",
          "post_date": "12/04/2020 08:00:35",
          "content": "<p>I think that is a very valid point. So basically we can try and implement the following scheme:</p>\n<ol>\n<li>Perform random cropping on minority class.</li>\n<li>Perform horizontal flipping and vertical flipping on minority class.</li>\n<li>Random zoom in augmentation on minority class.</li>\n</ol>\n<p>Once we have the dataset balanced now perform augmentations on the entire dataset like:</p>\n<ol>\n<li>Random crop out </li>\n<li>Color variations</li>\n<li>Random rotations</li>\n<li>Random shear </li>\n</ol>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1101860,
          "author_name": "zhangeng",
          "author_url": "",
          "post_date": "12/04/2020 10:42:04",
          "content": "<p>Our thinking is similar</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1101202": "I was thinking to augment only the minority class but then came across this [post](https://www.kaggle.com/c/siim-isic-melanoma-classification/discussion/156403).\n\nAccording to this augmenting only the minority class can lead to overfitting. Anyone experienced the same?",
    "1101213": "The first thing you should experiment and compare your CV scores; though in another image problem I did use augmentation on the minority data which was giving me a decent result, though I don't remember it was overfitting or not.",
    "1101330": "It might depend on the augmentation. If your augmentation leaves some visual artifacts (like, for example, the messed up corners of the image left after rotational augmentation) and if they are present only in the minority class then your learning algorithm will most probably notice these artifacts and overfit to them. As a result, you will get a glowing CV score and very poor LB performance.",
    "1101758": "I think that is a very valid point. So basically we can try and implement the following scheme:\n\n1. Perform random cropping on minority class.\n2. Perform horizontal flipping and vertical flipping on minority class.\n3. Random zoom in augmentation on minority class.\n\nOnce we have the dataset balanced now perform augmentations on the entire dataset like:\n\n1. Random crop out \n2. Color variations\n3. Random rotations\n4. Random shear",
    "1101860": "Our thinking is similar"
  },
  "source": "meta"
}