{
  "id": 243042,
  "title": "1st place solution",
  "url": "/competitions/plant-pathology-2021-fgvc8/discussion/243042",
  "author_name": "wanghao",
  "post_date": "2021-06-01T03:17:03.378000",
  "votes": 41,
  "comment_count": 4,
  "views": 0,
  "content": "<p>&nbsp;</p>\n<ul>\n<li><p><strong>soft label <br></strong><br>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;train 5-folds efficientnetv2<br><br>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;label==1 &amp; pred_score &lt; 0.7 ==&gt; soft_label=0.3(for train folds)<br>\n<br></p></li>\n<li><p><strong>multi-label augment <br></strong></p>\n<ul>\n<li><p><strong>cutmix <br></strong><br>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;different from norm cutmix, I didn't use:<br> <br>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;loss = lam * loss(outputs, labels) + (1-lam) * loss(outputs, mix_labels)<br><br>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;because I think 'healthy' + 'scab' == 'scab'<br><br><br>\n'scab'+'frog_eye_leaf_spot' ==&gt; 'scab frog_eye_leaf_spot'(There are also other different combinations)<br>\n<img src=\"https://i.loli.net/2021/06/01/tAIaBcgWirRuwM9.png\" alt=\"1.png\"></p></li>\n<li><p><strong>mosaic <br></strong><br>\n'scab' + 'scab' + 'scab frog_eye_leaf_spot' + 'complex' ==&gt;'scab frog_eye_leaf_spot complex' (There are also other different combinations)<br><br>\n<img src=\"https://i.loli.net/2021/06/01/FDCuve7csdXROUJ.png\" alt=\"2.png\"><br>\n<br></p></li></ul></li>\n<li><p><strong>augment <br></strong> <br>\nCrop HFlip VFlip brightness contrast ShiftScaleRotate OpticalDistortion GridDistortion IAAPiecewiseAffine Cutout CoarseDropout<br>\n<br></p></li>\n<li><p><strong>other <br></strong><br>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;resnet50-5folds+resnext50_32x4d-5folds<br><br>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TTA(flip, centerCrop)<br><br>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;class balance(last three epoch)<br><br>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;label_smooth<br><br>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;384x576<br><br>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;warmup<br><br>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CosineAnnealingLR<br><br>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;AdamW<br></p></li>\n<li><p><strong>unfinished LeafGAN <br></strong><br>\nDue to time and computing resource constraints,  I did not finish it, but I think it's the best way for multi-label<br><br>\nwe can train LeafGAN generate healthy-&gt;disease_A and healthy-&gt;disease_B, than we can get multi-label('disease_A disease_B') by mixup('disease_A', 'disease_B') <br><br>\n<a href=\"https://github.com/IyatomiLab/LeafGAN\" target=\"_blank\">https://github.com/IyatomiLab/LeafGAN</a><br>\n<img src=\"https://i.loli.net/2021/06/01/LQB3dEtp8IrGfg2.png\" alt=\"3.png\"></p></li>\n</ul>",
  "messages": [
    {
      "id": 1330642,
      "postDate": "2021-06-01T03:17:03.380Z",
      "content": "<p>&nbsp;</p>\n<ul>\n<li><p><strong>soft label <br></strong><br>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;train 5-folds efficientnetv2<br><br>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;label==1 &amp; pred_score &lt; 0.7 ==&gt; soft_label=0.3(for train folds)<br>\n<br></p></li>\n<li><p><strong>multi-label augment <br></strong></p>\n<ul>\n<li><p><strong>cutmix <br></strong><br>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;different from norm cutmix, I didn't use:<br> <br>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;loss = lam * loss(outputs, labels) + (1-lam) * loss(outputs, mix_labels)<br><br>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;because I think 'healthy' + 'scab' == 'scab'<br><br><br>\n'scab'+'frog_eye_leaf_spot' ==&gt; 'scab frog_eye_leaf_spot'(There are also other different combinations)<br>\n<img src=\"https://i.loli.net/2021/06/01/tAIaBcgWirRuwM9.png\" alt=\"1.png\"></p></li>\n<li><p><strong>mosaic <br></strong><br>\n'scab' + 'scab' + 'scab frog_eye_leaf_spot' + 'complex' ==&gt;'scab frog_eye_leaf_spot complex' (There are also other different combinations)<br><br>\n<img src=\"https://i.loli.net/2021/06/01/FDCuve7csdXROUJ.png\" alt=\"2.png\"><br>\n<br></p></li></ul></li>\n<li><p><strong>augment <br></strong> <br>\nCrop HFlip VFlip brightness contrast ShiftScaleRotate OpticalDistortion GridDistortion IAAPiecewiseAffine Cutout CoarseDropout<br>\n<br></p></li>\n<li><p><strong>other <br></strong><br>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;resnet50-5folds+resnext50_32x4d-5folds<br><br>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TTA(flip, centerCrop)<br><br>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;class balance(last three epoch)<br><br>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;label_smooth<br><br>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;384x576<br><br>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;warmup<br><br>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CosineAnnealingLR<br><br>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;AdamW<br></p></li>\n<li><p><strong>unfinished LeafGAN <br></strong><br>\nDue to time and computing resource constraints,  I did not finish it, but I think it's the best way for multi-label<br><br>\nwe can train LeafGAN generate healthy-&gt;disease_A and healthy-&gt;disease_B, than we can get multi-label('disease_A disease_B') by mixup('disease_A', 'disease_B') <br><br>\n<a href=\"https://github.com/IyatomiLab/LeafGAN\" target=\"_blank\">https://github.com/IyatomiLab/LeafGAN</a><br>\n<img src=\"https://i.loli.net/2021/06/01/LQB3dEtp8IrGfg2.png\" alt=\"3.png\"></p></li>\n</ul>",
      "rawMarkdown": "&nbsp;\n+ **<font size=5>soft label</font> <br>**\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;train 5-folds efficientnetv2<br>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;label==1 & pred_score < 0.7 ==> soft_label=0.3(for train folds)\n<br>\n+ **<font size=5>multi-label augment</font> <br>**\n   + **<font size=4>cutmix</font> <br>**\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;different from norm cutmix, I didn't use:<br> \n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;loss = lam * loss(outputs, labels) + (1-lam) * loss(outputs, mix_labels)<br>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;because I think 'healthy' + 'scab' == 'scab'<br><br>\n'scab'+'frog_eye_leaf_spot' ==> 'scab frog_eye_leaf_spot'(There are also other different combinations)\n![1.png](https://i.loli.net/2021/06/01/tAIaBcgWirRuwM9.png)\n\n   + **<font size=4>mosaic</font> <br>**\n'scab' + 'scab' + 'scab frog_eye_leaf_spot' + 'complex' ==>'scab frog_eye_leaf_spot complex' (There are also other different combinations)<br>\n![2.png](https://i.loli.net/2021/06/01/FDCuve7csdXROUJ.png)\n<br>\n+  **<font size=5>augment</font> <br>** \nCrop HFlip VFlip brightness contrast ShiftScaleRotate OpticalDistortion GridDistortion IAAPiecewiseAffine Cutout CoarseDropout\n<br>\n+  **<font size=5>other</font> <br>**\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;resnet50-5folds+resnext50_32x4d-5folds<br>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TTA(flip, centerCrop)<br>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;class balance(last three epoch)<br>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;label_smooth<br>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;384x576<br>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;warmup<br>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CosineAnnealingLR<br>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;AdamW<br>\n+  **<font size=5>unfinished LeafGAN</font> <br>**\nDue to time and computing resource constraints,  I did not finish it, but I think it's the best way for multi-label<br>\nwe can train LeafGAN generate healthy->disease_A and healthy->disease_B, than we can get multi-label('disease_A disease_B') by mixup('disease_A', 'disease_B') <br>\nhttps://github.com/IyatomiLab/LeafGAN\n![3.png](https://i.loli.net/2021/06/01/LQB3dEtp8IrGfg2.png)",
      "votes": 41
    },
    {
      "id": 1360020,
      "postDate": "2021-06-21T18:22:46.817Z",
      "content": "<p>Congrats on 1st place!</p>",
      "rawMarkdown": "Congrats on 1st place!"
    },
    {
      "id": 1332907,
      "postDate": "2021-06-02T11:31:34.727Z",
      "content": "<p>Thx, very helpful for me.))</p>",
      "rawMarkdown": "Thx, very helpful for me.))"
    },
    {
      "id": 1331233,
      "postDate": "2021-06-01T10:51:29.877Z",
      "content": "<p>Thank you for sharing your solution. I have a few questions regarding your approach</p>\n<ul>\n<li>Did you use any ensambling techniques or just simply used average?</li>\n<li>What is &gt; lam&gt;  in the loss you have calculated?</li>\n<li>Also how did you apply the class balance in the last three epochs.</li>\n</ul>\n<p>Sorry if any of these questions seem trivial, I am still learning a lot of stuff, so I am trying to gain as much insight into the decision processes as possible.</p>\n<p>Thank you</p>",
      "rawMarkdown": "Thank you for sharing your solution. I have a few questions regarding your approach\n-  Did you use any ensambling techniques or just simply used average?\n-  What is > lam>  in the loss you have calculated?\n- Also how did you apply the class balance in the last three epochs.\n\nSorry if any of these questions seem trivial, I am still learning a lot of stuff, so I am trying to gain as much insight into the decision processes as possible.\n\nThank you\n"
    },
    {
      "id": 1331319,
      "postDate": "2021-06-01T11:51:01.693Z",
      "rawMarkdown": "",
      "isDeleted": true
    }
  ],
  "comments": [
    {
      "id": 1360020,
      "author_name": "Okyanus",
      "author_url": "",
      "post_date": "2021-06-21T18:22:46.817000",
      "content": "<p>Congrats on 1st place!</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1332907,
      "author_name": "Oknedis",
      "author_url": "",
      "post_date": "2021-06-02T11:31:34.727000",
      "content": "<p>Thx, very helpful for me.))</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1331233,
      "author_name": "Gur Amrit Singh",
      "author_url": "",
      "post_date": "2021-06-01T10:51:29.877000",
      "content": "<p>Thank you for sharing your solution. I have a few questions regarding your approach</p>\n<ul>\n<li>Did you use any ensambling techniques or just simply used average?</li>\n<li>What is &gt; lam&gt;  in the loss you have calculated?</li>\n<li>Also how did you apply the class balance in the last three epochs.</li>\n</ul>\n<p>Sorry if any of these questions seem trivial, I am still learning a lot of stuff, so I am trying to gain as much insight into the decision processes as possible.</p>\n<p>Thank you</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1331319,
      "author_name": "",
      "author_url": "",
      "post_date": "2021-06-01T11:51:01.693000",
      "content": "",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1330642": "&nbsp;\n+ **<font size=5>soft label</font> <br>**\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;train 5-folds efficientnetv2<br>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;label==1 & pred_score < 0.7 ==> soft_label=0.3(for train folds)\n<br>\n+ **<font size=5>multi-label augment</font> <br>**\n   + **<font size=4>cutmix</font> <br>**\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;different from norm cutmix, I didn't use:<br> \n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;loss = lam * loss(outputs, labels) + (1-lam) * loss(outputs, mix_labels)<br>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;because I think 'healthy' + 'scab' == 'scab'<br><br>\n'scab'+'frog_eye_leaf_spot' ==> 'scab frog_eye_leaf_spot'(There are also other different combinations)\n![1.png](https://i.loli.net/2021/06/01/tAIaBcgWirRuwM9.png)\n\n   + **<font size=4>mosaic</font> <br>**\n'scab' + 'scab' + 'scab frog_eye_leaf_spot' + 'complex' ==>'scab frog_eye_leaf_spot complex' (There are also other different combinations)<br>\n![2.png](https://i.loli.net/2021/06/01/FDCuve7csdXROUJ.png)\n<br>\n+  **<font size=5>augment</font> <br>** \nCrop HFlip VFlip brightness contrast ShiftScaleRotate OpticalDistortion GridDistortion IAAPiecewiseAffine Cutout CoarseDropout\n<br>\n+  **<font size=5>other</font> <br>**\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;resnet50-5folds+resnext50_32x4d-5folds<br>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TTA(flip, centerCrop)<br>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;class balance(last three epoch)<br>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;label_smooth<br>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;384x576<br>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;warmup<br>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CosineAnnealingLR<br>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;AdamW<br>\n+  **<font size=5>unfinished LeafGAN</font> <br>**\nDue to time and computing resource constraints,  I did not finish it, but I think it's the best way for multi-label<br>\nwe can train LeafGAN generate healthy->disease_A and healthy->disease_B, than we can get multi-label('disease_A disease_B') by mixup('disease_A', 'disease_B') <br>\nhttps://github.com/IyatomiLab/LeafGAN\n![3.png](https://i.loli.net/2021/06/01/LQB3dEtp8IrGfg2.png)",
    "1360020": "Congrats on 1st place!",
    "1332907": "Thx, very helpful for me.))",
    "1331233": "Thank you for sharing your solution. I have a few questions regarding your approach\n-  Did you use any ensambling techniques or just simply used average?\n-  What is > lam>  in the loss you have calculated?\n- Also how did you apply the class balance in the last three epochs.\n\nSorry if any of these questions seem trivial, I am still learning a lot of stuff, so I am trying to gain as much insight into the decision processes as possible.\n\nThank you\n",
    "1331319": ""
  }
}