{
  "id": 334813,
  "title": "confused in image shape",
  "url": "/competitions/hubmap-organ-segmentation/discussion/334813",
  "author_name": "",
  "post_date": "2022-07-03T09:15:01.487822100Z",
  "votes": 5,
  "comment_count": 9,
  "views": 0,
  "content": "<p>does shape matters when we convert mask2rle  for example</p>\n<p>1. if shape of  mask is (256,256),(height,width) </p>\n<p>2. if shape of mask is (500, 500)(height,width)</p>\n<p>will rle going to be same </p>\n<p>and how you decide what is shape of your img in output of unet</p>",
  "messages": [
    {
      "id": "1841580",
      "postDate": "07/03/2022 09:15:01",
      "content": "<p>does shape matters when we convert mask2rle  for example</p>\n<p>1. if shape of  mask is (256,256),(height,width) </p>\n<p>2. if shape of mask is (500, 500)(height,width)</p>\n<p>will rle going to be same </p>\n<p>and how you decide what is shape of your img in output of unet</p>",
      "rawMarkdown": "<p>does shape matters when we convert mask2rle  for example</p> \n<p>1. if shape of  mask is (256,256),(height,width) </p> \n<p>2. if shape of mask is (500, 500)(height,width)</p> \n\n<p>will rle going to be same </p> \n\nand how you decide what is shape of your img in output of unet",
      "votes": null
    },
    {
      "id": "1841717",
      "postDate": "07/03/2022 12:18:01",
      "content": "<p>The RLE will not be the same since there is fewer pixels to decode from. See <a href=\"https://www.techiedelight.com/run-length-encoding-rle-data-compression-algorithm/\" target=\"_blank\">small example here</a>.</p>\n<p>Usually, the output of the U-net should be the same as your output. The image goes in, and U-net produces the output mask which you will compare with the target mask for accuracy.</p>\n<p>But the output is not so much important as the input size of the U-net. The higher the image size in the input, the higher the value of neurons required to train the model. Usually the output/input is the order of 2^n values.</p>\n<ul>\n<li>2^8 = 256</li>\n<li>2^9 = 512</li>\n<li>etc…</li>\n</ul>",
      "rawMarkdown": "The RLE will not be the same since there is fewer pixels to decode from. See [small example here](https://www.techiedelight.com/run-length-encoding-rle-data-compression-algorithm/).\n\nUsually, the output of the U-net should be the same as your output. The image goes in, and U-net produces the output mask which you will compare with the target mask for accuracy.\n\nBut the output is not so much important as the input size of the U-net. The higher the image size in the input, the higher the value of neurons required to train the model. Usually the output/input is the order of 2^n values.\n\n- 2^8 = 256\n- 2^9 = 512\n- etc...",
      "votes": null
    },
    {
      "id": "1841802",
      "postDate": "07/03/2022 13:25:17",
      "content": "<p>assume i trained model on img shape(256,256) and created inference which will predict on test data then converted mask2rle but may be they are not exppecting rle wrt shape(256,256)</p>",
      "rawMarkdown": "assume i trained model on img shape(256,256) and created inference which will predict on test data then converted mask2rle but may be they are not exppecting rle wrt shape(256,256)",
      "votes": null
    },
    {
      "id": "1841898",
      "postDate": "07/03/2022 14:39:07",
      "content": "<p>Your question is not in question form, I can't answer a sentence that is a statement.</p>",
      "rawMarkdown": "Your question is not in question form, I can't answer a sentence that is a statement.",
      "votes": null
    },
    {
      "id": "1841900",
      "postDate": "07/03/2022 14:39:41",
      "content": "<p>I don't know what is your question.</p>",
      "rawMarkdown": "I don't know what is your question.",
      "votes": null
    },
    {
      "id": "1841986",
      "postDate": "07/03/2022 15:42:08",
      "content": "<p>my questions is -&gt; is it ok if i trained model on img shape(256,256) and create rle and submit it ?</p>",
      "rawMarkdown": "my questions is -> is it ok if i trained model on img shape(256,256) and create rle and submit it ?",
      "votes": null
    },
    {
      "id": "1842008",
      "postDate": "07/03/2022 16:00:14",
      "content": "<p>Yes it will be ok, input image shape is not that important.</p>",
      "rawMarkdown": "Yes it will be ok, input image shape is not that important.",
      "votes": null
    },
    {
      "id": "1843406",
      "postDate": "07/04/2022 19:25:06",
      "content": "<p>no it is not, rle must be over the original img size</p>",
      "rawMarkdown": "no it is not, rle must be over the original img size",
      "votes": null
    },
    {
      "id": "1844046",
      "postDate": "07/05/2022 10:06:22",
      "content": "<p>Train the model in any image size, take predictions in any image size, the important step is to resize the predicted masks to the shape of raw image, this is given in test.csv as columns 'img_height' and 'img_width', then encode this resized mask as rle and submit.</p>",
      "rawMarkdown": "Train the model in any image size, take predictions in any image size, the important step is to resize the predicted masks to the shape of raw image, this is given in test.csv as columns 'img_height' and 'img_width', then encode this resized mask as rle and submit.",
      "votes": null
    },
    {
      "id": "1845102",
      "postDate": "07/06/2022 04:13:47",
      "content": "<p>Thank you ,i was confused that how if i i  am submitting rle of mask which is shape of 256 will be same. Now i got it </p>",
      "rawMarkdown": "Thank you ,i was confused that how if i i  am submitting rle of mask which is shape of 256 will be same. Now i got it",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1841717,
      "author_name": "urosjarc",
      "author_url": "",
      "post_date": "07/03/2022 12:18:01",
      "content": "<p>The RLE will not be the same since there is fewer pixels to decode from. See <a href=\"https://www.techiedelight.com/run-length-encoding-rle-data-compression-algorithm/\" target=\"_blank\">small example here</a>.</p>\n<p>Usually, the output of the U-net should be the same as your output. The image goes in, and U-net produces the output mask which you will compare with the target mask for accuracy.</p>\n<p>But the output is not so much important as the input size of the U-net. The higher the image size in the input, the higher the value of neurons required to train the model. Usually the output/input is the order of 2^n values.</p>\n<ul>\n<li>2^8 = 256</li>\n<li>2^9 = 512</li>\n<li>etc…</li>\n</ul>",
      "votes": null,
      "replies": [
        {
          "id": 1841802,
          "author_name": "arvinddevarkonda",
          "author_url": "",
          "post_date": "07/03/2022 13:25:17",
          "content": "<p>assume i trained model on img shape(256,256) and created inference which will predict on test data then converted mask2rle but may be they are not exppecting rle wrt shape(256,256)</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1841898,
          "author_name": "urosjarc",
          "author_url": "",
          "post_date": "07/03/2022 14:39:07",
          "content": "<p>Your question is not in question form, I can't answer a sentence that is a statement.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1841900,
          "author_name": "urosjarc",
          "author_url": "",
          "post_date": "07/03/2022 14:39:41",
          "content": "<p>I don't know what is your question.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1841986,
          "author_name": "arvinddevarkonda",
          "author_url": "",
          "post_date": "07/03/2022 15:42:08",
          "content": "<p>my questions is -&gt; is it ok if i trained model on img shape(256,256) and create rle and submit it ?</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1842008,
          "author_name": "urosjarc",
          "author_url": "",
          "post_date": "07/03/2022 16:00:14",
          "content": "<p>Yes it will be ok, input image shape is not that important.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1843406,
          "author_name": "enric1296",
          "author_url": "",
          "post_date": "07/04/2022 19:25:06",
          "content": "<p>no it is not, rle must be over the original img size</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1845102,
          "author_name": "arvinddevarkonda",
          "author_url": "",
          "post_date": "07/06/2022 04:13:47",
          "content": "<p>Thank you ,i was confused that how if i i  am submitting rle of mask which is shape of 256 will be same. Now i got it </p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1844046,
      "author_name": "harshitsheoran",
      "author_url": "",
      "post_date": "07/05/2022 10:06:22",
      "content": "<p>Train the model in any image size, take predictions in any image size, the important step is to resize the predicted masks to the shape of raw image, this is given in test.csv as columns 'img_height' and 'img_width', then encode this resized mask as rle and submit.</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1841580": "<p>does shape matters when we convert mask2rle  for example</p> \n<p>1. if shape of  mask is (256,256),(height,width) </p> \n<p>2. if shape of mask is (500, 500)(height,width)</p> \n\n<p>will rle going to be same </p> \n\nand how you decide what is shape of your img in output of unet",
    "1841717": "The RLE will not be the same since there is fewer pixels to decode from. See [small example here](https://www.techiedelight.com/run-length-encoding-rle-data-compression-algorithm/).\n\nUsually, the output of the U-net should be the same as your output. The image goes in, and U-net produces the output mask which you will compare with the target mask for accuracy.\n\nBut the output is not so much important as the input size of the U-net. The higher the image size in the input, the higher the value of neurons required to train the model. Usually the output/input is the order of 2^n values.\n\n- 2^8 = 256\n- 2^9 = 512\n- etc...",
    "1841802": "assume i trained model on img shape(256,256) and created inference which will predict on test data then converted mask2rle but may be they are not exppecting rle wrt shape(256,256)",
    "1841898": "Your question is not in question form, I can't answer a sentence that is a statement.",
    "1841900": "I don't know what is your question.",
    "1841986": "my questions is -> is it ok if i trained model on img shape(256,256) and create rle and submit it ?",
    "1842008": "Yes it will be ok, input image shape is not that important.",
    "1843406": "no it is not, rle must be over the original img size",
    "1844046": "Train the model in any image size, take predictions in any image size, the important step is to resize the predicted masks to the shape of raw image, this is given in test.csv as columns 'img_height' and 'img_width', then encode this resized mask as rle and submit.",
    "1845102": "Thank you ,i was confused that how if i i  am submitting rle of mask which is shape of 256 will be same. Now i got it"
  },
  "source": "meta"
}