{
  "id": 50801,
  "title": "How to encode the mask?",
  "url": "/competitions/data-science-bowl-2018/discussion/50801",
  "author_name": "",
  "post_date": "2018-03-01T12:01:07.995899400Z",
  "votes": null,
  "comment_count": 2,
  "views": 0,
  "content": "<p>I am an data science newbie. It seems the masks are of uint8 type in [0, 255] range. My understanding is that a segmentation task is like a pixel-wise classification task, hence it should use binary encoding. Does that mean I have to convert the masks with [0, 1] encoding? I am using keras binary_cross entropy loss.</p>\n\n<p>In other words, should I reshape the masks to [Height, Width, num_of_class=2] ?</p>\n\n<p>Thanks!</p>",
  "messages": [
    {
      "id": "289335",
      "postDate": "03/01/2018 12:01:07",
      "content": "<p>I am an data science newbie. It seems the masks are of uint8 type in [0, 255] range. My understanding is that a segmentation task is like a pixel-wise classification task, hence it should use binary encoding. Does that mean I have to convert the masks with [0, 1] encoding? I am using keras binary_cross entropy loss.</p>\n\n<p>In other words, should I reshape the masks to [Height, Width, num_of_class=2] ?</p>\n\n<p>Thanks!</p>",
      "rawMarkdown": "I am an data science newbie. It seems the masks are of uint8 type in [0, 255] range. My understanding is that a segmentation task is like a pixel-wise classification task, hence it should use binary encoding. Does that mean I have to convert the masks with [0, 1] encoding? I am using keras binary_cross entropy loss.\n\nIn other words, should I reshape the masks to [Height, Width, num_of_class=2] ?\n\nThanks!",
      "votes": null
    },
    {
      "id": "291025",
      "postDate": "03/05/2018 13:32:42",
      "content": "<p>You can start using the U-net kernels, it shows end to end approach that can solve lots of your doubts. </p>",
      "rawMarkdown": "You can start using the U-net kernels, it shows end to end approach that can solve lots of your doubts.",
      "votes": null
    },
    {
      "id": "291044",
      "postDate": "03/05/2018 14:10:20",
      "content": "<p><a href=\"https://www.kaggle.com/keegil/keras-u-net-starter-lb-0-277\">https://www.kaggle.com/keegil/keras-u-net-starter-lb-0-277</a></p>",
      "rawMarkdown": "https://www.kaggle.com/keegil/keras-u-net-starter-lb-0-277",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 291025,
      "author_name": "sosssego",
      "author_url": "",
      "post_date": "03/05/2018 13:32:42",
      "content": "<p>You can start using the U-net kernels, it shows end to end approach that can solve lots of your doubts. </p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 291044,
      "author_name": "sosssego",
      "author_url": "",
      "post_date": "03/05/2018 14:10:20",
      "content": "<p><a href=\"https://www.kaggle.com/keegil/keras-u-net-starter-lb-0-277\">https://www.kaggle.com/keegil/keras-u-net-starter-lb-0-277</a></p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "289335": "I am an data science newbie. It seems the masks are of uint8 type in [0, 255] range. My understanding is that a segmentation task is like a pixel-wise classification task, hence it should use binary encoding. Does that mean I have to convert the masks with [0, 1] encoding? I am using keras binary_cross entropy loss.\n\nIn other words, should I reshape the masks to [Height, Width, num_of_class=2] ?\n\nThanks!",
    "291025": "You can start using the U-net kernels, it shows end to end approach that can solve lots of your doubts.",
    "291044": "https://www.kaggle.com/keegil/keras-u-net-starter-lb-0-277"
  },
  "source": "meta"
}