{
  "id": 109113,
  "title": " 113th place solution - some notes from the kaggle freshman",
  "url": "/competitions/aptos2019-blindness-detection/discussion/109113",
  "author_name": "jayjhlin",
  "post_date": "2019-09-16T16:19:58.649000",
  "votes": 4,
  "comment_count": 0,
  "views": 0,
  "content": "<p><strong>Model and input size</strong>\n    EfficientNet-B5(456 x 456)\n    number of output: 5 (classification problem)</p>\n\n<p><strong>Preprocessing</strong>\n    1. crop from gray (thanks to <a href=\"/ahoukang\">@ahoukang</a>  from the <a href=\"https://www.kaggle.com/ahoukang/aptos-vote\">post</a>\n    2. Replace both blue and red channel with green channel and apply CLAHE  (thanks to <a href=\"/bibek777\">@bibek777</a> from the <a href=\"https://www.kaggle.com/c/aptos2019-blindness-detection/discussion/102613#latest-621678\">post</a></p>\n\n<p><strong>Augmentation</strong>\n    - crop resize (thanks to <a href=\"/jeffreydf\">@jeffreydf</a> from the <a href=\"https://github.com/JeffreyDF/kaggle_diabetic_retinopathy\">source code</a> for the fifth place for old DR competition\n    - color jitter\n    - horrizontal/vertical flip\n    - rotation\n    - zoom-in (thanks to <a href=\"/jeffreydf\">@jeffreydf</a> from the <a href=\"https://github.com/JeffreyDF/kaggle_diabetic_retinopathy\">source code</a> for the fifth place for old DR competition</p>\n\n<p><strong>Training Process</strong>\n    I leveraged two datasets, 2015 (35 k) and 2019 (3.6 k) DR dataset for the training process.\nThe first model was trained from scratch using 2019 DR dataset (~100 epochs), and the second model can be divided into two stages. In the first stage, I pre-trained the model on *full DR dataset(~100 epochs),  setting 2019 DR dataset as validation set. In the second stage, I fine-tuned the model only on 2019 DR dataset(~20 epochs).</p>\n\n<p><strong>Testing Process</strong>\n    Test Time Augmentation (five random combinations of flip, rotation, zoom-in ) was adapted for each model. For the first and the second model, we got LB 0.808 and LB 0.798 respectively. Finally, we ensemble two models by averaging the prediction and got LB 0.817.</p>\n\n<p><strong>Note:</strong>\n    1. Since I found that the first model was pretty accurate on class 0 (normal) than the other classes, so I only combined 2015 class 1-4 data with 2019 data as pre-trained dataset. It brought the benefit that costing less time for training the second model as well.\n    2. I have tried to use only the 2015 data as training data after deadline. In comparison with the full data(2015 + 2019), although the public LB is higher, the private LB is lower.\n        3. Special thanks to <a href=\"/kirayue\">@kirayue</a>  and <a href=\"/hyc1993\">@hyc1993</a> for all the discussions and suggestions, you guys always helped me a lot:)</p>\n\n<p>Dealing with real world dataset is so challenging also exciting for me and I truly learnt a lot from the competition, especially resource like those awesome discussions and kernels from the great kagglers, I do very appreciate their sharing and hopefully I can share my strength one day. Thank you so much!!!</p>",
  "messages": [
    {
      "id": 627951,
      "postDate": "2019-09-16T16:19:58.650Z",
      "content": "<p><strong>Model and input size</strong>\n    EfficientNet-B5(456 x 456)\n    number of output: 5 (classification problem)</p>\n\n<p><strong>Preprocessing</strong>\n    1. crop from gray (thanks to <a href=\"/ahoukang\">@ahoukang</a>  from the <a href=\"https://www.kaggle.com/ahoukang/aptos-vote\">post</a>\n    2. Replace both blue and red channel with green channel and apply CLAHE  (thanks to <a href=\"/bibek777\">@bibek777</a> from the <a href=\"https://www.kaggle.com/c/aptos2019-blindness-detection/discussion/102613#latest-621678\">post</a></p>\n\n<p><strong>Augmentation</strong>\n    - crop resize (thanks to <a href=\"/jeffreydf\">@jeffreydf</a> from the <a href=\"https://github.com/JeffreyDF/kaggle_diabetic_retinopathy\">source code</a> for the fifth place for old DR competition\n    - color jitter\n    - horrizontal/vertical flip\n    - rotation\n    - zoom-in (thanks to <a href=\"/jeffreydf\">@jeffreydf</a> from the <a href=\"https://github.com/JeffreyDF/kaggle_diabetic_retinopathy\">source code</a> for the fifth place for old DR competition</p>\n\n<p><strong>Training Process</strong>\n    I leveraged two datasets, 2015 (35 k) and 2019 (3.6 k) DR dataset for the training process.\nThe first model was trained from scratch using 2019 DR dataset (~100 epochs), and the second model can be divided into two stages. In the first stage, I pre-trained the model on *full DR dataset(~100 epochs),  setting 2019 DR dataset as validation set. In the second stage, I fine-tuned the model only on 2019 DR dataset(~20 epochs).</p>\n\n<p><strong>Testing Process</strong>\n    Test Time Augmentation (five random combinations of flip, rotation, zoom-in ) was adapted for each model. For the first and the second model, we got LB 0.808 and LB 0.798 respectively. Finally, we ensemble two models by averaging the prediction and got LB 0.817.</p>\n\n<p><strong>Note:</strong>\n    1. Since I found that the first model was pretty accurate on class 0 (normal) than the other classes, so I only combined 2015 class 1-4 data with 2019 data as pre-trained dataset. It brought the benefit that costing less time for training the second model as well.\n    2. I have tried to use only the 2015 data as training data after deadline. In comparison with the full data(2015 + 2019), although the public LB is higher, the private LB is lower.\n        3. Special thanks to <a href=\"/kirayue\">@kirayue</a>  and <a href=\"/hyc1993\">@hyc1993</a> for all the discussions and suggestions, you guys always helped me a lot:)</p>\n\n<p>Dealing with real world dataset is so challenging also exciting for me and I truly learnt a lot from the competition, especially resource like those awesome discussions and kernels from the great kagglers, I do very appreciate their sharing and hopefully I can share my strength one day. Thank you so much!!!</p>",
      "rawMarkdown": "**Model and input size**\n\tEfficientNet-B5(456 x 456)\n\tnumber of output: 5 (classification problem)\n\n**Preprocessing**\n\t1. crop from gray (thanks to @ahoukang  from the [post](https://www.kaggle.com/ahoukang/aptos-vote)\n\t2. Replace both blue and red channel with green channel and apply CLAHE  (thanks to @bibek777 from the [post](https://www.kaggle.com/c/aptos2019-blindness-detection/discussion/102613#latest-621678)\n\n\n**Augmentation**\n\t- crop resize (thanks to @jeffreydf from the [source code](https://github.com/JeffreyDF/kaggle_diabetic_retinopathy) for the fifth place for old DR competition\n\t- color jitter\n\t- horrizontal/vertical flip\n\t- rotation\n\t- zoom-in (thanks to @jeffreydf from the [source code](https://github.com/JeffreyDF/kaggle_diabetic_retinopathy) for the fifth place for old DR competition\n\n**Training Process**\n\tI leveraged two datasets, 2015 (35 k) and 2019 (3.6 k) DR dataset for the training process.\nThe first model was trained from scratch using 2019 DR dataset (~100 epochs), and the second model can be divided into two stages. In the first stage, I pre-trained the model on *full DR dataset(~100 epochs),  setting 2019 DR dataset as validation set. In the second stage, I fine-tuned the model only on 2019 DR dataset(~20 epochs).\n\n**Testing Process**\n\tTest Time Augmentation (five random combinations of flip, rotation, zoom-in ) was adapted for each model. For the first and the second model, we got LB 0.808 and LB 0.798 respectively. Finally, we ensemble two models by averaging the prediction and got LB 0.817.\n\n**Note:**\n\t1. Since I found that the first model was pretty accurate on class 0 (normal) than the other classes, so I only combined 2015 class 1-4 data with 2019 data as pre-trained dataset. It brought the benefit that costing less time for training the second model as well.\n\t2. I have tried to use only the 2015 data as training data after deadline. In comparison with the full data(2015 + 2019), although the public LB is higher, the private LB is lower.\n        3. Special thanks to @kirayue  and @hyc1993 for all the discussions and suggestions, you guys always helped me a lot:)\n\n\nDealing with real world dataset is so challenging also exciting for me and I truly learnt a lot from the competition, especially resource like those awesome discussions and kernels from the great kagglers, I do very appreciate their sharing and hopefully I can share my strength one day. Thank you so much!!!",
      "votes": 4
    }
  ],
  "comments": [],
  "raw_markdown_by_id": {
    "627951": "**Model and input size**\n\tEfficientNet-B5(456 x 456)\n\tnumber of output: 5 (classification problem)\n\n**Preprocessing**\n\t1. crop from gray (thanks to @ahoukang  from the [post](https://www.kaggle.com/ahoukang/aptos-vote)\n\t2. Replace both blue and red channel with green channel and apply CLAHE  (thanks to @bibek777 from the [post](https://www.kaggle.com/c/aptos2019-blindness-detection/discussion/102613#latest-621678)\n\n\n**Augmentation**\n\t- crop resize (thanks to @jeffreydf from the [source code](https://github.com/JeffreyDF/kaggle_diabetic_retinopathy) for the fifth place for old DR competition\n\t- color jitter\n\t- horrizontal/vertical flip\n\t- rotation\n\t- zoom-in (thanks to @jeffreydf from the [source code](https://github.com/JeffreyDF/kaggle_diabetic_retinopathy) for the fifth place for old DR competition\n\n**Training Process**\n\tI leveraged two datasets, 2015 (35 k) and 2019 (3.6 k) DR dataset for the training process.\nThe first model was trained from scratch using 2019 DR dataset (~100 epochs), and the second model can be divided into two stages. In the first stage, I pre-trained the model on *full DR dataset(~100 epochs),  setting 2019 DR dataset as validation set. In the second stage, I fine-tuned the model only on 2019 DR dataset(~20 epochs).\n\n**Testing Process**\n\tTest Time Augmentation (five random combinations of flip, rotation, zoom-in ) was adapted for each model. For the first and the second model, we got LB 0.808 and LB 0.798 respectively. Finally, we ensemble two models by averaging the prediction and got LB 0.817.\n\n**Note:**\n\t1. Since I found that the first model was pretty accurate on class 0 (normal) than the other classes, so I only combined 2015 class 1-4 data with 2019 data as pre-trained dataset. It brought the benefit that costing less time for training the second model as well.\n\t2. I have tried to use only the 2015 data as training data after deadline. In comparison with the full data(2015 + 2019), although the public LB is higher, the private LB is lower.\n        3. Special thanks to @kirayue  and @hyc1993 for all the discussions and suggestions, you guys always helped me a lot:)\n\n\nDealing with real world dataset is so challenging also exciting for me and I truly learnt a lot from the competition, especially resource like those awesome discussions and kernels from the great kagglers, I do very appreciate their sharing and hopefully I can share my strength one day. Thank you so much!!!"
  }
}