{
  "id": 70549,
  "title": "Is my process wrong? Please, help me.",
  "url": "/competitions/airbus-ship-detection/discussion/70549",
  "author_name": "",
  "post_date": "2018-11-05T06:13:28.269770200Z",
  "votes": 7,
  "comment_count": 14,
  "views": 0,
  "content": "<p>I'm using keras.\nAfter looking some kernels and dicussions, I have thought that unet+resnet34 will work.\nThen, I've tried unet+resnet34 and unet+resnext50, but the score is not good.\nunet+resnet34 gave me a 0.699. unet+resnext50 is not converging.</p>\n\n<p>my code is quiet similar with this my kernel. <a href=\"https://www.kaggle.com/youhanlee/1st-solution-reproducing-1-unet-resnet34-se\">https://www.kaggle.com/youhanlee/1st-solution-reproducing-1-unet-resnet34-se</a>. (using qubvel's library)</p>\n\n<p>There are some choices.\n(1) using pretrained weight or just using architecture without pretrained weights.\nI tried both, but it didn't work.</p>\n\n<p>(2)  loss function\ndice_loss, focal_loss</p>\n\n<p>I referred some kernels. and used below loss function.</p>\n\n<p>from keras.losses import binary_crossentropy\nfrom keras import backend as K</p>\n\n<pre><code>    def dice_coef(y_true, y_pred):\n        y_true_f = K.flatten(y_true)\n        y_pred = K.cast(y_pred, 'float32')\n        y_pred_f = K.cast(K.greater(K.flatten(y_pred), 0.5), 'float32')\n        intersection = y_true_f * y_pred_f\n        score = 2. * K.sum(intersection) / (K.sum(y_true_f) + K.sum(y_pred_f))\n        return score\n\n    def dice_loss(y_true, y_pred):\n        smooth = 1.\n        y_true_f = K.flatten(y_true)\n        y_pred_f = K.flatten(y_pred)\n        intersection = y_true_f * y_pred_f\n        score = (2. * K.sum(intersection) + smooth) / (K.sum(y_true_f) + K.sum(y_pred_f) + smooth)\n        return 1. - score\n\n    def bce_dice_loss(y_true, y_pred):\n        return binary_crossentropy(y_true, y_pred) + dice_loss(y_true, y_pred)\n</code></pre>\n\n<p>(3) Number of epochs.\nI learned unet+resnet34 with ~300 epochs. Is it not enough? </p>\n\n<p>(4) augmentation\nI used keras imageDataAugmentation.</p>\n\n<pre><code>dg_args = dict(featurewise_center = False,\n                  samplewise_center = False,\n                  rotation_range = 20,\n                  width_shift_range = 0.2,\n                  height_shift_range = 0.2,\n                  shear_range = 0.02,\n                  zoom_range = [0.8, 1.25],\n                  horizontal_flip = True,\n                  vertical_flip = True,\n                  fill_mode = 'reflect',\n                   data_format = 'channels_last')\n</code></pre>\n\n<p>(5) data selection\nI ignored the non-zero images.</p>\n\n<p>I think my loss function is wrong. \nHow do you, kagglers, think about my process?\nIf you have a time, please give me your advice. Thanks!</p>",
  "messages": [
    {
      "id": "415446",
      "postDate": "11/05/2018 06:13:28",
      "content": "<p>I'm using keras.\nAfter looking some kernels and dicussions, I have thought that unet+resnet34 will work.\nThen, I've tried unet+resnet34 and unet+resnext50, but the score is not good.\nunet+resnet34 gave me a 0.699. unet+resnext50 is not converging.</p>\n\n<p>my code is quiet similar with this my kernel. <a href=\"https://www.kaggle.com/youhanlee/1st-solution-reproducing-1-unet-resnet34-se\">https://www.kaggle.com/youhanlee/1st-solution-reproducing-1-unet-resnet34-se</a>. (using qubvel's library)</p>\n\n<p>There are some choices.\n(1) using pretrained weight or just using architecture without pretrained weights.\nI tried both, but it didn't work.</p>\n\n<p>(2)  loss function\ndice_loss, focal_loss</p>\n\n<p>I referred some kernels. and used below loss function.</p>\n\n<p>from keras.losses import binary_crossentropy\nfrom keras import backend as K</p>\n\n<pre><code>    def dice_coef(y_true, y_pred):\n        y_true_f = K.flatten(y_true)\n        y_pred = K.cast(y_pred, 'float32')\n        y_pred_f = K.cast(K.greater(K.flatten(y_pred), 0.5), 'float32')\n        intersection = y_true_f * y_pred_f\n        score = 2. * K.sum(intersection) / (K.sum(y_true_f) + K.sum(y_pred_f))\n        return score\n\n    def dice_loss(y_true, y_pred):\n        smooth = 1.\n        y_true_f = K.flatten(y_true)\n        y_pred_f = K.flatten(y_pred)\n        intersection = y_true_f * y_pred_f\n        score = (2. * K.sum(intersection) + smooth) / (K.sum(y_true_f) + K.sum(y_pred_f) + smooth)\n        return 1. - score\n\n    def bce_dice_loss(y_true, y_pred):\n        return binary_crossentropy(y_true, y_pred) + dice_loss(y_true, y_pred)\n</code></pre>\n\n<p>(3) Number of epochs.\nI learned unet+resnet34 with ~300 epochs. Is it not enough? </p>\n\n<p>(4) augmentation\nI used keras imageDataAugmentation.</p>\n\n<pre><code>dg_args = dict(featurewise_center = False,\n                  samplewise_center = False,\n                  rotation_range = 20,\n                  width_shift_range = 0.2,\n                  height_shift_range = 0.2,\n                  shear_range = 0.02,\n                  zoom_range = [0.8, 1.25],\n                  horizontal_flip = True,\n                  vertical_flip = True,\n                  fill_mode = 'reflect',\n                   data_format = 'channels_last')\n</code></pre>\n\n<p>(5) data selection\nI ignored the non-zero images.</p>\n\n<p>I think my loss function is wrong. \nHow do you, kagglers, think about my process?\nIf you have a time, please give me your advice. Thanks!</p>",
      "rawMarkdown": "I'm using keras.\nAfter looking some kernels and dicussions, I have thought that unet+resnet34 will work.\nThen, I've tried unet+resnet34 and unet+resnext50, but the score is not good.\nunet+resnet34 gave me a 0.699. unet+resnext50 is not converging.\n\nmy code is quiet similar with this my kernel. https://www.kaggle.com/youhanlee/1st-solution-reproducing-1-unet-resnet34-se. (using qubvel's library)\n\nThere are some choices.\n(1) using pretrained weight or just using architecture without pretrained weights.\nI tried both, but it didn't work.\n\n(2)  loss function\ndice_loss, focal_loss\n\n I referred some kernels. and used below loss function.\n\n\n\n\nfrom keras.losses import binary_crossentropy\nfrom keras import backend as K\n    \n        def dice_coef(y_true, y_pred):\n            y_true_f = K.flatten(y_true)\n            y_pred = K.cast(y_pred, 'float32')\n            y_pred_f = K.cast(K.greater(K.flatten(y_pred), 0.5), 'float32')\n            intersection = y_true_f * y_pred_f\n            score = 2. * K.sum(intersection) / (K.sum(y_true_f) + K.sum(y_pred_f))\n            return score\n    \n        def dice_loss(y_true, y_pred):\n            smooth = 1.\n            y_true_f = K.flatten(y_true)\n            y_pred_f = K.flatten(y_pred)\n            intersection = y_true_f * y_pred_f\n            score = (2. * K.sum(intersection) + smooth) / (K.sum(y_true_f) + K.sum(y_pred_f) + smooth)\n            return 1. - score\n    \n        def bce_dice_loss(y_true, y_pred):\n            return binary_crossentropy(y_true, y_pred) + dice_loss(y_true, y_pred)\n\n(3) Number of epochs.\nI learned unet+resnet34 with ~300 epochs. Is it not enough? \n\n\n(4) augmentation\nI used keras imageDataAugmentation.\n\n    dg_args = dict(featurewise_center = False,\n                      samplewise_center = False,\n                      rotation_range = 20,\n                      width_shift_range = 0.2,\n                      height_shift_range = 0.2,\n                      shear_range = 0.02,\n                      zoom_range = [0.8, 1.25],\n                      horizontal_flip = True,\n                      vertical_flip = True,\n                      fill_mode = 'reflect',\n                       data_format = 'channels_last')\n\n\n(5) data selection\nI ignored the non-zero images.\n\n\nI think my loss function is wrong. \nHow do you, kagglers, think about my process?\nIf you have a time, please give me your advice. Thanks!",
      "votes": null
    },
    {
      "id": "415490",
      "postDate": "11/05/2018 08:14:56",
      "content": "<p>For what it’s worth, my 0.741 score is a simple unet-resnet34, ~30 epochs, using a single GPU. I suspect there are many routes to similar scores with this challenge. </p>",
      "rawMarkdown": "For what it’s worth, my 0.741 score is a simple unet-resnet34, ~30 epochs, using a single GPU. I suspect there are many routes to similar scores with this challenge.",
      "votes": null
    },
    {
      "id": "415492",
      "postDate": "11/05/2018 08:19:45",
      "content": "<p>Oh, amazing. I think Deep learning requires quite experience and technique.\nDid you use the pretrained-weight for unet+resnet34? </p>",
      "rawMarkdown": "Oh, amazing. I think Deep learning requires quite experience and technique.\nDid you use the pretrained-weight for unet+resnet34?",
      "votes": null
    },
    {
      "id": "415494",
      "postDate": "11/05/2018 08:21:37",
      "content": "<p>1.) Both should work! Pretrained a little better. I am using the same library.</p>\n\n<p>2.) <code>keras.losses.binary_crossentropy</code> just reduces along the last (<code>axis=-1</code>) axis. So due to broadcasting <code>binary_crossentropy(y_true, y_pred) + dice_loss(y_true, y_pred)</code> will still be a (batch_size, height, width) tensor. You probably want <code>K.mean(binary_crossentropy(y_true, y_pred)) + dice_loss(y_true, y_pred)</code>.</p>\n\n<p>3.) 300 epochs is enough. I get LB 736 with ResNet18 based encoder and 155 epochs.</p>\n\n<p>4.) I never used ImageDataAugmentation. Just make sure the masks get augmented in the same fashion.</p>\n\n<p>5.) Training only on images with ship got me ~705 LB score. You can start by training on ship images. Then predict the non-ship -&gt; add false positives.</p>",
      "rawMarkdown": "1.) Both should work! Pretrained a little better. I am using the same library.\n\n2.) `keras.losses.binary_crossentropy` just reduces along the last (`axis=-1`) axis. So due to broadcasting `binary_crossentropy(y_true, y_pred) + dice_loss(y_true, y_pred)` will still be a (batch_size, height, width) tensor. You probably want `K.mean(binary_crossentropy(y_true, y_pred)) + dice_loss(y_true, y_pred)`.\n\n3.) 300 epochs is enough. I get LB 736 with ResNet18 based encoder and 155 epochs.\n\n4.) I never used ImageDataAugmentation. Just make sure the masks get augmented in the same fashion.\n\n5.) Training only on images with ship got me ~705 LB score. You can start by training on ship images. Then predict the non-ship -&gt; add false positives.",
      "votes": null
    },
    {
      "id": "415513",
      "postDate": "11/05/2018 08:47:55",
      "content": "<p>Thanks for very kind and detailed comments.</p>\n\n<p>I applied your 2nd suggestion and 4th suggestion in my process. I'll talk to you After learning.</p>\n\n<p>Could I ask one more question?\nDid you use both pseudo-labeling and deep-supervision? </p>\n\n<p>I've tried deep-supervision, but didn't work.</p>",
      "rawMarkdown": "Thanks for very kind and detailed comments.\n\nI applied your 2nd suggestion and 4th suggestion in my process. I'll talk to you After learning.\n\nCould I ask one more question?\nDid you use both pseudo-labeling and deep-supervision? \n\nI've tried deep-supervision, but didn't work.",
      "votes": null
    },
    {
      "id": "415521",
      "postDate": "11/05/2018 08:57:38",
      "content": "<p>Not yet. The model is a pretrained ResNet18 + FPN. I will try pseudo-labeling later on.</p>",
      "rawMarkdown": "Not yet. The model is a pretrained ResNet18 + FPN. I will try pseudo-labeling later on.",
      "votes": null
    },
    {
      "id": "415535",
      "postDate": "11/05/2018 09:35:38",
      "content": "<p><a href=\"/robga\">@robga</a>, if I may ask, are you training on 768 pixels or are you using 256 pixels and mosaic techniques for inference?</p>",
      "rawMarkdown": "robga, if I may ask, are you training on 768 pixels or are you using 256 pixels and mosaic techniques for inference?",
      "votes": null
    },
    {
      "id": "415536",
      "postDate": "11/05/2018 09:39:50",
      "content": "<p><a href=\"/seesee\">@seesee</a>, if I may ask, do you train at 768 pixels or 256 crops? What about inference? Direct on 768 pixels or do you use mosaic techniques?</p>",
      "rawMarkdown": "seesee, if I may ask, do you train at 768 pixels or 256 crops? What about inference? Direct on 768 pixels or do you use mosaic techniques?",
      "votes": null
    },
    {
      "id": "415565",
      "postDate": "11/05/2018 10:25:16",
      "content": "<p>I started to train only on unique 256x256 patches. However, I got many FPs. I think this is due to very small cropped boats that the network sees during training. Now, I am training with 384x384 random crops. Bigger crops might be even better. For submission &amp; validation I am using the full 768 images. I just use the mosaic to select the training/validation splits.</p>",
      "rawMarkdown": "I started to train only on unique 256x256 patches. However, I got many FPs. I think this is due to very small cropped boats that the network sees during training. Now, I am training with 384x384 random crops. Bigger crops might be even better. For submission &amp; validation I am using the full 768 images. I just use the mosaic to select the training/validation splits.",
      "votes": null
    },
    {
      "id": "415585",
      "postDate": "11/05/2018 11:05:34",
      "content": "<p>Thanks! I have this weird behavior that if I train on 256 pixels crops and try to infer on 768 pixels I get completely wrong results. So right now I'm training on 768 pixels but it takes ages.. </p>",
      "rawMarkdown": "Thanks! I have this weird behavior that if I train on 256 pixels crops and try to infer on 768 pixels I get completely wrong results. So right now I'm training on 768 pixels but it takes ages..",
      "votes": null
    },
    {
      "id": "415674",
      "postDate": "11/05/2018 13:24:41",
      "content": "<p><a href=\"/arc144\">@arc144</a> You may try training on 256x256 crops (or even smaller) and then train for additional 10-15 epochs on full size. </p>",
      "rawMarkdown": "arc144 You may try training on 256x256 crops (or even smaller) and then train for additional 10-15 epochs on full size.",
      "votes": null
    },
    {
      "id": "415694",
      "postDate": "11/05/2018 14:11:24",
      "content": "<p>Hi~ <a href=\"/robga\">@robga</a> Did consider make a team?\nWe now have 10+ gpu and 0.731 score ~\nsome teammate  are the 5th player in the TGS \nsome experience of us may help you get a better score boost</p>",
      "rawMarkdown": "Hi~ @robga Did consider make a team?\nWe now have 10+ gpu and 0.731 score ~\nsome teammate  are the 5th player in the TGS \nsome experience of us may help you get a better score boost",
      "votes": null
    },
    {
      "id": "415716",
      "postDate": "11/05/2018 14:49:55",
      "content": "<p>@see-- Thanks for the reply! With your precious comments, I'm testing the Unet+Resnet34. Thanks!</p>",
      "rawMarkdown": "see-- Thanks for the reply! With your precious comments, I'm testing the Unet+Resnet34. Thanks!",
      "votes": null
    },
    {
      "id": "420591",
      "postDate": "11/13/2018 21:19:01",
      "content": "<p>@YouHan Lee, can you share the methods that improved ur score up from 0.699</p>",
      "rawMarkdown": "YouHan Lee, can you share the methods that improved ur score up from 0.699",
      "votes": null
    },
    {
      "id": "420593",
      "postDate": "11/13/2018 21:20:04",
      "content": "<p><a href=\"/robga\">@robga</a>, would u mind sharing ur approach (and even better the code) after the competition is over.</p>",
      "rawMarkdown": "robga, would u mind sharing ur approach (and even better the code) after the competition is over.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 415490,
      "author_name": "robga",
      "author_url": "",
      "post_date": "11/05/2018 08:14:56",
      "content": "<p>For what it’s worth, my 0.741 score is a simple unet-resnet34, ~30 epochs, using a single GPU. I suspect there are many routes to similar scores with this challenge. </p>",
      "votes": null,
      "replies": [
        {
          "id": 415492,
          "author_name": "youhanlee",
          "author_url": "",
          "post_date": "11/05/2018 08:19:45",
          "content": "<p>Oh, amazing. I think Deep learning requires quite experience and technique.\nDid you use the pretrained-weight for unet+resnet34? </p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 415535,
          "author_name": "arc144",
          "author_url": "",
          "post_date": "11/05/2018 09:35:38",
          "content": "<p><a href=\"/robga\">@robga</a>, if I may ask, are you training on 768 pixels or are you using 256 pixels and mosaic techniques for inference?</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 415694,
          "author_name": "asd3032801",
          "author_url": "",
          "post_date": "11/05/2018 14:11:24",
          "content": "<p>Hi~ <a href=\"/robga\">@robga</a> Did consider make a team?\nWe now have 10+ gpu and 0.731 score ~\nsome teammate  are the 5th player in the TGS \nsome experience of us may help you get a better score boost</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 420593,
          "author_name": "ravivadapalli",
          "author_url": "",
          "post_date": "11/13/2018 21:20:04",
          "content": "<p><a href=\"/robga\">@robga</a>, would u mind sharing ur approach (and even better the code) after the competition is over.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 415494,
      "author_name": "seesee",
      "author_url": "",
      "post_date": "11/05/2018 08:21:37",
      "content": "<p>1.) Both should work! Pretrained a little better. I am using the same library.</p>\n\n<p>2.) <code>keras.losses.binary_crossentropy</code> just reduces along the last (<code>axis=-1</code>) axis. So due to broadcasting <code>binary_crossentropy(y_true, y_pred) + dice_loss(y_true, y_pred)</code> will still be a (batch_size, height, width) tensor. You probably want <code>K.mean(binary_crossentropy(y_true, y_pred)) + dice_loss(y_true, y_pred)</code>.</p>\n\n<p>3.) 300 epochs is enough. I get LB 736 with ResNet18 based encoder and 155 epochs.</p>\n\n<p>4.) I never used ImageDataAugmentation. Just make sure the masks get augmented in the same fashion.</p>\n\n<p>5.) Training only on images with ship got me ~705 LB score. You can start by training on ship images. Then predict the non-ship -&gt; add false positives.</p>",
      "votes": null,
      "replies": [
        {
          "id": 415513,
          "author_name": "youhanlee",
          "author_url": "",
          "post_date": "11/05/2018 08:47:55",
          "content": "<p>Thanks for very kind and detailed comments.</p>\n\n<p>I applied your 2nd suggestion and 4th suggestion in my process. I'll talk to you After learning.</p>\n\n<p>Could I ask one more question?\nDid you use both pseudo-labeling and deep-supervision? </p>\n\n<p>I've tried deep-supervision, but didn't work.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 415521,
          "author_name": "seesee",
          "author_url": "",
          "post_date": "11/05/2018 08:57:38",
          "content": "<p>Not yet. The model is a pretrained ResNet18 + FPN. I will try pseudo-labeling later on.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 415536,
          "author_name": "arc144",
          "author_url": "",
          "post_date": "11/05/2018 09:39:50",
          "content": "<p><a href=\"/seesee\">@seesee</a>, if I may ask, do you train at 768 pixels or 256 crops? What about inference? Direct on 768 pixels or do you use mosaic techniques?</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 415565,
          "author_name": "seesee",
          "author_url": "",
          "post_date": "11/05/2018 10:25:16",
          "content": "<p>I started to train only on unique 256x256 patches. However, I got many FPs. I think this is due to very small cropped boats that the network sees during training. Now, I am training with 384x384 random crops. Bigger crops might be even better. For submission &amp; validation I am using the full 768 images. I just use the mosaic to select the training/validation splits.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 415585,
          "author_name": "arc144",
          "author_url": "",
          "post_date": "11/05/2018 11:05:34",
          "content": "<p>Thanks! I have this weird behavior that if I train on 256 pixels crops and try to infer on 768 pixels I get completely wrong results. So right now I'm training on 768 pixels but it takes ages.. </p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 415674,
          "author_name": "ddanevskyi",
          "author_url": "",
          "post_date": "11/05/2018 13:24:41",
          "content": "<p><a href=\"/arc144\">@arc144</a> You may try training on 256x256 crops (or even smaller) and then train for additional 10-15 epochs on full size. </p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 415716,
          "author_name": "youhanlee",
          "author_url": "",
          "post_date": "11/05/2018 14:49:55",
          "content": "<p>@see-- Thanks for the reply! With your precious comments, I'm testing the Unet+Resnet34. Thanks!</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 420591,
          "author_name": "ravivadapalli",
          "author_url": "",
          "post_date": "11/13/2018 21:19:01",
          "content": "<p>@YouHan Lee, can you share the methods that improved ur score up from 0.699</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "415446": "I'm using keras.\nAfter looking some kernels and dicussions, I have thought that unet+resnet34 will work.\nThen, I've tried unet+resnet34 and unet+resnext50, but the score is not good.\nunet+resnet34 gave me a 0.699. unet+resnext50 is not converging.\n\nmy code is quiet similar with this my kernel. https://www.kaggle.com/youhanlee/1st-solution-reproducing-1-unet-resnet34-se. (using qubvel's library)\n\nThere are some choices.\n(1) using pretrained weight or just using architecture without pretrained weights.\nI tried both, but it didn't work.\n\n(2)  loss function\ndice_loss, focal_loss\n\n I referred some kernels. and used below loss function.\n\n\n\n\nfrom keras.losses import binary_crossentropy\nfrom keras import backend as K\n    \n        def dice_coef(y_true, y_pred):\n            y_true_f = K.flatten(y_true)\n            y_pred = K.cast(y_pred, 'float32')\n            y_pred_f = K.cast(K.greater(K.flatten(y_pred), 0.5), 'float32')\n            intersection = y_true_f * y_pred_f\n            score = 2. * K.sum(intersection) / (K.sum(y_true_f) + K.sum(y_pred_f))\n            return score\n    \n        def dice_loss(y_true, y_pred):\n            smooth = 1.\n            y_true_f = K.flatten(y_true)\n            y_pred_f = K.flatten(y_pred)\n            intersection = y_true_f * y_pred_f\n            score = (2. * K.sum(intersection) + smooth) / (K.sum(y_true_f) + K.sum(y_pred_f) + smooth)\n            return 1. - score\n    \n        def bce_dice_loss(y_true, y_pred):\n            return binary_crossentropy(y_true, y_pred) + dice_loss(y_true, y_pred)\n\n(3) Number of epochs.\nI learned unet+resnet34 with ~300 epochs. Is it not enough? \n\n\n(4) augmentation\nI used keras imageDataAugmentation.\n\n    dg_args = dict(featurewise_center = False,\n                      samplewise_center = False,\n                      rotation_range = 20,\n                      width_shift_range = 0.2,\n                      height_shift_range = 0.2,\n                      shear_range = 0.02,\n                      zoom_range = [0.8, 1.25],\n                      horizontal_flip = True,\n                      vertical_flip = True,\n                      fill_mode = 'reflect',\n                       data_format = 'channels_last')\n\n\n(5) data selection\nI ignored the non-zero images.\n\n\nI think my loss function is wrong. \nHow do you, kagglers, think about my process?\nIf you have a time, please give me your advice. Thanks!",
    "415490": "For what it’s worth, my 0.741 score is a simple unet-resnet34, ~30 epochs, using a single GPU. I suspect there are many routes to similar scores with this challenge.",
    "415492": "Oh, amazing. I think Deep learning requires quite experience and technique.\nDid you use the pretrained-weight for unet+resnet34?",
    "415494": "1.) Both should work! Pretrained a little better. I am using the same library.\n\n2.) `keras.losses.binary_crossentropy` just reduces along the last (`axis=-1`) axis. So due to broadcasting `binary_crossentropy(y_true, y_pred) + dice_loss(y_true, y_pred)` will still be a (batch_size, height, width) tensor. You probably want `K.mean(binary_crossentropy(y_true, y_pred)) + dice_loss(y_true, y_pred)`.\n\n3.) 300 epochs is enough. I get LB 736 with ResNet18 based encoder and 155 epochs.\n\n4.) I never used ImageDataAugmentation. Just make sure the masks get augmented in the same fashion.\n\n5.) Training only on images with ship got me ~705 LB score. You can start by training on ship images. Then predict the non-ship -&gt; add false positives.",
    "415513": "Thanks for very kind and detailed comments.\n\nI applied your 2nd suggestion and 4th suggestion in my process. I'll talk to you After learning.\n\nCould I ask one more question?\nDid you use both pseudo-labeling and deep-supervision? \n\nI've tried deep-supervision, but didn't work.",
    "415521": "Not yet. The model is a pretrained ResNet18 + FPN. I will try pseudo-labeling later on.",
    "415535": "robga, if I may ask, are you training on 768 pixels or are you using 256 pixels and mosaic techniques for inference?",
    "415536": "seesee, if I may ask, do you train at 768 pixels or 256 crops? What about inference? Direct on 768 pixels or do you use mosaic techniques?",
    "415565": "I started to train only on unique 256x256 patches. However, I got many FPs. I think this is due to very small cropped boats that the network sees during training. Now, I am training with 384x384 random crops. Bigger crops might be even better. For submission &amp; validation I am using the full 768 images. I just use the mosaic to select the training/validation splits.",
    "415585": "Thanks! I have this weird behavior that if I train on 256 pixels crops and try to infer on 768 pixels I get completely wrong results. So right now I'm training on 768 pixels but it takes ages..",
    "415674": "arc144 You may try training on 256x256 crops (or even smaller) and then train for additional 10-15 epochs on full size.",
    "415694": "Hi~ @robga Did consider make a team?\nWe now have 10+ gpu and 0.731 score ~\nsome teammate  are the 5th player in the TGS \nsome experience of us may help you get a better score boost",
    "415716": "see-- Thanks for the reply! With your precious comments, I'm testing the Unet+Resnet34. Thanks!",
    "420591": "YouHan Lee, can you share the methods that improved ur score up from 0.699",
    "420593": "robga, would u mind sharing ur approach (and even better the code) after the competition is over."
  },
  "source": "meta"
}