{
  "id": 81974,
  "title": "Image size?",
  "url": "/competitions/humpback-whale-identification/discussion/81974",
  "author_name": "",
  "post_date": "2019-02-26T14:30:15.467251900Z",
  "votes": 2,
  "comment_count": 6,
  "views": 0,
  "content": "<p>What image size do you use? \nI am doing progressive resizing, and observe LB score decrease (~0.007) while moving from 512x512 to 768x768. Any ideas on it?</p>",
  "messages": [
    {
      "id": "478723",
      "postDate": "02/26/2019 14:30:15",
      "content": "<p>What image size do you use? \nI am doing progressive resizing, and observe LB score decrease (~0.007) while moving from 512x512 to 768x768. Any ideas on it?</p>",
      "rawMarkdown": "What image size do you use? \nI am doing progressive resizing, and observe LB score decrease (~0.007) while moving from 512x512 to 768x768. Any ideas on it?",
      "votes": null
    },
    {
      "id": "478734",
      "postDate": "02/26/2019 14:49:17",
      "content": "<p>From what I see, most of the kernels out there for this competition are using a 512x512 image size, one link <a href=\"https://www.kaggle.com/seesee/siamese-pretrained-0-822\">here</a> to Martin Piotte's Siamese NN script and <a href=\"https://www.kaggle.com/iafoss/similarity-densenet121-0-805lb-kernel-time-limit\">here</a> with <a href=\"https://www.kaggle.com/iafoss\">Iafoss</a>'s DenseNet. Particularly in Iafoss's, the <a href=\"https://www.kaggle.com/iafoss/similarity-densenet121-0-805lb-kernel-time-limit/comments\">comments section</a> of the kernel has a few posts related specifically to your question.   </p>\n\n<p>Unfortunately, Kaggle's permalink system seems to be somewhat broken (it'll scroll you to some random spot in the page) but I'll try to highlight some helpful ones nonetheless:    </p>\n\n<ul>\n<li><a href=\"https://www.kaggle.com/iafoss/similarity-densenet121-0-805lb-kernel-time-limit/comments#472923\">Comment 1</a> from <a href=\"https://www.kaggle.com/affjljoo3581\">Jungwoo Park</a>: \"In my case, my resnet50 scored about 0.84 LB with 512x256 images while public LB with 256x128 was about 0.76. I think 224 image size is not big enough to catch the whole difference of whales.\" response from Iafoss: \"<a href=\"/affjljoo3581\">@affjljoo3581</a>, I think the that if you use too small images the score drops a lot since there are many tiny, several pixels, features that really help a lot to distinguish whales. However, when you approach ~384x384 or higher, the score stops increasing much because, I think, the limiting factor in this case is sampling of images during training. I would expect about ~0.02 boost when you go from 224 to 512. In <a href=\"https://www.kaggle.com/c/humpback-whale-identification/discussion/79086#472913\">this discussion</a>, @syoya has reported 0.83 for 512x512 resolution. Probably, the best image size for training is ~384x384, since you still can fit quite large batches into GPU RAM and have many pixel size details.\"    </li>\n<li><a href=\"https://www.kaggle.com/iafoss/similarity-densenet121-0-805lb-kernel-time-limit/comments#465173\">Comment 2</a> from <a href=\"https://www.kaggle.com/msmelguizo\">Maria Wellen</a>'s comment: \"I got 0.786 by doing this same kernel and then continuing the training with image size 384 and bs = 10. I optimized the dcut thresholds and I didn't use dropout. Training on size 512 as we speak. Will report later.\"  </li>\n</ul>\n\n<p>There are many more but I won't post an exhaustive list here. If you go to <a href=\"https://www.kaggle.com/iafoss/similarity-densenet121-0-805lb-kernel-time-limit/comments\">Iafoss's kernel's comment section</a> and CTRL-F for \"512\" or \"size\" you should find a number of relevant entries. </p>\n\n<p>Hope you found this helpful!</p>",
      "rawMarkdown": "From what I see, most of the kernels out there for this competition are using a 512x512 image size, one link [here](https://www.kaggle.com/seesee/siamese-pretrained-0-822) to Martin Piotte's Siamese NN script and [here](https://www.kaggle.com/iafoss/similarity-densenet121-0-805lb-kernel-time-limit) with [Iafoss](https://www.kaggle.com/iafoss)'s DenseNet. Particularly in Iafoss's, the [comments section](https://www.kaggle.com/iafoss/similarity-densenet121-0-805lb-kernel-time-limit/comments) of the kernel has a few posts related specifically to your question.   \n\nUnfortunately, Kaggle's permalink system seems to be somewhat broken (it'll scroll you to some random spot in the page) but I'll try to highlight some helpful ones nonetheless:    \n\n* [Comment 1](https://www.kaggle.com/iafoss/similarity-densenet121-0-805lb-kernel-time-limit/comments#472923) from [Jungwoo Park](https://www.kaggle.com/affjljoo3581): \"In my case, my resnet50 scored about 0.84 LB with 512x256 images while public LB with 256x128 was about 0.76. I think 224 image size is not big enough to catch the whole difference of whales.\" response from Iafoss: \"@affjljoo3581, I think the that if you use too small images the score drops a lot since there are many tiny, several pixels, features that really help a lot to distinguish whales. However, when you approach ~384x384 or higher, the score stops increasing much because, I think, the limiting factor in this case is sampling of images during training. I would expect about ~0.02 boost when you go from 224 to 512. In [this discussion](https://www.kaggle.com/c/humpback-whale-identification/discussion/79086#472913), @syoya has reported 0.83 for 512x512 resolution. Probably, the best image size for training is ~384x384, since you still can fit quite large batches into GPU RAM and have many pixel size details.\"    \n* [Comment 2](https://www.kaggle.com/iafoss/similarity-densenet121-0-805lb-kernel-time-limit/comments#465173) from [Maria Wellen](https://www.kaggle.com/msmelguizo)'s comment: \"I got 0.786 by doing this same kernel and then continuing the training with image size 384 and bs = 10. I optimized the dcut thresholds and I didn't use dropout. Training on size 512 as we speak. Will report later.\"  \n\nThere are many more but I won't post an exhaustive list here. If you go to [Iafoss's kernel's comment section](https://www.kaggle.com/iafoss/similarity-densenet121-0-805lb-kernel-time-limit/comments) and CTRL-F for \"512\" or \"size\" you should find a number of relevant entries. \n\nHope you found this helpful!",
      "votes": null
    },
    {
      "id": "478770",
      "postDate": "02/26/2019 16:00:18",
      "content": "<p>In my opinion, as long as it can handle with minimum batch size=32. Otherwise, you can address it via gradient accumulation. </p>",
      "rawMarkdown": "In my opinion, as long as it can handle with minimum batch size=32. Otherwise, you can address it via gradient accumulation.",
      "votes": null
    },
    {
      "id": "478872",
      "postDate": "02/26/2019 18:22:25",
      "content": "<p>512x192</p>",
      "rawMarkdown": "512x192",
      "votes": null
    },
    {
      "id": "478888",
      "postDate": "02/26/2019 18:45:11",
      "content": "<p>No difference if &gt; 384x384 for me</p>",
      "rawMarkdown": "No difference if &gt; 384x384 for me",
      "votes": null
    },
    {
      "id": "478992",
      "postDate": "02/26/2019 22:23:10",
      "content": "<p>I think your models are still under-fitting. For our models it doesn't really make a difference.</p>",
      "rawMarkdown": "I think your models are still under-fitting. For our models it doesn't really make a difference.",
      "votes": null
    },
    {
      "id": "479579",
      "postDate": "02/27/2019 08:55:44",
      "content": "<p>check my comment at:\n<a href=\"https://www.kaggle.com/c/humpback-whale-identification/discussion/81085\">https://www.kaggle.com/c/humpback-whale-identification/discussion/81085</a></p>\n\n<ul>\n<li>LB 0.80 for resnet18 using 224 input. (threshold at 30% new-whale)</li>\n<li>LB 0.85 for resnet18 using 384 input. (threshold at 30% new-whale)</li>\n<li>LB 0.88 for resnet18 using 640 input. (threshold at 30% new-whale) </li>\n<li>LB  0.91 for resnet18 using 800 input.  (threshold at 30% new-whale)  </li>\n</ul>",
      "rawMarkdown": "check my comment at:\nhttps://www.kaggle.com/c/humpback-whale-identification/discussion/81085\n\n - LB 0.80 for resnet18 using 224 input. (threshold at 30% new-whale)\n - LB 0.85 for resnet18 using 384 input. (threshold at 30% new-whale)\n - LB 0.88 for resnet18 using 640 input. (threshold at 30% new-whale) \n - LB  0.91 for resnet18 using 800 input.  (threshold at 30% new-whale)",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 478734,
      "author_name": "alecthekulak",
      "author_url": "",
      "post_date": "02/26/2019 14:49:17",
      "content": "<p>From what I see, most of the kernels out there for this competition are using a 512x512 image size, one link <a href=\"https://www.kaggle.com/seesee/siamese-pretrained-0-822\">here</a> to Martin Piotte's Siamese NN script and <a href=\"https://www.kaggle.com/iafoss/similarity-densenet121-0-805lb-kernel-time-limit\">here</a> with <a href=\"https://www.kaggle.com/iafoss\">Iafoss</a>'s DenseNet. Particularly in Iafoss's, the <a href=\"https://www.kaggle.com/iafoss/similarity-densenet121-0-805lb-kernel-time-limit/comments\">comments section</a> of the kernel has a few posts related specifically to your question.   </p>\n\n<p>Unfortunately, Kaggle's permalink system seems to be somewhat broken (it'll scroll you to some random spot in the page) but I'll try to highlight some helpful ones nonetheless:    </p>\n\n<ul>\n<li><a href=\"https://www.kaggle.com/iafoss/similarity-densenet121-0-805lb-kernel-time-limit/comments#472923\">Comment 1</a> from <a href=\"https://www.kaggle.com/affjljoo3581\">Jungwoo Park</a>: \"In my case, my resnet50 scored about 0.84 LB with 512x256 images while public LB with 256x128 was about 0.76. I think 224 image size is not big enough to catch the whole difference of whales.\" response from Iafoss: \"<a href=\"/affjljoo3581\">@affjljoo3581</a>, I think the that if you use too small images the score drops a lot since there are many tiny, several pixels, features that really help a lot to distinguish whales. However, when you approach ~384x384 or higher, the score stops increasing much because, I think, the limiting factor in this case is sampling of images during training. I would expect about ~0.02 boost when you go from 224 to 512. In <a href=\"https://www.kaggle.com/c/humpback-whale-identification/discussion/79086#472913\">this discussion</a>, @syoya has reported 0.83 for 512x512 resolution. Probably, the best image size for training is ~384x384, since you still can fit quite large batches into GPU RAM and have many pixel size details.\"    </li>\n<li><a href=\"https://www.kaggle.com/iafoss/similarity-densenet121-0-805lb-kernel-time-limit/comments#465173\">Comment 2</a> from <a href=\"https://www.kaggle.com/msmelguizo\">Maria Wellen</a>'s comment: \"I got 0.786 by doing this same kernel and then continuing the training with image size 384 and bs = 10. I optimized the dcut thresholds and I didn't use dropout. Training on size 512 as we speak. Will report later.\"  </li>\n</ul>\n\n<p>There are many more but I won't post an exhaustive list here. If you go to <a href=\"https://www.kaggle.com/iafoss/similarity-densenet121-0-805lb-kernel-time-limit/comments\">Iafoss's kernel's comment section</a> and CTRL-F for \"512\" or \"size\" you should find a number of relevant entries. </p>\n\n<p>Hope you found this helpful!</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 478770,
      "author_name": "",
      "author_url": "",
      "post_date": "02/26/2019 16:00:18",
      "content": "<p>In my opinion, as long as it can handle with minimum batch size=32. Otherwise, you can address it via gradient accumulation. </p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 478872,
      "author_name": "pinullmezon",
      "author_url": "",
      "post_date": "02/26/2019 18:22:25",
      "content": "<p>512x192</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 478888,
      "author_name": "oldufo",
      "author_url": "",
      "post_date": "02/26/2019 18:45:11",
      "content": "<p>No difference if &gt; 384x384 for me</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 478992,
      "author_name": "alexanderliao",
      "author_url": "",
      "post_date": "02/26/2019 22:23:10",
      "content": "<p>I think your models are still under-fitting. For our models it doesn't really make a difference.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 479579,
      "author_name": "hengck23",
      "author_url": "",
      "post_date": "02/27/2019 08:55:44",
      "content": "<p>check my comment at:\n<a href=\"https://www.kaggle.com/c/humpback-whale-identification/discussion/81085\">https://www.kaggle.com/c/humpback-whale-identification/discussion/81085</a></p>\n\n<ul>\n<li>LB 0.80 for resnet18 using 224 input. (threshold at 30% new-whale)</li>\n<li>LB 0.85 for resnet18 using 384 input. (threshold at 30% new-whale)</li>\n<li>LB 0.88 for resnet18 using 640 input. (threshold at 30% new-whale) </li>\n<li>LB  0.91 for resnet18 using 800 input.  (threshold at 30% new-whale)  </li>\n</ul>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "478723": "What image size do you use? \nI am doing progressive resizing, and observe LB score decrease (~0.007) while moving from 512x512 to 768x768. Any ideas on it?",
    "478734": "From what I see, most of the kernels out there for this competition are using a 512x512 image size, one link [here](https://www.kaggle.com/seesee/siamese-pretrained-0-822) to Martin Piotte's Siamese NN script and [here](https://www.kaggle.com/iafoss/similarity-densenet121-0-805lb-kernel-time-limit) with [Iafoss](https://www.kaggle.com/iafoss)'s DenseNet. Particularly in Iafoss's, the [comments section](https://www.kaggle.com/iafoss/similarity-densenet121-0-805lb-kernel-time-limit/comments) of the kernel has a few posts related specifically to your question.   \n\nUnfortunately, Kaggle's permalink system seems to be somewhat broken (it'll scroll you to some random spot in the page) but I'll try to highlight some helpful ones nonetheless:    \n\n* [Comment 1](https://www.kaggle.com/iafoss/similarity-densenet121-0-805lb-kernel-time-limit/comments#472923) from [Jungwoo Park](https://www.kaggle.com/affjljoo3581): \"In my case, my resnet50 scored about 0.84 LB with 512x256 images while public LB with 256x128 was about 0.76. I think 224 image size is not big enough to catch the whole difference of whales.\" response from Iafoss: \"@affjljoo3581, I think the that if you use too small images the score drops a lot since there are many tiny, several pixels, features that really help a lot to distinguish whales. However, when you approach ~384x384 or higher, the score stops increasing much because, I think, the limiting factor in this case is sampling of images during training. I would expect about ~0.02 boost when you go from 224 to 512. In [this discussion](https://www.kaggle.com/c/humpback-whale-identification/discussion/79086#472913), @syoya has reported 0.83 for 512x512 resolution. Probably, the best image size for training is ~384x384, since you still can fit quite large batches into GPU RAM and have many pixel size details.\"    \n* [Comment 2](https://www.kaggle.com/iafoss/similarity-densenet121-0-805lb-kernel-time-limit/comments#465173) from [Maria Wellen](https://www.kaggle.com/msmelguizo)'s comment: \"I got 0.786 by doing this same kernel and then continuing the training with image size 384 and bs = 10. I optimized the dcut thresholds and I didn't use dropout. Training on size 512 as we speak. Will report later.\"  \n\nThere are many more but I won't post an exhaustive list here. If you go to [Iafoss's kernel's comment section](https://www.kaggle.com/iafoss/similarity-densenet121-0-805lb-kernel-time-limit/comments) and CTRL-F for \"512\" or \"size\" you should find a number of relevant entries. \n\nHope you found this helpful!",
    "478770": "In my opinion, as long as it can handle with minimum batch size=32. Otherwise, you can address it via gradient accumulation.",
    "478872": "512x192",
    "478888": "No difference if &gt; 384x384 for me",
    "478992": "I think your models are still under-fitting. For our models it doesn't really make a difference.",
    "479579": "check my comment at:\nhttps://www.kaggle.com/c/humpback-whale-identification/discussion/81085\n\n - LB 0.80 for resnet18 using 224 input. (threshold at 30% new-whale)\n - LB 0.85 for resnet18 using 384 input. (threshold at 30% new-whale)\n - LB 0.88 for resnet18 using 640 input. (threshold at 30% new-whale) \n - LB  0.91 for resnet18 using 800 input.  (threshold at 30% new-whale)"
  },
  "source": "meta"
}