{
  "id": 212532,
  "title": "Refinement model wo data augmentation ",
  "url": "/competitions/ranzcr-clip-catheter-line-classification/discussion/212532",
  "author_name": "",
  "post_date": "2021-01-19T09:06:05.210203100Z",
  "votes": 30,
  "comment_count": 8,
  "views": 0,
  "content": "<p>I was gathering information about ML/DL on Twitter and found an interesting topic.<br>\nThe summary is this.</p>\n<pre><code>Train a model using intense data augmentation.\nFine tune the model with clean data (i.e. no DA) to improve accuracy.\n</code></pre>\n<p>The topic reminded me of the <a href=\"https://www.kaggle.com/underwearfitting/single-fold-training-of-resnet200d-lb0-965\" target=\"_blank\">great notebook</a>  by <a href=\"https://www.kaggle.com/underwearfitting\" target=\"_blank\">@underwearfitting</a>.<br>\nThis training notebook has just been used with intense augmentation.<br>\nAnd <a href=\"https://www.kaggle.com/underwearfitting/resnet200d-baseline-benchmark-public\" target=\"_blank\">weights are also available</a>.<br>\nI added a few tricks to this notebook and fine-tune some epochs without DA.<br>\nAs a result, the AUC increased from 0.9528 to 0.9548 (in fold0).<br>\nBut I haven't tried to see if it works for all folds.<br>\nYou can Try if you have a model that is trained with strong augmentation.<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F2294613%2Ffd5be348106d7a7b361adbc790e01fc8%2F2021-01-19.png?generation=1611046617592541&amp;alt=media\" alt=\"\"></p>\n<p>This paper seems to be reference.<br>\n<a href=\"https://arxiv.org/abs/1909.09148\" target=\"_blank\">Data Augmentation Revisited: Rethinking the Distribution Gap between Clean and Augmented Data</a></p>\n<p>[1/21 updated]<br>\nI experimented with all the folds.<br>\nThe results are shown below.</p>\n<table>\n<thead>\n<tr>\n<th>fold</th>\n<th><a href=\"https://www.kaggle.com/underwearfitting/resnet200d-baseline-benchmark-public\" target=\"_blank\">base weight</a></th>\n<th>Refined with no DA</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>fold 0</td>\n<td>0.9528</td>\n<td><strong>0.9548</strong></td>\n</tr>\n<tr>\n<td>fold 1</td>\n<td>0.9551</td>\n<td>0.9545</td>\n</tr>\n<tr>\n<td>fold 2</td>\n<td>0.9552</td>\n<td><strong>0.9557</strong></td>\n</tr>\n<tr>\n<td>fold 3</td>\n<td>0.9572</td>\n<td>0.9572</td>\n</tr>\n<tr>\n<td>fold 4</td>\n<td>0.9543</td>\n<td><strong>0.9548</strong></td>\n</tr>\n</tbody>\n</table>\n<p>If I have more time and left GPU quota, I would like to change the optimizer, lr, and others for further experiments.</p>",
  "messages": [
    {
      "id": "1159448",
      "postDate": "01/19/2021 09:06:05",
      "content": "<p>I was gathering information about ML/DL on Twitter and found an interesting topic.<br>\nThe summary is this.</p>\n<pre><code>Train a model using intense data augmentation.\nFine tune the model with clean data (i.e. no DA) to improve accuracy.\n</code></pre>\n<p>The topic reminded me of the <a href=\"https://www.kaggle.com/underwearfitting/single-fold-training-of-resnet200d-lb0-965\" target=\"_blank\">great notebook</a>  by <a href=\"https://www.kaggle.com/underwearfitting\" target=\"_blank\">@underwearfitting</a>.<br>\nThis training notebook has just been used with intense augmentation.<br>\nAnd <a href=\"https://www.kaggle.com/underwearfitting/resnet200d-baseline-benchmark-public\" target=\"_blank\">weights are also available</a>.<br>\nI added a few tricks to this notebook and fine-tune some epochs without DA.<br>\nAs a result, the AUC increased from 0.9528 to 0.9548 (in fold0).<br>\nBut I haven't tried to see if it works for all folds.<br>\nYou can Try if you have a model that is trained with strong augmentation.<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F2294613%2Ffd5be348106d7a7b361adbc790e01fc8%2F2021-01-19.png?generation=1611046617592541&amp;alt=media\" alt=\"\"></p>\n<p>This paper seems to be reference.<br>\n<a href=\"https://arxiv.org/abs/1909.09148\" target=\"_blank\">Data Augmentation Revisited: Rethinking the Distribution Gap between Clean and Augmented Data</a></p>\n<p>[1/21 updated]<br>\nI experimented with all the folds.<br>\nThe results are shown below.</p>\n<table>\n<thead>\n<tr>\n<th>fold</th>\n<th><a href=\"https://www.kaggle.com/underwearfitting/resnet200d-baseline-benchmark-public\" target=\"_blank\">base weight</a></th>\n<th>Refined with no DA</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>fold 0</td>\n<td>0.9528</td>\n<td><strong>0.9548</strong></td>\n</tr>\n<tr>\n<td>fold 1</td>\n<td>0.9551</td>\n<td>0.9545</td>\n</tr>\n<tr>\n<td>fold 2</td>\n<td>0.9552</td>\n<td><strong>0.9557</strong></td>\n</tr>\n<tr>\n<td>fold 3</td>\n<td>0.9572</td>\n<td>0.9572</td>\n</tr>\n<tr>\n<td>fold 4</td>\n<td>0.9543</td>\n<td><strong>0.9548</strong></td>\n</tr>\n</tbody>\n</table>\n<p>If I have more time and left GPU quota, I would like to change the optimizer, lr, and others for further experiments.</p>",
      "rawMarkdown": "I was gathering information about ML/DL on Twitter and found an interesting topic.\nThe summary is this.\n```\nTrain a model using intense data augmentation.\nFine tune the model with clean data (i.e. no DA) to improve accuracy.\n```\nThe topic reminded me of the [great notebook](https://www.kaggle.com/underwearfitting/single-fold-training-of-resnet200d-lb0-965)  by @underwearfitting.\nThis training notebook has just been used with intense augmentation.\nAnd [weights are also available](https://www.kaggle.com/underwearfitting/resnet200d-baseline-benchmark-public).\nI added a few tricks to this notebook and fine-tune some epochs without DA.\nAs a result, the AUC increased from 0.9528 to 0.9548 (in fold0).\nBut I haven't tried to see if it works for all folds.\nYou can Try if you have a model that is trained with strong augmentation.\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F2294613%2Ffd5be348106d7a7b361adbc790e01fc8%2F2021-01-19.png?generation=1611046617592541&alt=media)\n\nThis paper seems to be reference.\n[Data Augmentation Revisited: Rethinking the Distribution Gap between Clean and Augmented Data](https://arxiv.org/abs/1909.09148)\n\n[1/21 updated]\nI experimented with all the folds.\nThe results are shown below.\n| fold |  [base weight](https://www.kaggle.com/underwearfitting/resnet200d-baseline-benchmark-public) | Refined with no DA |\n| --- | --- |\n| fold 0 | 0.9528 | **0.9548** |\n| fold 1 | 0.9551 | 0.9545 |\n| fold 2 | 0.9552 | **0.9557** |\n| fold 3 | 0.9572 | 0.9572 |\n| fold 4 | 0.9543 | **0.9548** | \n\nIf I have more time and left GPU quota, I would like to change the optimizer, lr, and others for further experiments.",
      "votes": null
    },
    {
      "id": "1159507",
      "postDate": "01/19/2021 10:15:06",
      "content": "<p>Very interesting idea. Thanks for sharing! Will def try it.</p>",
      "rawMarkdown": "Very interesting idea. Thanks for sharing! Will def try it.",
      "votes": null
    },
    {
      "id": "1159682",
      "postDate": "01/19/2021 11:50:30",
      "content": "<p>Hi,great idea,you mean is to load the trained model using augumentation and train again without augumentation?By the way,did you retrain the model use the lr is not change?Thanks!</p>",
      "rawMarkdown": "Hi,great idea,you mean is to load the trained model using augumentation and train again without augumentation?By the way,did you retrain the model use the lr is not change?Thanks!",
      "votes": null
    },
    {
      "id": "1159753",
      "postDate": "01/19/2021 12:54:03",
      "content": "<p>Your perception is correct.<br>\nBut lr should be a little smaller.</p>",
      "rawMarkdown": "Your perception is correct.\nBut lr should be a little smaller.",
      "votes": null
    },
    {
      "id": "1159857",
      "postDate": "01/19/2021 14:14:33",
      "content": "<p>Thanks for your reply! I see you from 0.952 to 0.954,you use the origin notebook can get 0.952 score?Thanks!</p>",
      "rawMarkdown": "Thanks for your reply! I see you from 0.952 to 0.954,you use the origin notebook can get 0.952 score?Thanks!",
      "votes": null
    },
    {
      "id": "1161682",
      "postDate": "01/20/2021 17:21:20",
      "content": "<p>thank you <a href=\"https://www.kaggle.com/itsuki9180\" target=\"_blank\">@itsuki9180</a>  for this interesting idea but when i try to retrain the model with the trained weight with augmentation it gives me out of memory error however i decrease batch size to just 1 </p>",
      "rawMarkdown": "thank you @itsuki9180  for this interesting idea but when i try to retrain the model with the trained weight with augmentation it gives me out of memory error however i decrease batch size to just 1",
      "votes": null
    },
    {
      "id": "1174057",
      "postDate": "01/28/2021 08:29:12",
      "content": "<p>One more tip,  When performing TTA, recommend to use the same augmentation as it in train.<br>\ne.g. if Horizontal flip in TTA, leave the H-flip augmentation in the training.</p>",
      "rawMarkdown": "One more tip,  When performing TTA, recommend to use the same augmentation as it in train.\ne.g. if Horizontal flip in TTA, leave the H-flip augmentation in the training.",
      "votes": null
    },
    {
      "id": "1218693",
      "postDate": "02/26/2021 05:53:28",
      "content": "<p>Great work! Did you use the annotation dataset or the normal image dataset? Thanks for the great analysis!</p>",
      "rawMarkdown": "Great work! Did you use the annotation dataset or the normal image dataset? Thanks for the great analysis!",
      "votes": null
    },
    {
      "id": "1220222",
      "postDate": "02/27/2021 18:33:33",
      "content": "<p>I can confirm that this increases CV for 10 of my models. Best increase was <code>96.17 -&gt; 96.34</code>. Thank you for sharing.</p>",
      "rawMarkdown": "I can confirm that this increases CV for 10 of my models. Best increase was `96.17 -> 96.34`. Thank you for sharing.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1159507,
      "author_name": "underwearfitting",
      "author_url": "",
      "post_date": "01/19/2021 10:15:06",
      "content": "<p>Very interesting idea. Thanks for sharing! Will def try it.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1159682,
      "author_name": "bcwang",
      "author_url": "",
      "post_date": "01/19/2021 11:50:30",
      "content": "<p>Hi,great idea,you mean is to load the trained model using augumentation and train again without augumentation?By the way,did you retrain the model use the lr is not change?Thanks!</p>",
      "votes": null,
      "replies": [
        {
          "id": 1159753,
          "author_name": "itsuki9180",
          "author_url": "",
          "post_date": "01/19/2021 12:54:03",
          "content": "<p>Your perception is correct.<br>\nBut lr should be a little smaller.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1159857,
          "author_name": "bcwang",
          "author_url": "",
          "post_date": "01/19/2021 14:14:33",
          "content": "<p>Thanks for your reply! I see you from 0.952 to 0.954,you use the origin notebook can get 0.952 score?Thanks!</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1161682,
      "author_name": "mohamed3abdelrazik",
      "author_url": "",
      "post_date": "01/20/2021 17:21:20",
      "content": "<p>thank you <a href=\"https://www.kaggle.com/itsuki9180\" target=\"_blank\">@itsuki9180</a>  for this interesting idea but when i try to retrain the model with the trained weight with augmentation it gives me out of memory error however i decrease batch size to just 1 </p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1174057,
      "author_name": "itsuki9180",
      "author_url": "",
      "post_date": "01/28/2021 08:29:12",
      "content": "<p>One more tip,  When performing TTA, recommend to use the same augmentation as it in train.<br>\ne.g. if Horizontal flip in TTA, leave the H-flip augmentation in the training.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1218693,
      "author_name": "andyjianzhou",
      "author_url": "",
      "post_date": "02/26/2021 05:53:28",
      "content": "<p>Great work! Did you use the annotation dataset or the normal image dataset? Thanks for the great analysis!</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1220222,
      "author_name": "tuckerarrants",
      "author_url": "",
      "post_date": "02/27/2021 18:33:33",
      "content": "<p>I can confirm that this increases CV for 10 of my models. Best increase was <code>96.17 -&gt; 96.34</code>. Thank you for sharing.</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1159448": "I was gathering information about ML/DL on Twitter and found an interesting topic.\nThe summary is this.\n```\nTrain a model using intense data augmentation.\nFine tune the model with clean data (i.e. no DA) to improve accuracy.\n```\nThe topic reminded me of the [great notebook](https://www.kaggle.com/underwearfitting/single-fold-training-of-resnet200d-lb0-965)  by @underwearfitting.\nThis training notebook has just been used with intense augmentation.\nAnd [weights are also available](https://www.kaggle.com/underwearfitting/resnet200d-baseline-benchmark-public).\nI added a few tricks to this notebook and fine-tune some epochs without DA.\nAs a result, the AUC increased from 0.9528 to 0.9548 (in fold0).\nBut I haven't tried to see if it works for all folds.\nYou can Try if you have a model that is trained with strong augmentation.\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F2294613%2Ffd5be348106d7a7b361adbc790e01fc8%2F2021-01-19.png?generation=1611046617592541&alt=media)\n\nThis paper seems to be reference.\n[Data Augmentation Revisited: Rethinking the Distribution Gap between Clean and Augmented Data](https://arxiv.org/abs/1909.09148)\n\n[1/21 updated]\nI experimented with all the folds.\nThe results are shown below.\n| fold |  [base weight](https://www.kaggle.com/underwearfitting/resnet200d-baseline-benchmark-public) | Refined with no DA |\n| --- | --- |\n| fold 0 | 0.9528 | **0.9548** |\n| fold 1 | 0.9551 | 0.9545 |\n| fold 2 | 0.9552 | **0.9557** |\n| fold 3 | 0.9572 | 0.9572 |\n| fold 4 | 0.9543 | **0.9548** | \n\nIf I have more time and left GPU quota, I would like to change the optimizer, lr, and others for further experiments.",
    "1159507": "Very interesting idea. Thanks for sharing! Will def try it.",
    "1159682": "Hi,great idea,you mean is to load the trained model using augumentation and train again without augumentation?By the way,did you retrain the model use the lr is not change?Thanks!",
    "1159753": "Your perception is correct.\nBut lr should be a little smaller.",
    "1159857": "Thanks for your reply! I see you from 0.952 to 0.954,you use the origin notebook can get 0.952 score?Thanks!",
    "1161682": "thank you @itsuki9180  for this interesting idea but when i try to retrain the model with the trained weight with augmentation it gives me out of memory error however i decrease batch size to just 1",
    "1174057": "One more tip,  When performing TTA, recommend to use the same augmentation as it in train.\ne.g. if Horizontal flip in TTA, leave the H-flip augmentation in the training.",
    "1218693": "Great work! Did you use the annotation dataset or the normal image dataset? Thanks for the great analysis!",
    "1220222": "I can confirm that this increases CV for 10 of my models. Best increase was `96.17 -> 96.34`. Thank you for sharing."
  },
  "source": "meta"
}