{
  "id": 217150,
  "title": "Combination of cutmix and other augmentations",
  "url": "/competitions/cassava-leaf-disease-classification/discussion/217150",
  "author_name": "",
  "post_date": "2021-02-05T14:14:18.288524400Z",
  "votes": 5,
  "comment_count": 8,
  "views": 0,
  "content": "<p>Hi all.<br>\nI wanna know about the combination of cutmix and other augmentations.</p>\n<p>Is there any problem if I use cutmix with other augmentations?<br>\nOr shouldn't I use other augmentations when I do cutmix?</p>\n<p>Now I'm using cutmix with other augmentations, but score is not improved.<br>\n(In my code, transformed image is pasted to transformed image…)</p>\n<p>If you have opinion about this, please give me some advice.<br>\nThanks!</p>",
  "messages": [
    {
      "id": "1187533",
      "postDate": "02/05/2021 14:14:18",
      "content": "<p>Hi all.<br>\nI wanna know about the combination of cutmix and other augmentations.</p>\n<p>Is there any problem if I use cutmix with other augmentations?<br>\nOr shouldn't I use other augmentations when I do cutmix?</p>\n<p>Now I'm using cutmix with other augmentations, but score is not improved.<br>\n(In my code, transformed image is pasted to transformed image…)</p>\n<p>If you have opinion about this, please give me some advice.<br>\nThanks!</p>",
      "rawMarkdown": "Hi all.\nI wanna know about the combination of cutmix and other augmentations.\n\nIs there any problem if I use cutmix with other augmentations?\nOr shouldn't I use other augmentations when I do cutmix?\n\nNow I'm using cutmix with other augmentations, but score is not improved.\n(In my code, transformed image is pasted to transformed image...)\n\nIf you have opinion about this, please give me some advice.\nThanks!",
      "votes": null
    },
    {
      "id": "1187623",
      "postDate": "02/05/2021 15:28:48",
      "content": "<p>You definitely want other augmentations (plenty of public notebooks highlight ones that help), whether you use cutmix or not. The question is more whether cutmix is helpful, how to tune its parameters and what alternatives to it (e.g. the much discussed snapmix) may be better. </p>\n<p>To my mind the problem with cutmix is that it does not reflect that one diseased corner of a leaf will often change the appropriate classification of an image. If you add 10% of an diseased image to a healthy image and that bit happens to show disease, then the logical prediction would be 1 diseased and 0 healthy. In contrast, on, say, CIFAR-10 it makes sense to predict 0.5 car and 0.5 plane when showing half a plane image and half a car image. </p>\n<p>This is not saying that with suitable settings cutmix might not end up improving performance, but presumably a skilled human cutting out bits from different images and hand assigning labels would end up doing something more meaningful. E.g. a human might sometimes only add some random cut-out stuff from the background  that does not matter without covering the key bits (label unchanged). Or, a human might cut out exactly the diseased area of leaf and adding that to another image of healthy leaves (label changes to the disease shown). And that's what some of the alternative proposals (like snapmix) try to address in an automated fashion.</p>",
      "rawMarkdown": "You definitely want other augmentations (plenty of public notebooks highlight ones that help), whether you use cutmix or not. The question is more whether cutmix is helpful, how to tune its parameters and what alternatives to it (e.g. the much discussed snapmix) may be better. \n\nTo my mind the problem with cutmix is that it does not reflect that one diseased corner of a leaf will often change the appropriate classification of an image. If you add 10% of an diseased image to a healthy image and that bit happens to show disease, then the logical prediction would be 1 diseased and 0 healthy. In contrast, on, say, CIFAR-10 it makes sense to predict 0.5 car and 0.5 plane when showing half a plane image and half a car image. \n\nThis is not saying that with suitable settings cutmix might not end up improving performance, but presumably a skilled human cutting out bits from different images and hand assigning labels would end up doing something more meaningful. E.g. a human might sometimes only add some random cut-out stuff from the background  that does not matter without covering the key bits (label unchanged). Or, a human might cut out exactly the diseased area of leaf and adding that to another image of healthy leaves (label changes to the disease shown). And that's what some of the alternative proposals (like snapmix) try to address in an automated fashion.",
      "votes": null
    },
    {
      "id": "1187666",
      "postDate": "02/05/2021 16:07:21",
      "content": "<p>I think cutmix works in this comp because it introduces noise to the training so you wont overfit on the training set noise. Also be carefull not to add to much regularization with cutmix otherwise you will underfit</p>",
      "rawMarkdown": "I think cutmix works in this comp because it introduces noise to the training so you wont overfit on the training set noise. Also be carefull not to add to much regularization with cutmix otherwise you will underfit",
      "votes": null
    },
    {
      "id": "1187929",
      "postDate": "02/05/2021 19:02:58",
      "content": "<p>My suggestion is avoid using cutout, cutmix, snapmix or mixup more than one time at one iteration.</p>",
      "rawMarkdown": "My suggestion is avoid using cutout, cutmix, snapmix or mixup more than one time at one iteration.",
      "votes": null
    },
    {
      "id": "1188473",
      "postDate": "02/06/2021 09:20:19",
      "content": "<p>As you said, there is a risk that cutmix will not be able to reflect the proper label.<br>\nNow, it seems that my cutmixed image don't capture features.<br>\nThis problem is so difficult to solve, but interesting :)<br>\nThanks!</p>",
      "rawMarkdown": "As you said, there is a risk that cutmix will not be able to reflect the proper label.\nNow, it seems that my cutmixed image don't capture features.\nThis problem is so difficult to solve, but interesting :)\nThanks!",
      "votes": null
    },
    {
      "id": "1188475",
      "postDate": "02/06/2021 09:21:41",
      "content": "<p>Thanks  for your advice!</p>",
      "rawMarkdown": "Thanks  for your advice!",
      "votes": null
    },
    {
      "id": "1188477",
      "postDate": "02/06/2021 09:25:52",
      "content": "<p>Thanks!<br>\nSorry I didn't get it well, but  What exactly do you mean by \"be carefull not to add to much regularization with cutmix\"?</p>",
      "rawMarkdown": "Thanks!\nSorry I didn't get it well, but  What exactly do you mean by \"be carefull not to add to much regularization with cutmix\"?",
      "votes": null
    },
    {
      "id": "1189251",
      "postDate": "02/06/2021 20:40:59",
      "content": "<p>not adding to hard augments like cutout, not adding too much dropouts, drop_path or dropblock, not adding too much weight decay etc..</p>",
      "rawMarkdown": "not adding to hard augments like cutout, not adding too much dropouts, drop_path or dropblock, not adding too much weight decay etc..",
      "votes": null
    },
    {
      "id": "1189924",
      "postDate": "02/07/2021 10:43:09",
      "content": "<p>I got it! I learned a lot, thanks!</p>",
      "rawMarkdown": "I got it! I learned a lot, thanks!",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1187623,
      "author_name": "bjoernholzhauer",
      "author_url": "",
      "post_date": "02/05/2021 15:28:48",
      "content": "<p>You definitely want other augmentations (plenty of public notebooks highlight ones that help), whether you use cutmix or not. The question is more whether cutmix is helpful, how to tune its parameters and what alternatives to it (e.g. the much discussed snapmix) may be better. </p>\n<p>To my mind the problem with cutmix is that it does not reflect that one diseased corner of a leaf will often change the appropriate classification of an image. If you add 10% of an diseased image to a healthy image and that bit happens to show disease, then the logical prediction would be 1 diseased and 0 healthy. In contrast, on, say, CIFAR-10 it makes sense to predict 0.5 car and 0.5 plane when showing half a plane image and half a car image. </p>\n<p>This is not saying that with suitable settings cutmix might not end up improving performance, but presumably a skilled human cutting out bits from different images and hand assigning labels would end up doing something more meaningful. E.g. a human might sometimes only add some random cut-out stuff from the background  that does not matter without covering the key bits (label unchanged). Or, a human might cut out exactly the diseased area of leaf and adding that to another image of healthy leaves (label changes to the disease shown). And that's what some of the alternative proposals (like snapmix) try to address in an automated fashion.</p>",
      "votes": null,
      "replies": [
        {
          "id": 1188473,
          "author_name": "tt0721",
          "author_url": "",
          "post_date": "02/06/2021 09:20:19",
          "content": "<p>As you said, there is a risk that cutmix will not be able to reflect the proper label.<br>\nNow, it seems that my cutmixed image don't capture features.<br>\nThis problem is so difficult to solve, but interesting :)<br>\nThanks!</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1187666,
      "author_name": "yannmajewski",
      "author_url": "",
      "post_date": "02/05/2021 16:07:21",
      "content": "<p>I think cutmix works in this comp because it introduces noise to the training so you wont overfit on the training set noise. Also be carefull not to add to much regularization with cutmix otherwise you will underfit</p>",
      "votes": null,
      "replies": [
        {
          "id": 1188477,
          "author_name": "tt0721",
          "author_url": "",
          "post_date": "02/06/2021 09:25:52",
          "content": "<p>Thanks!<br>\nSorry I didn't get it well, but  What exactly do you mean by \"be carefull not to add to much regularization with cutmix\"?</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1189251,
          "author_name": "yannmajewski",
          "author_url": "",
          "post_date": "02/06/2021 20:40:59",
          "content": "<p>not adding to hard augments like cutout, not adding too much dropouts, drop_path or dropblock, not adding too much weight decay etc..</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1189924,
          "author_name": "tt0721",
          "author_url": "",
          "post_date": "02/07/2021 10:43:09",
          "content": "<p>I got it! I learned a lot, thanks!</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1187929,
      "author_name": "steamedsheep",
      "author_url": "",
      "post_date": "02/05/2021 19:02:58",
      "content": "<p>My suggestion is avoid using cutout, cutmix, snapmix or mixup more than one time at one iteration.</p>",
      "votes": null,
      "replies": [
        {
          "id": 1188475,
          "author_name": "tt0721",
          "author_url": "",
          "post_date": "02/06/2021 09:21:41",
          "content": "<p>Thanks  for your advice!</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1187533": "Hi all.\nI wanna know about the combination of cutmix and other augmentations.\n\nIs there any problem if I use cutmix with other augmentations?\nOr shouldn't I use other augmentations when I do cutmix?\n\nNow I'm using cutmix with other augmentations, but score is not improved.\n(In my code, transformed image is pasted to transformed image...)\n\nIf you have opinion about this, please give me some advice.\nThanks!",
    "1187623": "You definitely want other augmentations (plenty of public notebooks highlight ones that help), whether you use cutmix or not. The question is more whether cutmix is helpful, how to tune its parameters and what alternatives to it (e.g. the much discussed snapmix) may be better. \n\nTo my mind the problem with cutmix is that it does not reflect that one diseased corner of a leaf will often change the appropriate classification of an image. If you add 10% of an diseased image to a healthy image and that bit happens to show disease, then the logical prediction would be 1 diseased and 0 healthy. In contrast, on, say, CIFAR-10 it makes sense to predict 0.5 car and 0.5 plane when showing half a plane image and half a car image. \n\nThis is not saying that with suitable settings cutmix might not end up improving performance, but presumably a skilled human cutting out bits from different images and hand assigning labels would end up doing something more meaningful. E.g. a human might sometimes only add some random cut-out stuff from the background  that does not matter without covering the key bits (label unchanged). Or, a human might cut out exactly the diseased area of leaf and adding that to another image of healthy leaves (label changes to the disease shown). And that's what some of the alternative proposals (like snapmix) try to address in an automated fashion.",
    "1187666": "I think cutmix works in this comp because it introduces noise to the training so you wont overfit on the training set noise. Also be carefull not to add to much regularization with cutmix otherwise you will underfit",
    "1187929": "My suggestion is avoid using cutout, cutmix, snapmix or mixup more than one time at one iteration.",
    "1188473": "As you said, there is a risk that cutmix will not be able to reflect the proper label.\nNow, it seems that my cutmixed image don't capture features.\nThis problem is so difficult to solve, but interesting :)\nThanks!",
    "1188475": "Thanks  for your advice!",
    "1188477": "Thanks!\nSorry I didn't get it well, but  What exactly do you mean by \"be carefull not to add to much regularization with cutmix\"?",
    "1189251": "not adding to hard augments like cutout, not adding too much dropouts, drop_path or dropblock, not adding too much weight decay etc..",
    "1189924": "I got it! I learned a lot, thanks!"
  },
  "source": "meta"
}