{
  "id": 287758,
  "title": "Different image sizes",
  "url": "/competitions/sartorius-cell-instance-segmentation/discussion/287758",
  "author_name": "IgorMuniz",
  "post_date": "2021-11-15T13:38:15.211000",
  "votes": 8,
  "comment_count": 4,
  "views": 0,
  "content": "<p>Hi folks,</p>\n<p>I have been trying to use different image sizes for training as this competition needs a lot of GPU memory. However, when submitting a model trained with 448x448 images, for example, it got a very lower score.</p>\n<p>520x704 -&gt; 0.282<br>\n448x448 -&gt; 0.216</p>\n<p>I didn't resize the images while predicting, and despite it having a different ratio/size from the original training, I don't think the difference is too large for such a score. </p>\n<p>All the public notebooks seem to be using the original size. Am I missing something here? <br>\nHave someone be able to train with different image sizes, optimize the memory usage and still get a good score?</p>",
  "messages": [
    {
      "id": 1583022,
      "postDate": "2021-11-15T13:38:15.213Z",
      "content": "<p>Hi folks,</p>\n<p>I have been trying to use different image sizes for training as this competition needs a lot of GPU memory. However, when submitting a model trained with 448x448 images, for example, it got a very lower score.</p>\n<p>520x704 -&gt; 0.282<br>\n448x448 -&gt; 0.216</p>\n<p>I didn't resize the images while predicting, and despite it having a different ratio/size from the original training, I don't think the difference is too large for such a score. </p>\n<p>All the public notebooks seem to be using the original size. Am I missing something here? <br>\nHave someone be able to train with different image sizes, optimize the memory usage and still get a good score?</p>",
      "rawMarkdown": "Hi folks,\n\nI have been trying to use different image sizes for training as this competition needs a lot of GPU memory. However, when submitting a model trained with 448x448 images, for example, it got a very lower score.\n\n520x704 -> 0.282\n448x448 -> 0.216\n\nI didn't resize the images while predicting, and despite it having a different ratio/size from the original training, I don't think the difference is too large for such a score. \n\nAll the public notebooks seem to be using the original size. Am I missing something here? \nHave someone be able to train with different image sizes, optimize the memory usage and still get a good score?\n",
      "votes": 8
    },
    {
      "id": 1583264,
      "postDate": "2021-11-15T17:10:08.513Z",
      "content": "<p>My bet for the best strategy would be to use 704x704 by padding the short side with zeros.</p>\n<p>Update: I guess this isn't a good idea based on the downvotes.</p>",
      "rawMarkdown": "My bet for the best strategy would be to use 704x704 by padding the short side with zeros.\n\nUpdate: I guess this isn't a good idea based on the downvotes.",
      "votes": 1,
      "replies": [
        {
          "id": 1584298,
          "postDate": "2021-11-16T12:45:36.253Z",
          "rawMarkdown": "",
          "isDeleted": true
        },
        {
          "id": 1584669,
          "postDate": "2021-11-16T17:15:06.027Z",
          "content": "<p>Thanks for the idea anyway. However, my question was more like if people are getting good scores with different image sizes and if it's needed to do another step in postprocessing when resizing. </p>",
          "rawMarkdown": "Thanks for the idea anyway. However, my question was more like if people are getting good scores with different image sizes and if it's needed to do another step in postprocessing when resizing. "
        },
        {
          "id": 1584726,
          "postDate": "2021-11-16T18:06:18.610Z",
          "content": "<p>In detectron I use the following settings</p>\n<p>MIN_SIZE_TRAIN: (440, 480, 520, 560, 580, 620)<br>\nMIN_SIZE_TEST: 800</p>\n<p>It means during training it resizes the shorter edge to one of the values at random and at inference uses 800</p>",
          "rawMarkdown": "In detectron I use the following settings\n\nMIN_SIZE_TRAIN: (440, 480, 520, 560, 580, 620)\nMIN_SIZE_TEST: 800\n\nIt means during training it resizes the shorter edge to one of the values at random and at inference uses 800",
          "votes": 1
        }
      ]
    }
  ],
  "comments": [
    {
      "id": 1583264,
      "author_name": "Tolga",
      "author_url": "",
      "post_date": "2021-11-15T17:10:08.513000",
      "content": "<p>My bet for the best strategy would be to use 704x704 by padding the short side with zeros.</p>\n<p>Update: I guess this isn't a good idea based on the downvotes.</p>",
      "votes": 1,
      "replies": [
        {
          "id": 1584298,
          "author_name": "",
          "author_url": "",
          "post_date": "2021-11-16T12:45:36.253000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1584669,
          "author_name": "IgorMuniz",
          "author_url": "",
          "post_date": "2021-11-16T17:15:06.027000",
          "content": "<p>Thanks for the idea anyway. However, my question was more like if people are getting good scores with different image sizes and if it's needed to do another step in postprocessing when resizing. </p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1584726,
          "author_name": "Slawek Biel",
          "author_url": "",
          "post_date": "2021-11-16T18:06:18.610000",
          "content": "<p>In detectron I use the following settings</p>\n<p>MIN_SIZE_TRAIN: (440, 480, 520, 560, 580, 620)<br>\nMIN_SIZE_TEST: 800</p>\n<p>It means during training it resizes the shorter edge to one of the values at random and at inference uses 800</p>",
          "votes": 1,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1583022": "Hi folks,\n\nI have been trying to use different image sizes for training as this competition needs a lot of GPU memory. However, when submitting a model trained with 448x448 images, for example, it got a very lower score.\n\n520x704 -> 0.282\n448x448 -> 0.216\n\nI didn't resize the images while predicting, and despite it having a different ratio/size from the original training, I don't think the difference is too large for such a score. \n\nAll the public notebooks seem to be using the original size. Am I missing something here? \nHave someone be able to train with different image sizes, optimize the memory usage and still get a good score?\n",
    "1583264": "My bet for the best strategy would be to use 704x704 by padding the short side with zeros.\n\nUpdate: I guess this isn't a good idea based on the downvotes."
  }
}