{
  "id": 226839,
  "title": "36th Place Solution",
  "url": "/competitions/ranzcr-clip-catheter-line-classification/discussion/226839",
  "author_name": "ASSAZZIN",
  "post_date": "2021-03-17T22:07:29.593000",
  "votes": 15,
  "comment_count": 11,
  "views": 0,
  "content": "<p>First of all, I would really like to thank my teammates <a href=\"https://www.kaggle.com/yannmajewski\" target=\"_blank\">@yannmajewski</a> and  <a href=\"https://www.kaggle.com/mo5mami\" target=\"_blank\">@mo5mami</a> for their hard work and commitment . And I would like to thank all the competitors that shared their codes, ideas, discussions.</p>\n<p>Here is the overview of our pipeline:</p>\n<p><img src=\"https://i.imgur.com/2gE74RX.png\" alt=\"\"></p>\n<h3>Summary</h3>\n<p>Final submission(Public: 0.969, Private: 0.972) <br>\nWe used different  image size for our models. [(512x512),(640x640),(736x736)]</p>\n<ul>\n<li>M1: Multi resnet200d (Public: 0.967, Private: 0.971) :<ul>\n<li>details will be provided later by <a href=\"https://www.kaggle.com/yannmajewski\" target=\"_blank\">@yannmajewski</a><br>\n<br></li></ul></li>\n<li>M2: EcaresNet269d :<ul>\n<li>details will be provided later by <a href=\"https://www.kaggle.com/yannmajewski\" target=\"_blank\">@yannmajewski</a><br>\n<br></li></ul></li>\n<li>M3: <a href=\"https://www.kaggle.com/ammarali32\" target=\"_blank\">@ammarali32</a> 4 stages Models <br>\n<br></li>\n<li>M4: <a href=\"https://www.kaggle.com/ttahara\" target=\"_blank\">@ttahara</a> <a href=\"https://www.kaggle.com/ttahara/ranzcr-multi-head-model-inference\" target=\"_blank\">Multi Head Model</a> <br>\n<br></li>\n<li>M5: <a href=\"https://www.kaggle.com/underwearfitting\" target=\"_blank\">@underwearfitting</a> <a href=\"https://www.kaggle.com/underwearfitting/resnet200d-public-benchmark-2xtta-lb0-965\" target=\"_blank\">Resnet200d 2xTTA</a> <br>\n<br></li>\n<li>M6: TF - EfficienNet B7 (Public: 0.963, Private: 0.964) :<ul>\n<li>pretrained model: ImageNet</li>\n<li>train with different Losses</li>\n<li>split : 10Folds with <a href=\"https://www.kaggle.com/underwearfitting/how-to-properly-split-folds\" target=\"_blank\">@sin's Split Methods</a> , but we just used 4 folds for EfficientNet_final_sub </li></ul></li>\n</ul>\n<h3>Other Models :</h3>\n<ul>\n<li>3 stages ResNet200d (Public: 0.962, Private: 0.966) </li>\n</ul>\n<h3>Post Processing</h3>\n<ul>\n<li>thanks to <a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a> For <a href=\"https://www.kaggle.com/c/ranzcr-clip-catheter-line-classification/discussion/211194\" target=\"_blank\">Magic trick</a> . </li>\n</ul>\n<h3>Submission Selections</h3>\n<p>Our plan is to choose one submission with setting weights referring to LB Scores , and another based on CV scores. But Both Scored 0.972 with some differences ( submission based on LB give us 36th Place)</p>\n<p>To Be Continued …</p>",
  "messages": [
    {
      "id": 1242882,
      "postDate": "2021-03-17T22:07:29.593Z",
      "content": "<p>First of all, I would really like to thank my teammates <a href=\"https://www.kaggle.com/yannmajewski\" target=\"_blank\">@yannmajewski</a> and  <a href=\"https://www.kaggle.com/mo5mami\" target=\"_blank\">@mo5mami</a> for their hard work and commitment . And I would like to thank all the competitors that shared their codes, ideas, discussions.</p>\n<p>Here is the overview of our pipeline:</p>\n<p><img src=\"https://i.imgur.com/2gE74RX.png\" alt=\"\"></p>\n<h3>Summary</h3>\n<p>Final submission(Public: 0.969, Private: 0.972) <br>\nWe used different  image size for our models. [(512x512),(640x640),(736x736)]</p>\n<ul>\n<li>M1: Multi resnet200d (Public: 0.967, Private: 0.971) :<ul>\n<li>details will be provided later by <a href=\"https://www.kaggle.com/yannmajewski\" target=\"_blank\">@yannmajewski</a><br>\n<br></li></ul></li>\n<li>M2: EcaresNet269d :<ul>\n<li>details will be provided later by <a href=\"https://www.kaggle.com/yannmajewski\" target=\"_blank\">@yannmajewski</a><br>\n<br></li></ul></li>\n<li>M3: <a href=\"https://www.kaggle.com/ammarali32\" target=\"_blank\">@ammarali32</a> 4 stages Models <br>\n<br></li>\n<li>M4: <a href=\"https://www.kaggle.com/ttahara\" target=\"_blank\">@ttahara</a> <a href=\"https://www.kaggle.com/ttahara/ranzcr-multi-head-model-inference\" target=\"_blank\">Multi Head Model</a> <br>\n<br></li>\n<li>M5: <a href=\"https://www.kaggle.com/underwearfitting\" target=\"_blank\">@underwearfitting</a> <a href=\"https://www.kaggle.com/underwearfitting/resnet200d-public-benchmark-2xtta-lb0-965\" target=\"_blank\">Resnet200d 2xTTA</a> <br>\n<br></li>\n<li>M6: TF - EfficienNet B7 (Public: 0.963, Private: 0.964) :<ul>\n<li>pretrained model: ImageNet</li>\n<li>train with different Losses</li>\n<li>split : 10Folds with <a href=\"https://www.kaggle.com/underwearfitting/how-to-properly-split-folds\" target=\"_blank\">@sin's Split Methods</a> , but we just used 4 folds for EfficientNet_final_sub </li></ul></li>\n</ul>\n<h3>Other Models :</h3>\n<ul>\n<li>3 stages ResNet200d (Public: 0.962, Private: 0.966) </li>\n</ul>\n<h3>Post Processing</h3>\n<ul>\n<li>thanks to <a href=\"https://www.kaggle.com/hengck23\" target=\"_blank\">@hengck23</a> For <a href=\"https://www.kaggle.com/c/ranzcr-clip-catheter-line-classification/discussion/211194\" target=\"_blank\">Magic trick</a> . </li>\n</ul>\n<h3>Submission Selections</h3>\n<p>Our plan is to choose one submission with setting weights referring to LB Scores , and another based on CV scores. But Both Scored 0.972 with some differences ( submission based on LB give us 36th Place)</p>\n<p>To Be Continued …</p>",
      "rawMarkdown": "First of all, I would really like to thank my teammates @yannmajewski and  @mo5mami for their hard work and commitment . And I would like to thank all the competitors that shared their codes, ideas, discussions.\n\nHere is the overview of our pipeline:\n \n![](https://i.imgur.com/2gE74RX.png)\n \n### Summary\n \nFinal submission(Public: 0.969, Private: 0.972) \nWe used different  image size for our models. [(512x512),(640x640),(736x736)]\n\n * M1: Multi resnet200d (Public: 0.967, Private: 0.971) :\n     * details will be provided later by @yannmajewski\n<br>\n * M2: EcaresNet269d :\n     * details will be provided later by @yannmajewski\n<br>\n * M3: @ammarali32 4 stages Models \n <br>\n * M4: @ttahara [Multi Head Model](https://www.kaggle.com/ttahara/ranzcr-multi-head-model-inference) \n<br>\n * M5: @underwearfitting [Resnet200d 2xTTA](https://www.kaggle.com/underwearfitting/resnet200d-public-benchmark-2xtta-lb0-965) \n <br>\n * M6: TF - EfficienNet B7 (Public: 0.963, Private: 0.964) :\n     * pretrained model: ImageNet\n     * train with different Losses\n     * split : 10Folds with [@sin's Split Methods](https://www.kaggle.com/underwearfitting/how-to-properly-split-folds) , but we just used 4 folds for EfficientNet_final_sub \n \n### Other Models : \n * 3 stages ResNet200d (Public: 0.962, Private: 0.966) \n\n### Post Processing \n * thanks to @hengck23 For [Magic trick](https://www.kaggle.com/c/ranzcr-clip-catheter-line-classification/discussion/211194) . \n \n### Submission Selections\n Our plan is to choose one submission with setting weights referring to LB Scores , and another based on CV scores. But Both Scored 0.972 with some differences ( submission based on LB give us 36th Place)\n\nTo Be Continued ...\n\n",
      "votes": 15
    },
    {
      "id": 1242909,
      "postDate": "2021-03-17T22:31:16.170Z",
      "content": "<p><strong>Dual Resnet200d – Multi resolution input</strong></p>\n<p>The idea of having multiple resolution images as input was to learn different features of the same image and combine all of them into one ensemble classifier to make one more robust prediction.</p>\n<p><strong>Training pipeline (greatly inspired by ammarli):</strong></p>\n<p><strong>Stage 1:</strong></p>\n<ul>\n<li>Train a resnet200d on competition training data. </li>\n<li>Loss: BCELoss() + 0.1*AsymmetricLossMultiLabel() + FocalLoss()</li>\n<li>8 epochs</li>\n<li>lr 3e-4</li>\n</ul>\n<p><strong>Stage 2:</strong></p>\n<ul>\n<li>Use stage 1 model as teacher model to generate feature maps of NIH chest X ray dataset.</li>\n<li>Use the teacher feature maps as labels to pretrain the student model.</li>\n<li>Loss: MSELoss()</li>\n<li>3 epochs</li>\n<li>lr 3e-4</li>\n</ul>\n<p><strong>Stage 3:</strong></p>\n<ul>\n<li>Finetune the pretrained model on competition data.</li>\n<li>CV:+-0.965 </li>\n<li>Loss: BCELoss() + 0.1*AsymmetricLossMultiLabel() + FocalLoss()</li>\n<li>6 epochs</li>\n<li>Lr 1e-4 to 5e-5 depending on batch size.</li>\n</ul>\n<p><strong>Repeat stage 1 to stage 3 with different image resolutions. I trained 2 models, one with 640x640 image size and the other with 736x736 image size. More models could’ve been used but time was lacking.</strong></p>\n<p><strong>Final stage:</strong></p>\n<ul>\n<li>Freeze encoders and add a classifier that has concatenated embeddings as input.</li>\n<li>Finally, finetune the classifier.</li>\n<li>Loss: BCELoss() + 0.1*AsymmetricLossMultiLabel() + FocalLoss()</li>\n<li>CV:+-0.9675 </li>\n<li>Public lb: 0.967</li>\n<li>Private lb: 0.971</li>\n<li>6 epochs</li>\n<li>lr 1e-4 to 5e-5 depending on batch size.</li>\n</ul>\n<p><strong>Training augmentations used:</strong></p>\n<pre><code>  return A.Compose([\n            A.RandomResizedCrop(img_size, img_size, scale=(0.9, 1.0)),\n            A.CLAHE(clip_limit=4, p=0.5),\n            A.HorizontalFlip(p=0.5),\n            A.ShiftScaleRotate (shift_limit=0.025, scale_limit=0, rotate_limit=5,border_mode=0, p=0.5),\n            A.OneOf([\n                A.RandomContrast(p=1),\n                A.RandomGamma(p=1),\n                A.RandomBrightness(p=1),\n            ], p=0.5),\n            A.OneOf([\n                A.MultiplicativeNoise(p=1),\n                A.IAASharpen(p=1),\n            ], p=0.5),\n            A.Normalize(),\n            ToTensorV2(),\n        ])\n</code></pre>\n<p>Thanks to my teamates and everyone in this awesome kaggle community! </p>",
      "rawMarkdown": "**Dual Resnet200d – Multi resolution input**\n\nThe idea of having multiple resolution images as input was to learn different features of the same image and combine all of them into one ensemble classifier to make one more robust prediction.\n\n**Training pipeline (greatly inspired by ammarli):**\n\n**Stage 1:**\n- Train a resnet200d on competition training data. \n- Loss: BCELoss() + 0.1*AsymmetricLossMultiLabel() + FocalLoss()\n- 8 epochs\n- lr 3e-4\n\n**Stage 2:**\n- Use stage 1 model as teacher model to generate feature maps of NIH chest X ray dataset.\n- Use the teacher feature maps as labels to pretrain the student model.\n- Loss: MSELoss()\n- 3 epochs\n- lr 3e-4\n\n**Stage 3:**\n- Finetune the pretrained model on competition data.\n- CV:+-0.965 \n- Loss: BCELoss() + 0.1*AsymmetricLossMultiLabel() + FocalLoss()\n- 6 epochs\n- Lr 1e-4 to 5e-5 depending on batch size.\n\n**Repeat stage 1 to stage 3 with different image resolutions. I trained 2 models, one with 640x640 image size and the other with 736x736 image size. More models could’ve been used but time was lacking.**\n\n**Final stage:**\n\n- Freeze encoders and add a classifier that has concatenated embeddings as input.\n- Finally, finetune the classifier.\n- Loss: BCELoss() + 0.1*AsymmetricLossMultiLabel() + FocalLoss()\n- CV:+-0.9675 \n- Public lb: 0.967\n- Private lb: 0.971\n- 6 epochs\n- lr 1e-4 to 5e-5 depending on batch size.\n\n**Training augmentations used:**\n\n```\n  return A.Compose([\n            A.RandomResizedCrop(img_size, img_size, scale=(0.9, 1.0)),\n            A.CLAHE(clip_limit=4, p=0.5),\n            A.HorizontalFlip(p=0.5),\n            A.ShiftScaleRotate (shift_limit=0.025, scale_limit=0, rotate_limit=5,border_mode=0, p=0.5),\n            A.OneOf([\n                A.RandomContrast(p=1),\n                A.RandomGamma(p=1),\n                A.RandomBrightness(p=1),\n            ], p=0.5),\n            A.OneOf([\n                A.MultiplicativeNoise(p=1),\n                A.IAASharpen(p=1),\n            ], p=0.5),\n            A.Normalize(),\n            ToTensorV2(),\n        ])\n```\n\nThanks to my teamates and everyone in this awesome kaggle community! \n",
      "votes": 6
    },
    {
      "id": 1242894,
      "postDate": "2021-03-17T22:15:39.453Z",
      "content": "<p>Congrats on getting your first medal!</p>",
      "rawMarkdown": "Congrats on getting your first medal!",
      "votes": 4,
      "replies": [
        {
          "id": 1242921,
          "postDate": "2021-03-17T22:57:26.250Z",
          "content": "<p>Thanks a lot <a href=\"https://www.kaggle.com/underwearfitting\" target=\"_blank\">@underwearfitting</a> For you Contribution in Almost Kaggle Competitions , <br>\nAnd Congrats For the second place !</p>",
          "rawMarkdown": "Thanks a lot @underwearfitting For you Contribution in Almost Kaggle Competitions , \nAnd Congrats For the second place !",
          "votes": 2
        }
      ]
    },
    {
      "id": 1243562,
      "postDate": "2021-03-18T10:13:04.397Z",
      "content": "<p>Congrats on your first silver medal <a href=\"https://www.kaggle.com/ksouriazer\" target=\"_blank\">@ksouriazer</a> and thanks for sharing solution </p>",
      "rawMarkdown": "Congrats on your first silver medal @ksouriazer and thanks for sharing solution ",
      "votes": 1
    },
    {
      "id": 1243036,
      "postDate": "2021-03-18T01:12:24.073Z",
      "content": "<p><a href=\"https://www.kaggle.com/ksouriazer\" target=\"_blank\">@ksouriazer</a> Congratulations on Silver Finish . Great Detailed writeup . Thanks so much for sharing </p>",
      "rawMarkdown": "@ksouriazer Congratulations on Silver Finish . Great Detailed writeup . Thanks so much for sharing ",
      "votes": 1,
      "replies": [
        {
          "id": 1243044,
          "postDate": "2021-03-18T01:20:32.500Z",
          "rawMarkdown": "",
          "isDeleted": true
        }
      ]
    },
    {
      "id": 1243022,
      "postDate": "2021-03-18T00:53:35.373Z",
      "content": "<p>Congratulations for your silver medal! Nice solution.</p>",
      "rawMarkdown": "Congratulations for your silver medal! Nice solution.",
      "votes": 1,
      "replies": [
        {
          "id": 1243037,
          "postDate": "2021-03-18T01:16:13.090Z",
          "rawMarkdown": "",
          "isDeleted": true
        }
      ]
    },
    {
      "id": 1243632,
      "postDate": "2021-03-18T11:30:15.510Z",
      "content": "<p>Hi <a href=\"https://www.kaggle.com/ksouriazer\" target=\"_blank\">@ksouriazer</a> congrats on the silver, thanks for the detailed write up , can you please share the intuition behind using dual resolution inputs?</p>",
      "rawMarkdown": "Hi @ksouriazer congrats on the silver, thanks for the detailed write up , can you please share the intuition behind using dual resolution inputs?",
      "replies": [
        {
          "id": 1243738,
          "postDate": "2021-03-18T13:07:00.987Z",
          "content": "<p>Hi! The idea is to train multiple encoders with different resolutions and then train a ensemble classifier that is trained with multiple resolutions in one single foward pass. This way the classifier learns features at multiple resolutions and can make a better prediction! you can check my comment lower is this comment section about the model! Its nothing special but it did increase the performance by a good margin!</p>",
          "rawMarkdown": "Hi! The idea is to train multiple encoders with different resolutions and then train a ensemble classifier that is trained with multiple resolutions in one single foward pass. This way the classifier learns features at multiple resolutions and can make a better prediction! you can check my comment lower is this comment section about the model! Its nothing special but it did increase the performance by a good margin!",
          "votes": 1
        }
      ]
    },
    {
      "id": 1246817,
      "postDate": "2021-03-21T06:18:55.710Z",
      "rawMarkdown": "",
      "isDeleted": true
    }
  ],
  "comments": [
    {
      "id": 1242909,
      "author_name": "Yann Majewski",
      "author_url": "",
      "post_date": "2021-03-17T22:31:16.170000",
      "content": "<p><strong>Dual Resnet200d – Multi resolution input</strong></p>\n<p>The idea of having multiple resolution images as input was to learn different features of the same image and combine all of them into one ensemble classifier to make one more robust prediction.</p>\n<p><strong>Training pipeline (greatly inspired by ammarli):</strong></p>\n<p><strong>Stage 1:</strong></p>\n<ul>\n<li>Train a resnet200d on competition training data. </li>\n<li>Loss: BCELoss() + 0.1*AsymmetricLossMultiLabel() + FocalLoss()</li>\n<li>8 epochs</li>\n<li>lr 3e-4</li>\n</ul>\n<p><strong>Stage 2:</strong></p>\n<ul>\n<li>Use stage 1 model as teacher model to generate feature maps of NIH chest X ray dataset.</li>\n<li>Use the teacher feature maps as labels to pretrain the student model.</li>\n<li>Loss: MSELoss()</li>\n<li>3 epochs</li>\n<li>lr 3e-4</li>\n</ul>\n<p><strong>Stage 3:</strong></p>\n<ul>\n<li>Finetune the pretrained model on competition data.</li>\n<li>CV:+-0.965 </li>\n<li>Loss: BCELoss() + 0.1*AsymmetricLossMultiLabel() + FocalLoss()</li>\n<li>6 epochs</li>\n<li>Lr 1e-4 to 5e-5 depending on batch size.</li>\n</ul>\n<p><strong>Repeat stage 1 to stage 3 with different image resolutions. I trained 2 models, one with 640x640 image size and the other with 736x736 image size. More models could’ve been used but time was lacking.</strong></p>\n<p><strong>Final stage:</strong></p>\n<ul>\n<li>Freeze encoders and add a classifier that has concatenated embeddings as input.</li>\n<li>Finally, finetune the classifier.</li>\n<li>Loss: BCELoss() + 0.1*AsymmetricLossMultiLabel() + FocalLoss()</li>\n<li>CV:+-0.9675 </li>\n<li>Public lb: 0.967</li>\n<li>Private lb: 0.971</li>\n<li>6 epochs</li>\n<li>lr 1e-4 to 5e-5 depending on batch size.</li>\n</ul>\n<p><strong>Training augmentations used:</strong></p>\n<pre><code>  return A.Compose([\n            A.RandomResizedCrop(img_size, img_size, scale=(0.9, 1.0)),\n            A.CLAHE(clip_limit=4, p=0.5),\n            A.HorizontalFlip(p=0.5),\n            A.ShiftScaleRotate (shift_limit=0.025, scale_limit=0, rotate_limit=5,border_mode=0, p=0.5),\n            A.OneOf([\n                A.RandomContrast(p=1),\n                A.RandomGamma(p=1),\n                A.RandomBrightness(p=1),\n            ], p=0.5),\n            A.OneOf([\n                A.MultiplicativeNoise(p=1),\n                A.IAASharpen(p=1),\n            ], p=0.5),\n            A.Normalize(),\n            ToTensorV2(),\n        ])\n</code></pre>\n<p>Thanks to my teamates and everyone in this awesome kaggle community! </p>",
      "votes": 6,
      "replies": []
    },
    {
      "id": 1242894,
      "author_name": "sin",
      "author_url": "",
      "post_date": "2021-03-17T22:15:39.453000",
      "content": "<p>Congrats on getting your first medal!</p>",
      "votes": 4,
      "replies": [
        {
          "id": 1242921,
          "author_name": "ASSAZZIN",
          "author_url": "",
          "post_date": "2021-03-17T22:57:26.250000",
          "content": "<p>Thanks a lot <a href=\"https://www.kaggle.com/underwearfitting\" target=\"_blank\">@underwearfitting</a> For you Contribution in Almost Kaggle Competitions , <br>\nAnd Congrats For the second place !</p>",
          "votes": 2,
          "replies": []
        }
      ]
    },
    {
      "id": 1243562,
      "author_name": "KhanhVD",
      "author_url": "",
      "post_date": "2021-03-18T10:13:04.397000",
      "content": "<p>Congrats on your first silver medal <a href=\"https://www.kaggle.com/ksouriazer\" target=\"_blank\">@ksouriazer</a> and thanks for sharing solution </p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 1243036,
      "author_name": "Tensor Girl",
      "author_url": "",
      "post_date": "2021-03-18T01:12:24.073000",
      "content": "<p><a href=\"https://www.kaggle.com/ksouriazer\" target=\"_blank\">@ksouriazer</a> Congratulations on Silver Finish . Great Detailed writeup . Thanks so much for sharing </p>",
      "votes": 1,
      "replies": [
        {
          "id": 1243044,
          "author_name": "",
          "author_url": "",
          "post_date": "2021-03-18T01:20:32.500000",
          "content": "",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1243022,
      "author_name": "Miyatti",
      "author_url": "",
      "post_date": "2021-03-18T00:53:35.373000",
      "content": "<p>Congratulations for your silver medal! Nice solution.</p>",
      "votes": 1,
      "replies": [
        {
          "id": 1243037,
          "author_name": "",
          "author_url": "",
          "post_date": "2021-03-18T01:16:13.090000",
          "content": "",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1243632,
      "author_name": "Mr_KnowNothing",
      "author_url": "",
      "post_date": "2021-03-18T11:30:15.510000",
      "content": "<p>Hi <a href=\"https://www.kaggle.com/ksouriazer\" target=\"_blank\">@ksouriazer</a> congrats on the silver, thanks for the detailed write up , can you please share the intuition behind using dual resolution inputs?</p>",
      "votes": 0,
      "replies": [
        {
          "id": 1243738,
          "author_name": "Yann Majewski",
          "author_url": "",
          "post_date": "2021-03-18T13:07:00.987000",
          "content": "<p>Hi! The idea is to train multiple encoders with different resolutions and then train a ensemble classifier that is trained with multiple resolutions in one single foward pass. This way the classifier learns features at multiple resolutions and can make a better prediction! you can check my comment lower is this comment section about the model! Its nothing special but it did increase the performance by a good margin!</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 1246817,
      "author_name": "",
      "author_url": "",
      "post_date": "2021-03-21T06:18:55.710000",
      "content": "",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1242882": "First of all, I would really like to thank my teammates @yannmajewski and  @mo5mami for their hard work and commitment . And I would like to thank all the competitors that shared their codes, ideas, discussions.\n\nHere is the overview of our pipeline:\n \n![](https://i.imgur.com/2gE74RX.png)\n \n### Summary\n \nFinal submission(Public: 0.969, Private: 0.972) \nWe used different  image size for our models. [(512x512),(640x640),(736x736)]\n\n * M1: Multi resnet200d (Public: 0.967, Private: 0.971) :\n     * details will be provided later by @yannmajewski\n<br>\n * M2: EcaresNet269d :\n     * details will be provided later by @yannmajewski\n<br>\n * M3: @ammarali32 4 stages Models \n <br>\n * M4: @ttahara [Multi Head Model](https://www.kaggle.com/ttahara/ranzcr-multi-head-model-inference) \n<br>\n * M5: @underwearfitting [Resnet200d 2xTTA](https://www.kaggle.com/underwearfitting/resnet200d-public-benchmark-2xtta-lb0-965) \n <br>\n * M6: TF - EfficienNet B7 (Public: 0.963, Private: 0.964) :\n     * pretrained model: ImageNet\n     * train with different Losses\n     * split : 10Folds with [@sin's Split Methods](https://www.kaggle.com/underwearfitting/how-to-properly-split-folds) , but we just used 4 folds for EfficientNet_final_sub \n \n### Other Models : \n * 3 stages ResNet200d (Public: 0.962, Private: 0.966) \n\n### Post Processing \n * thanks to @hengck23 For [Magic trick](https://www.kaggle.com/c/ranzcr-clip-catheter-line-classification/discussion/211194) . \n \n### Submission Selections\n Our plan is to choose one submission with setting weights referring to LB Scores , and another based on CV scores. But Both Scored 0.972 with some differences ( submission based on LB give us 36th Place)\n\nTo Be Continued ...\n\n",
    "1242909": "**Dual Resnet200d – Multi resolution input**\n\nThe idea of having multiple resolution images as input was to learn different features of the same image and combine all of them into one ensemble classifier to make one more robust prediction.\n\n**Training pipeline (greatly inspired by ammarli):**\n\n**Stage 1:**\n- Train a resnet200d on competition training data. \n- Loss: BCELoss() + 0.1*AsymmetricLossMultiLabel() + FocalLoss()\n- 8 epochs\n- lr 3e-4\n\n**Stage 2:**\n- Use stage 1 model as teacher model to generate feature maps of NIH chest X ray dataset.\n- Use the teacher feature maps as labels to pretrain the student model.\n- Loss: MSELoss()\n- 3 epochs\n- lr 3e-4\n\n**Stage 3:**\n- Finetune the pretrained model on competition data.\n- CV:+-0.965 \n- Loss: BCELoss() + 0.1*AsymmetricLossMultiLabel() + FocalLoss()\n- 6 epochs\n- Lr 1e-4 to 5e-5 depending on batch size.\n\n**Repeat stage 1 to stage 3 with different image resolutions. I trained 2 models, one with 640x640 image size and the other with 736x736 image size. More models could’ve been used but time was lacking.**\n\n**Final stage:**\n\n- Freeze encoders and add a classifier that has concatenated embeddings as input.\n- Finally, finetune the classifier.\n- Loss: BCELoss() + 0.1*AsymmetricLossMultiLabel() + FocalLoss()\n- CV:+-0.9675 \n- Public lb: 0.967\n- Private lb: 0.971\n- 6 epochs\n- lr 1e-4 to 5e-5 depending on batch size.\n\n**Training augmentations used:**\n\n```\n  return A.Compose([\n            A.RandomResizedCrop(img_size, img_size, scale=(0.9, 1.0)),\n            A.CLAHE(clip_limit=4, p=0.5),\n            A.HorizontalFlip(p=0.5),\n            A.ShiftScaleRotate (shift_limit=0.025, scale_limit=0, rotate_limit=5,border_mode=0, p=0.5),\n            A.OneOf([\n                A.RandomContrast(p=1),\n                A.RandomGamma(p=1),\n                A.RandomBrightness(p=1),\n            ], p=0.5),\n            A.OneOf([\n                A.MultiplicativeNoise(p=1),\n                A.IAASharpen(p=1),\n            ], p=0.5),\n            A.Normalize(),\n            ToTensorV2(),\n        ])\n```\n\nThanks to my teamates and everyone in this awesome kaggle community! \n",
    "1242894": "Congrats on getting your first medal!",
    "1243562": "Congrats on your first silver medal @ksouriazer and thanks for sharing solution ",
    "1243036": "@ksouriazer Congratulations on Silver Finish . Great Detailed writeup . Thanks so much for sharing ",
    "1243022": "Congratulations for your silver medal! Nice solution.",
    "1243632": "Hi @ksouriazer congrats on the silver, thanks for the detailed write up , can you please share the intuition behind using dual resolution inputs?",
    "1246817": ""
  }
}