{
  "id": 217492,
  "title": "What shapes of square images are you resizing to?",
  "url": "/competitions/cassava-leaf-disease-classification/discussion/217492",
  "author_name": "",
  "post_date": "2021-02-07T01:57:02.955792400Z",
  "votes": 2,
  "comment_count": 8,
  "views": 0,
  "content": "<p>When we use pretrained models, the parameters generally require us to resize the input images to square shapes.<br>\nDespite the situation which you are testing your stuff(in that case you resize the images to small shapes). What image shapes do you choose to resize in this competition(in the best way)? Why are you resizing to that shape?<br>\nSince it's (600, 800, 3), will resizing to (600, 600, 3) always be better than resizing to (512, 512, 3)? How about (800, 800, 3)?</p>",
  "messages": [
    {
      "id": "1189400",
      "postDate": "02/07/2021 01:57:02",
      "content": "<p>When we use pretrained models, the parameters generally require us to resize the input images to square shapes.<br>\nDespite the situation which you are testing your stuff(in that case you resize the images to small shapes). What image shapes do you choose to resize in this competition(in the best way)? Why are you resizing to that shape?<br>\nSince it's (600, 800, 3), will resizing to (600, 600, 3) always be better than resizing to (512, 512, 3)? How about (800, 800, 3)?</p>",
      "rawMarkdown": "When we use pretrained models, the parameters generally require us to resize the input images to square shapes.\nDespite the situation which you are testing your stuff(in that case you resize the images to small shapes). What image shapes do you choose to resize in this competition(in the best way)? Why are you resizing to that shape?\nSince it's (600, 800, 3), will resizing to (600, 600, 3) always be better than resizing to (512, 512, 3)? How about (800, 800, 3)?",
      "votes": null
    },
    {
      "id": "1191718",
      "postDate": "02/08/2021 16:16:15",
      "content": "<p>I share some ideas about image size <a href=\"https://www.kaggle.com/c/siim-isic-melanoma-classification/discussion/160147\" target=\"_blank\">here</a></p>",
      "rawMarkdown": "I share some ideas about image size [here][1]\n\n[1]: https://www.kaggle.com/c/siim-isic-melanoma-classification/discussion/160147",
      "votes": null
    },
    {
      "id": "1191728",
      "postDate": "02/08/2021 16:23:44",
      "content": "<p>So far, going beyond <code>512x512</code> did not help me to improve the performance.</p>",
      "rawMarkdown": "So far, going beyond `512x512` did not help me to improve the performance.",
      "votes": null
    },
    {
      "id": "1191862",
      "postDate": "02/08/2021 18:19:41",
      "content": "<p>Agree, same here.</p>",
      "rawMarkdown": "Agree, same here.",
      "votes": null
    },
    {
      "id": "1192102",
      "postDate": "02/09/2021 00:04:12",
      "content": "<p><a href=\"https://www.kaggle.com/cdeotte\" target=\"_blank\">@cdeotte</a> thank you. </p>\n<p>May i ask, what is the general rule of transforming your test/validate set? Should it be resized or centercropped? From my understanding, it should be as original as possible.</p>\n<p>There are pros and cons between both. Centercrop you lose the information on the side but you do not distort the pixels. On the other hand, resize you scale the pixels and it may loose the information as you described. </p>\n<p>However, I did an experiment to check. centercrop and resize gave me different results and centercrop was always higher. I checked many notebooks and some people used centercrop, while some used resize.</p>",
      "rawMarkdown": "cdeotte thank you. \n\nMay i ask, what is the general rule of transforming your test/validate set? Should it be resized or centercropped? From my understanding, it should be as original as possible.\n\nThere are pros and cons between both. Centercrop you lose the information on the side but you do not distort the pixels. On the other hand, resize you scale the pixels and it may loose the information as you described. \n\nHowever, I did an experiment to check. centercrop and resize gave me different results and centercrop was always higher. I checked many notebooks and some people used centercrop, while some used resize.",
      "votes": null
    },
    {
      "id": "1192615",
      "postDate": "02/09/2021 08:07:23",
      "content": "<p>Good stuff, clear interpretation. And Thanks !<br>\nSo the conclusion is resizing the images as large as possible may not ends up getting best performance. Instead, we should try many sizes to test the performances and ensemble the best of them.</p>",
      "rawMarkdown": "Good stuff, clear interpretation. And Thanks !\nSo the conclusion is resizing the images as large as possible may not ends up getting best performance. Instead, we should try many sizes to test the performances and ensemble the best of them.",
      "votes": null
    },
    {
      "id": "1193796",
      "postDate": "02/09/2021 21:28:19",
      "content": "<p>Hi <a href=\"https://www.kaggle.com/cdeotte\" target=\"_blank\">@cdeotte</a> </p>\n<p>On the behalf of your reference post, what do you think about finetuning not only to the additional layers for the task but to the whole network. Do you think that the CNN filters can adapt to new data (e.g. finding circles which has diameter != 50 in your example)</p>\n<p>This is probably an experimental question and depends totally on the problem, I wonder your thougts if possible. Thanks!</p>",
      "rawMarkdown": "Hi @cdeotte \n\nOn the behalf of your reference post, what do you think about finetuning not only to the additional layers for the task but to the whole network. Do you think that the CNN filters can adapt to new data (e.g. finding circles which has diameter != 50 in your example)\n\nThis is probably an experimental question and depends totally on the problem, I wonder your thougts if possible. Thanks!",
      "votes": null
    },
    {
      "id": "1198218",
      "postDate": "02/12/2021 19:50:44",
      "content": "<p>512 worked best for me. Moreover 600 or more becomes computationally very expensive.</p>",
      "rawMarkdown": "512 worked best for me. Moreover 600 or more becomes computationally very expensive.",
      "votes": null
    },
    {
      "id": "1198913",
      "postDate": "02/13/2021 11:44:27",
      "content": "<p>Thanks. Computational expense is a thing.</p>",
      "rawMarkdown": "Thanks. Computational expense is a thing.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1191718,
      "author_name": "cdeotte",
      "author_url": "",
      "post_date": "02/08/2021 16:16:15",
      "content": "<p>I share some ideas about image size <a href=\"https://www.kaggle.com/c/siim-isic-melanoma-classification/discussion/160147\" target=\"_blank\">here</a></p>",
      "votes": null,
      "replies": [
        {
          "id": 1192102,
          "author_name": "tom88jerry",
          "author_url": "",
          "post_date": "02/09/2021 00:04:12",
          "content": "<p><a href=\"https://www.kaggle.com/cdeotte\" target=\"_blank\">@cdeotte</a> thank you. </p>\n<p>May i ask, what is the general rule of transforming your test/validate set? Should it be resized or centercropped? From my understanding, it should be as original as possible.</p>\n<p>There are pros and cons between both. Centercrop you lose the information on the side but you do not distort the pixels. On the other hand, resize you scale the pixels and it may loose the information as you described. </p>\n<p>However, I did an experiment to check. centercrop and resize gave me different results and centercrop was always higher. I checked many notebooks and some people used centercrop, while some used resize.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1192615,
          "author_name": "cathesilta",
          "author_url": "",
          "post_date": "02/09/2021 08:07:23",
          "content": "<p>Good stuff, clear interpretation. And Thanks !<br>\nSo the conclusion is resizing the images as large as possible may not ends up getting best performance. Instead, we should try many sizes to test the performances and ensemble the best of them.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1193796,
          "author_name": "snnclsr",
          "author_url": "",
          "post_date": "02/09/2021 21:28:19",
          "content": "<p>Hi <a href=\"https://www.kaggle.com/cdeotte\" target=\"_blank\">@cdeotte</a> </p>\n<p>On the behalf of your reference post, what do you think about finetuning not only to the additional layers for the task but to the whole network. Do you think that the CNN filters can adapt to new data (e.g. finding circles which has diameter != 50 in your example)</p>\n<p>This is probably an experimental question and depends totally on the problem, I wonder your thougts if possible. Thanks!</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1191728,
      "author_name": "kozodoi",
      "author_url": "",
      "post_date": "02/08/2021 16:23:44",
      "content": "<p>So far, going beyond <code>512x512</code> did not help me to improve the performance.</p>",
      "votes": null,
      "replies": [
        {
          "id": 1191862,
          "author_name": "aliabdin1",
          "author_url": "",
          "post_date": "02/08/2021 18:19:41",
          "content": "<p>Agree, same here.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1198218,
      "author_name": "vickygoyal",
      "author_url": "",
      "post_date": "02/12/2021 19:50:44",
      "content": "<p>512 worked best for me. Moreover 600 or more becomes computationally very expensive.</p>",
      "votes": null,
      "replies": [
        {
          "id": 1198913,
          "author_name": "cathesilta",
          "author_url": "",
          "post_date": "02/13/2021 11:44:27",
          "content": "<p>Thanks. Computational expense is a thing.</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1189400": "When we use pretrained models, the parameters generally require us to resize the input images to square shapes.\nDespite the situation which you are testing your stuff(in that case you resize the images to small shapes). What image shapes do you choose to resize in this competition(in the best way)? Why are you resizing to that shape?\nSince it's (600, 800, 3), will resizing to (600, 600, 3) always be better than resizing to (512, 512, 3)? How about (800, 800, 3)?",
    "1191718": "I share some ideas about image size [here][1]\n\n[1]: https://www.kaggle.com/c/siim-isic-melanoma-classification/discussion/160147",
    "1191728": "So far, going beyond `512x512` did not help me to improve the performance.",
    "1191862": "Agree, same here.",
    "1192102": "cdeotte thank you. \n\nMay i ask, what is the general rule of transforming your test/validate set? Should it be resized or centercropped? From my understanding, it should be as original as possible.\n\nThere are pros and cons between both. Centercrop you lose the information on the side but you do not distort the pixels. On the other hand, resize you scale the pixels and it may loose the information as you described. \n\nHowever, I did an experiment to check. centercrop and resize gave me different results and centercrop was always higher. I checked many notebooks and some people used centercrop, while some used resize.",
    "1192615": "Good stuff, clear interpretation. And Thanks !\nSo the conclusion is resizing the images as large as possible may not ends up getting best performance. Instead, we should try many sizes to test the performances and ensemble the best of them.",
    "1193796": "Hi @cdeotte \n\nOn the behalf of your reference post, what do you think about finetuning not only to the additional layers for the task but to the whole network. Do you think that the CNN filters can adapt to new data (e.g. finding circles which has diameter != 50 in your example)\n\nThis is probably an experimental question and depends totally on the problem, I wonder your thougts if possible. Thanks!",
    "1198218": "512 worked best for me. Moreover 600 or more becomes computationally very expensive.",
    "1198913": "Thanks. Computational expense is a thing."
  },
  "source": "meta"
}